Table of Contents

Errors

Overview

The Fredi API uses standard HTTP status codes to indicate whether a request was successfully processed or if an error occurred. When an error occurs, the API returns a structured response that includes details about the issue.

Understanding these responses helps developers diagnose problems and correct requests accordingly.

HTTP Status Codes

The API returns standard HTTP status codes to indicate the result of a request.

Status Code Message Description
200 OK The request was successfully processed.
201 Created A resource was successfully created.
400 Bad Request The request is invalid or contains incorrect parameters.
401 Unauthorized Authentication is required or the provided credentials are invalid.
403 Forbidden The authenticated user does not have permission to access the requested resource.
404 Not Found The requested resource could not be found.
409 Conflict The request conflicts with the current state of the resource.
422 Unprocessable Entity The request was valid but contains semantic errors or validation issues.
500 Internal Server Error An unexpected error occurred on the server.
503 Service Unavailable The API service is temporarily unavailable.

Error Response Format

When an error occurs, the API returns a JSON response containing details about the error.

Example Error Response

{
  "shipmentErrors": [
    {
      "error": "No shipment details found for the provided reference number.",
      "code": "404"
    }
  ]
}
Back to top ↑