Endpoint

GET #https://api.gospeedlog.com/deliveries

Required Headers

x-gsl-token string required
Your API authentication token
x-gsl-secret string required
Your API secret key
Content-Type string required
Must be set to application/json

Query Parameters

page integer optional

Page number (default: 1)

per_page integer optional

Items per page (default: 10, max: 100)

status string optional

Filter by delivery status. Multiple values can be provided as comma-separated.
pending assigned accepted picked_up started on_the_way completed incomplete failed cancelled

order_numbers string optional

Filter by order numbers (comma-separated)

start_date string optional

Filter deliveries created after this date (YYYY-MM-DD format)

end_date string optional

Filter deliveries created before this date (YYYY-MM-DD format)

Request Example (cURL)

curl --request GET \
--url 'https://api.gospeedlog.com/deliveries?page=1&per_page=20&status=pending,assigned&start_date=2024-01-01&end_date=2024-01-31' \
--header 'x-gsl-token: ' \
--header 'x-gsl-secret: ' \
--header 'Content-Type: application/json'

Replace <your_api_token> and <your_api_secret> with your actual credentials.

Response

200 OK
The request was successful. Returns an array of delivery objects matching the query.
Response Body
{
  "deliveries": [
    {
      "order_number": "ORD-12345",
      "pickup": {
        "customer_name": "John Doe",
        "address": "123 Main St, New York, NY 10001",
        "phone_number": "+11234567890"
      },
      "dropoff": {
        "customer_name": "Jane Smith",
        "address": "456 Oak Ave, Brooklyn, NY 11201",
        "phone_number": "+10987654321"
      },
      "package": {
        "type": "box",
        "content": "Electronics",
        "size": "medium",
        "height": 10,
        "width": 15,
        "length": 20,
        "weight": 2.5
      },
      "estimated_delivery_time": 120,
      "estimated_distance": 15.5,
      "pickup_date": "2024-01-15",
      "pickup_time": "09:00:00",
      "delivery_date": "2024-01-15",
      "delivery_time": "14:00:00",
      "status": "pending",
      "created_at": "2024-01-15T08:00:00Z"
    }
  ],
  "page_number": 1,
  "per_page": 20,
  "total_entries": 1
}
400 Bad Request
Invalid query parameters provided
401 Unauthorized
Your API key is missing or invalid. Make sure authentication headers are included in the request.
Response Body
{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication headers"
}

Important Notes

Pagination: The maximum number of items per page is 100. Requests with higher values will be capped at 100.

Date Filtering: When filtering by date, both start_date and end_date must be provided together.

Multiple Statuses: You can filter by multiple statuses by providing comma-separated values (e.g., "pending,assigned").

Common Error Codes

  • 400 Bad Request: Invalid request data or missing required fields
  • 401 Unauthorized: Invalid or missing API credentials (x-gsl-token or x-gsl-secret)
  • 404 Not Found: Delivery not found
  • 422 Unprocessable Entity: Cannot process request (e.g., trying to cancel a completed delivery)
  • 500 Internal Server Error: Server error

Validation Errors

When validation fails, the API returns a 400 status code with detailed error information:

{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication headers"
}

Support

For API support and questions, please contact our development team at api-support@gospeedlog.com .

Our team typically responds within 24 hours during business days.