curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"tracking": "MY-TRACKING-REF-12324"
}
}'
{
"data": {
"id": "38",
"type": "shipment",
"attributes": {
"tracking": "MY-TRACKING-NUMBER-1234",
"number": "H91981279448",
"cost": "100.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:11.360Z",
"updated_at": "2022-11-08T19:35:11.610Z",
"adjustment_total": "0.0",
"additional_tax_total": "0.0",
"promo_total": "0.0",
"included_tax_total": "0.0",
"pre_tax_amount": "0.0",
"taxable_adjustment_total": "0.0",
"non_taxable_adjustment_total": "0.0",
"public_metadata": {},
"private_metadata": {},
"display_discounted_cost": "$100.00",
"display_item_cost": "$10.00",
"display_amount": "$100.00",
"display_final_price": "$100.00",
"display_cost": "$100.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "85",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "116",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "34",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "45",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "45",
"type": "shipping_rate"
}
}
}
}
}
Updates a Shipment
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"tracking": "MY-TRACKING-REF-12324"
}
}'
{
"data": {
"id": "38",
"type": "shipment",
"attributes": {
"tracking": "MY-TRACKING-NUMBER-1234",
"number": "H91981279448",
"cost": "100.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:11.360Z",
"updated_at": "2022-11-08T19:35:11.610Z",
"adjustment_total": "0.0",
"additional_tax_total": "0.0",
"promo_total": "0.0",
"included_tax_total": "0.0",
"pre_tax_amount": "0.0",
"taxable_adjustment_total": "0.0",
"non_taxable_adjustment_total": "0.0",
"public_metadata": {},
"private_metadata": {},
"display_discounted_cost": "$100.00",
"display_item_cost": "$10.00",
"display_amount": "$100.00",
"display_final_price": "$100.00",
"display_cost": "$100.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "85",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "116",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "34",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "45",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "45",
"type": "shipping_rate"
}
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Record updated
The response is of type object
.
Was this page helpful?