Skip to main content
GET
/
api
/
shipments
/
{id}
/
versions
curl -X GET \
  'https://platform.returnqueen.dev/api/shipments/123e4567-e89b-12d3-a456-426614174000/versions?page=1&page_size=20' \
  -H 'X-API-KEY: your-api-key'
{
  "versions": [
    {
      "id": 456,
      "action": "update",
      "recorded_at": "2024-01-15T10:30:00Z",
      "changes": {
        "status": {
          "from": "scheduled",
          "to": "cancelled"
        },
        "cancelled_at": "2024-01-15T10:30:00Z",
        "cancelled_reason": "Partner requested cancellation"
      },
      "metadata": {
        "user_type": "api",
        "api_key_id": "550e8400-e29b-41d4-a716-446655440000",
        "partner_id": "660e8400-e29b-41d4-a716-446655440001",
        "change_reason": "Partner requested cancellation"
      }
    },
    {
      "id": 123,
      "action": "insert",
      "recorded_at": "2024-01-15T08:00:00Z",
      "changes": {
        "order_number": "ORD-123",
        "shipment_type": "delivery",
        "status": "pending"
      },
      "metadata": {
        "user_type": "api",
        "api_key_id": "550e8400-e29b-41d4-a716-446655440000",
        "partner_id": "660e8400-e29b-41d4-a716-446655440001"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 20,
    "total_count": 2,
    "total_pages": 1
  }
}

Request Parameters

Path Parameters

id
string
required
The unique identifier of the shipment (UUID format)

Query Parameters

page
integer
default:"1"
Page number for pagination
page_size
integer
default:"20"
Items per page (maximum: 100)
curl -X GET \
  'https://platform.returnqueen.dev/api/shipments/123e4567-e89b-12d3-a456-426614174000/versions?page=1&page_size=20' \
  -H 'X-API-KEY: your-api-key'
{
  "versions": [
    {
      "id": 456,
      "action": "update",
      "recorded_at": "2024-01-15T10:30:00Z",
      "changes": {
        "status": {
          "from": "scheduled",
          "to": "cancelled"
        },
        "cancelled_at": "2024-01-15T10:30:00Z",
        "cancelled_reason": "Partner requested cancellation"
      },
      "metadata": {
        "user_type": "api",
        "api_key_id": "550e8400-e29b-41d4-a716-446655440000",
        "partner_id": "660e8400-e29b-41d4-a716-446655440001",
        "change_reason": "Partner requested cancellation"
      }
    },
    {
      "id": 123,
      "action": "insert",
      "recorded_at": "2024-01-15T08:00:00Z",
      "changes": {
        "order_number": "ORD-123",
        "shipment_type": "delivery",
        "status": "pending"
      },
      "metadata": {
        "user_type": "api",
        "api_key_id": "550e8400-e29b-41d4-a716-446655440000",
        "partner_id": "660e8400-e29b-41d4-a716-446655440001"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 20,
    "total_count": 2,
    "total_pages": 1
  }
}

Response Fields

versions
array
List of version entries showing changes to the shipment
pagination
object
Pagination information