Status codes and API info

Understand common API responses, request formats, and error handling.
View as Markdown

Etals APIs use JSON for request and response bodies.

Send requests with:

1Content-Type: application/json
2Accept: application/json

Common status codes

Status codeMeaning
200 OKThe request was accepted and processed successfully.
400 Bad RequestThe request body, mapping, or validation data is invalid.
401 UnauthorizedThe request is missing a valid API token.
403 ForbiddenThe token or user does not have the required ability or permission.
404 Not FoundThe requested resource or endpoint could not be found, or the funnel is inactive.
422 Unprocessable EntityThe payload format is valid JSON, but the data does not match what the endpoint expects.
500 Internal Server ErrorEtals could not complete the request because of an unexpected error.

Response format

Etals API responses use this structure:

1{
2 "status": "success",
3 "message": "Data received successfully."
4}

When a request fails, the response includes status, message, and any relevant validation errors:

1{
2 "status": "error",
3 "message": "Validation failed for one or more items.",
4 "errors": {
5 "SKU-1001": {
6 "Product Image": "The image must be a valid URL."
7 }
8 }
9}

Error handling

When integrating with Etals, handle errors based on the response status and message.

For batch operations, check whether the response contains item-level errors. Some endpoints can accept valid items while returning errors for invalid items, depending on the endpoint settings.