HTTP requests to the ReflexBlue External API
You access the ReflexBlue External API via the URL of your own ReflexBlue Application Server. Add the path of the desired API endpoint to this URL to send a request.
You can find the correct URL of your ReflexBlue Application Server on this page.
Every request to the ReflexBlue External API must include required HTTP request headers and path variables. Below you’ll find what you need.
Required path variables
-
administrationNumber
This is the number of the administration for which you’re making the request. The path of the API endpoint starts with the administration number, followed by/api/and then the resource path of the endpoint. Usually, the administration number is1(main administration) or2(test administration).You can find the correct administration number at the bottom left of the menu in the ReflexBlue Desktop Client or in the Administrations overview screen.
-
version
This is the version number of the integration API.
Example:
Suppose your Application Server URL is
https://your-company.reflex-blue.cloud.reflex-systems.nl.
You want to send a request to the articles endpoint /{administrationNumber}/api/external/v{version}/articles/list for version 2 of the integration API, for administration 1.
The full URL will be:
https://your-company.reflex-blue.cloud.reflex-systems.nl/1/api/external/v2/articles/list.
Required HTTP request headers
Always use the following HTTP headers with each request to the ReflexBlue External API.
| HTTP header | Description | Value |
|---|---|---|
| Authorization | Contains the bearer token for authorization. You can obtain this token by first authenticating with ReflexBlue. | Bearer <your_token> |
| Accept | Indicates in which format you want to receive the response. | application/json |
| Content-Type | Indicates the format of the request body. | application/json |
| x-rng-client-identifier | Contains the client identifier of the application. | reflexblue.externalapi |
| x-rng-dynamicfield-scope※ | Determines the scope of dynamic fields. Use * for all fields. Sometimes there are multiple fields with the same identifier but for different scopes. Use the scope name to select the correct field. | * |
Note: The headers marked with ※ are only required for version 1 of the External API.
HTTP responses from the ReflexBlue External API
This overview describes the most common HTTP status codes you’ll receive when using the ReflexBlue External API. This way, you’ll quickly know what a response means and what to do in case of an error.
HTTP status codes
200 (OK) / 204 (No Content)
- The request was successfully processed.
- Depending on the chosen endpoint, you’ll receive data in the response, or it will be empty.
302 (Found)
- The request was successfully processed.
- You’ll receive a redirect URL in the response, depending on the endpoint.
401 (Unauthorized)
- The request was not successful.
- Possible causes:
- No authorization token was provided or the token has expired. Request a new token.
- An invalid username and/or password was used for ReflexBlue.
- The seat or role of the ReflexBlue user has insufficient permissions.
- The response contains an object with details about the error.
403 (Forbidden)
- The request was not successful.
- The response contains an object with details about the error.
409 (Conflict)
- The request was not successful.
- The response contains an object with details about the error.
500 (Internal Server Error)
- The request was not successful due to an internal error.
- The response contains an object with details about the error.
- Contact ReflexSystems if this problem persists.
Error messages in the API response
When an HTTP request to the ReflexBlue External API results in an error, you’ll receive a JSON object in the response body with details about the error. This object always contains one or more error messages.
An example of the JSON object:
{
"messageKey": "",
"translatedMessageKey": "",
"messageParams": [],
"messages": [
{
"messageKey": "",
"translatedMessageKey": "",
"messageParams": []
}
]
} | Property | Description |
|---|---|
messageKey | Unique value identifying the error message. |
translatedMessageKey | The error message in a user-friendly format. |
messages | List of additional messages (if applicable). |
messageParams | List of IDs, codes, or names of entities to which the error relates (if applicable). |
Always check the error details in the response to quickly determine the problem and how to resolve it.