inventory

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-inventory"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/13ae8851-6d82-415a-b826-a5fe03af153c/social-card.svg?v=3e7ae33eec8b" alt="inventory" width="600" height="315"></a>
PUThttps://linkyhub.net/api/v3/products/{productId}/inventoryScope inventory:write

Set a product’s stock. 0 marks it sold out; null means unlimited.

Parameters

productIdstringpathrequired

Request body

application/json
inventoryintegerrequired
{
  "inventory": 0
}

Code samples

cURL
curl -X PUT "https://linkyhub.net/api/v3/products/{productId}/inventory" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inventory":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated