Versions Compared
Version | Old Version 34 | New Version Current |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Panel | ||
---|---|---|
| ||
If you are integrating with Extend Commerce through Extend Commerce API we expect you to behave, use and consume the API according to this document. Extend Commerce API are designed for external webshops, POS systems, warehouse management systems, procurement systems and other ERP systems to post or get data to and from Extend Commerce. Some parts of this document are technical descriptions, but the first part, the general code of conduct. contains some business critical parts that are very important that you as business owner / responsible reads and understand. |
In general
Panel |
---|
|
Throttling / Rate limits
Panel | ||
---|---|---|
| ||
Extend Commerce use throttling to secure system resources to all vital processes within Extend Commerce platform. We classify the methods in 3 different rate limits groups, and we use different rate limits for the different groups.
Rate limits can be adjusted by decision from Extend Commerce. It's possible to sign an agreement with Extend Commerce to get other rate limits. When the rate limit has been reached, we will respond with Status code 429, too many request. In the response header there are three extra fields for rate limit information: "x-ratelimit-limit": "300", (300 would be Standard limit) |
Webhook
Panel | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Our webhooks will call on the endpoint that you have added in the Extend Commerce platform. You can use a Secret that we produce for each endpoint to verify that the call comes from Extend Commerce. We strongly advice that you use webhooks as a trigger for you to fetch data from Extend Commerce platform. The Events for webhooks are: Currently these events triggers a post:
More info about webhooks and how to set up, please read here https://confluence.extend.se/x/qYCMAg Webhooks - Manual & Kunskapscenter - Confluence (atlassian.net) |
Get list
Panel | ||
---|---|---|
| ||
Most of our methods comes with this structure:
In the get list there are a lot of parameters to use to find records. The purpose is that you shall use get list to find records, and then use Get single record to get all details about the record. Example, if you shall get all order from one customer, you use the get list, with parameter customer number, then you get a list of orders, use those ID to fetch each orders details. An example of use of this that´s NOT acceptable is if you have 500 orders in your application that you don´t know if they have been shipped or not. you then can´t fetching all 500 orders in details on a tight schedule just to see if the status has changed. |
Best practice on common processes
Panel | ||
---|---|---|
| ||
Sync product masterdata When your system shall use / sync product masterdata from Extend Commerce. Use webhook. Best practice for sync product master data from Extend Commerce to your applications is for you to listen to our webhook. If you act on a webhook event then your application will have as near real time updated product masterdata. We will fire webhook on these events:
In the webhook you'll get the product number and you can use that to call on GET product details to fetch all master data on the product Example URL for detailed product master data https://INSTALLATIONURL/RESTAPI/v1_0/CLIENT/Products?Id=productnumber GET list If you don´t use webhook, use the product get list method. When filtering on date you must use a fully qualified utc format, eg 2019-11-20T22:00:00.00+01:00. That date must be url encoded. Here is an example of a request with a parameter where we want to get a list of all products with change date after 17th of june. https://INSTALLATIONURL/RESTAPI/v1_0/CLIENT/Products?modifiedDateFrom=2019-06-17T00%3A00%3A00.00%2B01%3A00 Sync inventory balances. Use webhook. Best practice for having your application in sync, in realtime, about balances (physical and available) we strongly recommend you to consume the webhook. we have 2 different events:
These events will fire the webhook. Within this webhook we will give you information about the product, the warehouse and the new balance. (see example below) This information is normally enough for you to update your application with new balance. We know that the balances are extremely important that it´s real time balance, and if you consume the data in this webhook, you don´t need to call Extend Commerce to check about any balances. But there is one issue with using the balance within the webhook that you need to consider. If your service is down or not responding, Extend Commerce will store that webhook and try again after a period of time (we try in total 10 times, after that we don´t try again). In a situation where we have not been able to post to your endpoint and we store that message for 5 min before we try again, another webhook might have been send and received by you. In such case the hooks will not be in a correct order, and the balance within the hooks are not correct. So if you want to be 100% secure to avoid this potential error, you should use the hook as a trigger to call us to fetch live balances. Example of o webhook with balances "Id": "67b20e3dd433470786e5ecced223478f", "Attempt": 1, "Properties": { "NotificationId": "7bfd9089-b5d3-48b0-bc04-80e2d2b79d80" }, "Notifications": [ { "Action": "BalanceChanged", "Details": { "ProductNumber": "1138-00", "Warehouse": "WarehouseShortName", "Balance": 201 }}] Get List If you can´t use the hook, then you should use ProductAvailability method. this method will provide you with to get a list of products with changed balances if you can´t consume the webhook, then you should use the ProductAvailability method to get balances. in this method there is a changedate we expect you to use that to only get balances where the balance has changed since you last asked. here is an example of a call to get products with changed balances since. When filtering on date you must use a fully qualified utc format, eg 2019-11-20T22:00:00.00+01:00. That date must be url encoded. https://INSTALLATION URL/RESTAPI/v1_0/CLIENT/ProductAvailability?modifiedDateFrom=2019-05-13T00%3A00%3A00.00%2B01%3A00 "productAvailabilityList": [ "productNumber": "123456798", If you work with a lot of items, this list is normally quite long, contains a lot of records. here it´s important that you can handle pagination. The response is paginated and in the bottom you´ll see this information. (this is an example of where the get list returned 344 records. "paginationInfo": { { Sync Order status. Use webhook Best practice for syncing status on a customer order is to listen to our webhooks. There are these events:
That will fire a webhook telling you that an update has been done on the order. Use the orderid (ordernumber) in the webhook and use the CustomerOrders method to get all details about the order and orderrows. Here is an example of API call to get details about a order. https://INSTALLATION URL/RESTAPI/v1_0/CLIENT/CustomerOrders/?id=ORDER-ID Get List And as for many other methods, if you can´t use the webhook as trigger, use the get list with parameter of change date. this will give you a list of orders that has changed. Sync prices ProductPrices method Best practice for getting prices from Extend Commerce is to call on method ProductPrices. This method requires a customer number as parameter. You will get best available prices for that customer, the list could be a combination of different pricelists, discounts, campaign priceslists etc. You will get only one price per product and quantity. (the best price). If you get several records (prices) for one product it´s either because it´s a bracket pricing, or unit pricing on the product. here is a example of a typical respons form ProductPrice method { { { These three examples gives you an understanding of how you need to understand quantity and units in the price model. In the first example the price is 423 for one piece. In the second example the price is 399 per piece IF the quantity is 6 pieces or more. In the last example the price is 1599 for one box. We expect you NOT to call this to verify prices within your own order/check out process. If you need to validate an order in a checkout process, you should use a price validation method. |
Contents | |
---|---|
|
Include Page | ||||
---|---|---|---|---|
|