Skip to navigation

Status codes and API info

What each integration endpoint returns, and how your code should react.
View as Markdown

All Etals integration endpoints take and return JSON. Send these headers on every request:

Authorization: Bearer {api-token}
Content-Type: application/json
Accept: application/json

Without Accept: application/json, authentication and permission failures answer with a redirect or an HTML page instead of the JSON shown here.

Funnel API

POST and DELETE on /api/v1/funnels/{endpoint-url}. Details on Data sync via Funnel API.

StatusWhenWhat to do
200All items accepted, or Partial Validation is on.With partial validation, check errors and errorsWithoutIdentifier in the body.
400Validation failed (partial validation off), the body is empty or not JSON, or the funnel’s mapping is broken.Fix the data or the mapping. Do not retry unchanged.
401Token missing, invalid or revoked.Check the token.
403Token lacks Create or Delete, or its owner lacks the Funnels permission.Fix the token or the user’s role.
404No funnel with that endpoint URL, or the funnel is switched off.Check the URL and Activate Endpoint.
500Unexpected error, or the funnel has no content type.Retry later with backoff. Contact Etals if it persists.

Funnel bodies always have status (success or error) and message, plus errors, errorsWithoutIdentifier and data when they have content.

Feedback API

POST /api/v1/feedback/content-job-values. Details on API Feedback.

StatusWhenWhat to do
201Feedback stored.Read createdContentJobIds, skipped and failed.
401Token missing, invalid or revoked.Check the token.
403Token lacks Create.Fix the token.
422The body is invalid, or one or more values could not be found. Nothing is stored.Fix the reported values and send the whole request again.
500Storing failed.Retry later with backoff.

Feedback bodies use success (true or false) and message, plus data or errors. Body validation errors use the standard format {"message": "...", "errors": {"field.path": ["..."]}}.

Authentication errors

The same for every endpoint:

{ "status": "error", "message": "You are not authorized to access this resource." }

is returned with 401, and

{ "status": "error", "message": "You are not authorized to perform this action." }

with 403. See Authorization.

Rate limits

The funnel and feedback endpoints have no request rate limit today, so they do not return 429. Other Etals API endpoints do. If you get a 429, wait for the number of seconds in the Retry-After header before sending again.

Retrying safely

  • Retry on network errors and 5xx, with increasing waits (for example 5 s, 30 s, 2 min).
  • Do not retry 400, 401, 403, 404 or 422 without changing something first.
  • Funnel requests are safe to repeat: items are matched by identifier, so sending the same body twice gives the same result.
  • Feedback requests are not deduplicated. Sending the same feedback twice stores it twice and can create two tasks. Only retry a feedback request when you did not get a response.

Your receiver’s status codes

For the other direction, where Etals calls your endpoint, Etals treats any 2xx as delivered and everything else, including timeouts, as failed. See How Etals reads your response.