{"openapi":"3.1.0","info":{"title":"GET /api/v1/inventory/locations","version":"1.0.0","description":"List inventory locations"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/locations":{"get":{"tags":["inventory:locations"],"summary":"List inventory locations","description":"List all inventory locations for the business with optional filtering.","operationId":"list_locations_api_v1_inventory_locations_get","parameters":[{"name":"location_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationTypeEnum"},{"type":"null"}],"description":"Filter by location type","title":"Location Type"},"description":"Filter by location type"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived locations","default":false,"title":"Include Archived"},"description":"Include archived locations"},{"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":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Include total count","default":false,"title":"Include Total Count"},"description":"Include total count"},{"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/LocationListResponse"}}}},"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":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LocationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LocationResponse"},"type":"array","title":"Items"},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count"},"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}},"type":"object","required":["items"],"title":"LocationListResponse","description":"Paginated list of locations."},"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","other"],"title":"LocationTypeEnum","description":"Types of inventory locations."},"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":[]}]}