In order to work with the 4D Scale APIs, you should create an account. Your account is assigned a unique API key which is used to access the APIs.
You can keep this API key in your integration configuration, or you can choose to use the “log in” flow to acquire the API key when needed.
Similarly, there is an endpoint to fetch information about an account, given an API key.
In addition to standalone accounts, 4D Scale supports existing SellerCloud teams. This allows for a seamless integration with Sellercloud services like Skustack, ShipBridge, Delta, and more.
Creating a new standalone account
Create a standalone account by calling POST /accounts/standalone and providing a request body.
Choose a company name, an email address to use with your account, and a strong password.
A successful call will result in a StandaloneAccount object containing your apiKey
“Logging into” an existing standalone account
You can “log into” an existing standalone account by calling GET /accounts/standalone and providing the respective email and password in the URI query string.
The result will be the exact same StandaloneAccount object returned in the Create standalone account flow.
Using Sellercloud team credentials
If you are an existing SellerCloud team customer, you may choose to use your team credentials.
Call POST /accounts/sellercloud with your team, username, and password provided in the request body.
The 4D Scale API will validate your credentials with SellerCloud, and return a SellerCloudAccount object containing your apiKey
Note that unlike creation of standalone accounts, this endpoint (and the GET /accounts/sellercloud equivalent) can be called any number of times.
If the team has previously been “imported” by another 4D Scale API call, the operation will not fail. Instead, it will return the SellerCloudAccount object created the first time this call succeeded. The apiKey value will not change.
Fetch account details based on API key
You can fetch information about a given 4D Scale account (be it standalone or Sellercloud team) by calling GET /accounts/me and providing the API key. You can learn more about authentication here.
The result will be a SimpleAccount object. Depending on the type of account, it will contain details about either standaloneAccount or sellerCloudAccount – but not both.