Common Headers & Request Structure
Every Freightways API request should include the following headers:
| Header | Required | Description | Example |
|---|---|---|---|
Content-Type |
✅ | Specifies the media type of the request body. Must be application/json. |
application/json |
Accept |
✅ | Determines the response format. Always application/json. |
application/json |
Authorization |
✅ | Used when authenticating via OAuth2 Bearer tokens. | Bearer eyJhbGci... |
Example request headers:
Common Error Response Format
All errors follow a consistent structure:
| Field | Type | Description |
|---|---|---|
| errors | array | Error details |
| type | string | HTTP status code |
| title | string | human-readable summary of the problem type |
| status | string | HTTP status code |
| detail | string | A human-readable explanation specific to this occurrence of the problem. |
| instance | string | endpoint utilised |
| correlationId | string | error Id - helps with troubleshooting |
Common HTTP Status Codes:
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Resource created successfully |
| 400 | Invalid request format or validation error |
| 401 | Unauthorized – missing or invalid credentials |
| 403 | Forbidden – insufficient permissions |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |