{"openapi":"3.1.0","info":{"title":"GET /api/v1/inventory/shipments","version":"1.0.0","description":"List shipments"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/shipments":{"get":{"tags":["inventory:shipments"],"summary":"List shipments","description":"Retrieve all shipments for inventory orders.","operationId":"get_shipments_api_v1_inventory_shipments_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"Cursor"},"description":"Cursor for pagination"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Pagination limit","title":"Limit"},"description":"Pagination limit"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"Pagination direction: 'next' or 'prev'","default":"next","title":"Direction"},"description":"Pagination direction: 'next' or 'prev'"},{"name":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include total count (expensive - avoid if possible)","default":false,"title":"Include Total Count"},"description":"Whether to include total count (expensive - avoid if possible)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.","title":"Sort By"},"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None."},{"name":"descending","in":"query","required":false,"schema":{"type":"boolean","description":"Sort direction: true for descending (newest/largest first), false for ascending","default":true,"title":"Descending"},"description":"Sort direction: true for descending (newest/largest first), false for ascending"},{"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/ShipmentListResponse"}}}},"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":{"Fee":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Fee name (e.g., 'Shipping', 'Handling')."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Fee description (alternative to name)."},"amount":{"type":"integer","title":"Amount","description":"Fee amount in cents."}},"type":"object","required":["amount"],"title":"Fee","description":"Additional fee on an inventory order.\n\nUsed for shipping, handling, customs, or other charges.\nAmount is in cents.","example":{"amount":5000,"name":"Shipping"}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ShipmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ShipmentResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of items (null when not calculated for performance)"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Pagination limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for next page"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor","description":"Cursor for previous page"},"has_next":{"type":"boolean","title":"Has Next","description":"Whether there are more items"},"has_prev":{"type":"boolean","title":"Has Prev","description":"Whether there are previous items"}},"type":"object","required":["items","has_next","has_prev"],"title":"ShipmentListResponse","description":"Paginated list of shipments."},"ShipmentResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Shipment UUID."},"business_id":{"type":"string","title":"Business Id","description":"Business UUID."},"status":{"type":"string","title":"Status","description":"Shipment status."},"fees":{"items":{"$ref":"#/components/schemas/Fee"},"type":"array","title":"Fees","description":"Shipment fees."},"line_items":{"items":{},"type":"array","title":"Line Items","description":"Items in shipment."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Notes."},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number","description":"Tracking number."},"expected_arrival_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Arrival Date","description":"Expected delivery."},"shipped_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shipped Date","description":"Ship date."},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id","description":"Destination location ID."},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name","description":"Destination location name."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Created timestamp."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Updated timestamp."},"version":{"type":"integer","title":"Version","description":"Version for optimistic locking.","default":1}},"additionalProperties":true,"type":"object","required":["id","business_id","status","fees","line_items","created_at","updated_at"],"title":"ShipmentResponse","description":"Response schema for a shipment.","example":{"business_id":"019ab37c-bus1-7000-8000-000000000001","created_at":"2024-01-15T10:30:00Z","expected_arrival_date":"2024-01-20T00:00:00Z","fees":[],"id":"019ab37c-ship-7000-8000-000000000001","line_items":[],"shipped_date":"2024-01-16T00:00:00Z","status":"shipped","tracking_number":"1Z999AA10123456784","updated_at":"2024-01-16T09:00:00Z","version":2}},"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":[]}]}