Vai alla navigazione

Adjust Product Stock

Add to or subtract from the on-hand quantity of a counted product at one location, without overwriting orders taken at the same time.

Parametri di percorso

product_idstringObbligatorio

Header

xi-api-keystringOpzionale
xi-workspace-idstring or nullOpzionale
The customer workspace a reseller's API key acts on.

Richiesta

This endpoint expects an object.
location_idstringObbligatorio
Location whose count changes.
deltaintegerObbligatorio

Signed change to apply to on-hand. Prefer this over an absolute write whenever the intent is ‘a few more/fewer’.

Risposta

Risposta riuscita
namestring
Name of the product.
_idstring
pricing_modeenumOpzionalePredefinito a fixed

‘fixed’ (default): the item has a known price the agent can quote, and customers can book or order it directly. ‘quote’: the price depends on the job (renovation, catering, custom work), so no price or slot is offered; the agent collects the intake_questions and files a quote request instead. Takes effect only while quotes are enabled for the business. Group services cannot use ‘quote’.

Valori consentiti:
intake_questionslist of objectsOpzionale

Questions the agent asks before booking or ordering this item. Required for a useful pricing_mode='quote' item — without them a quote request arrives with nothing to price — but also valid on fixed-price items that need extra detail (current hair color before a dye job, allergies before a treatment).

groupslist of objectsOpzionale

Group memberships for this item. Each entry carries the group label and the item’s 0-based rank within that group.

ungrouped_rankinteger or nullOpzionale>=0

Display position among items with no group; null sorts last. Change it with the reorder endpoint.

descriptionstringOpzionale
Description of the product.
pricedouble or nullOpzionale>=0

Price of the product; null for no listed price.

is_activebooleanOpzionalePredefinito a true
False hides the product without deleting it.
orderablebooleanOpzionalePredefinito a true

False keeps the product listed (callers can ask about it) but not orderable.

allowed_fulfillment_typeslist of enumsOpzionale
Fulfillment options customers may choose when ordering this product.
Valori consentiti:
location_idslist of stringsOpzionale

Locations where this product is sold; empty list means all locations.

stockmap from strings to integers or nullOpzionale

On-hand quantity by location. None means unlimited. A missing location key means zero.

created_at_unixintegerOpzionale

Unix timestamp (seconds since epoch)

updated_at_unixintegerOpzionale

Unix timestamp (seconds since epoch)

Errori

422
Unprocessable Entity Error