Providing REST API Access
This article reviews the next steps for external developers to access Extensiv's open REST API once they are provided with a unique set of REST API keys.
API support
Our general Technical Support team is unable to provide deep technical and within development support on the API when it is beyond credential updates, potential defects, or system/knowledge-related issues. However, we do have an active developer community at https://community.extensiv.com. Troubleshooting questions should go through this community forum, where answers are visible to other developers who might have similar questions.
If this is your first time accessing Extensiv Community, please specify the customer you are working within your membership request.
Direct developer support is only available as part of a Developer Enablement package. If you're interested in learning more about Developer Enablement, please ask your warehouse representative to contact their Customer Success Manager for more information.
Authorization key
When using Extensiv's REST API, authorization in the HTTP header is required to request an access token (reviewed in the next section). To access your authorization key, do the following:
- Navigate to a Base64 encoder tool, such as https://www.base64encode.org/.
- Insert the Client ID value, followed by a colon and the Client Secret value (e.g., ClientID:ClientSecret), into the encoder tool.
- The encoded value is your authorization key. Use this value to request an access token.
Access token
As mentioned above, an access token is required in your HTTP header when accessing 3PL Warehouse Manager’s external REST API. For security purposes, this access token is only valid temporarily—typically between 30 and 60 minutes. It is the best practice and most efficient to refresh your access token programmatically no less than every 30 minutes, as well as refresh the token when it is no longer valid.
Below is an example of the HTTP header and JSON payload for you to gain an access token.
Header
POST https://secure-wms.com/AuthServer/api/Token
Content-Type: application/json; charset=utf-8
Accept: application/json
Host: secure-wms.com
Accept-Language: Content-Length
Accept-Encoding: gzip,deflate,sdch
Authorization: Basic MTg2ZDczZDgtY2FmNy00MzFmLWJkMWEtY2ZmMzIzNDliZjA3OmRPemowandIWE05ZjJUbnFtWVlMOGszWTVyWGkxS1Fa
JSON
{
"grant_type": "client_credentials",
"tpl": "[Provided by warehouse]",
"user_login_id": "[Provided by warehouse]"
}
After submitting a successful call, Extensiv will return a response code of 200. The following JSON is typical of what will be returned:
{
"access_token": "eyJ0eXAi….25lNRk",
"token_type": "Bearer",
"expires_in": 0,
"refresh_token": null,
"scope": null
}
The element, user_login_Id, is provided to you by your warehouse representative and helps provide visibility to which specific connection created a transaction for auditing purposes.
For more information on API authentication to Extensiv, visit our API documentation.
Orders
One of the most common uses of the API is to create and retrieve orders in 3PL Warehouse Manager. For more details on order API calls, see our Orders API documentation.
Inventory
Retrieving inventory is another common usage of the API, and there are several methods for accomplishing this—including retrieving inventory received on and before a particular date, as well as stock summaries. For more details on inventory API calls, see our Inventory API documentation.