Skip to content

Errors

Every error uses the same envelope. The HTTP status tells you the category; errorCode tells you exactly what happened and whether retrying is worth it.

json
{
  "success": false,
  "message": "This store's fleet cannot currently accept orders.",
  "data": {
    "errorCode": "FLEET_SUSPENDED",
    "retryable": false,
    "action": "A new fleet must be selected for the store."
  }
}

message is written to be shown to a human. errorCode is what your code should branch on — messages may be reworded, codes will not.

Catalogue

Request shape

CodeerrorCodeCauseRetry
400MALFORMED_REQUESTThe body could not be parsed: invalid JSON, empty body, or a field of the wrong typeNo — fix the body

data.fields names the offending fields:

json
{
  "success": false,
  "message": "fleetId alanı beklenen türde değil.",
  "data": {
    "errorCode": "MALFORMED_REQUEST",
    "retryable": false,
    "fields": ["fleetId"]
  }
}

The difference from 422: a 422 means we read the body and its contents broke a rule. A 400 means we never got to read it.

Authentication

StatusCodeCauseRetry
401TOKEN_EXPIREDToken aged outYes — renew, resend once
401INVALID_CREDENTIALSWrong, revoked or suspended credentialsNo

Store

StatusCodeCauseRetry
409STORE_NOT_CONFIGUREDNo fleet attached, or store not activeNo
409ALREADY_HIZLIYO_PARTNERThis branch is already a direct Hızlıyo partnerNo
409STORE_EXISTS_ON_ANOTHER_VENDORThis branch is registered by another integratorNo
409DUPLICATE_STOREYou already registered this branch under a different store id — reuse itNo
422INVALID_TAX_NUMBERTax number missing or malformedNo

Order

StatusCodeCauseRetry
423FLEET_SUSPENDEDThe fleet cannot accept orders (commercial reason)No — the store needs a different fleet
423FLEET_TERMINATEDThe fleet's channel is closedNo
503FLEET_UNAVAILABLENo available courier in the area right nowYes — after ~60 s
422DROPOFF_OUT_OF_COVERAGEAddress outside the fleet's coverageNo
422COORDINATE_MISMATCHCoordinates disagree with the address text by more than 2 kmNo — fix the data
422INVALID_RECIPIENTRecipient name too short or missingNo
422INVALID_PHONEPhone is not a valid 10-digit numberNo
422INVALID_ADDRESSAddress text too shortNo
422READY_AT_TOO_FARreadyAt more than 4 hours in the futureNo
409DUPLICATE_ORDERSame externalOrderId with different contentNo
409CANCEL_TOO_LATECourier already picked the package upNo
404ORDER_NOT_FOUNDUnknown orderId, or it belongs to another accountNo

Throttling

StatusCodeCauseRetry
429RATE_LIMITEDRate limit exceededYes — after Retry-After seconds

Retrying, honestly

Only three codes are worth retrying: TOKEN_EXPIRED, FLEET_UNAVAILABLE and RATE_LIMITED. Everything else is a decision or a data problem, and repeating the request will produce the same answer while burning your rate limit.

Remember that we never retry on your behalf — see Orders › Retry policy.

Showing errors to restaurants

The restaurant is your user, not ours. A few suggestions from what actually helps:

CodeUnhelpfulHelpful
FLEET_UNAVAILABLE"Delivery error""No courier available right now. Trying again."
FLEET_SUSPENDED"423 error""Your courier company is not accepting orders. Please contact them."
COORDINATE_MISMATCH"Invalid request""The address and map location do not match. Please check the pin."
STORE_NOT_CONFIGURED"Store error""No courier company is set up for this branch yet."

Something unexpected

5xx responses other than 503 FLEET_UNAVAILABLE mean something broke on our side. They are logged with a correlation id; if you contact us, include the orderId or the X-Idempotency-Key you sent and the approximate time.

Hızlıyo Vendor API v1