Skip to main content
The Zinc API uses conventional HTTP response codes to indicate the success or failure of an API request.

HTTP Status Codes

Status CodeDescription
200Success - The request was successful
201Created - A new resource was created successfully
400Bad Request - The request was malformed or invalid
401Unauthorized - Invalid or missing authentication
404Not Found - The requested resource does not exist
500Internal Server Error - Something went wrong on our end

Error Response Format

All error responses follow a consistent structure:
{
  "code": "ERROR_CODE",
  "message": "Human-readable error message",
  "details": {
    "string": "Additional details that is relevant to the error"
  }
}

Error Types

General API errors
Error CodeDescription
not_foundResource was not found
validation_errorA parameter to this endpoint was incorrect or missing. Check the details for more information.
already_existsTrying to create an item that already exists. This could be due to an item with the same idempotency key already being submitted
internal_errorSomething has gone wrong with our internal systems
Authentication / Authorization Errors
Error CodeDescription
unauthorizedAuthentication is required for this action
forbiddenYou do not have the requirement permissions for this action
invalid_tokenYour API token is invalid.
token_expiredYour API token has expired.
Wallet Errors
Error CodeDescription
insufficient_fundsInsufficient funds in wallet for the order
payment_failedPayment failed
payment_method_requiredNo default payment method selected
Order Errors
Error CodeDescription
invalid_shipping_addressThe shipping address failed validation
url_unreachableThe product URL provided is inaccessible
invalid_variantNo product variant provided or the product variant is not present on the product page
out_of_stocktProduct is no currently available for purchase
shipping_unavailableShipping to this address is not available

Example Error Response

{
  "type": "INVALID_SHIPPING_ADDRESS",
  "message": "The shipping address could not be validated. Please check that the address is complete and accurate."
}