Error codes
Every refusal comes in the same envelope, with a code from this list:
{"error": {"code": "SCOPE_MISSING", "message": "This client does not hold the invoices:read scope. Add it in Settings → Integrations.", "details": [{"scope": "invoices:read", "code": "SCOPE_MISSING"}], "request_id": "req_01J9X4Q7T2M8P3NRT6V5WZ", "retryable": false}}messageis written for you, the developer, and may name the field, the scope or the call to make first. Don’t parse it; branch oncode.retryablesays whether the same call can succeed later. “What it means” below is the plain text the SLFLO console shows for the same code.- Quote
request_id(also in theX-Request-Idheader) when you contact us. - A gateway in front of SLFLO may answer
502,503or504without this envelope. Treat those likeINTERNAL: back off and retry, honouringRetry-Afterwhen it is sent.
| Code | HTTP | Retry? | What it means | What to do |
|---|---|---|---|---|
INVALID_ | 400 or 422 | No | The request is not in the expected form. Check its parameters and body against the API documentation. | Fix the call (400) or the data (422, a rule on a pushed record): the message names the field. |
IDEMPOTENCY_ | 400 | No | The call had no Idempotency-Key, so it was not applied. Send one with every POST. | Send an Idempotency-Key header on every POST, PUT and DELETE. |
TOKEN_ | 401 | No | This integration token is not recognised. Check the token set in the ERP. | Stop the job and alert. Check the token in your settings. |
TOKEN_ | 401 | No | This integration token has expired. Create a new one in Settings → Integrations and update the ERP. | Stop the job and alert. Rotate the token in Settings → Integrations. |
TOKEN_ | 401 | No | This integration token was revoked. Ask your administrator for a new one. | Stop the job and alert. Put the new token in your settings. |
COMPANY_ | 401 | No | This company's account is suspended, so its integration tokens are not accepted. Contact SLFLO support. | Stop the job and contact us. |
SCOPE_ | 403 | No | This integration is not allowed to do that. Add the missing permission to it in Settings → Integrations. | Ask the administrator to add the scope named in details to the client. |
IP_ | 403 | No | Calls from this address are not on the integration's allowlist. Add the address in Settings → Integrations. | Call from an address on the client's allow-list, or ask for yours to be added. |
NOT_ | 404 | No | It isn't there any more. Refresh and try again. | Check the id, path or reference list name. |
ALREADY_ | 409 | No | The ERP already answered this order differently. It can answer again only after the order is sent to the ERP again. | The record was already answered differently. Treat it as done unless it is sent again. |
ORDER_ | 409 | No | This order is not waiting for the ERP, so there is nothing for the ERP to answer. | The order is not waiting for your ERP. Pull filter[ack]=pending for the ones that are. |
ERP_ | 409 | No | This company's orders are not set to be collected by its ERP, so the ERP cannot answer for them. | Order acks need the company in ERP mode API. Ask us to switch it. |
EXTERNAL_ | 409 | No | That ERP reference already belongs to another record here. Each record answers to one ERP reference. | Your key already belongs to another record. Use one key per record; adopt with salflo_id. |
BRANCH_ | 409 | No | This branch is still on a route. Remove it from the route first. | Take the branch off its route in the console, then delete it. |
REQUEST_ | 409 | Yes | The same call is still being processed. Try again in a few seconds. | The first call with this key is still running. Retry shortly with the same key. |
UNKNOWN_ | 422 | No | That refers to something the ERP has not sent yet. Send it first, then try again. | Push what details names first (the call is in the message); nothing was written. |
IDEMPOTENCY_ | 422 | No | That Idempotency-Key was already used for a different request. Use a new key for a new request. | A key goes with one request body. Use a new key for a different request. |
ERP_ | 409 | No | This company keeps its stock in SLFLO. Turn on "Stock is managed in your ERP" in Settings → Integrations first. | The company keeps its stock in SLFLO. Hold stock sends until an administrator turns on Stock is managed in your ERP. |
LOAD_ | 409 | No | The rep already accepted this load, so its goods can no longer change. | The rep already accepted the load. Do not post the edited journal: record the change as a new journal and alert the storekeeper. |
LOAD_ | 409 | No | Some of this load has already been sold from the van. | Part of the load has left the van, so it cannot be changed or cancelled. Record the change as a new journal. |
NOT_ | 422 | No | That place is not a van. Loads and unloads name a van. | van names a place that is not a van. Send the van warehouse's SLFLO code (GET /lookup?entity=van). |
NOT_ | 422 | No | The place named is not a warehouse: a load comes from a warehouse or another van, and good stock unloads to a warehouse. | A load's from names a held-back place, or a good-stock unload's to names a place that is not a warehouse. Send the warehouse's (or the giving van's) SLFLO code. |
INSUFFICIENT_ | 422 | No | The giving van of a van to van doesn't hold all the goods the journal moves. | A van to van moves only what the giving van holds in SLFLO; the message names each short line. Check that van's sales since the journal was made, fix the journal and send it again. |
SAME_ | 422 | No | The load's from and van are the same place. | from and van are the same place. Fix the journal's warehouses. |
UNIT_ | 422 | No | The product isn't kept in that unit in SLFLO. | The line's unit is not one of the product's units. Push its product units, or send the base unit. |
BATCH_ | 422 | No | SLFLO tracks this product by lot, and the line has none. | SLFLO tracks the product by lot. Send the line's lot. |
NOT_ | 422 | No | SLFLO doesn't track this product by lot, and the line names one. | SLFLO does not track the product by lot. Leave the line's lot out. |
SERIAL_ | 422 | No | SLFLO tracks this product by serial number, which loads and unloads don't take. | Serial-tracked products cannot be loaded or unloaded through the API yet. |
LOAD_ | 409 | Yes | A load on this van still waits for the rep to accept or refuse it. The unload goes through once the rep has answered. | A load still waits on the van for the rep's answer. Keep the unload and send it again later (same body, any key). |
VAN_ | 409 | Yes | The rep hasn't ended today's work day yet. The unload goes through once the rep taps End day. | The van's rep has not ended today's work day. Keep the unload and send it again later. |
UNLOAD_ | 409 | No | This unload journal was already recorded with other goods, and its stock has moved. Post the correction as a new journal. | The journal was already recorded with other goods and its stock has moved. Post the correction as a new journal. |
NOT_ | 422 | No | A held-back unload's to is a van or a van's held-back place; held-back goods go to a warehouse's held-back place. | A held-back unload's to must be a warehouse's held-back place (or the warehouse itself), not a van's. |
NO_ | 422 | No | The van, or the warehouse in to, has no held-back place set up. | The van, or the warehouse named in to, has no held-back place. Set one up in SLFLO, or name another warehouse. |
RATE_ | 429 | Yes | Too many attempts. Wait a minute and try again. | Wait the Retry-After seconds, then send the same call again. |
INTERNAL | 500 | Yes | Something went wrong on our side. Try again in a moment; if it keeps happening, quote the request number to support. | Retry with back-off; quote the request_id if it persists. |
INVALID_REQUEST is 400 when the call itself is malformed (an unknown filter, a bad
per_page) and 422 when a pushed record breaks a rule (a negative price, a key with a /).
How to retry each status is in Retries, 429 and token rotation.

