{"openapi":"3.1.0","info":{"title":"GET /api/v1/inventory/locations/{location_id}/inventory","version":"1.0.0","description":"Get inventory at location"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/locations/{location_id}/inventory":{"get":{"tags":["inventory:locations"],"summary":"Get inventory at location","description":"Get all inventory levels at a specific location.","operationId":"get_location_inventory_api_v1_inventory_locations__location_id__inventory_get","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","title":"Location Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Limit"},"description":"Page size"},{"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_GetLocationInventoryResponse_"}}}},"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"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GetLocationInventoryResponse":{"properties":{"location":{"$ref":"#/components/schemas/LocationResponse"},"items":{"items":{"$ref":"#/components/schemas/VariantInventoryAcrossLocations"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"has_next":{"type":"boolean","title":"Has Next","default":false},"has_prev":{"type":"boolean","title":"Has Prev","default":false}},"additionalProperties":true,"type":"object","required":["location","items"],"title":"GetLocationInventoryResponse","description":"Response for ``get_location_inventory``."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LocationResponse":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Location name"},"code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Code","description":"Short code like 'WH1', 'STORE-NYC'"},"location_type":{"$ref":"#/components/schemas/LocationTypeEnum","description":"Type of location","default":"warehouse"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","maxLength":2,"title":"Country","default":"US"},"is_default":{"type":"boolean","title":"Is Default","description":"Default location for new inventory","default":false},"is_active":{"type":"boolean","title":"Is Active","description":"Whether location accepts new inventory","default":true},"contact_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contact Phone"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"id":{"type":"string","title":"Id"},"business_id":{"type":"string","title":"Business Id"},"archived":{"type":"boolean","title":"Archived"},"full_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Address"},"display_name":{"type":"string","title":"Display Name"},"can_receive_inventory":{"type":"boolean","title":"Can Receive Inventory"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"shopify_location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shopify Location Id"}},"type":"object","required":["name","id","business_id","archived","display_name","can_receive_inventory","created_at","updated_at"],"title":"LocationResponse","description":"Schema for location response."},"LocationTypeEnum":{"type":"string","enum":["warehouse","store","virtual","drop_ship","office","supplier","manufacturer","packaging","copacker","third_party_logistics","other"],"title":"LocationTypeEnum","description":"Types of inventory locations."},"SuccessEnvelope_GetLocationInventoryResponse_":{"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/GetLocationInventoryResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[GetLocationInventoryResponse]"},"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"},"VariantInventoryAcrossLocations":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"variant_name":{"type":"string","title":"Variant Name"},"variant_sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Sku"},"total_on_hand":{"type":"integer","title":"Total On Hand","default":0},"total_available":{"type":"integer","title":"Total Available","default":0},"unit_cost_cents":{"type":"integer","title":"Unit Cost Cents","default":0},"locations":{"items":{"$ref":"#/components/schemas/VariantLocationLevel"},"type":"array","title":"Locations","default":[]}},"type":"object","required":["variant_id","variant_name"],"title":"VariantInventoryAcrossLocations","description":"Total inventory for a variant across all locations."},"VariantLocationLevel":{"properties":{"location_id":{"type":"string","title":"Location Id"},"location_name":{"type":"string","title":"Location Name"},"location_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Code"},"on_hand":{"type":"integer","title":"On Hand","default":0},"available":{"type":"integer","title":"Available","default":0},"reorder_point":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reorder Point"},"reorder_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reorder Quantity"},"needs_reorder":{"type":"boolean","title":"Needs Reorder","default":false}},"type":"object","required":["location_id","location_name"],"title":"VariantLocationLevel","description":"Inventory level for a variant at a specific location."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}