MMelo Developers

Errors

Handle Melo API failures consistently and decide when requests are safe to retry.

All API errors use the same JSON envelope:

{
  "type": "WAREHOUSE_NOT_FOUND",
  "message": "Warehouse not found",
  "code": 404
}
FieldDescription
typeStable machine-readable error identifier when provided by the API.
messageHuman-readable description intended for developers.
codeHTTP status code repeated in the response body.

Status codes

CodeMeaningClient behavior
400Invalid input or invalid resource stateCorrect the request; do not retry unchanged.
401Missing, invalid, expired, or revoked credentialsRefresh the token when expired; otherwise stop and inspect credentials.
403The merchant cannot access the resourceDo not retry without changing credentials or resource ownership.
404The requested resource does not existVerify the identifier and environment.
500Unexpected server failureRetry with exponential backoff when the operation is safe to repeat.

Common business errors

TypeEndpointMeaning
WAREHOUSE_NOT_FOUNDWarehouse operations, optionsThe warehouse ID does not exist.
WAREHOUSE_NOT_ACTIVEOptionsThe selected warehouse is disabled.
WAREHOUSE_HAS_TRANSFERS_ASSOCIATEDDelete warehouseHistorical transfers prevent deletion.
NO_PRODUCTS_FOUNDOptionsNo delivery product is available for the request.
MATCHMAKING_NOT_FOUNDCreate transferThe quote ID does not exist.
MATCHMAKING_INCORRECT_STATUSCreate transferThe quote has already been consumed or is not pending.
PRODUCT_NOT_FOUNDCreate transferThe product key was not returned by that quote.
DELIVERY_OPTION_PRICE_NOT_FOUNDCreate transferThe selected product has no payable price.
TRANSFER_NOT_FOUNDGet transferThe transfer does not exist or is not an API-created transfer.

Retry safety

GET requests are safe to retry. Token and quote requests may be retried after transient network failures. Transfer creation changes state and charges the merchant balance, so treat a timeout as an unknown result and avoid automatic retries until you can establish whether the transfer was created.

On this page