> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ordergroove.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ordergroove.com/_mcp/server.

# Real Time Stock Update

Ordergroove's API can change the stock status of a product in real time. This can help you manage inventory by sending an API call when a product — or group of products — hits a low threshold or goes completely out of stock.

#### Platform

This article is specifically for stores on eCommerce platforms outside of Shopify who want live stock updates. If you are on Shopify, please [reach out to Ordergroove Support](https://help.ordergroove.com/hc/en-us/requests/new) and we'll enable it for you.

***

## Example Use Case

The real time stock update can help you get ahead of inventory issues. For example, if you have 100 units left and 200 are set to renew during the morning order placement task, you can send an automated call to Ordergroove when stock runs out. The overflow orders will then naturally move into Ordergroove's out-of-stock flow instead of failing due to missing inventory.

***

## PATCH Update Endpoint

`https://restapi.ordergroove.com/products-batch/update/`

### Headers

This endpoint requires [user-level authentication](/docs/api-reference/authentication). You will need a specific hash key and a merchant-level ID to generate the `sig_field` value. Please reach out to [help@ordergroove.com](mailto:help@ordergroove.com) to get these credentials if you don't have them.

```text title="Headers"
headers = {
  'authorization': '{"public_id": "<MERCHANT_PUBLIC_ID>", "ts": <SECONDS_SINCE_EPOCH>, "sig_field": "<MERCHANT_LEVEL_ID>", "sig": "<HMAC_SIGNATURE>"}',
  'og-authorization': True,
  'content-type': 'application/json'
}
```

***

## Example Request Body

You can update one or more products in the same request:

```json title="Request"
[
  {
    "product_id": "(external product id)",
    "live": false
  }
]
```

### Example Response

Ordergroove will attempt an update for each product sent and respond with a mapping of each product along with the result:

```json title="Response"
[
  {"results": [{"status": 200, "product_id": "166603786142092350"}]},
  {"results": [{"status": 404, "product_id": "notfound"}]},
  {"results": [{"status": 400, "product_id": "166603786142092351"}]}
]
```