{"openapi":"3.0.3","info":{"title":"Opsfitter API","version":"2026-12-05","description":"One API for every Opsfitter system, on Opsfitter Hosted or in Google Sheets. Read and write bookings, staff, shifts, time, money, inventory, tickets, handoff notes and more, and get signed webhooks when things change. Practice for free: POST /sandbox gives a key to a sample business. Guide: https://opsfitter.com/developers","contact":{"name":"Opsfitter","email":"hello@opsfitter.com","url":"https://opsfitter.com/developers"},"x-author":"C.Perry"},"servers":[{"url":"https://opsfitter.com/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"locations","description":"Your locations (stores, hotels, shops, sites). Every other record says which location it belongs to."},{"name":"customers","description":"Everyone who booked, ordered, paid or got an invoice, rolled up by email (or phone, then name). Read only: a customer is made when you add a booking, order, payment or invoice for them."},{"name":"bookings","description":"Appointments and bookings: who, what service, when, with whom, and the deposit."},{"name":"staff","description":"Your team. Pay type and pay rate only come back with the private scope. Turn someone off with active=false instead of deleting."},{"name":"shifts","description":"Scheduled shifts. Hours and week_start are worked out for you from the times and the date."},{"name":"time_entries","description":"Time clock punches. Hours are worked out from clock_in, clock_out and break minutes. Use these for payroll-ready exports; Opsfitter never runs payroll."},{"name":"payments","description":"Card payments, deposits and payment links (the Payments module). Cards are taken on Stripe or Square; Opsfitter only keeps the status, never card numbers. Paid ones count as money in on the profit and loss. Void with status=cancelled instead of deleting. Needs the money scope."},{"name":"invoices","description":"Back office invoices with lines and a due date. lines is a list like [{\"description\":\"Group block, 12 rooms\",\"qty\":2,\"price\":120}]; total is added up for you. Set status=paid and the payment lands in money in (money_entries) by itself. A paid invoice cannot be changed. Needs the money scope."},{"name":"money_entries","description":"Back office money in and money out: every sale total, deposit, bill and expense, sorted by category. These feed the profit and loss, budget, forecast and tax set-aside. group is income, cogs (cost of sales), labor or expense. Needs the money scope."},{"name":"purchase_orders","description":"Purchase orders to vendors. lines is a list like [{\"description\":\"Bath towels\",\"qty\":50,\"price\":6.5}]. Receive an order in the app, so stock goes up and the bill lands in money out in one step. Needs the money scope."},{"name":"orders","description":"Orders from your store or counter. items is a list like [{\"name\":\"Shampoo\",\"qty\":2,\"price\":12.5}]; total is added up for you when left out."},{"name":"products","description":"What you sell or book: products and services, with price, deposit and minutes."},{"name":"inventory","description":"Supplies and stock on hand, with par and reorder points. Change counts with POST /inventory/{id}/adjust so every change keeps its history. low_stock=true lists what needs ordering."},{"name":"tickets","description":"Tickets and work orders: what broke, where, who has it, and what fixed it. tried_on_site is what the team already tried before calling a vendor. Close with status=closed."},{"name":"handoff_notes","description":"The shift handoff log: what happened on each shift, what must be read, and the follow ups. Notes are never deleted; replies go to /handoff_notes/{id}/replies."},{"name":"vendors","description":"Vendors and contractors, with insurance end dates and W-9 on file."},{"name":"reports","description":"Reports built from your money records. Needs the money scope."},{"name":"webhooks","description":"Tell another app the moment something changes. Needs the webhooks scope."},{"name":"events","description":"Every change, newest first, for 30 days. Good for tools that check every few minutes instead of webhooks."},{"name":"account","description":"Your key and the practice sandbox."}],"paths":{"/locations":{"get":{"tags":["locations"],"summary":"List locations","operationId":"listLocations","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"city","in":"query","schema":{"type":"string","readOnly":true},"required":false},{"name":"state","in":"query","schema":{"type":"string","readOnly":true},"required":false},{"name":"active","in":"query","schema":{"type":"boolean","readOnly":true},"required":false}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["locations"],"summary":"Get one location","operationId":"getLocation","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers":{"get":{"tags":["customers"],"summary":"List customers","operationId":"listCustomers","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"email","in":"query","schema":{"type":"string","readOnly":true},"required":false}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["customers"],"summary":"Get one customer","operationId":"getCustomer","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bookings":{"get":{"tags":["bookings"],"summary":"List bookings","operationId":"listBookings","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"email","in":"query","schema":{"type":"string"},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"staff","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["requested","confirmed","done","no_show","cancelled"]},"required":false},{"name":"source","in":"query","schema":{"type":"string","readOnly":true},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["bookings"],"summary":"Add a booking","operationId":"createBooking","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bookings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["bookings"],"summary":"Get one booking","operationId":"getBooking","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["bookings"],"summary":"Change a booking","operationId":"updateBooking","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/staff":{"get":{"tags":["staff"],"summary":"List staff","operationId":"listStaff","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"email","in":"query","schema":{"type":"string"},"required":false},{"name":"department_id","in":"query","schema":{"type":"string"},"required":false},{"name":"active","in":"query","schema":{"type":"boolean"},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Staff"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["staff"],"summary":"Add a staff","operationId":"createStaff","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Staff"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/staff/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["staff"],"summary":"Get one staff","operationId":"getStaff","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Staff"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["staff"],"summary":"Change a staff","operationId":"updateStaff","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Staff"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shifts":{"get":{"tags":["shifts"],"summary":"List shifts","operationId":"listShifts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"week_start","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05","readOnly":true},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"staff_id","in":"query","schema":{"type":"string"},"required":false},{"name":"department_id","in":"query","schema":{"type":"string"},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Shift"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["shifts"],"summary":"Add a shift","operationId":"createShift","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shifts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["shifts"],"summary":"Get one shift","operationId":"getShift","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["shifts"],"summary":"Change a shift","operationId":"updateShift","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shift"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time_entries":{"get":{"tags":["time_entries"],"summary":"List time entries","operationId":"listTimeEntries","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"staff_id","in":"query","schema":{"type":"string"},"required":false},{"name":"department_id","in":"query","schema":{"type":"string"},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"source","in":"query","schema":{"type":"string","readOnly":true},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["open","done","approved"]},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntry"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["time_entries"],"summary":"Add a time entry","operationId":"createTimeEntry","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time_entries/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["time_entries"],"summary":"Get one time entry","operationId":"getTimeEntry","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["time_entries"],"summary":"Change a time entry","operationId":"updateTimeEntry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments":{"get":{"tags":["payments"],"summary":"List payments","operationId":"listPayments","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"kind","in":"query","schema":{"type":"string","enum":["link","deposit","order","invoice"]},"required":false},{"name":"customer_email","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["open","paid","cancelled","refunded"]},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["payments"],"summary":"Add a payment","operationId":"createPayment","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["payments"],"summary":"Get one payment","operationId":"getPayment","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["payments"],"summary":"Change a payment","operationId":"updatePayment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"get":{"tags":["invoices"],"summary":"List invoices","operationId":"listInvoices","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"email","in":"query","schema":{"type":"string"},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"due","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"category","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","paid","void"]},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["invoices"],"summary":"Add a invoice","operationId":"createInvoice","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["invoices"],"summary":"Get one invoice","operationId":"getInvoice","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["invoices"],"summary":"Change a invoice","operationId":"updateInvoice","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/money_entries":{"get":{"tags":["money_entries"],"summary":"List money entries","operationId":"listMoneyEntries","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"kind","in":"query","schema":{"type":"string","enum":["in","out"]},"required":false},{"name":"category","in":"query","schema":{"type":"string"},"required":false},{"name":"group","in":"query","schema":{"type":"string","enum":["income","cogs","labor","expense"]},"required":false},{"name":"party","in":"query","schema":{"type":"string"},"required":false},{"name":"is_1099","in":"query","schema":{"type":"boolean"},"required":false},{"name":"source","in":"query","schema":{"type":"string","readOnly":true},"required":false},{"name":"ref","in":"query","schema":{"type":"string"},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MoneyEntry"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["money_entries"],"summary":"Add a money entry","operationId":"createMoneyEntry","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyEntryCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/money_entries/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["money_entries"],"summary":"Get one money entry","operationId":"getMoneyEntry","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["money_entries"],"summary":"Change a money entry","operationId":"updateMoneyEntry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyEntryCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoneyEntry"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["money_entries"],"summary":"Delete a money entry","operationId":"deleteMoneyEntry","responses":{"200":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/purchase_orders":{"get":{"tags":["purchase_orders"],"summary":"List purchase orders","operationId":"listPurchaseOrders","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"vendor","in":"query","schema":{"type":"string"},"required":false},{"name":"date","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","received","cancelled"]},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrder"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["purchase_orders"],"summary":"Add a purchase order","operationId":"createPurchaseOrder","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/purchase_orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["purchase_orders"],"summary":"Get one purchase order","operationId":"getPurchaseOrder","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["purchase_orders"],"summary":"Change a purchase order","operationId":"updatePurchaseOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders":{"get":{"tags":["orders"],"summary":"List orders","operationId":"listOrders","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"email","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["new","ready","completed","cancelled"]},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["orders"],"summary":"Add a order","operationId":"createOrder","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["orders"],"summary":"Get one order","operationId":"getOrder","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["orders"],"summary":"Change a order","operationId":"updateOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"tags":["products"],"summary":"List products","operationId":"listProducts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["product","service"]},"required":false},{"name":"category","in":"query","schema":{"type":"string"},"required":false},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"active","in":"query","schema":{"type":"boolean"},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["products"],"summary":"Add a product","operationId":"createProduct","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["products"],"summary":"Get one product","operationId":"getProduct","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["products"],"summary":"Change a product","operationId":"updateProduct","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["products"],"summary":"Delete a product","operationId":"deleteProduct","responses":{"200":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory":{"get":{"tags":["inventory"],"summary":"List inventory","operationId":"listInventory","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"category","in":"query","schema":{"type":"string"},"required":false},{"name":"vendor","in":"query","schema":{"type":"string"},"required":false},{"name":"sku","in":"query","schema":{"type":"string"},"required":false},{"name":"active","in":"query","schema":{"type":"boolean"},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"low_stock","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["inventory"],"summary":"Add a inventory item","operationId":"createInventoryItem","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["inventory"],"summary":"Get one inventory item","operationId":"getInventoryItem","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["inventory"],"summary":"Change a inventory item","operationId":"updateInventoryItem","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItem"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["inventory"],"summary":"Delete a inventory item","operationId":"deleteInventoryItem","responses":{"200":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets":{"get":{"tags":["tickets"],"summary":"List tickets","operationId":"listTickets","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"category","in":"query","schema":{"type":"string"},"required":false},{"name":"priority","in":"query","schema":{"type":"string","enum":["low","normal","high","urgent"]},"required":false},{"name":"status","in":"query","schema":{"type":"string","enum":["new","open","waiting","done","closed"]},"required":false},{"name":"assigned_to","in":"query","schema":{"type":"string"},"required":false},{"name":"vendor","in":"query","schema":{"type":"string"},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["tickets"],"summary":"Add a ticket","operationId":"createTicket","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["tickets"],"summary":"Get one ticket","operationId":"getTicket","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["tickets"],"summary":"Change a ticket","operationId":"updateTicket","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/handoff_notes":{"get":{"tags":["handoff_notes"],"summary":"List handoff notes","operationId":"listHandoffNotes","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"location_id","in":"query","schema":{"type":"string"},"required":false},{"name":"day","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"},"required":false},{"name":"shift","in":"query","schema":{"type":"string"},"required":false},{"name":"department_id","in":"query","schema":{"type":"string"},"required":false},{"name":"type","in":"query","schema":{"type":"string"},"required":false},{"name":"must_read","in":"query","schema":{"type":"boolean"},"required":false},{"name":"date_from","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date","example":"2026-12-05"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/HandoffNote"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["handoff_notes"],"summary":"Add a handoff note","operationId":"createHandoffNote","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffNoteCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffNote"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/handoff_notes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["handoff_notes"],"summary":"Get one handoff note","operationId":"getHandoffNote","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffNote"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["handoff_notes"],"summary":"Change a handoff note","operationId":"updateHandoffNote","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffNoteCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffNote"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors":{"get":{"tags":["vendors"],"summary":"List vendors","operationId":"listVendors","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"trade","in":"query","schema":{"type":"string"},"required":false},{"name":"email","in":"query","schema":{"type":"string"},"required":false},{"name":"active","in":"query","schema":{"type":"boolean"},"required":false},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Vendor"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["vendors"],"summary":"Add a vendor","operationId":"createVendor","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Send the same key again and you get the first answer back, never a double."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["vendors"],"summary":"Get one vendor","operationId":"getVendor","responses":{"200":{"description":"Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["vendors"],"summary":"Change a vendor","operationId":"updateVendor","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets/{id}/notes":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["tickets"],"summary":"List notes on one ticket","operationId":"listTicketsNotes","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketNote"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["tickets"],"summary":"Add to notes","operationId":"createTicketNote","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"by":{"type":"string"},"kind":{"type":"string"},"text":{"type":"string"}},"required":["text"]}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketNote"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/handoff_notes/{id}/replies":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["handoff_notes"],"summary":"List replies on one handoff note","operationId":"listHandoffNotesReplies","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/HandoffReply"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["handoff_notes"],"summary":"Add to replies","operationId":"createHandoffReply","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"by_name":{"type":"string"},"kind":{"type":"string"},"text":{"type":"string"}},"required":["text"]}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffReply"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/{id}/moves":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["inventory"],"summary":"List moves on one inventory item","operationId":"listInventoryMoves","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryMove"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/{id}/adjust":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["inventory"],"summary":"Change a count with history","operationId":"adjustInventory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["qty"],"properties":{"kind":{"type":"string","enum":["received","used","wasted","count","fix"],"default":"count"},"qty":{"type":"number","description":"count sets the amount; received adds; used and wasted take away; fix adds a plus or minus number"},"note":{"type":"string"}}}}}},"responses":{"201":{"description":"Adjusted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/profit_and_loss":{"get":{"tags":["reports"],"summary":"Profit and loss for a month","operationId":"profitAndLoss","parameters":[{"name":"month","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-12"}},{"name":"location_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The report"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"tags":["account"],"summary":"About this key: plan, scopes, limits, calls today","operationId":"me","responses":{"200":{"description":"Key info"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sandbox":{"post":{"tags":["account"],"summary":"Get a free practice key (no sign up)","operationId":"sandbox","security":[],"responses":{"201":{"description":"A practice key for Sample Co, good for 14 days"},"429":{"description":"Too many practice keys from one place","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"tags":["events"],"summary":"List events","operationId":"listEvents","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the last page"},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["booking.created","booking.updated","staff.created","staff.updated","shift.created","shift.updated","time_entry.created","time_entry.updated","payment.created","payment.updated","invoice.created","invoice.updated","money_entry.created","money_entry.updated","money_entry.deleted","purchase_order.created","purchase_order.updated","order.created","order.updated","product.created","product.updated","product.deleted","inventory_item.created","inventory_item.updated","inventory_item.deleted","ticket.created","ticket.updated","handoff_note.created","handoff_note.updated","vendor.created","vendor.updated","booking.cancelled","invoice.paid","payment.paid","ticket.closed","inventory_item.low","ticket_note.created","handoff_reply.created","ping"]}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhooks","operationId":"listWebhooks","responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"url":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["webhooks"],"summary":"Add a webhook (the answer has the signing secret, once)","operationId":"createWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["url"],"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","booking.created","booking.updated","staff.created","staff.updated","shift.created","shift.updated","time_entry.created","time_entry.updated","payment.created","payment.updated","invoice.created","invoice.updated","money_entry.created","money_entry.updated","money_entry.deleted","purchase_order.created","purchase_order.updated","order.created","order.updated","product.created","product.updated","product.deleted","inventory_item.created","inventory_item.updated","inventory_item.deleted","ticket.created","ticket.updated","handoff_note.created","handoff_note.updated","vendor.created","vendor.updated","booking.cancelled","invoice.paid","payment.paid","ticket.closed","inventory_item.low","ticket_note.created","handoff_reply.created","ping"]}},"label":{"type":"string"},"active":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["webhooks"],"operationId":"getWebhook","summary":"Get a webhook","responses":{"200":{"description":"Webhook"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["webhooks"],"operationId":"updateWebhook","summary":"Change a webhook (url, events, label, active)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","booking.created","booking.updated","staff.created","staff.updated","shift.created","shift.updated","time_entry.created","time_entry.updated","payment.created","payment.updated","invoice.created","invoice.updated","money_entry.created","money_entry.updated","money_entry.deleted","purchase_order.created","purchase_order.updated","order.created","order.updated","product.created","product.updated","product.deleted","inventory_item.created","inventory_item.updated","inventory_item.deleted","ticket.created","ticket.updated","handoff_note.created","handoff_note.updated","vendor.created","vendor.updated","booking.cancelled","invoice.paid","payment.paid","ticket.closed","inventory_item.low","ticket_note.created","handoff_reply.created","ping"]}},"label":{"type":"string"},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Changed"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["webhooks"],"operationId":"deleteWebhook","summary":"Delete a webhook","responses":{"200":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["webhooks"],"operationId":"testWebhook","summary":"Send a ping now and see what came back","responses":{"200":{"description":"Result"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate_secret":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["webhooks"],"operationId":"rotateWebhookSecret","summary":"New signing secret (the old one stops now)","responses":{"200":{"description":"New secret"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["webhooks"],"operationId":"listDeliveries","summary":"Last 50 sends and what happened","responses":{"200":{"description":"Deliveries"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries/{delivery}/retry":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["webhooks"],"operationId":"retryDelivery","summary":"Send a failed one again","responses":{"202":{"description":"Queued"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or a bad key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or plan does not allow it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fields did not pass the checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"of_live_... for your system, of_test_... for the practice sandbox. Scopes: read, write, delete, webhooks, money, private."}},"schemas":{"Line":{"type":"object","properties":{"description":{"type":"string"},"qty":{"type":"number"},"price":{"type":"number"},"amount":{"type":"number","readOnly":true}},"required":["description","qty","price"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication_error","permission_error","not_found","conflict","rate_limit","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"doc_url":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}},"request_id":{"type":"string"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["event"]},"type":{"type":"string","enum":["booking.created","booking.updated","staff.created","staff.updated","shift.created","shift.updated","time_entry.created","time_entry.updated","payment.created","payment.updated","invoice.created","invoice.updated","money_entry.created","money_entry.updated","money_entry.deleted","purchase_order.created","purchase_order.updated","order.created","order.updated","product.created","product.updated","product.deleted","inventory_item.created","inventory_item.updated","inventory_item.deleted","ticket.created","ticket.updated","handoff_note.created","handoff_note.updated","vendor.created","vendor.updated","booking.cancelled","invoice.paid","payment.paid","ticket.closed","inventory_item.low","ticket_note.created","handoff_reply.created","ping"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"label":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"string"},"failures_in_a_row":{"type":"integer"},"paused_reason":{"type":"string","nullable":true},"secret":{"type":"string","description":"Only when made or rotated. Save it then."}}},"Location":{"type":"object","description":"Your locations (stores, hotels, shops, sites). Every other record says which location it belongs to.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["location"],"readOnly":true},"name":{"type":"string","readOnly":true},"brand":{"type":"string","readOnly":true},"address":{"type":"string","readOnly":true},"city":{"type":"string","readOnly":true},"state":{"type":"string","readOnly":true},"zip":{"type":"string","readOnly":true},"phone":{"type":"string","readOnly":true},"room_count":{"type":"number","nullable":true,"readOnly":true},"active":{"type":"boolean","readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"Customer":{"type":"object","description":"Everyone who booked, ordered, paid or got an invoice, rolled up by email (or phone, then name). Read only: a customer is made when you add a booking, order, payment or invoice for them.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["customer"],"readOnly":true},"name":{"type":"string","readOnly":true},"email":{"type":"string","readOnly":true},"phone":{"type":"string","readOnly":true},"first_seen":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"last_seen":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"bookings":{"type":"number","nullable":true,"readOnly":true},"orders":{"type":"number","nullable":true,"readOnly":true},"invoices":{"type":"number","nullable":true,"readOnly":true},"payments":{"type":"number","nullable":true,"readOnly":true},"total_billed":{"type":"number","nullable":true,"readOnly":true},"total_paid":{"type":"number","nullable":true,"readOnly":true},"open_balance":{"type":"number","nullable":true,"readOnly":true}}},"Booking":{"type":"object","description":"Appointments and bookings: who, what service, when, with whom, and the deposit.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["booking"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"product_id":{"type":"string"},"service":{"type":"string"},"minutes":{"type":"number","nullable":true},"price":{"type":"number","nullable":true},"deposit":{"type":"number","nullable":true},"deposit_paid":{"type":"boolean"},"invoice_id":{"type":"string","readOnly":true},"customer":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"staff":{"type":"string"},"notes":{"type":"string"},"status":{"type":"string","enum":["requested","confirmed","done","no_show","cancelled"]},"source":{"type":"string","readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"BookingCreate":{"type":"object","properties":{"location_id":{"type":"string"},"product_id":{"type":"string"},"service":{"type":"string"},"minutes":{"type":"number","nullable":true},"price":{"type":"number","nullable":true},"deposit":{"type":"number","nullable":true},"deposit_paid":{"type":"boolean"},"customer":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"staff":{"type":"string"},"notes":{"type":"string"},"status":{"type":"string","enum":["requested","confirmed","done","no_show","cancelled"]}},"required":["service","customer","date"]},"Staff":{"type":"object","description":"Your team. Pay type and pay rate only come back with the private scope. Turn someone off with active=false instead of deleting.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["staff"],"readOnly":true},"location_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"department_id":{"type":"string"},"position_id":{"type":"string"},"pay_type":{"type":"string","description":"Private: needs the private scope."},"pay_rate":{"type":"number","nullable":true,"description":"Private: needs the private scope."},"hire_date":{"type":"string","format":"date","example":"2026-12-05"},"active":{"type":"boolean"},"term_date":{"type":"string","format":"date","example":"2026-12-05","description":"Private: needs the private scope."},"max_hours":{"type":"number","nullable":true},"min_hours":{"type":"number","nullable":true},"notes":{"type":"string","description":"Private: needs the private scope."},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"StaffCreate":{"type":"object","properties":{"location_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"department_id":{"type":"string"},"position_id":{"type":"string"},"pay_type":{"type":"string","description":"Private: needs the private scope."},"pay_rate":{"type":"number","nullable":true,"description":"Private: needs the private scope."},"hire_date":{"type":"string","format":"date","example":"2026-12-05"},"active":{"type":"boolean"},"term_date":{"type":"string","format":"date","example":"2026-12-05","description":"Private: needs the private scope."},"max_hours":{"type":"number","nullable":true},"min_hours":{"type":"number","nullable":true},"notes":{"type":"string","description":"Private: needs the private scope."}},"required":["first_name"]},"Shift":{"type":"object","description":"Scheduled shifts. Hours and week_start are worked out for you from the times and the date.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["shift"],"readOnly":true},"location_id":{"type":"string"},"week_start":{"type":"string","format":"date","example":"2026-12-05","readOnly":true},"date":{"type":"string","format":"date","example":"2026-12-05"},"staff_id":{"type":"string"},"department_id":{"type":"string"},"position_id":{"type":"string"},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"start_2":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"end_2":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"hours":{"type":"number","nullable":true,"readOnly":true},"note":{"type":"string"},"attendance":{"type":"string"},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ShiftCreate":{"type":"object","properties":{"location_id":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"staff_id":{"type":"string"},"department_id":{"type":"string"},"position_id":{"type":"string"},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"start_2":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"end_2":{"type":"string","pattern":"^\\d{2}:\\d{2}$","example":"14:30"},"note":{"type":"string"},"attendance":{"type":"string"}},"required":["date","staff_id","start","end"]},"TimeEntry":{"type":"object","description":"Time clock punches. Hours are worked out from clock_in, clock_out and break minutes. Use these for payroll-ready exports; Opsfitter never runs payroll.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["time_entry"],"readOnly":true},"location_id":{"type":"string"},"staff_id":{"type":"string"},"department_id":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"clock_in":{"type":"string","format":"date-time","nullable":true},"clock_out":{"type":"string","format":"date-time","nullable":true},"break_minutes":{"type":"number","nullable":true},"hours":{"type":"number","nullable":true,"readOnly":true},"source":{"type":"string","readOnly":true},"status":{"type":"string","enum":["open","done","approved"]},"note":{"type":"string"},"approved_by":{"type":"string","readOnly":true},"approved_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"TimeEntryCreate":{"type":"object","properties":{"location_id":{"type":"string"},"staff_id":{"type":"string"},"department_id":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"clock_in":{"type":"string","format":"date-time","nullable":true},"clock_out":{"type":"string","format":"date-time","nullable":true},"break_minutes":{"type":"number","nullable":true},"status":{"type":"string","enum":["open","done","approved"]},"note":{"type":"string"}},"required":["staff_id","clock_in"]},"Payment":{"type":"object","description":"Card payments, deposits and payment links (the Payments module). Cards are taken on Stripe or Square; Opsfitter only keeps the status, never card numbers. Paid ones count as money in on the profit and loss. Void with status=cancelled instead of deleting.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["payment"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"kind":{"type":"string","enum":["link","deposit","order","invoice"]},"ref_type":{"type":"string"},"ref_id":{"type":"string"},"customer":{"type":"string"},"customer_email":{"type":"string"},"customer_phone":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","nullable":true},"currency":{"type":"string"},"provider":{"type":"string","readOnly":true},"pay_url":{"type":"string","readOnly":true},"status":{"type":"string","enum":["open","paid","cancelled","refunded"]},"paid_at":{"type":"string","format":"date-time","nullable":true},"paid_amount":{"type":"number","nullable":true},"method":{"type":"string"},"note":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"PaymentCreate":{"type":"object","properties":{"location_id":{"type":"string"},"kind":{"type":"string","enum":["link","deposit","order","invoice"]},"ref_type":{"type":"string"},"ref_id":{"type":"string"},"customer":{"type":"string"},"customer_email":{"type":"string"},"customer_phone":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","nullable":true},"currency":{"type":"string"},"status":{"type":"string","enum":["open","paid","cancelled","refunded"]},"paid_at":{"type":"string","format":"date-time","nullable":true},"paid_amount":{"type":"number","nullable":true},"method":{"type":"string"},"note":{"type":"string"}},"required":["customer","amount"]},"Invoice":{"type":"object","description":"Back office invoices with lines and a due date. lines is a list like [{\"description\":\"Group block, 12 rooms\",\"qty\":2,\"price\":120}]; total is added up for you. Set status=paid and the payment lands in money in (money_entries) by itself. A paid invoice cannot be changed.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["invoice"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"customer":{"type":"string"},"email":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"due":{"type":"string","format":"date","example":"2026-12-05"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/Line"}},"total":{"type":"number","nullable":true,"readOnly":true},"category":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","void"]},"paid_on":{"type":"string","format":"date","example":"2026-12-05"},"entry_id":{"type":"string","readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_by":{"type":"string","readOnly":true}}},"InvoiceCreate":{"type":"object","properties":{"location_id":{"type":"string"},"customer":{"type":"string"},"email":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"due":{"type":"string","format":"date","example":"2026-12-05"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/Line"}},"category":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","void"]},"paid_on":{"type":"string","format":"date","example":"2026-12-05"}},"required":["customer","lines"]},"MoneyEntry":{"type":"object","description":"Back office money in and money out: every sale total, deposit, bill and expense, sorted by category. These feed the profit and loss, budget, forecast and tax set-aside. group is income, cogs (cost of sales), labor or expense.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["money_entry"],"readOnly":true},"location_id":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"kind":{"type":"string","enum":["in","out"]},"category":{"type":"string"},"group":{"type":"string","enum":["income","cogs","labor","expense"]},"party":{"type":"string"},"amount":{"type":"number","nullable":true},"method":{"type":"string"},"memo":{"type":"string"},"is_1099":{"type":"boolean"},"source":{"type":"string","readOnly":true},"ref":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_by":{"type":"string","readOnly":true}}},"MoneyEntryCreate":{"type":"object","properties":{"location_id":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"kind":{"type":"string","enum":["in","out"]},"category":{"type":"string"},"group":{"type":"string","enum":["income","cogs","labor","expense"]},"party":{"type":"string"},"amount":{"type":"number","nullable":true},"method":{"type":"string"},"memo":{"type":"string"},"is_1099":{"type":"boolean"},"ref":{"type":"string"}},"required":["date","kind","category","amount"]},"PurchaseOrder":{"type":"object","description":"Purchase orders to vendors. lines is a list like [{\"description\":\"Bath towels\",\"qty\":50,\"price\":6.5}]. Receive an order in the app, so stock goes up and the bill lands in money out in one step.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["purchase_order"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"vendor":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/Line"}},"total":{"type":"number","nullable":true,"readOnly":true},"status":{"type":"string","enum":["draft","sent","received","cancelled"]},"received_on":{"type":"string","format":"date","example":"2026-12-05","readOnly":true},"entry_id":{"type":"string","readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_by":{"type":"string","readOnly":true}}},"PurchaseOrderCreate":{"type":"object","properties":{"location_id":{"type":"string"},"vendor":{"type":"string"},"date":{"type":"string","format":"date","example":"2026-12-05"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/Line"}},"status":{"type":"string","enum":["draft","sent","received","cancelled"]}},"required":["vendor","lines"]},"Order":{"type":"object","description":"Orders from your store or counter. items is a list like [{\"name\":\"Shampoo\",\"qty\":2,\"price\":12.5}]; total is added up for you when left out.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["order"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"customer":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"items":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object"}]},"total":{"type":"number","nullable":true},"status":{"type":"string","enum":["new","ready","completed","cancelled"]},"invoice_id":{"type":"string","readOnly":true},"note":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"OrderCreate":{"type":"object","properties":{"location_id":{"type":"string"},"customer":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"items":{"oneOf":[{"type":"array","items":{"type":"object"}},{"type":"object"}]},"total":{"type":"number","nullable":true},"status":{"type":"string","enum":["new","ready","completed","cancelled"]},"note":{"type":"string"}},"required":["customer","items"]},"Product":{"type":"object","description":"What you sell or book: products and services, with price, deposit and minutes.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["product"],"readOnly":true},"type":{"type":"string","enum":["product","service"]},"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number","nullable":true},"deposit":{"type":"number","nullable":true},"minutes":{"type":"number","nullable":true},"image_link":{"type":"string"},"category":{"type":"string"},"stock":{"type":"number","nullable":true},"location_id":{"type":"string"},"active":{"type":"boolean"},"sort_order":{"type":"number","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ProductCreate":{"type":"object","properties":{"type":{"type":"string","enum":["product","service"]},"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number","nullable":true},"deposit":{"type":"number","nullable":true},"minutes":{"type":"number","nullable":true},"image_link":{"type":"string"},"category":{"type":"string"},"stock":{"type":"number","nullable":true},"location_id":{"type":"string"},"active":{"type":"boolean"},"sort_order":{"type":"number","nullable":true}},"required":["name"]},"InventoryItem":{"type":"object","description":"Supplies and stock on hand, with par and reorder points. Change counts with POST /inventory/{id}/adjust so every change keeps its history. low_stock=true lists what needs ordering.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["inventory_item"],"readOnly":true},"location_id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"unit":{"type":"string"},"par":{"type":"number","nullable":true},"reorder_at":{"type":"number","nullable":true},"on_hand":{"type":"number","nullable":true,"description":"Set when making it. Change it later with POST /inventory/{id}/adjust."},"unit_cost":{"type":"number","nullable":true},"vendor":{"type":"string"},"sku":{"type":"string"},"spot":{"type":"string"},"active":{"type":"boolean"},"last_count":{"type":"string","format":"date","example":"2026-12-05","readOnly":true},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"low_stock":{"type":"boolean","readOnly":true}}},"InventoryItemCreate":{"type":"object","properties":{"location_id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"unit":{"type":"string"},"par":{"type":"number","nullable":true},"reorder_at":{"type":"number","nullable":true},"on_hand":{"type":"number","nullable":true,"description":"Set when making it. Change it later with POST /inventory/{id}/adjust."},"unit_cost":{"type":"number","nullable":true},"vendor":{"type":"string"},"sku":{"type":"string"},"spot":{"type":"string"},"active":{"type":"boolean"}},"required":["name"]},"Ticket":{"type":"object","description":"Tickets and work orders: what broke, where, who has it, and what fixed it. tried_on_site is what the team already tried before calling a vendor. Close with status=closed.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["ticket"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"area":{"type":"string"},"record_id":{"type":"string"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["new","open","waiting","done","closed"]},"assigned_to":{"type":"string"},"vendor":{"type":"string"},"tried_on_site":{"type":"string"},"reported_by":{"type":"string"},"reported_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"due_at":{"type":"string","format":"date-time","nullable":true},"closed_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"closed_by":{"type":"string","readOnly":true},"root_cause":{"type":"string"},"resolution":{"type":"string"},"cost":{"type":"number","nullable":true},"photo_link":{"type":"string"},"details":{"type":"string"},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"TicketCreate":{"type":"object","properties":{"location_id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"area":{"type":"string"},"record_id":{"type":"string"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"string","enum":["new","open","waiting","done","closed"]},"assigned_to":{"type":"string"},"vendor":{"type":"string"},"tried_on_site":{"type":"string"},"reported_by":{"type":"string"},"due_at":{"type":"string","format":"date-time","nullable":true},"root_cause":{"type":"string"},"resolution":{"type":"string"},"cost":{"type":"number","nullable":true},"photo_link":{"type":"string"},"details":{"type":"string"}},"required":["title"]},"HandoffNote":{"type":"object","description":"The shift handoff log: what happened on each shift, what must be read, and the follow ups. Notes are never deleted; replies go to /handoff_notes/{id}/replies.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["handoff_note"],"readOnly":true},"number":{"type":"number","nullable":true,"readOnly":true},"location_id":{"type":"string"},"day":{"type":"string","format":"date","example":"2026-12-05"},"shift":{"type":"string"},"department_id":{"type":"string"},"type":{"type":"string"},"priority":{"type":"number","nullable":true},"must_read":{"type":"boolean"},"to_departments":{"type":"string"},"body":{"type":"string"},"by_name":{"type":"string"},"photo_link":{"type":"string"},"follow_up":{"type":"string"},"follow_up_due":{"type":"string","format":"date","example":"2026-12-05"},"follow_up_done_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"ticket_id":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"edited_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"HandoffNoteCreate":{"type":"object","properties":{"location_id":{"type":"string"},"day":{"type":"string","format":"date","example":"2026-12-05"},"shift":{"type":"string"},"department_id":{"type":"string"},"type":{"type":"string"},"priority":{"type":"number","nullable":true},"must_read":{"type":"boolean"},"to_departments":{"type":"string"},"body":{"type":"string"},"by_name":{"type":"string"},"photo_link":{"type":"string"},"follow_up":{"type":"string"},"follow_up_due":{"type":"string","format":"date","example":"2026-12-05"},"ticket_id":{"type":"string"}},"required":["body"]},"Vendor":{"type":"object","description":"Vendors and contractors, with insurance end dates and W-9 on file.","properties":{"id":{"type":"string","readOnly":true},"object":{"type":"string","enum":["vendor"],"readOnly":true},"name":{"type":"string"},"trade":{"type":"string"},"contact":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"active":{"type":"boolean"},"notes":{"type":"string"},"insurance_ends":{"type":"string","format":"date","example":"2026-12-05"},"w9_on_file":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"updated_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"VendorCreate":{"type":"object","properties":{"name":{"type":"string"},"trade":{"type":"string"},"contact":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"active":{"type":"boolean"},"notes":{"type":"string"},"insurance_ends":{"type":"string","format":"date","example":"2026-12-05"},"w9_on_file":{"type":"boolean"}},"required":["name"]},"TicketNote":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["ticket_note"]},"ticket_id":{"type":"string","readOnly":true},"at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"by":{"type":"string"},"kind":{"type":"string"},"text":{"type":"string"}}},"HandoffReply":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["handoff_reply"]},"note_id":{"type":"string","readOnly":true},"location_id":{"type":"string","readOnly":true},"by_name":{"type":"string"},"kind":{"type":"string"},"text":{"type":"string"},"at":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"InventoryMove":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["inventory_move"]},"item_id":{"type":"string","readOnly":true},"location_id":{"type":"string","readOnly":true},"at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"by":{"type":"string","readOnly":true},"kind":{"type":"string","readOnly":true},"qty":{"type":"number","nullable":true,"readOnly":true},"before":{"type":"number","nullable":true,"readOnly":true},"after":{"type":"number","nullable":true,"readOnly":true},"note":{"type":"string","readOnly":true}}}}},"x-webhook-signature":"Opsfitter-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook secret>. Reject if t is more than 5 minutes old.","x-events":["booking.created","booking.updated","staff.created","staff.updated","shift.created","shift.updated","time_entry.created","time_entry.updated","payment.created","payment.updated","invoice.created","invoice.updated","money_entry.created","money_entry.updated","money_entry.deleted","purchase_order.created","purchase_order.updated","order.created","order.updated","product.created","product.updated","product.deleted","inventory_item.created","inventory_item.updated","inventory_item.deleted","ticket.created","ticket.updated","handoff_note.created","handoff_note.updated","vendor.created","vendor.updated","booking.cancelled","invoice.paid","payment.paid","ticket.closed","inventory_item.low","ticket_note.created","handoff_reply.created","ping"]}