Skip to content

Status codes and error codes

When Genstore processes a REST API request, it returns specific HTTP status codes based on the outcome of the request. This section details the status codes you may encounter, along with their meanings.

Successful responses

When an app's REST API request receives a successful response, the HTTP status code will be within the 2xx range, indicating that the request has been successfully received, understood, and processed.

Example:

HTTP status: HTTP/1.1 200 OK

HTTP body:

json
{ "customer": {"id":123456, "name": "book"} }

Error responses

When an app's REST API request receives an error response, the HTTP status code is outside the 2xx range, and an error message is returned. Example below:

HTTP status: HTTP/1.1 400 Bad Request

HTTP body:

json
{"error": "Amount must be less than net payment", "order": {...}}

Exceptional responses always include an error field that describes the error information for the current request.

Refer to the response status code table below for specific meanings.

Rest API response status codes

Status CodeDescriptionTypeDetails
200OKStandardRequest succeeded.
201CreatedStandardSuccessfully created a new resource.
202AcceptedStandardRequest accepted, processing pending.
204No ContentStandardRequest succeeded, no content returned.
205Reset ContentStandardRequest succeeded, requester should reset view.
303See OtherStandardRequest redirected to another URI.
400Bad RequestStandardMalformed request syntax; cannot process.
401UnauthorizedStandardMissing or invalid authentication credentials.
402Payment RequiredStandardPayment necessary to access resources.
403ForbiddenStandardServer understood but refuses to authorize.
404Not FoundStandardRequested resource could not be found.
405Method Not AllowedStandardMethod not allowed for the requested resource.
406Not AcceptableStandardCannot produce response acceptable to the client.
409Resource ConflictStandardRequest conflicts with resource's current state.
414URI Too LongStandardURI too long to process.
415Unsupported Media TypeStandardMedia type of request not supported.
422Unprocessable EntityStandardSemantic errors in request.
423LockedStandardResource being accessed is locked.
429Too Many RequestsStandardUser has sent too many requests (rate limiting).
500Internal Server ErrorStandardServer encountered an unexpected condition.
501Not ImplementedStandardServer does not support the requested function.
502Bad GatewayStandardInvalid response received from upstream server.
503Service UnavailableStandardServer temporarily unavailable (overload/maintenance).
504Gateway TimeoutStandardNo timely response from upstream server.
530Origin DNS ErrorNon-standardDNS resolution error.
540Temporarily DisabledNon-standardService temporarily disabled on the server.
783Unexpected TokenNon-standardError processing a token in the request.
  • Standard: Comply with HTTP protocol standards.
  • Non-standard: Unique to Genstore, addressing specific platform situations.