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
}
}
Shipments
Get Shipment Audit History
Returns paginated audit history showing all changes made to a shipment
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
string
required
The unique identifier of the shipment (UUID format)
Query Parameters
integer
default:"1"
Page number for pagination
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
array
List of version entries showing changes to the shipment
Show version properties
Show version properties
integer
Version ID
string
Type of change:
insert, update, or deletestring
When the change was recorded (ISO 8601 format)
object
Fields that changed with their from/to values
⌘I