Goto APIs

Supplier delivery terms API

General:

Basics:

Base-URL: https://capi.lagerkoll.com/v1/supplier_delivery_terms/
Parameters in the url should all be encoded and all data sent should be UTF-8

MAX number of requests per minute is set to 200.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.

Headers:

There are 2 ways to be authenticated when using this API. in both ways you add headers to the request.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
store: <<STORE>>
user_id: <<USER_ID>>
user_token: <<USER_TOKEN>>
api_key: <<API_KEY>>
Accept: application/json
Content-Type: application/json

Errors:

Code Description
900001 Credentials don't match
900101 Common error
900429 Too many requests
900611 Error when getting supplier delivery term
900612 Error when creating a supplier delivery term
900613 Error when updating a supplier delivery term
900614 Error when deleting a supplier delivery term
{
  "errorCode" : 900101,
  "errorMessage" : "Something went wrong on the server",
  "errorField" : null,
  "errorData" : null
}

Supplier delivery terms API:

Supplier delivery terms

Get supplier delivery term

GETUrl: /{term_id : .+}
Headers:
Accept: application/json or application/xml
Get a single supplier delivery term based on term code
Body:
Successfull response:

{ "supplierDeliveryTerms": [{ "code": "code", "description": "description" }], "since": 8985 }

Get supplier delivery terms

GETUrl:
Headers:
Accept: application/json or application/xml
Get a list of supplier delivery terms

Valid parameters:

Parameter Description Default value Allowed values
since 0

Body:
Successfull response:

{ "supplierDeliveryTerms": [{ "code": "code", "description": "description" }], "since": 2253 }

Add supplier delivery term

POSTUrl:
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Add a new supplier delivery term
Body:

{ "code": "code", "description": "description" }
Successfull response:

{ "code": "code", "description": "description" }

Update supplier delivery term

PUTUrl: /{term_id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update an existing supplier delivery term
Body:

{ "code": "code", "description": "description" }
Successfull response:

{ "code": "code", "description": "description" }

Delete supplier delivery term

DELETEUrl: /{term_id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Delete an existing supplier delivery term
Body:
Successfull response:

Classes:

SupplierDeliveryTerm

Field Type Description Default Mandatory Accepted values Example values Access
code String Write only with POST Post R,W
description String Post R,W

SupplierDeliveryTermsResponse

Field Type Description Default Mandatory Accepted values Example values Access
since long R
supplierDeliveryTerms List R