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
}
}
Returns paginated audit history showing all changes made to a shipment
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
}
}
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
}
}
Show version properties
insert, update, or delete