Update and retire items
Change selected attributes of a listing, replace it in full, or retire it.
Product data changes over time. You might correct a title, add images or stop selling an item altogether. You can update a listing in two ways, and retire it with a delete:
- Patch changes only the attributes you name. Use it for most updates.
- Put replaces the whole listing with the attributes you send.
- Delete retires the listing for a SKU.
All three return the same submission response, with a status of ACCEPTED or INVALID.
Before you begin
- Get an access token with the
listings:writescope, pluslistings:readto check your changes. See Authentication. - Know your seller ID, the SKU and the listing's product type. Get the listing first if you aren't sure. See Get item details.
- Check the attribute names and structure in the product type definition. See Understand the requirements for listing an item.
Update selected attributes
Call Patch a listing. The body requires productType and a patches array. Each patch is a JSON Patch-style operation:
| Field | Description |
|---|---|
op | add, replace or delete. |
path | A JSON Pointer (RFC 6901) to the attribute, for example /attributes/item_name. |
value | An array of objects with the new value. Leave it out for delete. |
PATCH /v4/items/listings/<seller_id>/HP-WL-001?marketplaceIds=WALMART_US&issueLocale=en_US
Authorization: Bearer <access_token>
Content-Type: application/json{
"productType": "Headphones",
"patches": [
{
"op": "replace",
"path": "/attributes/item_name",
"value": [{ "value": "Wireless Over-Ear Headphones with Noise Cancelling", "language": "en_US" }]
},
{
"op": "delete",
"path": "/attributes/bullet_point"
}
]
}The attribute names above are illustrative. Use the names from your product type definition.
{
"sku": "HP-WL-001",
"status": "ACCEPTED",
"submissionId": "7b2e9c41-0d3a-4f6e-8a51-3c9d2e7f4b62",
"issues": []
}Replace the whole listing
When you want the listing to match your source data exactly, call Create or replace a listing with the complete set of attributes. The request has the same shape as when you create the item. See Create items on Walmart.com.
A PUT replaces everything
Attributes you leave out of a PUT body aren't kept. Send every attribute the listing needs, or use PATCH instead.
Retire an item
To stop selling an item, call Delete a listing for the SKU. There is no request body.
DELETE /v4/items/listings/<seller_id>/HP-WL-001?marketplaceIds=WALMART_US
Authorization: Bearer <access_token>{
"sku": "HP-WL-001",
"status": "ACCEPTED",
"submissionId": "c4a81f2d-6e95-4b07-a3d8-91f0b5e2c7a4"
}To retire many items at once, submit a feed with the RETIRE_ITEM_FEED feed type. See Bulk item setup with feeds.
Check the result
Get the listing with includedData=summaries,issues to confirm your change took effect and to see any new issues. See Get item details.
Errors and edge cases
INVALIDstatus. The submission was rejected. Each entry inissuesgives acode,message,severityand the affectedattributeNames.- SKU not found.
PATCHandDELETEreturn404 Not Foundwhen the SKU doesn't exist for your seller ID. - Missing fields.
productTypeandpatchesare required for a patch.marketplaceIdsis required on every request. Leaving one out returns400 Bad Request. - Permissions. A token without
listings:writereturns403 Forbidden. - Rate limits. Back off and retry on
429 Too Many Requests.
