HTTP status codes

HTTP status codes are an essential part of the SHOPLINE API. For every API request, the response includes an HTTP status code indicating the outcome of the request.


Status code overview

Classes

HTTP status codes consist of three digits, with the first digit defining the status code class.

The SHOPLINE API uses the following status code classes:

  • 2xx: Success. The server has received, understood, and accepted the request.
  • 3xx: Redirection. The client must take further action, such as redirecting to a new URL, to fulfill the request.
  • 4xx: Client error. The request cannot be processed, typically due to client-side issues such as invalid parameter formatting, authentication failure, or resource not found.
  • 5xx: Server error. The request itself is valid, but the SHOPLINE server encountered an exception. This is usually a temporary issue. Try again later or contact technical support.

Error responses

When an API request fails, in addition to an HTTP status code (4xx or 5xx), the API includes error details in the response. The response structure is as follows:

  • HTTP status line

    • Status code: The HTTP status code used to identify the specific error, such as 404 or 500. For details, see the Status code list below.
    • Status text: A brief description of the HTTP status code, such as Not Found.
  • Response body: Contains the errors field, which provides detailed contextual information, such as parameter validation failures or business logic errors.

Example:

HTTP/1.1 404 Not Found
{
"errors": "The product does not exist."
}

Status code list

The following table lists the HTTP status codes used by the SHOPLINE API:

Status codeStatus textDescription
200OKThe request was processed successfully.
201CreatedThe request succeeded, and a new resource was created.
202AcceptedThe request has been accepted, but has not yet been processed.
303See OtherTemporary redirect. Requires the client to request the new URI using the GET method.
400Bad RequestThe server could not understand the request, typically due to malformed syntax, Content-Type not set to application/json, or invalid parameter types.
401UnauthorizedAuthentication failed. No credentials were provided, or the credentials are invalid or expired. Obtain authorization again or refresh your credentials.
402Payment RequiredThe store is currently frozen. The merchant must log in to the SHOPLINE Admin and pay the outstanding balance.
403ForbiddenThe server refused to fulfill the request.
404Not FoundThe requested resource could not be found.
405Method Not AllowedThe API endpoint does not exist or has been taken offline.
406Not AcceptableThe server cannot return a response matching the content type specified in the request's Accept header.
412Precondition FailedPrecondition failed. For example, the request body contains blocked content, such as high-risk scripts.
422Unprocessable EntityThe request body is well-formed but contains semantic errors. Detailed information is provided in the errors field of the response body.
423LockedThe store is currently locked. Common reasons include exceeding API request limits or risks of account compromise or fraud. Contact SHOPLINE support for assistance.
429Too Many RequestsThe request was rate-limited. The app has exceeded its API rate limits.
433Request BlockedThe request was identified as a malicious attack, or the originating IP address has been blacklisted.
434Excessive Rate Limit SurpassedThe request rate far exceeded the allowed limit, triggering SHOPLINE's security rate-limiting mechanism.
435Challenge Collapsar AttackThe request triggered the Challenge Collapsar (CC) attack defense policy.
436Security Policy TriggeredThe request was blocked because its content triggered a SHOPLINE security policy.
500Internal ErrorAn internal error occurred on the SHOPLINE server. Try again later, or contact SHOPLINE support.
501Not ImplementedThe API endpoint is not available for the current store. This may be because the endpoint is limited to internal apps or reserved for future use.
503Service UnavailableThe server is currently unavailable. Try again later.
504Gateway TimeoutThe server failed to respond in time, resulting in a timeout. For bulk or complex requests, consider splitting them into smaller ones.
Was this article helpful to you?