API Reference

Shipments API

Create, list, and manage shipments programmatically via the Trackberry API.

2 min read

List Shipments

Retrieve all shipments for your organization.

bash
GET /api/v1/shipments

Parameters

Parameter Type Description
page integer Page number (default: 1)
per_page integer Results per page (default: 25, max: 100)
status string Filter by status: pending, processing, ready_for_review, approved, rejected

Example Request

bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
     "https://trackberry.ag/api/v1/shipments?status=approved&page=1"

Example Response

json
{
  "shipments": [
    {
      "id": "ship_abc123",
      "reference": "BU-1341",
      "status": "approved",
      "vessel": "MSC Aurora",
      "origin": "Valparaiso, Chile",
      "destination": "Rotterdam, Netherlands",
      "pallets_count": 42,
      "created_at": "2026-02-10T14:30:00Z",
      "approved_at": "2026-02-11T09:15:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 1
  }
}

Get Shipment

Retrieve a single shipment with full details including pallets and check results.

bash
GET /api/v1/shipments/:id

Example Response

json
{
  "shipment": {
    "id": "ship_abc123",
    "reference": "BU-1341",
    "status": "approved",
    "vessel": "MSC Aurora",
    "pallets": [
      {
        "pallet_number": "P001",
        "produce_name": "Hass Avocado",
        "calibre": "14",
        "boxes": 120,
        "box_weight_kg": 4.0
      }
    ],
    "checks": [
      {
        "name": "Completeness",
        "result": "pass",
        "details": "All required fields present"
      }
    ]
  }
}

Create Shipment

Create a new shipment. Documents can be attached separately.

bash
POST /api/v1/shipments

Request Body

json
{
  "shipment": {
    "reference": "BU-1342",
    "vessel": "MSC Aurora",
    "origin": "Valparaiso, Chile",
    "destination": "Rotterdam, Netherlands"
  }
}

Response

json
{
  "shipment": {
    "id": "ship_def456",
    "reference": "BU-1342",
    "status": "pending",
    "created_at": "2026-02-11T10:00:00Z"
  }
}
Tags: api shipments rest endpoints