Unyte API calls provides a set of responses that can be used to communicate with the client. The responses are based on the HTTP status codes and are used to indicate the success or failure of an operation. Most calls would return JSON response bodies that include information about the resource, and may include one or more contextual HATEOAS links. Use these links to request more information about and construct an API flow that is relative to a specific request. Each REST API request returns an HTTP status code.

HTTP Status Codes

Successful requests

Unyte returns HTTP status codes in the 2xx range for successful requests. The following table lists the HTTP status codes that are returned for successful requests.
Status CodeDescription
200 OKThe API request succeeded.
201 CreatedA POST request was successful and a new resource was created.
202 AcceptedThe request has been accepted for processing, but the processing has not been completed. This means the server would excute it later.
204 No ContentThe server successfully executed the request but there is no content to return.

Failed requests

HTTP 4XX status codes

For failed requests, the platform would return HTTP status codes in the 4xx and 5xx range. This could be something was wrong with the request as in 4xx or something on our end wrong with a server or service, 5xx. The following table lists the HTTP status codes that are returned for failed requests. For authentication specific HTTP 4XX status codes, refer to the Authorization errors section.
Status CodeDescriptionProbable Cause and Solutions
400 Bad RequestINVALID_REQUEST. The request was invalid or cannot be served. This could be because the request was syntatically incorect, or violates the schema.Check the request for validation errors - missing or incorrect parameters, or incorrect data types. The server couldn’t uderstand the request, indicating in addition to the things stated before, one of the followng below:
- The data is not in the expected format
- A data validation error occured
- The API cannot convert the payload data to the underlying data type
404 Not FoundRESOURCE_NOT_FOUND. The requested resource does not existThe server couldn’t find anything on the requested resource. This could be either, because the URI does not exists or the resource is not available. For example, was it previoulsy deleted in a seperate request? or perharps does not exist yet in our database.
405 Method Not AllowedMETHOD_NOT_SUPPORTED. The server does not implement the requested HTTP methodThe server does not support the HTTP request method, e.g PATCH or DELETE operations in some cases
406 Not AcceptableMEDIA_TYPE_NOT_SUPPORTED. The server does not support the media type that is acceptable by the client
409 ConflictRESOURCE_CONFLICT. The request could not be processed because it conflicts with another requestPerhaps, a similar request is previously running? The server could not complete the requested action as it conflicts with aother requets that is currently being processed. Please retry the request later.
429 Too Many RequestsRATE_LIMIT_REACHED. Too many requests - Blocked due to rate limiting.The rate limit for the user or application has exceed a predefined value. Please consult with customer support.

HTTP 5XX status codes

Status codeDescriptionPossible causes and solutions
500 Internal Server ErrorINTERNAL_SERVER_ERROR. An internal server error has occuredA system or application error has occured. Please note the although, the client may have provided a correct request, something unexpected occured within our internal systems. Please try again or reach out to support team
503 Service UnavailableSERVICE_UNAVAILABLE. Temporary outage or failure of a serviceThe server couldn’t handle the incoming request due to a temporary downtime of one of our service, or system scheduled for maintainance. Please check with the support team or the review operational APIs through the Status page

Authorization errors

The following table lists common authorization-related errors you might encounter. These errors typically correspond to HTTP 401 Unauthorized or 403 Forbidden status codes.
Status CodeError Code (in response body)DescriptionProbable Cause and Solutions
401 UnauthorizedUNAUTHORIZEDThe request requires user authentication. The credentials provided are missing or invalid.Cause: Missing or incorrect API key, token, or other authentication method.
Solution: Ensure your request includes valid authentication credentials and that they are correctly formatted (e.g., in the Authorization header).
403 ForbiddenFORBIDDEN or PERMISSION_DENIEDThe server understood the request, but refuses to authorize it. The authenticated user does not have the necessary permissions to access the resource or perform the requested action.Cause: The user associated with the provided credentials does not have the required role or permissions for this specific operation or resource.
Solution: Verify that the user’s role and permissions allow them to perform the action. Contact an administrator if necessary to adjust permissions.
Coming soon