Shipments
Removes item (Variant) from 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
Removes item (Variant) from Shipment
If selected Variant is removed completely and Shipment doesn’t include any other Line Items, Shipment itself will be deleted
PATCH
/
api
/
v2
/
platform
/
shipments
/
{id}
/
remove_item
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id}/remove_item \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"variant_id": "101",
"quantity": 2
}
}'
{
"data": {
"id": "54",
"type": "shipment",
"attributes": {
"tracking": "U10000",
"number": "H51498419568",
"cost": "0.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:15.496Z",
"updated_at": "2022-11-08T19:35:15.944Z",
"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": "$10.00",
"display_amount": "$0.00",
"display_final_price": "$0.00",
"display_cost": "$0.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "93",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "133",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "51",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "100",
"type": "shipping_rate"
},
{
"id": "101",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "97",
"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
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/shipments/{id}/remove_item \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"shipment": {
"variant_id": "101",
"quantity": 2
}
}'
{
"data": {
"id": "54",
"type": "shipment",
"attributes": {
"tracking": "U10000",
"number": "H51498419568",
"cost": "0.0",
"shipped_at": null,
"state": "pending",
"created_at": "2022-11-08T19:35:15.496Z",
"updated_at": "2022-11-08T19:35:15.944Z",
"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": "$10.00",
"display_amount": "$0.00",
"display_final_price": "$0.00",
"display_cost": "$0.00",
"tracking_url": null
},
"relationships": {
"order": {
"data": {
"id": "93",
"type": "order"
}
},
"address": {
"data": null
},
"stock_location": {
"data": {
"id": "133",
"type": "stock_location"
}
},
"adjustments": {
"data": []
},
"inventory_units": {
"data": [
{
"id": "51",
"type": "inventory_unit"
}
]
},
"shipping_rates": {
"data": [
{
"id": "100",
"type": "shipping_rate"
},
{
"id": "101",
"type": "shipping_rate"
}
]
},
"state_changes": {
"data": []
},
"selected_shipping_rate": {
"data": {
"id": "97",
"type": "shipping_rate"
}
}
}
}
}