{"openapi":"3.1.0","info":{"title":"NextStock API","version":"v1","description":"v1 is the current public contract. Additive fields and endpoints ship in place. Breaking changes are introduced under a new version path; this version stays until an announced deprecation date. Authenticate with a bearer API key. POST requests require an Idempotency-Key header."},"servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"WorkflowNotInUse":{"description":"409 problem returned when a request starts new work in a workflow the tenant has not turned on. Work that is already open still completes while the workflow is finishing.","type":"object","properties":{"type":{"type":"string","example":"about:blank"},"title":{"type":"string","const":"workflow_not_in_use"},"status":{"type":"integer","const":409},"detail":{"type":"string"},"recovery":{"type":"object","properties":{"action":{"type":"string","const":"turn_on_workflow"},"recordId":{"type":"string","description":"The workflow key, e.g. orders"},"href":{"type":"string","description":"The office settings page that turns it on"}}}}}}},"security":[{"bearer":[]}],"paths":{"/products":{"get":{"summary":"List products"},"post":{"summary":"Create product","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"type":"string"},"title":{"type":"string","minLength":1},"description":{"type":"string"},"brand":{"type":"string"},"category":{"type":"string"},"optionNames":{"default":[],"type":"array","items":{"type":"string"}},"variants":{"minItems":1,"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","minLength":1},"optionValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"trackLot":{"default":false,"type":"boolean"},"trackExpiry":{"default":false,"type":"boolean"},"trackSerial":{"default":false,"type":"boolean"},"shipsInOwnContainer":{"default":false,"type":"boolean"},"barcode":{"type":"string"},"weightG":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"salesOrderMultiple":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"salesMinQty":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"notes":{"type":"string","maxLength":2000},"priceMinor":{"type":"integer","minimum":0,"maximum":2147483647},"costMinor":{"type":"integer","minimum":0,"maximum":2147483647},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"customValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["sku"]}}},"required":["clientId","title","variants"]}}}}}},"/products/{id}":{"get":{"summary":"Get product"},"patch":{"summary":"Update product","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","minLength":1},"description":{"type":"string"},"brand":{"type":"string"},"category":{"type":"string"}},"required":["id"]}}}}}},"/products/{id}/archive":{"post":{"summary":"Archive product"}},"/products/{id}/restore":{"post":{"summary":"Restore product"}},"/variants":{"get":{"summary":"List variants"}},"/variants/{id}":{"get":{"summary":"Get variant"},"patch":{"summary":"Update variant, including notes, customValues (keyed by custom field key; null clears one) and the priceMinor / costMinor reference values","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"sku":{"type":"string","minLength":1},"trackLot":{"type":"boolean"},"trackExpiry":{"type":"boolean"},"trackSerial":{"type":"boolean"},"receiveToQuarantine":{"type":["boolean","null"]},"minShelfLifeDays":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hsCode":{"type":["string","null"]},"originCountry":{"type":["string","null"]},"customsDescription":{"type":["string","null"]},"salesOrderMultiple":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"salesMinQty":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"priceMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"costMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"customValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id"]}}}}}},"/variants/{id}/tags":{"put":{"summary":"Replace the variant's tags by name; missing tags are created","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tags":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["tags"]}}}}}},"/tags":{"get":{"summary":"List tags in use, with how many items carry each"}},"/custom-fields":{"get":{"summary":"List item fields (custom field definitions)","parameters":[{"name":"archived","in":"query","required":false,"schema":{"type":"string","enum":["true"]}}]},"post":{"summary":"Create an item field; its key is derived from the label and never changes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"type":{"type":"string","enum":["text","number","date","select","yes_no"]},"options":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}}},"required":["label","type"]}}}}}},"/custom-fields/{id}":{"patch":{"summary":"Rename an item field or change its choices (the type is fixed)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"options":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":80}}}}}}}}},"/custom-fields/{id}/archive":{"post":{"summary":"Archive an item field; recorded values are kept"}},"/custom-fields/{id}/restore":{"post":{"summary":"Restore an archived item field"}},"/stock-minimums":{"put":{"summary":"Set or clear (minQty: null) an item's minimum level in a warehouse","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string","minLength":1},"warehouseId":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"minQty":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]}},"required":["variantId","warehouseId","minQty"]}}}}}},"/items":{"get":{"summary":"List items in a warehouse with on hand, minimum, low flag and tags (cost and value while Item value is on)","parameters":[{"name":"warehouse","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"name":"place","in":"query","required":false,"schema":{"type":"string"}},{"name":"low","in":"query","required":false,"schema":{"type":"string"}}]}},"/inventory":{"get":{"summary":"List inventory balances","parameters":[{"name":"warehouse","in":"query","required":false,"schema":{"type":"string"}},{"name":"client","in":"query","required":false,"schema":{"type":"string"}},{"name":"sku","in":"query","required":false,"schema":{"type":"string"}},{"name":"location","in":"query","required":false,"schema":{"type":"string"}},{"name":"lot","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Matches SKU, product title, location code, lot number or LPN code"}]}},"/inventory/movements":{"get":{"summary":"List movements"}},"/inventory/adjustments":{"post":{"summary":"Adjust stock","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string"},"clientId":{"type":"string"},"lotId":{"type":["string","null"]},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"location":{"type":"object","properties":{"warehouseId":{"type":"string"},"locationId":{"type":"string"},"lpnId":{"type":["string","null"]},"status":{"default":"available","type":"string","enum":["available","quarantine","damaged","hold"]}},"required":["warehouseId","locationId"]},"serialIds":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string","enum":["found","lost","damaged","correction","restocked","sold","used","import_correction","opening","count","scrap","transfer_loss","transfer_damage","kit_yield"]},"note":{"type":"string"},"commandId":{"type":"string","minLength":1}},"required":["variantId","clientId","quantity","location","reasonCode"]}}}}}},"/inventory/moves":{"post":{"summary":"Move stock","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string"},"clientId":{"type":"string"},"lotId":{"type":["string","null"]},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":"object","properties":{"warehouseId":{"type":"string"},"locationId":{"type":"string"},"lpnId":{"type":["string","null"]},"status":{"default":"available","type":"string","enum":["available","quarantine","damaged","hold"]}},"required":["warehouseId","locationId"]},"to":{"type":"object","properties":{"warehouseId":{"type":"string"},"locationId":{"type":"string"},"lpnId":{"type":["string","null"]},"status":{"default":"available","type":"string","enum":["available","quarantine","damaged","hold"]}},"required":["warehouseId","locationId"]},"serialIds":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["variantId","clientId","quantity","from","to"]}}}}}},"/inventory/status-changes":{"post":{"summary":"Change stock status","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string"},"clientId":{"type":"string"},"lotId":{"type":["string","null"]},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"location":{"type":"object","properties":{"warehouseId":{"type":"string"},"locationId":{"type":"string"},"lpnId":{"type":["string","null"]},"status":{"default":"available","type":"string","enum":["available","quarantine","damaged","hold"]}},"required":["warehouseId","locationId"]},"toStatus":{"type":"string","enum":["available","quarantine","damaged","hold"]},"serialIds":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["variantId","clientId","quantity","location","toStatus"]}}}}}},"/warehouses":{"get":{"summary":"List warehouses"},"post":{"summary":"Create warehouse","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"default":"UTC","type":"string"},"walkConfig":{"type":"object","properties":{"zoneOrder":{"type":"array","items":{"type":"string"}},"aisleMode":{"default":"serpentine","type":"string","enum":["serpentine","asc","desc"]},"rackMode":{"default":"single","type":"string","enum":["single","both_sides"]}},"required":["zoneOrder"]}},"required":["code","name"]}}}}}},"/warehouses/{id}":{"get":{"summary":"Get warehouse"},"patch":{"summary":"Update warehouse","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"}}}},"required":["id"]}}}}}},"/warehouses/{id}/process":{"get":{"summary":"Get the warehouse process map (which inbound, outbound and returns steps exist, with readiness)"},"put":{"summary":"Replace the warehouse process map; expectedRevision guards against stale saves","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"inbound":{"type":"array","items":{"type":"string","enum":["receive","inspect","putaway"]}},"outbound":{"type":"array","items":{"type":"string","enum":["pick","pack","load","ship"]}},"returns":{"type":"array","items":{"type":"string","enum":["receive","inspect","disposition"]}}},"required":["warehouseId","expectedRevision","inbound","outbound","returns"]}}}}}},"/workflows":{"get":{"summary":"List the tenant's workflows with their state (active, finishing, off) and open work"},"put":{"summary":"Replace the set of workflows that are on; expectedRevision guards against stale saves","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"enabled":{"type":"array","items":{"type":"string","enum":["item_value","pick_lists","orders","receiving","purchasing","returns","stock_counts","quality","multiple_warehouses","stock_owners","containers","kits","replenishment","check_out"]}}},"required":["expectedRevision","enabled"]}}}}}},"/warehouses/{id}/archive":{"post":{"summary":"Archive warehouse"}},"/warehouses/{id}/restore":{"post":{"summary":"Restore warehouse"}},"/locations":{"get":{"summary":"List locations"},"post":{"summary":"Generate locations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"spec":{"type":"object","properties":{"prefixZone":{"default":false,"type":"boolean"},"zones":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":16,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1},"aisleCount":{"type":"integer","minimum":1,"maximum":26},"racksPerAisle":{"type":"integer","minimum":1,"maximum":99},"levels":{"type":"integer","minimum":1,"maximum":20},"binsPerLevel":{"type":"integer","minimum":1,"maximum":26},"usage":{"type":"string","enum":["storage","pick_face","receiving","packing","staging","dock","returns","quarantine","transit"]},"maxLpns":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"singleSku":{"type":"boolean"}},"required":["code","name","aisleCount","racksPerAisle","levels","binsPerLevel","usage"]}}},"required":["zones"]},"dryRun":{"default":false,"type":"boolean"}},"required":["warehouseId","spec"]}}}}}},"/locations/walk-order":{"get":{"summary":"Read zone routes and layout revision","parameters":[{"name":"warehouse","in":"query","required":true,"schema":{"type":"string"}}]},"post":{"summary":"Save zone routes and recompute walk sequence (Idempotency-Key required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string","minLength":1},"revision":{"type":"string","minLength":1},"routes":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"zone":{"type":"string","maxLength":32},"stopIds":{"minItems":1,"maxItems":20000,"type":"array","items":{"type":"string","minLength":1}}},"required":["zone","stopIds"]}}},"required":["warehouseId","revision","routes"]}}}}}},"/locations/walk-order/preview":{"post":{"summary":"Preview a route without saving","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string","minLength":1},"revision":{"type":"string","minLength":1},"routes":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"zone":{"type":"string","maxLength":32},"stopIds":{"minItems":1,"maxItems":20000,"type":"array","items":{"type":"string","minLength":1}}},"required":["zone","stopIds"]}}},"required":["warehouseId","revision","routes"]}}}}}},"/locations/areas":{"post":{"summary":"Create a standalone area (Idempotency-Key required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"zone":{"default":"","type":"string","maxLength":32},"usage":{"type":"string","enum":["storage","pick_face","receiving","packing","staging","dock","returns","quarantine"]}},"required":["warehouseId","code","usage"]}}}}}},"/locations/{id}":{"patch":{"summary":"Update capacity, sequence override and replenishment targets atomically (Idempotency-Key required)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"id":{"type":"string"},"updatedAt":{"type":"string"},"maxLpns":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}]},"singleSku":{"type":"boolean"},"sequenceLocked":{"type":"boolean"},"walkSequence":{"type":"integer","minimum":0,"maximum":2147483637},"face":{"type":"object","properties":{"variantId":{"type":"string"},"minQty":{"type":"integer","minimum":0,"maximum":2147483647},"maxQty":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"required":["variantId","minQty","maxQty"]}},"required":["warehouseId","id","updatedAt","maxLpns","singleSku","sequenceLocked","walkSequence"]}}}}}},"/clients":{"get":{"summary":"List clients"},"post":{"summary":"Create client","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1}},"required":["code","name"]}}}}}},"/clients/{id}":{"get":{"summary":"Get client"},"patch":{"summary":"Update client","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40}}},"inboundConfig":{"type":"object","properties":{"overReceiptTolerancePct":{"type":"number","minimum":0,"maximum":100},"receiveToQuarantine":{"type":"boolean"},"minShelfLifeDays":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"blindReceiving":{"type":["boolean","null"]}}},"returnsConfig":{"type":"object","properties":{"defaultDisposition":{"type":"string","enum":["restock","quarantine","repair","scrap"]},"requireInspection":{"type":"boolean"},"restockWindowDays":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}}}},"required":["id"]}}}}}},"/clients/{id}/archive":{"post":{"summary":"Archive client"}},"/clients/{id}/restore":{"post":{"summary":"Restore client"}},"/customers":{"get":{"summary":"List customers"},"post":{"summary":"Create customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"type":"string"},"code":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":160},"email":{"type":"string"},"phone":{"type":"string"},"defaultAllowPartial":{"default":false,"type":"boolean"},"addresses":{"default":[],"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"address":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"contact":{"type":"string"},"deliveryNotes":{"type":"string"}},"required":["label","address"]}}},"required":["clientId","code","name"]}}}}},"patch":{"summary":"Update customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"defaultAllowPartial":{"type":"boolean"}},"required":["id"]}}}}}},"/customers/{id}":{"get":{"summary":"Get customer with live ship-to addresses"}},"/customers/{id}/archive":{"post":{"summary":"Archive customer"}},"/customers/{id}/restore":{"post":{"summary":"Restore customer"}},"/customers/{id}/addresses":{"post":{"summary":"Add a ship-to address","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"label":{"type":"string","minLength":1},"address":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"contact":{"type":"string"},"deliveryNotes":{"type":"string"}},"required":["label","address"]}}}}}},"/customers/{id}/item-codes":{"get":{"summary":"List customer item codes"},"post":{"summary":"Create or update a customer item code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string"},"packId":{"type":["string","null"]},"code":{"type":"string","minLength":1,"maxLength":80},"description":{"type":["string","null"]}},"required":["variantId","code"]}}}}}},"/customers/{id}/item-codes/{codeId}":{"delete":{"summary":"Archive a customer item code"}},"/orders":{"get":{"summary":"List orders and pick lists; `purpose=sale` or `purpose=internal` narrows to one"},"post":{"summary":"Create order. With `orderTypeId` set to the warehouse's `PICK` order type (purpose internal) it creates a pick list: no customer, `shipTo.name` says what it is for, and it needs the Pick lists workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"customerId":{"type":"string"},"customerAddressId":{"type":"string"},"shipTo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"channel":{"default":"manual","type":"string","enum":["manual","api","csv"]},"externalRef":{"type":"string"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowPartial":{"type":"boolean"},"requestedShipDate":{"type":"string"},"notes":{"type":"string"},"autoAllocate":{"type":"boolean"},"orderTypeId":{"type":["string","null"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"sku":{"type":"string"},"barcode":{"type":"string"},"customerItemCode":{"type":"string"},"packId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unitPriceMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowOffMultiple":{"type":"boolean"},"offMultipleReason":{"type":"string"}},"required":["quantity"]}}},"required":["warehouseId","clientId","lines"]}}}}}},"/orders/allocate":{"post":{"summary":"Retry backorders for a warehouse","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"variantIds":{"type":"array","items":{"type":"string"}}},"required":["warehouseId"]}}}}}},"/orders/{id}":{"get":{"summary":"Get order"},"patch":{"summary":"Update order header","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notes":{"type":["string","null"]},"requestedShipDate":{"type":["string","null"]},"allowPartial":{"type":"boolean"},"shipTo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"customerAddressId":{"type":["string","null"]},"orderTypeId":{"type":["string","null"]}},"required":["id"]}}}}}},"/orders/{id}/lines":{"patch":{"summary":"Update order lines","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"variantId":{"type":"string"},"sku":{"type":"string"},"barcode":{"type":"string"},"customerItemCode":{"type":"string"},"packId":{"type":"string"},"quantity":{"type":"integer","minimum":0,"maximum":9007199254740991},"unitPriceMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowOffMultiple":{"type":"boolean"},"offMultipleReason":{"type":"string"}},"required":["quantity"]}}},"required":["id","lines"]}}}}}},"/orders/{id}/split":{"post":{"summary":"Split remaining unpicked demand onto a child order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"lineIds":{"type":"array","items":{"type":"string"}},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"},"shipTo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"allowPartial":{"type":"boolean"},"orderTypeId":{"type":["string","null"]},"requestedShipDate":{"type":["string","null"]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","reason"]}}}}}},"/orders/{id}/reship":{"post":{"summary":"Create a reship of a shipped order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["lineId","quantity"]}},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"},"shipTo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"notes":{"type":"string"}},"required":["name"]},"allowPartial":{"type":"boolean"},"orderTypeId":{"type":["string","null"]},"requestedShipDate":{"type":["string","null"]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"externalRef":{"type":"string"},"channel":{"default":"manual","type":"string","enum":["manual","api","csv"]}},"required":["id","lines","reason"]}}}}}},"/orders/{id}/restock":{"post":{"summary":"Restock picked leftover before cancel","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"orderId":{"type":"string"},"toLocationId":{"type":"string"},"toLpnId":{"type":["string","null"]},"variantId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serialIds":{"type":"array","items":{"type":"string"}},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"}},"required":["orderId","toLocationId","reason"]}}}}}},"/orders/{id}/cancel":{"post":{"summary":"Cancel order"}},"/orders/{id}/hold":{"post":{"summary":"Hold order"}},"/orders/{id}/release":{"post":{"summary":"Release / allocate order"}},"/orders/{id}/ship":{"post":{"summary":"Confirm an order left the warehouse (warehouses that ship without loads)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"orderId":{"type":"string"}},"required":["orderId"]}}}}}},"/pick-lists":{"get":{"summary":"List pick lists for a warehouse"},"post":{"summary":"Plan pick lists from allocated orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"orderIds":{"minItems":1,"type":"array","items":{"type":"string"}},"mode":{"default":"discrete","type":"string","enum":["discrete","batch"]},"assignedTo":{"type":"string"}},"required":["warehouseId","orderIds"]}}}}}},"/pick-lists/{id}":{"get":{"summary":"Get pick list with walk-ordered tasks"}},"/pick-lists/{id}/assign":{"post":{"summary":"Assign a pick list to a member, or release it with assignedTo: null","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assignedTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["assignedTo"]}}}}}},"/shipping-units":{"get":{"summary":"List shipping units"}},"/shipping-units/{id}/ship":{"post":{"summary":"Ship closed packages without a load","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["shippingUnitIds"]}}}}}},"/shipments":{"get":{"summary":"List shipments"},"post":{"summary":"Buy a carrier label for a closed package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitId":{"type":"string"},"carrierAccountId":{"type":"string"},"service":{"type":"string"},"printerId":{"type":"string"},"customs":{"type":"object","properties":{"hsCode":{"type":"string"},"originCountry":{"type":"string"},"description":{"type":"string"}}},"codAmountMinor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["shippingUnitId"]}}}}}},"/shipments/{id}":{"get":{"summary":"Get a shipment (credentials never included)"}},"/shipments/{id}/void":{"post":{"summary":"Void a purchased label","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shipmentId":{"type":"string"},"reason":{"type":"string"}},"required":["shipmentId"]}}}}}},"/shipments/{id}/reconcile":{"post":{"summary":"Reconcile an uncertain purchase","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shipmentId":{"type":"string"}},"required":["shipmentId"]}}}}}},"/shipments/{id}/label":{"get":{"summary":"Download the stored label"}},"/shipments/{id}/tracking":{"get":{"summary":"Tracking events for a shipment"}},"/rates":{"post":{"summary":"Quote rates for a closed package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitId":{"type":"string"},"carrierAccountId":{"type":"string"}},"required":["shippingUnitId"]}}}}}},"/carrier-accounts":{"get":{"summary":"List carrier accounts (no credentials)"},"post":{"summary":"Create a carrier account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"provider":{"default":"null","type":"string","enum":["null"]},"accountRef":{"type":"string"},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"dimDivisor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"defaultService":{"type":"string"},"clientId":{"type":"string"}},"required":["name"]}}}}}},"/printers":{"get":{"summary":"List printers"},"post":{"summary":"Create a printer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"stationId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["label_4x6","label_2x1","document_a4"]},"transport":{"type":"string","enum":["printnode","browser","download"]},"transportRef":{"type":"string"},"dpi":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["warehouseId","name","kind","transport"]}}}}}},"/print-jobs":{"get":{"summary":"List print jobs"},"post":{"summary":"Send a print job","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"printerId":{"type":"string"},"kind":{"type":"string","enum":["shipping_label","packing_slip","lpn","item_label","location_label","manifest","pick_list","document","bill_of_lading","delivery_note","load_packing_list","purchase_order","pallet_label"]},"referenceType":{"type":"string","minLength":1},"referenceId":{"type":"string","minLength":1},"format":{"type":"string","enum":["zpl","pdf","html"]},"payload":{"type":"string"},"copies":{"type":"integer","exclusiveMinimum":0,"maximum":20},"reprintOfId":{"type":"string"},"payloadFileId":{"type":"string"}},"required":["kind","referenceType","referenceId","format"]}}}}}},"/carrier-manifests":{"post":{"summary":"Open a carrier manifest for a business date","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"carrierAccountId":{"type":"string"},"warehouseId":{"type":"string"},"businessDate":{"type":"string"}},"required":["carrierAccountId","warehouseId","businessDate"]}}}}}},"/carrier-manifests/{id}/close":{"post":{"summary":"Close a carrier manifest","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"manifestId":{"type":"string"}},"required":["manifestId"]}}}}}},"/shipping-units/{id}/reopen":{"post":{"summary":"Reopen a closed package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitId":{"type":"string"},"labelVoided":{"type":"boolean"},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"}},"required":["shippingUnitId","reason"]}}}}}},"/shipping-units/{id}/unpack":{"post":{"summary":"Unpack an item from an open package","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitId":{"type":"string"},"variantId":{"type":"string"},"quantity":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"toLpnId":{"type":"string"},"serialIds":{"type":"array","items":{"type":"string"}},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"}},"required":["shippingUnitId","variantId","reason"]}}}}}},"/shipping-units/{id}/remove-from-pallet":{"post":{"summary":"Take a carton off a pallet","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shippingUnitId":{"type":"string"},"reason":{"type":"string","enum":["closed_early","wrong_item","customer_cancelled","address_change","qty_change","carrier_void","other"]},"note":{"type":"string"}},"required":["shippingUnitId","reason"]}}}}}},"/loads":{"get":{"summary":"List loads"},"post":{"summary":"Create load","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"carrierName":{"type":"string"},"service":{"type":"string"},"vehicle":{"type":"string"},"driverName":{"type":"string"},"driverPhone":{"type":"string"},"dockLocationId":{"type":"string"},"scheduledAt":{"type":"string"},"reference":{"type":"string"},"freightTerms":{"type":"string","enum":["prepaid","collect","third_party"]},"bookingRef":{"type":"string"},"orderIds":{"default":[],"type":"array","items":{"type":"string"}}},"required":["warehouseId"]}}}}}},"/loads/{id}":{"get":{"summary":"Get load"}},"/loads/{id}/orders":{"post":{"summary":"Assign orders to a load","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"loadId":{"type":"string"},"orderIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["loadId","orderIds"]}}}}}},"/loads/{id}/dispatch":{"post":{"summary":"Dispatch a load (closes the outbound cycle)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"loadId":{"type":"string"},"overrideIncomplete":{"default":false,"type":"boolean"}},"required":["loadId"]}}}}}},"/loads/{id}/documents":{"get":{"summary":"Bill of lading, packing list and delivery notes for a load"}},"/loads/{id}/bill-of-lading":{"get":{"summary":"Bill of lading for a load"}},"/loads/{id}/stops/{stopId}/deliver":{"post":{"summary":"Record proof of delivery for a stop","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"loadId":{"type":"string"},"stopId":{"type":"string"},"receivedBy":{"type":"string","minLength":1,"maxLength":120},"deliveredAt":{"type":"string"},"signatureFileId":{"type":"string"},"photoFileId":{"type":"string"},"note":{"type":"string"},"exceptions":{"default":[],"type":"array","items":{"type":"object","properties":{"shippingUnitId":{"type":"string"},"kind":{"type":"string","enum":["refused","short","damaged"]},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"note":{"type":"string"}},"required":["shippingUnitId","kind"]}},"supersedesId":{"type":"string"},"reason":{"type":"string"}},"required":["loadId","stopId","receivedBy"]}}}}}},"/load-stops/{id}/delivery-note":{"get":{"summary":"Delivery note for a load stop"}},"/suppliers":{"get":{"summary":"List suppliers"},"post":{"summary":"Create supplier","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"type":"string"},"code":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":160},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal":{"type":"string"},"country":{"type":"string"}}}},"required":["clientId","code","name"]}}}}},"patch":{"summary":"Update supplier"}},"/purchase-orders":{"get":{"summary":"List purchase orders"},"post":{"summary":"Create purchase order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"supplierId":{"type":"string"},"channel":{"default":"manual","type":"string","enum":["manual","api","csv"]},"externalRef":{"type":"string"},"expectedDate":{"type":"string"},"currency":{"default":"USD","type":"string"},"notes":{"type":"string"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"sku":{"type":"string"},"barcode":{"type":"string"},"packId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedLotNumber":{"type":"string"},"expectedExpiry":{"type":"string"},"unitCostMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["quantity"]}}},"required":["warehouseId","clientId","lines"]}}}}}},"/purchase-orders/{id}":{"get":{"summary":"Get purchase order"},"patch":{"summary":"Update purchase order"}},"/purchase-orders/{id}/cancel":{"post":{"summary":"Cancel purchase order"}},"/purchase-orders/{id}/close":{"post":{"summary":"Close purchase order"}},"/purchase-orders/{id}/approve":{"post":{"summary":"Approve a purchase order waiting for purchasing.approve","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/purchase-orders/{id}/send":{"post":{"summary":"Email the purchase order to the supplier","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"to":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["id"]}}}}}},"/purchase-orders/{id}/files":{"post":{"summary":"Attach an inbound document to a purchase order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"poId":{"type":"string"},"fileId":{"type":"string"},"caption":{"type":"string"}},"required":["poId","fileId"]}}}}}},"/asns":{"get":{"summary":"List ASNs"},"post":{"summary":"Create ASN","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"supplierId":{"type":"string"},"purchaseOrderId":{"type":"string"},"channel":{"default":"manual","type":"string","enum":["manual","api","csv","unplanned"]},"externalRef":{"type":"string"},"carrier":{"type":"string"},"reference":{"type":"string"},"expectedAt":{"type":"string"},"receivingLocationId":{"type":"string"},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"sku":{"type":"string"},"barcode":{"type":"string"},"packId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedLotNumber":{"type":"string"},"expectedExpiry":{"type":"string"},"unitCostMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["quantity"]}},"fromOpenPo":{"default":false,"type":"boolean"}},"required":["warehouseId","clientId"]}}}}}},"/asns/{id}":{"get":{"summary":"Get ASN"},"patch":{"summary":"Update ASN"}},"/asns/{id}/arrive":{"post":{"summary":"Mark ASN arrived"}},"/asns/{id}/cancel":{"post":{"summary":"Cancel ASN"}},"/asns/{id}/close":{"post":{"summary":"Close ASN"}},"/asns/{id}/receipts":{"get":{"summary":"List ASN receipts"}},"/webhooks":{"get":{"summary":"List webhooks"},"post":{"summary":"Create webhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"eventTypes":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["url","eventTypes"]}}}}},"delete":{"summary":"Delete webhook"}},"/counts":{"get":{"summary":"List counts"},"post":{"summary":"Plan a count","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"programId":{"type":"string"},"scope":{"type":"object","properties":{"zoneIds":{"type":"array","items":{"type":"string"}},"abcClasses":{"type":"array","items":{"type":"string","enum":["a","b","c"]}},"clientIds":{"type":"array","items":{"type":"string"}},"variantIds":{"type":"array","items":{"type":"string"}}}},"kind":{"type":"string","enum":["cycle","spot","scoped"]},"sku":{"type":"string"},"triggeredOnly":{"type":"boolean"},"tasksPerRun":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"note":{"type":"string"}},"required":["warehouseId"]}}}}}},"/counts/{id}":{"get":{"summary":"Get count"}},"/counts/{id}/post":{"post":{"summary":"Post count","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"countId":{"type":"string"}},"required":["countId"]}}}}}},"/counts/{id}/cancel":{"post":{"summary":"Cancel count","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"countId":{"type":"string"}},"required":["countId"]}}}}}},"/counts/{id}/variances":{"get":{"summary":"List count variances"}},"/holds":{"get":{"summary":"List holds"},"post":{"summary":"Apply a hold","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"scopeKind":{"type":"string","enum":["lot","variant","location","lpn","supplier","asn"]},"scopeRef":{"type":"string"},"reason":{"type":"string","enum":["recall","quality","customer","damage","investigation"]},"targetStatus":{"default":"hold","type":"string","enum":["hold","quarantine"]},"autoApply":{"default":false,"type":"boolean"},"note":{"type":"string"}},"required":["scopeKind","scopeRef","reason"]}}}}}},"/holds/{id}":{"get":{"summary":"Get hold with exposure"}},"/holds/{id}/release":{"post":{"summary":"Release hold","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"holdId":{"type":"string"},"lineIds":{"type":"array","items":{"type":"string"}},"releaseNote":{"type":"string"}},"required":["holdId"]}}}}}},"/returns":{"get":{"summary":"List RMAs"},"post":{"summary":"Create RMA","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"customerId":{"type":"string"},"salesOrderId":{"type":"string"},"channel":{"default":"manual","type":"string","enum":["manual","api","csv","unplanned"]},"externalRef":{"type":"string"},"reason":{"type":"string"},"carrier":{"type":"string"},"tracking":{"type":"string"},"expectedAt":{"type":"string"},"receivingLocationId":{"type":"string"},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"sku":{"type":"string"},"barcode":{"type":"string"},"packId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedLotNumber":{"type":"string"},"expectedExpiry":{"type":"string"},"unitCostMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"salesOrderLineId":{"type":"string"}},"required":["quantity"]}}},"required":["warehouseId","clientId"]}}}}}},"/returns/{id}":{"get":{"summary":"Get RMA"},"patch":{"summary":"Update RMA","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"reason":{"type":["string","null"]},"carrier":{"type":["string","null"]},"tracking":{"type":["string","null"]},"expectedAt":{"type":["string","null"]}},"required":["id"]}}}}}},"/returns/{id}/cancel":{"post":{"summary":"Cancel RMA","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/returns/{id}/close":{"post":{"summary":"Close RMA","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"}},"required":["id"]}}}}}},"/returns/{id}/receipts":{"get":{"summary":"List return receipts"}},"/lots/{id}/trace":{"get":{"summary":"Lot traceability report"}},"/imports":{"post":{"summary":"Start an import and return a direct upload target","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"originalName":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":0,"maximum":52428800},"contentType":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["catalog","opening_stock","orders","asns","purchase_orders","pick_faces","counts","rmas","compositions","supplier_variants","transfers"]},"clientId":{"type":"string","minLength":1},"templateId":{"type":"string","minLength":1},"overrideDuplicate":{"type":"boolean"}},"required":["originalName","size","contentType","type"]}}}}}},"/imports/{id}":{"get":{"summary":"Get import job status, counts and cursor"}},"/imports/{id}/validate":{"post":{"summary":"Validate a mapped import and produce a plan","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"importJobId":{"type":"string","minLength":1},"templateId":{"type":"string"},"warehouseId":{"type":"string"},"mapping":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"source":{"type":"string"},"transform":{"type":"string","enum":["trim","upper","lower","bool","none"]},"clearWhenEmpty":{"type":"boolean"}},"required":["target","source"]}},"matchKey":{"type":"string","enum":["sku","barcode","external_ref"]},"updateMode":{"type":"string","enum":["create_only","update_only","upsert"]},"barcodeClash":{"type":"string","enum":["drop","refuse"]}},"required":["columns","matchKey","updateMode"]}},"required":["importJobId"]}}}}}},"/imports/{id}/commit":{"post":{"summary":"Confirm a plan and commit the next chunk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"importJobId":{"type":"string","minLength":1},"blastConfirmation":{"type":"string"},"unitConfirmation":{"type":"string"}},"required":["importJobId"]}}}}}},"/imports/{id}/cancel":{"post":{"summary":"Cancel an import that has not started committing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"importJobId":{"type":"string","minLength":1}},"required":["importJobId"]}}}}}},"/imports/{id}/revert":{"post":{"summary":"Revert a committed non-ledger import","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"importJobId":{"type":"string","minLength":1}},"required":["importJobId"]}}}}}},"/imports/{id}/rows":{"get":{"summary":"List staged import rows"}},"/imports/{id}/errors.csv":{"get":{"summary":"Download the re-uploadable error CSV"}},"/import-templates":{"get":{"summary":"List import templates"},"post":{"summary":"Save an import template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["catalog","opening_stock","orders","asns","purchase_orders","pick_faces","counts","rmas","compositions","supplier_variants","transfers"]},"clientId":{"type":"string"},"mapping":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"transform":{"type":"string","enum":["trim","upper","lower","bool","none"]},"clearWhenEmpty":{"type":"boolean"}},"required":["target","source"]}},"matchKey":{"type":"string","enum":["sku","barcode","external_ref"]},"updateMode":{"type":"string","enum":["create_only","update_only","upsert"]},"barcodeClash":{"type":"string","enum":["drop","refuse"]}},"required":["columns","matchKey","updateMode"]},"dialect":{"type":"object","properties":{"encoding":{"type":"string"},"delimiter":{"type":"string"},"quote":{"type":"string"},"header":{"type":"boolean"}},"required":["encoding","delimiter","quote","header"]},"defaults":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["name","kind","mapping"]}}}}}},"/import-templates/{id}":{"get":{"summary":"Get an import template"},"patch":{"summary":"Update an import template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["catalog","opening_stock","orders","asns","purchase_orders","pick_faces","counts","rmas","compositions","supplier_variants","transfers"]},"clientId":{"type":"string"},"mapping":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"transform":{"type":"string","enum":["trim","upper","lower","bool","none"]},"clearWhenEmpty":{"type":"boolean"}},"required":["target","source"]}},"matchKey":{"type":"string","enum":["sku","barcode","external_ref"]},"updateMode":{"type":"string","enum":["create_only","update_only","upsert"]},"barcodeClash":{"type":"string","enum":["drop","refuse"]}},"required":["columns","matchKey","updateMode"]},"dialect":{"type":"object","properties":{"encoding":{"type":"string"},"delimiter":{"type":"string"},"quote":{"type":"string"},"header":{"type":"boolean"}},"required":["encoding","delimiter","quote","header"]},"defaults":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["name","kind","mapping"]}}}}}},"/exports/{kind}.csv":{"get":{"summary":"Export a kind in the import column shape, including invoice_lines, bill_lines and supplier_credits"}},"/accounting-connections":{"get":{"summary":"List accounting connections (credentials never included)"},"post":{"summary":"Create an accounting connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"default":"null","type":"string","enum":["null"]},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}}},"/accounting-postings":{"get":{"summary":"List accounting postings"}},"/accounting-postings/{id}/retry":{"post":{"summary":"Retry a failed accounting posting","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/transfers":{"get":{"summary":"List transfer orders"},"post":{"summary":"Create a transfer order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"type":"string"},"fromWarehouseId":{"type":"string"},"toWarehouseId":{"type":"string"},"reason":{"type":"string"},"expectedAt":{"type":"string"},"notes":{"type":"string"},"allocate":{"default":true,"type":"boolean"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"packId":{"type":"string"}},"required":["sku","quantity"]}}},"required":["clientId","fromWarehouseId","toWarehouseId","lines"]}}}}}},"/transfers/{id}":{"get":{"summary":"Get a transfer order"}},"/transfers/{id}/allocate":{"post":{"summary":"Allocate a transfer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/transfers/{id}/dispatch":{"post":{"summary":"Dispatch a transfer into destination transit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/transfers/{id}/receive":{"post":{"summary":"Receive a transfer from transit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"units":{"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"condition":{"default":"available","type":"string","enum":["available","damaged"]}},"required":["unitId","quantity"]}}},"required":["id"]}}}}}},"/transfers/{id}/cancel":{"post":{"summary":"Cancel a transfer that has not dispatched","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/transfers/{id}/variances":{"post":{"summary":"Resolve a transfer shortfall","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"unitId":{"type":"string"},"outcome":{"type":"string","enum":["lost","damaged","received_late"]}},"required":["id","unitId","outcome"]}}}}}},"/supplier-returns":{"get":{"summary":"List supplier returns"},"post":{"summary":"Create a supplier return","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"clientId":{"type":"string"},"supplierId":{"type":"string"},"reason":{"type":"string"},"supplierRmaRef":{"type":"string"},"expectedCreditMinor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string"},"notes":{"type":"string"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fromStatus":{"type":"string","enum":["available","quarantine","damaged","hold"]},"locationId":{"type":"string"},"lotId":{"type":["string","null"]},"lpnId":{"type":["string","null"]},"receiptLineId":{"type":"string"},"unitCreditMinor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sku","quantity","fromStatus"]}}},"required":["warehouseId","clientId","supplierId","lines"]}}}}}},"/supplier-returns/{id}":{"get":{"summary":"Get a supplier return"}},"/supplier-returns/{id}/dispatch":{"post":{"summary":"Dispatch a supplier return","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["lineId"]}}},"required":["id"]}}}}}},"/supplier-returns/{id}/close":{"post":{"summary":"Close a dispatched supplier return","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}},"/supplier-returns/{id}/credit":{"post":{"summary":"Record supplier credit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"creditState":{"type":"string","enum":["expected","received","rejected"]},"creditRef":{"type":"string"},"creditNote":{"type":"string"},"expectedCreditMinor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","creditState"]}}}}}},"/kit-builds":{"post":{"summary":"Build or break a kit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warehouseId":{"type":"string"},"locationId":{"type":"string"},"variantId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lotId":{"type":["string","null"]},"serials":{"type":"array","items":{"type":"string"}},"note":{"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lotId":{"type":["string","null"]},"lpnId":{"type":["string","null"]},"serialIds":{"type":"array","items":{"type":"string"}}},"required":["variantId"]}}},"required":["warehouseId","locationId","variantId","quantity"]}}}}}},"/kit-builds/{id}":{"get":{"summary":"Get a kit build"}},"/variants/{id}/composition":{"get":{"summary":"Read a variant composition"},"put":{"summary":"Replace a variant composition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string"},"kind":{"type":"string","enum":["none","bundle","kit"]},"components":{"default":[],"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["variantId","quantity"]}}},"required":["variantId","kind"]}}}}}},"/variants/{id}/availability":{"get":{"summary":"Bundle availability with the limiting component"}},"/supplier-variants":{"get":{"summary":"List supplier variant terms"},"post":{"summary":"Set supplier variant terms","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"supplierId":{"type":"string"},"variantId":{"type":"string"},"supplierSku":{"type":["string","null"]},"supplierPackId":{"type":["string","null"]},"costMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string"},"leadTimeDays":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"minOrderQty":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"orderMultiple":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"boolean"}},"required":["supplierId","variantId"]}}}}}},"/suppliers/{id}/variants":{"get":{"summary":"List a supplier's variant terms"}},"/checkouts":{"get":{"summary":"List check-outs in a warehouse (view overdue, out or returned) with the count behind each view","parameters":[{"name":"warehouse","in":"query","required":true,"schema":{"type":"string"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["overdue","out","returned"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}]},"post":{"summary":"Check stock out of a place to a member, customer or named person, with an optional due date. The stock moves to the warehouse's custody area: still on hand, never allocatable. 409 workflow_not_in_use while Check-out is off","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variantId":{"type":"string","minLength":1},"locationId":{"type":"string","minLength":1},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"lotId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"serials":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"clientId":{"type":"string","minLength":1},"holder":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"member"},"userId":{"type":"string","minLength":1}},"required":["kind","userId"]},{"type":"object","properties":{"kind":{"type":"string","const":"customer"},"customerId":{"type":"string","minLength":1}},"required":["kind","customerId"]},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["kind","name"]}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"note":{"type":"string","maxLength":500}},"required":["variantId","locationId","quantity","holder"]}}}}}},"/checkouts/{id}":{"get":{"summary":"Get a check-out with its custody timeline and the serials still out"}},"/checkouts/{id}/check-in":{"post":{"summary":"Check stock back in to a place (the one it left by default); allowed while the workflow is finishing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"locationId":{"type":"string","minLength":1},"serials":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"note":{"type":"string","maxLength":500}},"required":["quantity"]}}}}}},"/checkouts/{id}/write-off":{"post":{"summary":"Record checked-out units that are not coming back (lost, used, damaged) as an adjustment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"reasonCode":{"default":"lost","type":"string","enum":["lost","used","damaged"]},"serials":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"note":{"type":"string","maxLength":500}},"required":["quantity"]}}}}}},"/replenishment-suggestions":{"get":{"summary":"List replenishment suggestions"}},"/replenishment-suggestions/release":{"post":{"summary":"Release suggestions into POs or transfers","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}}}},"/replenishment-suggestions/dismiss":{"post":{"summary":"Dismiss suggestions","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"reason":{"type":"string"}},"required":["ids"]}}}}}}}}