Skip to main content
All CollectionsAPI
Invalid responses
Invalid responses

Learn about invalid responses.

eLogii avatar
Written by eLogii
Updated over a year ago

Invalid responses may be caused by a couple of things, some of the most common reasons include:

Invalid request parameters

This invalid response occurs due to presence of invalid parameters or lack of the parameters all together ,which are referred to as the ‘where’.

This parameters include: - _id, uid, shipment, reference, date, externalID.

Example: Invalid response caused by omitting the date when retrieving customers’ tasks.

{ 
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid request parameters",
"data": {
"details": "\"where\" must contain at least one of [_id, uid, shipment, reference, externalId, date, dateTimeWindows.date]" }
}

Authentication Error

As the name suggestions, this invalid response is caused by an authentication error which may be due to missing authentication token or an already expired token(bad token).

Missing authorization header/token

To avoid this invalid response due to lack of an authentication token, ensure that you enter an API Key which can be generated on eLogii Configurations → API keys.

Proceed to input the authorization header as follows: Authorization: ApiKey YOUR_API_KEY

{ 
"statusCode": 400,
"error": "Bad Request",
"message": "Missing or invalid authorization header"
}

Expired/bad token

This response is often received when the API key input in the authorization header is not updated to match the one generated in eLogii and may appear as shown below:

{
"statusCode": 401,
"error": "Unauthorized",
"message": "Bad token",
"attributes": { "error": "Bad token" }
}

or

{ 
"statusCode": 401,
"error": "Unauthorized",
"message": "Unauthorized"
}

Did this answer your question?