# Inventory Guide

# Update stock

  • URL: https://developer.api.us.walmart.com/api-proxy/service/mercuriocl/supplierapi/v1/v2/stocks

  • URL (Sandbox): https://developer.api.us.stg.walmart.com/api-proxy/service/mercuriocl/supplierapi/v1/v2/stocks

  • Method: PUT

  • URL Params

    No parameters needed

  • Headers

    Required: Auth Headers

  • Body

    Required:

    • The body MUST contain the different items that the user wants to update, and the desired stock.
    • The maximum item to update is 400.

    Example:

{ "items": [ { "ITEM_NBR": 654321, "STOCK":30, "LEAD_TIME": "55" }, { "ITEM_NBR": 654322, "STOCK":20, "LEAD_TIME": "55" }, { "ITEM_NBR": 654323, "LEAD_TIME":30 }, { "ITEM_NBR": 654324, "STOCK":0 }, { "ITEM_NBR": 654325, "STOCK":10 } ]
} 
  • Example curl : updateInventory
curl -v -X PUT "https://api-proxy.stg.soa-api-proxy.platform.glb.prod.walmart.com/api-proxy/service/mercuriocl/supplierapi/v1/v2/stocks" \ -H 'Accept: application/json'\ -H 'Content-Type: application/json'\ -H 'WM_CONSUMER.ID: dd3e5a52-291b-469c-8d63-7f1ced3f554a'\ -H 'WM_CONSUMER.INTIMESTAMP: 1633375302898'\ -H 'WM_SEC.KEY_VERSION: 1'\ -H 'WM_SEC.AUTH_SIGNATURE: xXX0x/r1OC8NqgYfDM0HmcOl4vaW3y0CUu0ma5k94nrIL4DBtSWzRmjk3FmvMyu1JO1MfUMgX4Rmtc/u4iY8IpIgGoDDfpaEuwTMEUuTdGVlSbDZwRhVp6p6KG8QowsU5kwN90uR+IFleq/yKbsfVzFZEAodi/f+zHuid4GiH3PdB7RuqDIPxYiMBh8L/D4v9MtSsjc3enRTQiVQqIGVK0zHQ8j5uZoL6zg43RcOJjIwp+OKIN/Ba9txP3HJ0J6kIX4sjPxg3hrPQpyye82mtCeR4k2y6NXX9ivhISQnhsygnqzFq+A8Yh3+6wGP6wVg6WjNKv6IKtse2VjKh9GrGA=='\ -H 'x-api-key: 24A3F4BEE1E11EB9DBDC04DD6EFC163597SgKlq1LXkR9Dv6l/XxXxXxX0xXx=' --data-raw '{
"items": [ { "ITEM_NBR": 654321, "STOCK":30, "LEAD_TIME": "55" }, { "ITEM_NBR": 654322, "STOCK":20, "LEAD_TIME": "55" }, { "ITEM_NBR": 654323, "LEAD_TIME":30 }, { "ITEM_NBR": 654324, "STOCK":0 }, { "ITEM_NBR": 654325, "STOCK":10 } ]
}'
  • Successful Response:

    • Code: 200
    • Content:
{ "processId": "d2defe34-1234-11e4-as24-0fa02781f112", "items": { "error": [ 654325 ], "ok": [ 654321, 654322, 654323, 654324 ] }
}

A Successful response shows which items were updated successfully, and which items had error when trying to update. The response ignores items that do not exist in our database

  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: Not token authorization given or token is expired

# Retrieve update state

  • URL: https://developer.api.us.walmart.com/api-proxy/service/mercuriocl/supplierapi/v1/v2/updates/-updateUUID-/state

  • URL (Sandbox): https://developer.api.us.stg.walmart.com/api-proxy/service/mercuriocl/supplierapi/v1/v2/updates/-updateUUID-/state

  • Method: GET

  • URL Params

    Mandatory:

    :updateUUID

    Format: string
    Example: f31b7222-c9d2-11e6-9fe4-330476984cb3
    Description: For each request to update inventory you receive a UUID that identifies that update in our system. You can use this identifier to track your update status.

  • Headers

    Required: Auth Headers

  • Success Response:

    • Code: 200
    • Content:
{ "processId": "f31b7222-c9d2-11e6-9fe4-330476984cb3", "state": { "code": 2, "description": "IN_PROGRESS" }, "updateUploadedAt": 1
}

Possible Error cases