Shipments
Adds item (Variant) to an existing Shipment
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- GETReturn a list of Shipments
- POSTCreate a Shipment
- GETReturn a Shipment
- DELDelete a Shipment
- PATCHUpdate a Shipment
- PATCHAdds item (Variant) to an existing Shipment
- PATCHRemoves item (Variant) from Shipment
- PATCHMark Shipment as ready to be shipped
- PATCHMark Shipment as shipped
- PATCHCancels the Shipment
- PATCHResumes the Shipment
- PATCHMoves Shipment back to pending state
- GET
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Shipments
Adds item (Variant) to an existing Shipment
If selected Variant was already added to Order it will increase the quantity of existing Line Item, if not it will create a new Line Item
PATCH
/
api
/
v2
/
platform
/
shipments
/
{id}
/
add_item
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id}/add_item \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"variant_id": "101",
"quantity": 2
}
}'
{
"data": {
"id": "48",
"type": "shipment",
"attributes": {
"tracking": "U10000",
"number": "H80492609966",
"cost": "0.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:13.675Z",
"updated_at": "2022-11-08T19:35:13.998Z",
"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": "$0.00",
"display_item_cost": "$29.99",
"display_amount": "$0.00",
"display_final_price": "$0.00",
"display_cost": "$0.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "90",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "126",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "44",
"type": "inventory_unit"
},
{
"id": "45",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "76",
"type": "shipping_rate"
},
{
"id": "77",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "77",
"type": "shipping_rate"
}
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
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>
Body
application/json
Was this page helpful?
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id}/add_item \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"variant_id": "101",
"quantity": 2
}
}'
{
"data": {
"id": "48",
"type": "shipment",
"attributes": {
"tracking": "U10000",
"number": "H80492609966",
"cost": "0.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:13.675Z",
"updated_at": "2022-11-08T19:35:13.998Z",
"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": "$0.00",
"display_item_cost": "$29.99",
"display_amount": "$0.00",
"display_final_price": "$0.00",
"display_cost": "$0.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "90",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "126",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "44",
"type": "inventory_unit"
},
{
"id": "45",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "76",
"type": "shipping_rate"
},
{
"id": "77",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "77",
"type": "shipping_rate"
}
}
}
}
}