Getting Started
In this section we walk you through authenticating with the Codept API, cover the current API limits that you need to be aware of, and provide examples of how to make a request and parse a response in your local environment.
#
AuthenticationWhen you sign up for Codept, you'll be given two pieces of information by the Codept team: your API key and your API secret.
Requests are secured using basic authentication where username and password credentials are those provided API key and secret.
You will need to supply them in Authorization HTTP header as base64-encoded string in all the API requests you make. The encoded text is concatenation of an API key, a colon (:
), and an API secret. Here’s an example header:
Authorization: Basic MTAwMDAwMDpzZWNyZXQ=
If you receive a response with the HTTP code 401 Unauthorized
, please check your headers carefully — there could be a typo in your API key, your API secret or the header name. If you are confident you are supplying the right credentials but you still get 401 Unauthorized
responses, please reach out to the Codept team to get help with this issue.
#
The base endpointThe base endpoint for all the requests to the Codept API is https://milton.codept.de
.
Note: the webhooks that Codept sends into your infrastructure use an endpoint that you configure yourself; please consult the Messages section of the Fulfillment Merchant API, Shipment Merchant API or the Warehouse API for more details.
#
LimitsWe may apply rate limiting to any and all API endpoints in order to ensure quality of service for all customers on the Codept platform.
The current limits are as follows:
- Each API request payload's maximum size is 2MB.
- For each sales order, the total number of all line items of any kind may not exceed 20,000.
- This limit exists because we track the state of each item individually. Quantities greater than 20,000 items create a high workload for our item state tracking system.
If you are concerned about these limits, or believe that during the routine operation you’ll need higher limits on API payload and/or item quantities, please contact us. We are happy to help you in working around the limits.
#
ValidationWe validate all payloads to all API endpoints to make sure they contain valid JSON.
Additional validation we perform that’s not reflected in the API schema:
- If order is not a shipment order and the payload contains
country
field, it will be validated according to the ISO 3166-1 alpha 2 standard. Please review the list of accepted country codes.
#
Making a request via the command lineIf you’d like to try issuing requests to the Codept API from the command line in your development environment, here is an example curl
snippet that you can customize to your needs (works on macOS and Linux systems):
#
Parsing the response in the command lineTo parse the JSON responses of the Codept API in your development environment, we recommend using the jq
CLI tool. Check out this jq
tutorial to learn how to get started with jq
.
#
Details of the available APIsFind the information about the specific APIs in the following sections: