Getting started
To commence your API integration with Contentor, you will need to follow these key steps:
The first step in the integration process involves client setup. Reach out to dev@contentor.se for assistance and guidance during this phase.
Once the client is set up you will obtain the necessary authentication tokens (for test
and production
). These tokens are vital for API access.
After obtaining the tokens, you can start accessing the API. Send your requests using the base URL https://api.contentor.com, to ensure secure transmission via HTTPS. Requests over regular HTTP are not accepted by the API.
Authorization
To authorize your requests, you must use the tokens obtained in the previous process and include them in an HTTP header, as shown in the example below:
Authorization: Bearer your-token-here
Testing
The API offers testing capabilities through a dedicated authentication token for test only. When you create content requests using this test token, they are kept separate from regular data, and all fields within these requests are automatically populated with test values. This feature is designed to assist you during the development phase, serving as an excellent starting point for your integration work with this API.
Once you've verified the process using the test token, you can confidently proceed and transition to using the production token to send real requests that will be handled by Contentor.
Please note that once you switch from the test token to the production token, every request sent to the API will be treated as an actual orders, which will be processed and charged accordingly.
It's important to be aware that currently, orders cannot be canceled once placed. Therefore, you should only switch to the production token when you are ready to send real orders and incur the associated costs.
Formats and text encoding
The API utilizes JSON format for both input and output data. This means that the responses you receive will always be in JSON format, unless a different format is explicitly specified.
The API utilizes JSON for both input and output. Responses are always of type application/json
unless specified otherwise.
Moreover, when making requests that include a request body, it's essential to format the data in JSON as well. This
consistent use of JSON ensures a standardized and seamless data exchange process between your system and the Contentor API.
When you are sending data the server will refuse to process it unless you provide a valid Content-Type
header.
The API exclusively processes and provides text encoded in UTF-8 format. Ensure that your backend either natively supports UTF-8 or is capable of seamless conversion to and from the required encoding.
Locales and languages
The API operates with locales represented in the BCP 47, but currently only the language and region subtags are used.
The region subtag aids in achieving more precise localization. For instance, en-US
signifies US English, and en-GB
designates British English.
The range of languages available to you is established in collaboration with our team, tailored to meet your specific needs. Should you require additional details or have specific inquiries about language options, please do not hesitate to contact us directly.