{"openapi":"3.1.0","info":{"title":"GET /api/v1/inventory/landed-cost-allocations/orders","version":"1.0.0","description":"List allocatable purchase orders"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/landed-cost-allocations/orders":{"get":{"tags":["inventory:landed_cost_allocations"],"summary":"List allocatable purchase orders","description":"Return received/completed POs that can absorb landed cost, with per-order unit and variant counts so the UI can suggest a split.","operationId":"list_allocatable_orders_api_v1_inventory_landed_cost_allocations_orders_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max POs to return.","default":200,"title":"Limit"},"description":"Max POs to return."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_AllocatableOrdersResponse_"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AllocatableOrder":{"properties":{"inventory_order_id":{"type":"string","title":"Inventory Order Id"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"total_cents":{"type":"integer","title":"Total Cents","default":0},"total_units":{"type":"integer","title":"Total Units","default":0},"variant_count":{"type":"integer","title":"Variant Count","default":0}},"type":"object","required":["inventory_order_id","status"],"title":"AllocatableOrder","description":"A received PO that can absorb landed cost, with allocation context."},"AllocatableOrdersResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AllocatableOrder"},"type":"array","title":"Items"}},"type":"object","title":"AllocatableOrdersResponse","description":"Candidate POs for allocating a landed-cost bill."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_AllocatableOrdersResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/AllocatableOrdersResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[AllocatableOrdersResponse]"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}