General API

The general API is designed to be able to get, list, update, create and delete data entries in the system. It can be used to automate processes like vendor management or design creation.

Models & Actions

Each data type (e.g. a cmp, a design, vendor and so on) is called a model, each model provides several actions (get/list/update/…). You can use the call to info in order to receive the OpenAPI spec of all models and actions:

https://[API-Endpoint]/info

Please note that unauthenticated calls to the info model will result in an OpenAPI spec for unauthenticated actions. In order to get all Models & Actions that are possible for your account, please authenticate first.

URL structure

Calls to models follow the structure:

https://[API-Endpoint]/model/[MODELNAME]/[ACTIONNAME]

Example:

https://[API-Endpoint]/model/CMP/list

In addition to model calls, there are calls to authentication and the OpenAPI spec:

https://[API-Endpoint]/auth/[AUTH-ACTION]
https://[API-Endpoint]/info

General message structure

Communication is done by sending JSON data back and forth. In order to start an action, please send a POST request with the following JSON data in the HTTP body:

{
  "accessType": 1,         // Access type (may be required for authentication calls)
  "lang":       1|2|3|..., // Language (optional)  
  "kmd":        "...",     // Authentication token (optional/required depending on context)  
  "key":        "..."      // Your API-Key (optional/required depending on context)
  // other fields might be required depending on context
}

The content of the JSON data may vary depending on the action to be performed. Therefore please see the Actions section here.

Depending on the project implementation a key might be required for certain actions (e.g. creating a new user). Please get in touch with your account manager in order to receive your key.

Important: Keep your key private and do not transmit it via the browser but always via server-to-server connection!

The API will respond with a JSON body that is formated as follows:

{
  "status":     "...",  // Status: Success|Error 
  "statuscode": 0..999, // Status code
  "msg":        "...",  // Human readable status message
  "model":      "...",  // Context dependend. May return model type to be displayed or null
  "action":     "...",  // Action performed
  "data":        ...    // Type and content is depended on context  
}

Error codes

The API will use the following error codes in order to signal problems. The error code is send via the statuscode property of the response.

CodeDescription
100-199General error codes
101No input data found
102view/accessType missing or incorrect
103No IDs submitted / IDs invalid. Please send at least one ID
104Incorrect filter: Field X does not exist in Y
105action is missing or incorrect
106Parameter X is required/missing
107Unknown or empty toolbar action
108Action not allowed
109Action failed
110Action allows not more than one / or no ID.
111Data for ID x not found.
112Create error, see error message. Field specific messages see response.data
113Update error, see error message. Field specific messages see response.data
114No data for create/update an item
115IDs need to be an array
116Cannot sign password
117Maximum amount of item exceeded
  
200-299Login/access errors
201Adserver deactivated
202User not found
203IP blacklisted
204Password incorrect
205Missing credentials
206Unknown login error
207IP not whitelisted
208Passwort change necessary (password too old)
209Access not allowed
210Password renewal not successfull

211

Token incorrect
212Token expired
213Account not active yet
214Unknown access type
215Password change needed
216Deactivated
217Unknown error
218Authentication key missing or empty
219Two-Factor Authentication missing (send parameter 2fa)
220Two-Factor Authentication incorrect
221Two-Factor: OTP Code missing
222Two-Factor: OTP Code incorrect
223Two-Factor: Mail Code missing
224Two-Factor: Mail Code incorrect
225Two-Factor: SMS Code missing
226Two-Factor: SMS Code incorrect
227Two-Factor: Mail is sent now
228Two-Factor: SMS is sent now
229Password update email sent
230Password updated
  
300-399Internal error codes
301Could not resolve dependency for X on Y
302Dependency for X resulted in empty list
303No column to update
304Dependency error on field usage
305Dependency error on empty field
306List query resulted in empty field list
307Authentication callback not found
308API include file not found: …
399General internal error
  
900-999Custom error codes, please see message

Access Types

Depending on the API structure different access types exist (JSON field “accessType”). Please get in touch with your accout manager in order to recieve the ID for the access type you can use.

Models

Depending on the project and your access rights, you may see different models (data structures to be received/inserted from/into the database). Please call action rights in order to receive a list of models and actions.

We do our best to keep this purely informative documentation up to date. However, if you notice that any of these guides need a little touch-up, let us know!