{"openapi":"3.1.0","info":{"title":"Selflane API","version":"v1"},"servers":[{"url":"https://developer.selflane.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An `sl_live_` key created in Back Office"}},"schemas":{"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["type","code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/v1/business":{"get":{"summary":"The business profile of one location","x-scope":"business:read","security":[{"apiKey":[]}],"parameters":[{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"website":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["line1","line2","city","state","postal_code","country"],"additionalProperties":false}},"required":["id","location","name","timezone","currency","website","address"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/locations":{"get":{"summary":"The locations this API key covers","x-scope":"business:read","security":[{"apiKey":[]}],"parameters":[{"name":"location","in":"query","required":false,"description":"Narrows the list to one of the key's locations.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"}},"required":["id","location","name","timezone"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports":{"get":{"summary":"Daily sales summaries of one location, one entry per ended business day with orders","x-scope":"reports:read","security":[{"apiKey":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"location":{"type":"string"},"begin":{"type":"string"},"end":{"type":"string"},"version":{"type":"string"},"currency":{"type":"string"},"orders":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"canceled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"canceled_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count","open","closed","canceled","canceled_amount"],"additionalProperties":false},"sales":{"type":"object","properties":{"item_sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"service_charge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"net_sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selflane":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"service_fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivery_fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivery_tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","service_fee","delivery_fee","delivery_tip"],"additionalProperties":false},"adjustment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deduction":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gift":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"third_party":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["item_sales","discount","saved","service_charge","net_sales","tax","tip","fee","selflane","adjustment","deduction","gift","third_party","total"],"additionalProperties":false},"payments":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["method","amount","tip","count"],"additionalProperties":false}}},"required":["date","location","begin","end","version","currency","orders","sales","payments"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payouts":{"get":{"summary":"Stripe payouts of the account one location trades on, by arrival date","x-scope":"payouts:read","security":[{"apiKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"from","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"},"stripe_payout_id":{"type":"string"},"account_shared":{"type":"boolean"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","in_transit","paid","failed","canceled"]},"failure_code":{"type":["string","null"]},"automatic":{"type":"boolean"},"arrival_date":{"type":"string"},"created":{"type":["string","null"]},"reconciled":{"type":"boolean"},"breakdown":{"anyOf":[{"type":"object","properties":{"charges":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fees":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"transfers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"withheld":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"other":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"net":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["charges","refunds","fees","adjustments","transfers","withheld","other","net"],"additionalProperties":false},{"type":"null"}]},"channels":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["method","amount","count"],"additionalProperties":false}},"business_days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","amount","count"],"additionalProperties":false}},"unmatched":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["amount","count"],"additionalProperties":false},{"type":"null"}]}},"required":["id","location","stripe_payout_id","account_shared","amount","currency","status","failure_code","automatic","arrival_date","created","reconciled","breakdown","channels","business_days","unmatched"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments":{"get":{"summary":"Card payments at one location across processors, with their refunds and disputes","x-scope":"payments:read","security":[{"apiKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"from","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"},"processor":{"type":"string","enum":["stripe","pax"]},"type":{"type":"string","enum":["sale","return"]},"status":{"type":"string","enum":["succeeded","pending","canceled","failed"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tip":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"application_fee":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amount_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"created":{"type":"string"},"order":{"type":["string","null"]},"card":{"anyOf":[{"type":"object","properties":{"brand":{"type":["string","null"]},"last4":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]}},"required":["brand","last4"],"additionalProperties":false},{"type":"null"}]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"status":{"type":"string"},"created":{"type":"string"}},"required":["id","amount","currency","status","created"],"additionalProperties":false}},"disputes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"status":{"type":["string","null"]},"reason":{"type":["string","null"]},"created":{"type":["string","null"]}},"required":["id","amount","currency","status","reason","created"],"additionalProperties":false}}},"required":["id","location","processor","type","status","amount","tip","application_fee","amount_refunded","currency","created","order","card","refunds","disputes"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/menu":{"get":{"summary":"The current menu of one location: categories, items, modifier groups, taxes and discounts","x-scope":"menu:read","security":[{"apiKey":[]}],"parameters":[{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"location":{"type":"string"},"currency":{"type":"string"},"channel_markups":{"type":"object","properties":{"online":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"percent"},"percent":{"type":"number"}},"required":["type","percent"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"amount"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","amount"],"additionalProperties":false}]},{"type":"null"}]},"third_party":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"percent"},"percent":{"type":"number"}},"required":["type","percent"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"amount"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","amount"],"additionalProperties":false}]},{"type":"null"}]}},"required":["online","third_party"],"additionalProperties":false},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"sold_out":{"type":"boolean"},"hidden_online":{"type":"boolean"},"third_party":{"type":"boolean"},"catering":{"type":"boolean"},"hours":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},"start_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["days","start_minute","end_minute"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","description","sold_out","hidden_online","third_party","catering","hours"],"additionalProperties":false}},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"sort_order":{"type":"number"},"sold_out":{"type":"boolean"},"hidden_online":{"type":"boolean"},"third_party":{"type":"boolean"},"classification":{"type":"string","enum":["food","merchandise","beverage","alcohol","service","retail"]},"report_group":{"type":"string"},"tax_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","sort_order","sold_out","hidden_online","third_party","classification","report_group","tax_ids"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kitchen_name":{"type":["string","null"]},"description":{"type":["string","null"]},"category_id":{"type":["string","null"]},"menu_ids":{"type":"array","items":{"type":"string"}},"modifier_group_ids":{"type":"array","items":{"type":"string"}},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_price":{"type":"boolean"},"unit":{"type":["string","null"]},"online_upcharge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"third_party_upcharge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent_off":{"type":"number"},"sold_out":{"type":"boolean"},"hidden_online":{"type":"boolean"},"third_party":{"type":"boolean"},"daily_limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sku":{"type":["string","null"]},"upc":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"image_url":{"type":["string","null"]},"tax_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","kitchen_name","description","category_id","menu_ids","modifier_group_ids","price","open_price","unit","online_upcharge","third_party_upcharge","percent_off","sold_out","hidden_online","third_party","daily_limit","sku","upc","tags","image_url","tax_ids"],"additionalProperties":false}},"modifier_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"required":{"type":"boolean"},"min_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_selections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"online":{"type":"boolean"},"sold_out":{"type":"boolean"},"sub_options_half_and_half":{"type":"boolean"},"sub_options_quantity":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kitchen_name":{"type":["string","null"]},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preselected":{"type":"boolean"},"included":{"type":"boolean"},"online":{"type":"boolean"},"sold_out":{"type":"boolean"},"sub_options":{"anyOf":[{"type":"object","properties":{"unit_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"boosted_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"free_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["unit_price","boosted_price","free_quantity","max_quantity"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","kitchen_name","price","max_quantity","preselected","included","online","sold_out","sub_options"],"additionalProperties":false}},"sub_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"included":{"type":"boolean"},"price_tier":{"type":"string","enum":["unit","boosted"]},"free_quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","included","price_tier","free_quantity"],"additionalProperties":false}}},"required":["id","name","required","min_selections","max_selections","online","sold_out","sub_options_half_and_half","sub_options_quantity","options","sub_options"],"additionalProperties":false}},"taxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rate_percent":{"type":"number"},"inclusive":{"type":"boolean"},"category_ids":{"type":"array","items":{"type":"string"}},"excluded_order_types":{"type":"array","items":{"type":"string","enum":["dinein","pickup","delivery","curbside","drive","qrcode","retail"]}}},"required":["id","name","rate_percent","inclusive","category_ids","excluded_order_types"],"additionalProperties":false}},"discounts":{"type":"object","properties":{"price_rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"trigger":{"type":"string","enum":["automatic","manager_approval","member_automatic","member_manager_approval"]},"member_tier":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hours":{"anyOf":[{"type":"object","properties":{"days":{"type":"array","items":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},"start_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["days","start_minute","end_minute"],"additionalProperties":false},{"type":"null"}]},"menu_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"item_ids":{"type":"array","items":{"type":"string"}},"adjustment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"percent_off"},"percent":{"type":"number"}},"required":["type","percent"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"amount_off"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","amount"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"fixed_price"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","amount"],"additionalProperties":false}]},"excluded_order_types":{"type":"array","items":{"type":"string","enum":["dinein","pickup","delivery","curbside","drive","qrcode","retail"]}}},"required":["id","name","trigger","member_tier","hours","menu_ids","category_ids","item_ids","adjustment","excluded_order_types"],"additionalProperties":false}},"order_discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"adjustment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"percent_off"},"percent":{"type":"number"}},"required":["type","percent"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"amount_off"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","amount"],"additionalProperties":false}]},"hours":{"anyOf":[{"type":"object","properties":{"days":{"type":"array","items":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},"start_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["days","start_minute","end_minute"],"additionalProperties":false},{"type":"null"}]},"category_ids":{"type":"array","items":{"type":"string"}},"max_per_order":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","adjustment","hours","category_ids","max_per_order"],"additionalProperties":false}}},"required":["price_rules","order_discounts"],"additionalProperties":false}},"required":["location","currency","channel_markups","menus","categories","items","modifier_groups","taxes","discounts"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders":{"get":{"summary":"Orders of one location by ended business day: a date range, or every day changed since a checkpoint","x-scope":"orders:read","security":[{"apiKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"from","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string"}},{"name":"location","in":"query","required":false,"description":"Required when the key covers more than one location.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"location":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"business_date":{"type":"string"},"version":{"type":"string"},"origin":{"type":"string","enum":["pos","online","kiosk","third_party"]},"platform":{"type":["string","null"]},"fulfillment":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","ready","fulfilled","canceled"]},"created":{"type":["string","null"]},"needed":{"type":"string"},"note":{"type":["string","null"]},"currency":{"type":"string"},"amounts":{"type":"object","properties":{"item_sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"service_charge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selflane":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deduction":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gift":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"third_party":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["item_sales","discount","saved","service_charge","tax","tip","fee","selflane","adjustment","deduction","gift","third_party","total"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":["string","null"]},"name":{"type":"string"},"quantity":{"type":"number"},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percent_off":{"type":"number"},"seat":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"modifiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quantity":{"type":"number"}},"required":["name","price","quantity"],"additionalProperties":false}},"sub_options":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"}},"required":["name","quantity"],"additionalProperties":false}}},"required":["name","options","sub_options"],"additionalProperties":false}}},"required":["item_id","name","quantity","price","unit_price","percent_off","seat","note","modifiers"],"additionalProperties":false}},"tenders":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payment_id":{"type":["string","null"]},"card":{"anyOf":[{"type":"object","properties":{"brand":{"type":["string","null"]},"last4":{"type":["string","null"]}},"required":["brand","last4"],"additionalProperties":false},{"type":"null"}]}},"required":["method","amount","tip","payment_id","card"],"additionalProperties":false}},"customer":{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["name","phone","email"],"additionalProperties":false}},"required":["id","location","number","business_date","version","origin","platform","fulfillment","status","created","needed","note","currency","amounts","items","tenders"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"checkpoint":{"type":["string","null"]}},"required":["data","next_cursor","checkpoint"],"additionalProperties":false}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, a location the key does not cover, or a location without the API on its plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}