Getting Settings
When making API calls you will often are required to provide the correct id's when refering to configuration entities such as orderTypes. These id's can be obtained by using the shopapi/v2 GET settings/get method. It is recommended to cache this data locally and refresh daily. Among these settings the id's and names of the following entities are returned
| 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 id's of these settings differ between the acceptance and production environments.