Learn more about common error codes and how to resolve them.
Evy uses HTTP response status codes to indicate the success or failure of your API requests. If your request fails, Evy returns an error using the appropriate status code.
In general, there are three status codes ranges you can expect:
2xx
success status codes confirm that your request worked as expected4xx
error status codes indicate an error because of the information provided (for example, a required parameter was omitted)5xx
error status codes are rare and indicate an error with Evy's servers
Some 4xx
errors that could be handled programmatically include an error code—a short string with a brief explanation—as a value for code. Below is a list of possible error codes that can be returned, along with additional information about how to resolve them.
Error code | HTTP status code | Description | Endpoint |
---|---|---|---|
invalid_payload | 400 | The specified payload is invalid. The JSON content could not be parsed, fix it and try again. | All |
parameter_invalid_empty | 400 | One or more required values were not provided or some parameters were invalid. Make sure requests include all required and valid parameters. | All |
parameter_missing | 400 | One or more required values are missing. Check our API documentation to see which values are required to create or modify the specified resource. | All |
offer_unavailable | 404 | No offer is available for the specified product or variant resource. | /offers |
resource_missing | 404 | The ID provided is not valid. Either the resource does not exist, or an ID for a different resource has been provided. | /orders or /orders_intents |
resource_already_exists | 409 | A resource with a user-specified ID (e.g., order ) already exists. Use a different, unique value for id and try again. | /orders or /orders_intents |
resource_disabled | 422 | The resource is disabled and no longer available. Use a different resource, or make the current one active again. | /offers |
offer_invalid | 422 | The offer is invalid and not available for purchase anymore. Retrieve active offers to find a valid one. | /orders or /orders_intents |
resource_expired | 422 | The resource has expired and is not available anymore. | /orders_intents |
cannot_process_request | 422 | The request cannot be processed. See message for more details. | /orders , /order_documents , /order_intents , /contract_cancellation_requests , /subscription_charges |
Error body example:
{
"code": "resource_missing",
"message": "The ID provided is not valid. Either the resource does not exist, or an ID for a different resource has been provided."
}