Getting Settings
When making API calls, you are often required to provide the correct IDs for configuration entities such as orderTypes. These IDs can be obtained by using the ShopApi v2 GET settings/get method. We recommend caching this data locally and refreshing it daily. The returned settings include the IDs and names of the following entities:
| entity | description |
|---|---|
mainShippingMethods | (required for the shopapi/v3) |
shippingMethods | (deprecated, but still required for shopapi/v2 endpoints) |
orderTypes | |
returnReasons | |
returnShippingMethods | |
languages | |
countries | |
paymentMethods | (obsolete) |
http-request
GET settings/get/ HTTP/1.1
Host: shopapi.activeants.nl
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
Authorization: bearer 2342342342
http-response
{
"messageCode": "OK",
"message": "Settings are ok.",
"result": {
"shippingMethods": [{"id": 1, "name": "Default", "code": "DEF"}],
"paymentMethods": [{"id": 1, "name": "Geen incassering", "code": "GI"}],
"orderTypes": [{"id": 85, "name": "webwinkel", "code": "webwinkel"}],
"countries": [{"id": 1, "name": "NEDERLAND", "code": "NL"}, {"id": 2, "name": "BELGIUM", "code": "BE"}],
"languages": [{"id": 1, "name": "Nederlands", "code": "NL"}]
}
}
These settings need to be cached locally after getting the token. When creating the order object used for the API, the settings are used for certain fields.
warning
The IDs of these settings differ between the acceptance and production environments.