{"components":{"schemas":{"AddLicenseKeys":{"description":"The keys to load for a product.","properties":{"keys":{"description":"One key each, 1 to 200 characters, up to 1000 at a time. Blank lines\nare skipped; a key already loaded for the product, or repeated in the load, is counted as a duplicate.","items":{"type":"string"},"type":"array"}},"required":["keys"],"type":"object"},"AddedLicenseKeys":{"description":"What a load did.","properties":{"added":{"format":"int64","type":"integer"},"duplicates":{"format":"int64","type":"integer"}},"required":["added","duplicates"],"type":"object"},"AdjustCredit":{"description":"A correction of an account.","properties":{"amount_cents":{"description":"Positive adds, negative takes away. The balance never goes below zero.","format":"int64","type":"integer"},"note":{"description":"Why. Kept in the account's history.","type":"string"}},"required":["amount_cents","note"],"type":"object"},"AdjustPoints":{"description":"A correction of a customer's points.","properties":{"note":{"description":"Why. Kept in the history.","type":"string"},"points":{"description":"Signed, not zero, up to 1.000.000 either way.","format":"int64","type":"integer"}},"required":["points","note"],"type":"object"},"AdjustReason":{"description":"Why stock was adjusted by hand. A closed list so the history can be\ngrouped and reported on; put anything else in the free-text `note`.\n\n`opening_balance` (first load of a real shelf count), `damaged`, `lost`,\n`theft`, `found` (on the shelf but not in the book), `correction` (the\nbook was wrong; the default), `customer_return`, `supplier_return`,\n`expired`, `sample`, `other`; and, written by the system only,\n`shipment_cancelled` (units a shipment had taken out came back because\nthe shipment no longer carries them).","enum":["opening_balance","damaged","lost","theft","found","correction","customer_return","supplier_return","expired","sample","other","shipment_cancelled"],"type":"string"},"AdminRefundRequest":{"description":"How much to refund.","properties":{"amount_cents":{"description":"Cents to return, at least 1. Omit to refund everything still\nrefundable on the payment.","format":"int64","type":["integer","null"]},"reason":{"description":"Kept with the refund for the team; not sent to the customer.","type":["string","null"]}},"type":"object"},"ApplicationApproval":{"description":"Approving a request.","properties":{"group_id":{"description":"The group the business joins; the store's default group (`/wholesale/settings`) when left out.","format":"uuid","type":["string","null"]}},"type":"object"},"ApplicationRejection":{"description":"Rejecting a request.","properties":{"reason":{"description":"Why, in words the business reads in the e-mail (up to 1000 characters); optional.","type":["string","null"]}},"type":"object"},"ApplicationStatus":{"description":"Where a request stands.","enum":["pending","approved","rejected"],"type":"string"},"AppliedShippingRule":{"description":"The rule that changed an option, as the quote and the order keep it.","properties":{"action":{"description":"The action's `kind`.","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","action"],"type":"object"},"AutomaticDiscount":{"description":"A discount applied by itself when its conditions hold.","properties":{"buy_x_get_y":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuyXGetY"}]},"combines_with_codes":{"description":"Applies together with a discount code. False: a cart holding a code\ndoes not get it (a promotion: unless it gives more than the code; a\npayment-method rule: the code wins).","type":"boolean"},"combines_with_promotions":{"description":"Promotions only: stacks with the other combinable promotions. False:\nit applies alone, and the best set for the customer wins.","type":"boolean"},"condition_customer_group_id":{"description":"Only for customers in this group (a wholesale or VIP price); null for everybody. Such a rule is applied in the\ncart and at checkout, not shown on the product pages.","format":"uuid","type":["string","null"]},"condition_payment_method":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountPaymentMethod","description":"Only applies when paying with this method; null for any method."}]},"created_at":{"format":"date-time","type":"string"},"ends_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/AutomaticDiscountKind"},"min_subtotal_cents":{"description":"Only applies from this cart subtotal up.","format":"int64","type":["integer","null"]},"name":{"type":"string"},"priority":{"description":"Higher wins when several rules match.","format":"int32","type":"integer"},"skip_price_list_groups":{"description":"Not for the customers of a group with a price list (they already pay a\nwholesale price). False: the rule applies on top of the list price.","type":"boolean"},"starts_at":{"format":"date-time","type":["string","null"]},"tiered":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Tiered"}]},"updated_at":{"format":"date-time","type":"string"},"value_int":{"description":"Whole percent for `percent_off`, cents for `fixed_off`.","format":"int32","type":"integer"}},"required":["combines_with_codes","combines_with_promotions","created_at","id","is_active","kind","name","priority","updated_at","value_int"],"type":"object"},"AutomaticDiscountCreateRequest":{"description":"A new automatic discount.","properties":{"bundle":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Bundle","description":"Required for `bundle`."}]},"buy_x_get_y":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuyXGetY","description":"Required for `buy_x_get_y`."}]},"combines_with_codes":{"description":"Defaults to true.","type":["boolean","null"]},"combines_with_promotions":{"description":"Defaults to false.","type":["boolean","null"]},"condition_customer_group_id":{"description":"Limit the rule to one customer group of the store.","format":"uuid","type":["string","null"]},"condition_payment_method":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountPaymentMethod"}]},"ends_at":{"format":"date-time","type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"kind":{"$ref":"#/components/schemas/AutomaticDiscountKind"},"min_subtotal_cents":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"priority":{"description":"Defaults to 0.","format":"int32","type":["integer","null"]},"skip_price_list_groups":{"description":"Not for the customers of a group with a price list. Defaults to false:\nthe rule applies on top of list prices.","type":["boolean","null"]},"starts_at":{"format":"date-time","type":["string","null"]},"tiered":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Tiered","description":"Required for `tiered`."}]},"value_int":{"description":"Whole percent (0 to 100) for `percent_off`, cents for `fixed_off`.","format":"int32","type":"integer"}},"required":["name","kind","value_int"],"type":"object"},"AutomaticDiscountKind":{"description":"How an automatic discount is computed: `percent_off` (`value_int` is a\nwhole percent, 0 to 100) or `fixed_off` (`value_int` is cents, capped at\nthe subtotal), both payment-method or store-wide rules; `buy_x_get_y`\n(leve X pague Y, the second unit at N% off, a gift from a set: see\n`buy_x_get_y`) and `tiered` (progressive tiers by quantity or subtotal:\nsee `tiered`) and `bundle` (compre junto: products bought together, see\n`bundle`), the cart promotions.","enum":["percent_off","fixed_off","buy_x_get_y","tiered","bundle"],"type":"string"},"AutomaticDiscountUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; for the nullable ones\n(`condition_payment_method`, `min_subtotal_cents`, `starts_at`,\n`ends_at`) an explicit `null` clears them.","properties":{"bundle":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Bundle"}]},"buy_x_get_y":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuyXGetY"}]},"combines_with_codes":{"type":["boolean","null"]},"combines_with_promotions":{"type":["boolean","null"]},"condition_customer_group_id":{"format":"uuid","type":["string","null"]},"condition_payment_method":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountPaymentMethod"}]},"ends_at":{"format":"date-time","type":["string","null"]},"is_active":{"type":["boolean","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AutomaticDiscountKind"}]},"min_subtotal_cents":{"format":"int64","type":["integer","null"]},"name":{"type":["string","null"]},"priority":{"format":"int32","type":["integer","null"]},"skip_price_list_groups":{"type":["boolean","null"]},"starts_at":{"format":"date-time","type":["string","null"]},"tiered":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Tiered"}]},"value_int":{"format":"int32","type":["integer","null"]}},"type":"object"},"BillingAddress":{"description":"A billing address, in the parts of the delivery address.","properties":{"additional_info":{"description":"The complement.","type":["string","null"]},"city":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"state":{"description":"Two-letter state (UF).","type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"description":"CEP, 8 digits (formatting ignored).","type":["string","null"]}},"type":"object"},"BlockResult":{"properties":{"blocked":{"description":"The number is blocked (or unblocked) in Mobiari: nothing is sent to it.","type":"boolean"},"meta_error":{"description":"Why Meta refused (it only blocks people who wrote in the last 24 hours).","type":["string","null"]},"meta_synced":{"description":"WhatsApp itself also blocked (or unblocked) the number, so its\nmessages stop arriving. False when Meta refused; see `meta_error`.","type":"boolean"}},"required":["blocked","meta_synced"],"type":"object"},"BookedSeries":{"description":"What a series booked and what it skipped.","properties":{"booked":{"items":{"$ref":"#/components/schemas/Booking"},"type":"array"},"series_id":{"format":"uuid","type":"string"},"skipped":{"items":{"$ref":"#/components/schemas/SkippedSession"},"type":"array"}},"required":["series_id","booked","skipped"],"type":"object"},"Booking":{"description":"A booked session of a service with a provider.","properties":{"cancel_cutoff_hours":{"description":"How long before the start the client can still cancel or move it.","format":"int32","type":"integer"},"cancel_reason":{"type":["string","null"]},"cancelled_at":{"format":"date-time","type":["string","null"]},"cancelled_by":{"description":"`client` or `team`.","type":["string","null"]},"code":{"description":"The code in the customer's own link to the booking.","type":"string"},"consent_at":{"description":"When the client agreed to the use of sensitive answers.","format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_email":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"description":"Who the booking is for.","type":"string"},"customer_phone":{"type":["string","null"]},"deposit_cents":{"description":"The deposit asked when it was booked online.","format":"int64","type":"integer"},"deposit_credited_cents":{"description":"The deposit given back as store credit when the booking was cancelled (the service's `deposit_on_cancel`).","format":"int64","type":"integer"},"ends_at":{"format":"date-time","type":"string"},"has_intake":{"description":"The client answered the intake form (the answers have their own call).","type":"boolean"},"id":{"format":"uuid","type":"string"},"notes":{"type":["string","null"]},"number":{"description":"1, 2, 3... per store.","format":"int32","type":"integer"},"occurrence_id":{"description":"The class this seat is in (bookings of one service, provider and start).","format":"uuid","type":["string","null"]},"order_id":{"description":"The order that charges the deposit.","format":"uuid","type":["string","null"]},"package_id":{"description":"The package that paid for it with one of its sessions.","format":"uuid","type":["string","null"]},"paid_cents":{"description":"What the client paid online.","format":"int64","type":"integer"},"price_cents":{"format":"int64","type":"integer"},"provider_id":{"format":"uuid","type":"string"},"provider_name":{"type":"string"},"series_id":{"description":"Bookings made together as a repeating series.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"service_name":{"description":"The service's name when it was booked.","type":"string"},"source":{"description":"`public` (the client) or `team`.","type":"string"},"starts_at":{"format":"date-time","type":"string"},"status":{"description":"`pending_payment`, `confirmed`, `completed`, `no_show` or `cancelled`.","type":"string"},"video_url":{"description":"The video room of an online service.","type":["string","null"]}},"required":["id","number","code","status","service_id","service_name","provider_id","provider_name","customer_name","starts_at","ends_at","price_cents","deposit_cents","paid_cents","deposit_credited_cents","source","has_intake","cancel_cutoff_hours","created_at"],"type":"object"},"BookingCreate":{"description":"A new booking.","properties":{"consent":{"description":"The client agreed to the use of sensitive answers.","type":"boolean"},"customer_email":{"description":"An e-mail or a phone is required.","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"intake":{"description":"Answers to the service's intake form, if the client gave them.","items":{"$ref":"#/components/schemas/IntakeAnswerInput"},"type":"array"},"notes":{"type":["string","null"]},"package_id":{"description":"Spend a session of this package (one of the client's, for this service).","format":"uuid","type":["string","null"]},"provider_id":{"description":"Empty: the first provider of the service who is free.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"starts_at":{"format":"date-time","type":"string"}},"required":["service_id","starts_at","customer_name"],"type":"object"},"BookingHours":{"description":"One weekly window.","properties":{"end_min":{"description":"Minutes from midnight, 1 to 1440, after `start_min`.","format":"int32","type":"integer"},"start_min":{"description":"Minutes from midnight in the provider's zone, 0 to 1439.","format":"int32","type":"integer"},"weekday":{"description":"ISO weekday: 1 Monday to 7 Sunday.","format":"int32","type":"integer"}},"required":["weekday","start_min","end_min"],"type":"object"},"BookingIntake":{"description":"A booking's answers, for whoever may read them.","properties":{"answers":{"items":{"$ref":"#/components/schemas/IntakeAnswer"},"type":"array"},"consent_at":{"description":"When the client agreed to the use of sensitive answers.","format":"date-time","type":["string","null"]}},"required":["answers"],"type":"object"},"BookingNote":{"description":"A note of the team on a booking.","properties":{"author_name":{"type":["string","null"]},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"editable":{"description":"The one asking may change or delete it.","type":"boolean"},"id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","body","editable","created_at","updated_at"],"type":"object"},"BookingNoteInput":{"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"},"BookingPackage":{"description":"Sessions of a service sold together, used one booking at a time.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_email":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"plan_id":{"format":"uuid","type":["string","null"]},"price_cents":{"format":"int64","type":"integer"},"service_id":{"format":"uuid","type":"string"},"service_name":{"type":"string"},"sessions":{"format":"int32","type":"integer"},"status":{"description":"`pending_payment` (bought online, not paid yet), `active` or `cancelled`.","type":"string"},"used":{"description":"Sessions spent: bookings made with it that were not cancelled.","format":"int32","type":"integer"}},"required":["id","name","service_id","service_name","customer_name","sessions","used","price_cents","status","created_at"],"type":"object"},"BookingPackageIssue":{"description":"A package sold by the team: from a plan (`plan_id`), or made up here (`service_id`, `name`, `sessions`, `price_cents`).","properties":{"customer_email":{"description":"An e-mail or a phone is required; the e-mail gets the code.","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"name":{"type":["string","null"]},"plan_id":{"description":"From a plan; or give `service_id`, `name` and `sessions`.","format":"uuid","type":["string","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"service_id":{"format":"uuid","type":["string","null"]},"sessions":{"format":"int32","type":["integer","null"]},"valid_days":{"description":"Days from today; `0` never expires. Default: the plan's.","format":"int32","type":["integer","null"]}},"required":["customer_name"],"type":"object"},"BookingPackagePlan":{"description":"A package the store sells: sessions of a service at a price, valid for some days.","properties":{"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"price_cents":{"format":"int64","type":"integer"},"service_id":{"format":"uuid","type":"string"},"sessions":{"format":"int32","type":"integer"},"sold_online":{"description":"Clients can buy it on the booking page (Pix).","type":"boolean"},"valid_days":{"description":"Days from the purchase; empty never expires.","format":"int32","type":["integer","null"]}},"required":["id","service_id","name","sessions","price_cents","sold_online","is_active"],"type":"object"},"BookingPackagePlanCreate":{"description":"A new package plan: `service_id`, `name` and `sessions` are required.","properties":{"is_active":{"type":["boolean","null"]},"name":{"type":"string"},"price_cents":{"format":"int64","type":["integer","null"]},"service_id":{"format":"uuid","type":"string"},"sessions":{"description":"1 to 500.","format":"int32","type":"integer"},"sold_online":{"type":["boolean","null"]},"valid_days":{"description":"1 to 3650; `0` never expires.","format":"int32","type":["integer","null"]}},"required":["service_id","name","sessions"],"type":"object"},"BookingPackagePlanUpdate":{"description":"Fields to change on a plan; omitted fields keep their value.","properties":{"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"service_id":{"format":"uuid","type":["string","null"]},"sessions":{"description":"1 to 500.","format":"int32","type":["integer","null"]},"sold_online":{"type":["boolean","null"]},"valid_days":{"description":"1 to 3650; `0` never expires.","format":"int32","type":["integer","null"]}},"type":"object"},"BookingProvider":{"description":"Who gives a service (a person or a room), with their weekly hours.","properties":{"email":{"type":["string","null"]},"hours":{"description":"The weekly windows it takes bookings in, in its `timezone`.","items":{"$ref":"#/components/schemas/BookingHours"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"service_ids":{"description":"The services this provider delivers.","items":{"format":"uuid","type":"string"},"type":"array"},"timezone":{"description":"IANA zone of the weekly hours, such as `America/Sao_Paulo`.","type":"string"},"video_url":{"description":"A fixed video room for online services (Meet, Zoom, Teams).","type":["string","null"]}},"required":["id","name","timezone","service_ids","hours","is_active","position"],"type":"object"},"BookingProviderCreate":{"description":"A new provider: `name` is required.","properties":{"email":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":"string"},"position":{"format":"int32","type":["integer","null"]},"service_ids":{"description":"Replaces the services this provider delivers.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"timezone":{"type":["string","null"]},"video_url":{"description":"`https://` link; empty removes it.","type":["string","null"]}},"required":["name"],"type":"object"},"BookingProviderUpdate":{"description":"Fields to change on a provider; omitted fields keep their value.","properties":{"email":{"type":["string","null"]},"hours":{"description":"Its weekly windows, all of them: windows left out are removed.","items":{"$ref":"#/components/schemas/BookingHours"},"type":"array"},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"service_ids":{"description":"Replaces the services this provider delivers.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"timezone":{"type":["string","null"]},"video_url":{"description":"`https://` link; empty removes it.","type":["string","null"]}},"type":"object"},"BookingService":{"description":"A service the store books: how long it takes, what it costs, who gives it.","properties":{"buffer_minutes":{"description":"Time kept free after the service.","format":"int32","type":"integer"},"cancel_cutoff_hours":{"description":"How long before the start a client can still cancel or move it.","format":"int32","type":"integer"},"capacity":{"description":"Clients per start: 1 is one at a time, more is a class.","format":"int32","type":"integer"},"deposit_cents":{"description":"Charged online (Pix) when a client books; 0 charges nothing. At most\nthe price.","format":"int64","type":"integer"},"deposit_on_cancel":{"description":"What becomes of a paid deposit when the booking is cancelled: `keep` (the store keeps it) or `credit` (it\nbecomes store credit for the client, whoever cancels).","type":"string"},"description":{"type":["string","null"]},"duration_minutes":{"format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"intake_questions":{"description":"What the client answers when booking.","items":{"$ref":"#/components/schemas/IntakeQuestion"},"type":"array"},"is_active":{"type":"boolean"},"max_advance_days":{"format":"int32","type":"integer"},"min_notice_minutes":{"description":"How soon before the start a client can still book, in minutes.","format":"int32","type":"integer"},"name":{"type":"string"},"online":{"description":"Delivered by video: the booking carries the provider's link.","type":"boolean"},"position":{"format":"int32","type":"integer"},"price_cents":{"format":"int64","type":"integer"},"provider_ids":{"description":"The providers who deliver it.","items":{"format":"uuid","type":"string"},"type":"array"},"sensitive":{"description":"The answers and session notes may be health data: booking with answers\nneeds the client's consent.","type":"boolean"},"slot_step_minutes":{"description":"Offered start times are multiples of this many minutes.","format":"int32","type":"integer"}},"required":["id","name","duration_minutes","buffer_minutes","price_cents","deposit_cents","deposit_on_cancel","capacity","online","sensitive","min_notice_minutes","max_advance_days","cancel_cutoff_hours","slot_step_minutes","intake_questions","provider_ids","is_active","position"],"type":"object"},"BookingServiceCreate":{"description":"A new service: `name` and `duration_minutes` are required.","properties":{"buffer_minutes":{"format":"int32","type":["integer","null"]},"cancel_cutoff_hours":{"format":"int32","type":["integer","null"]},"capacity":{"description":"1 to 500.","format":"int32","type":["integer","null"]},"deposit_cents":{"format":"int64","type":["integer","null"]},"deposit_on_cancel":{"description":"`keep` (default) or `credit`.","type":["string","null"]},"description":{"type":["string","null"]},"duration_minutes":{"format":"int32","type":"integer"},"intake_questions":{"description":"Replaces the form. A question without an id gets one.","items":{"$ref":"#/components/schemas/IntakeQuestion"},"type":["array","null"]},"is_active":{"type":["boolean","null"]},"max_advance_days":{"format":"int32","type":["integer","null"]},"min_notice_minutes":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"online":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"provider_ids":{"description":"Replaces the providers who deliver it.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"sensitive":{"type":["boolean","null"]},"slot_step_minutes":{"format":"int32","type":["integer","null"]}},"required":["name","duration_minutes"],"type":"object"},"BookingServiceUpdate":{"description":"Fields to change on a service; omitted fields keep their value.","properties":{"buffer_minutes":{"format":"int32","type":["integer","null"]},"cancel_cutoff_hours":{"format":"int32","type":["integer","null"]},"capacity":{"description":"1 to 500.","format":"int32","type":["integer","null"]},"deposit_cents":{"format":"int64","type":["integer","null"]},"deposit_on_cancel":{"description":"`keep` (default) or `credit`.","type":["string","null"]},"description":{"type":["string","null"]},"duration_minutes":{"format":"int32","type":["integer","null"]},"intake_questions":{"description":"Replaces the form. A question without an id gets one.","items":{"$ref":"#/components/schemas/IntakeQuestion"},"type":["array","null"]},"is_active":{"type":["boolean","null"]},"max_advance_days":{"format":"int32","type":["integer","null"]},"min_notice_minutes":{"format":"int32","type":["integer","null"]},"name":{"type":["string","null"]},"online":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"provider_ids":{"description":"Replaces the providers who deliver it.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"sensitive":{"type":["boolean","null"]},"slot_step_minutes":{"format":"int32","type":["integer","null"]}},"type":"object"},"BookingSlot":{"description":"One start time on offer.","properties":{"provider_id":{"description":"The provider who would take it.","format":"uuid","type":"string"},"seats_left":{"description":"For a class: the seats still free at this start.","format":"int32","type":["integer","null"]},"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at","provider_id"],"type":"object"},"BookingTimeOff":{"description":"A span when a provider cannot be booked.","properties":{"ends_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"reason":{"type":["string","null"]},"starts_at":{"format":"date-time","type":"string"}},"required":["id","starts_at","ends_at"],"type":"object"},"BookingTimeOffInput":{"properties":{"ends_at":{"format":"date-time","type":"string"},"reason":{"type":["string","null"]},"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at","ends_at"],"type":"object"},"BookingsCancelledEvent":{"description":"A booking was cancelled.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.cancelled","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BookingsCompletedEvent":{"description":"A booked service was given.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.completed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BookingsConfirmedEvent":{"description":"A booking's deposit was paid.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.confirmed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BookingsCreatedEvent":{"description":"A booking was made.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BookingsNoShowEvent":{"description":"A customer missed their booking.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.no_show","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BookingsRescheduledEvent":{"description":"A booking moved to another time.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"manage_url":{"type":["string","null"]}},"required":["manage_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"bookings.rescheduled","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"BoxOrigin":{"description":"Where a planned box came from.","enum":["profile","part","variant","alone","carton","placeholder"],"type":"string"},"BoxSource":{"description":"Where a box's size came from.","enum":["pack","unit","unknown"],"type":"string"},"BulkStockAdjustItem":{"description":"One line of a bulk adjustment: exactly one of `delta` and `set_to`.","properties":{"delta":{"format":"int32","type":["integer","null"]},"set_to":{"format":"int32","minimum":0,"type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"BulkStockAdjustResult":{"properties":{"applied":{"description":"Lines processed.","minimum":0,"type":"integer"},"levels":{"description":"The new levels, one per line, in request order.","items":{"$ref":"#/components/schemas/StockLevelChange"},"type":"array"}},"required":["applied","levels"],"type":"object"},"Bundle":{"description":"Compre junto: products bought together. The first product is the one\nthe offer is on (its product page); the cart must hold it and at least\n`min_products` of the listed products in all. Each set (one unit of every\nlisted product the cart holds) gets the discount: `value` percent off\nthose units, or `value` cents off per set. Lines of the same product\n(its variants) count together, the cheapest units first.","properties":{"max_per_order":{"description":"How many sets get it in one order; null for as many as the cart holds.","format":"int32","type":["integer","null"]},"min_products":{"description":"How many of `product_ids` the cart must hold, 2 up to their number;\nall of them when null.","format":"int32","type":["integer","null"]},"product_ids":{"description":"2 to 4 distinct products, the one the offer is on first.","items":{"format":"uuid","type":"string"},"type":"array"},"value":{"description":"Whole percent (1 to 100) or cents per set (at least 1), per `value_type`.","format":"int32","type":"integer"},"value_type":{"$ref":"#/components/schemas/TierValue"}},"required":["product_ids","value_type","value"],"type":"object"},"BuyXGetY":{"description":"Leve X, ganhe Y: every `buy_quantity` units bought from `buy` give\n`get_quantity` units from `get` (the same products when null) at\n`get_percent` off, the cheapest ones first. \"Leve 3 pague 2\" is buy 2,\nget 1 at 100%; \"the second unit at 50% off\" is buy 1, get 1 at 50%.","properties":{"buy":{"$ref":"#/components/schemas/DiscountScope","description":"The products that count towards `buy_quantity`; empty is every product."},"buy_quantity":{"description":"Units to buy, at least 1.","format":"int32","type":"integer"},"exclude_sale_items":{"description":"Items already on sale (a promotional price) neither count nor are given.","type":"boolean"},"get":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountScope","description":"The products given; null is the same as `buy`."}]},"get_percent":{"description":"Whole percent off each unit given, 1 to 100 (100 is free).","format":"int32","type":"integer"},"get_quantity":{"description":"Units that get the discount, at least 1.","format":"int32","type":"integer"},"max_per_order":{"description":"How many times it applies in one order; null for as often as the cart allows.","format":"int32","type":["integer","null"]}},"required":["buy_quantity","get_quantity","get_percent"],"type":"object"},"CallsAnalyzedEvent":{"description":"A call's recording was analyzed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"calls.analyzed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CallsCompletedEvent":{"description":"A call was answered and ended.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"calls.completed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CallsLoggedEvent":{"description":"The outcome of a call was recorded.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"calls.logged","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CallsMissedEvent":{"description":"A call was missed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"calls.missed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CancelBooking":{"properties":{"following":{"description":"Also cancel the later sessions of its series.","type":"boolean"},"reason":{"description":"Shown to the team; the client's e-mail only says it was cancelled.","type":["string","null"]}},"type":"object"},"CancelOrderRequest":{"description":"How to cancel an order.","properties":{"note":{"description":"Kept in the order's history (and with the refund) for the team; not\nsent to the customer.","type":["string","null"]},"refund":{"description":"Give the money back too: through the gateway that took it (Mercado\nPago, Banco Inter, Asaas; what store credit paid goes back to the\ncredit), and as a refund recorded by hand for what was recorded as\npaid by hand (the team returns that money themselves). Default false:\nthe money stays as it is.","type":"boolean"}},"type":"object"},"CancelShipmentRequest":{"description":"Why a carrier order is cancelled.","properties":{"reason":{"description":"An `id` from `GET /stores/{store_id}/freight/cancel-reasons`.","format":"int64","type":"integer"}},"required":["reason"],"type":"object"},"CardDetail":{"description":"What the store's card machine did, for a payment taken on it\n(`card_terminal`). The machine charges; this only records it, so the\nreceipt, the reports and the NFC-e (`tPag` 03 or 04) say credit or debit.","properties":{"installments":{"description":"Credit only: in how many installments it was charged, 1 to 24. One\n(\"à vista\") when omitted. A debit payment has none.","format":"int32","type":["integer","null"]},"kind":{"$ref":"#/components/schemas/CardKind"}},"required":["kind"],"type":"object"},"CardKind":{"description":"Which card paid on the store's own machine.","enum":["credit","debit"],"type":"string"},"Cart":{"description":"A cart, with its lines.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_email":{"description":"The customer's e-mail, or the one typed at checkout.","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"description":"The customer's name, or the one typed at checkout.","type":["string","null"]},"customer_type":{"$ref":"#/components/schemas/CartCustomerType"},"discount_cents":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"identified_customer_id":{"description":"The cart's customer, or the one its contact details matched.","format":"uuid","type":["string","null"]},"item_count":{"format":"int32","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/CartItem"},"type":"array"},"kind":{"$ref":"#/components/schemas/CartKind"},"last_activity_at":{"format":"date-time","type":"string"},"lead_city":{"type":["string","null"]},"lead_email":{"type":["string","null"]},"lead_name":{"type":["string","null"]},"lead_phone":{"type":["string","null"]},"lead_state":{"type":["string","null"]},"lead_zip_code":{"type":["string","null"]},"shipping_cents":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/CartStatus"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["created_at","currency","customer_type","discount_cents","id","item_count","kind","last_activity_at","shipping_cents","status","subtotal_cents","tax_cents","total_cents","updated_at","items"],"type":"object"},"CartCustomerType":{"description":"Whether the cart's shopper matched a customer on file (`existing`) or\nnot yet (`new`).","enum":["existing","new"],"type":"string"},"CartItem":{"description":"One line of a cart.","properties":{"cart_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"total_cents":{"format":"int64","type":"integer"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["id","cart_id","product_id","variant_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"CartKind":{"description":"`storefront` (a shopper's cart) or `quote` (built at the counter and\nshared as a link; see Quotes).","enum":["storefront","quote"],"type":"string"},"CartStatus":{"description":"`open` (being filled), `abandoned` (no activity for a while; recovery\nmessages go out) or `converted` (became an order).","enum":["open","abandoned","converted"],"type":"string"},"CartSummary":{"description":"A cart as a list shows it.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_email":{"description":"The customer's e-mail, or the one typed at checkout.","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"description":"The customer's name, or the one typed at checkout.","type":["string","null"]},"customer_type":{"$ref":"#/components/schemas/CartCustomerType"},"discount_cents":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"identified_customer_id":{"description":"The cart's customer, or the one its contact details matched.","format":"uuid","type":["string","null"]},"item_count":{"format":"int32","type":"integer"},"kind":{"$ref":"#/components/schemas/CartKind"},"last_activity_at":{"format":"date-time","type":"string"},"lead_city":{"type":["string","null"]},"lead_email":{"type":["string","null"]},"lead_name":{"type":["string","null"]},"lead_phone":{"type":["string","null"]},"lead_state":{"type":["string","null"]},"lead_zip_code":{"type":["string","null"]},"shipping_cents":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/CartStatus"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["created_at","currency","customer_type","discount_cents","id","item_count","kind","last_activity_at","shipping_cents","status","subtotal_cents","tax_cents","total_cents","updated_at"],"type":"object"},"CartsAbandonedEvent":{"description":"A cart was left without an order; `recovery_url` brings the shopper back to it.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"recovery_url":{"type":["string","null"]}},"required":["recovery_url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Cart"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"carts.abandoned","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CartsCreatedEvent":{"description":"A cart was created.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Cart"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"carts.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CartsRecoveredEvent":{"description":"An abandoned cart became an order.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"order_id":{"format":"uuid","type":["string","null"]}},"required":["order_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Cart"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"carts.recovered","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CashbackBalance":{"description":"A customer's cashback.","properties":{"next_release_at":{"description":"When the next waiting amount reaches the wallet.","format":"date-time","type":["string","null"]},"owed_cents":{"description":"What refunds took back that the wallet could not cover, in cents: the\nnext cashback pays it first.","format":"int64","type":"integer"},"pending_cents":{"description":"Waiting for its orders to stand, in cents.","format":"int64","type":"integer"},"released_cents":{"description":"What reached the wallet in all, net of what refunds took back, in cents.","format":"int64","type":"integer"}},"required":["pending_cents","released_cents","owed_cents"],"type":"object"},"CashbackEntry":{"description":"One line of a customer's cashback history.","properties":{"amount_cents":{"description":"Signed, in cents: `release` is negative here because the amount left\nthis ledger for the wallet.","format":"int64","type":"integer"},"available_at":{"description":"From when it counts.","format":"date-time","type":"string"},"bps":{"description":"An `earn`: the percent it was counted at, in basis points.","format":"int32","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`earn`, `reverse`, `release` (it reached the wallet) or `clawback` (a\nrefund took it back from the wallet). The set may grow: treat other\nvalues as unknown entries.","type":"string"},"note":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]}},"required":["id","kind","amount_cents","available_at","created_at"],"type":"object"},"Category":{"description":"A category of the catalog.","properties":{"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"description":"Null for a top-level category.","format":"uuid","type":["string","null"]},"slug":{"description":"Derived from the name.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["created_at","id","is_active","name","slug","updated_at"],"type":"object"},"CategoryCreateRequest":{"description":"A new category.","properties":{"description":{"type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"name":{"type":"string"},"parent_id":{"description":"A category of the same store; omit for a top-level one.","format":"uuid","type":["string","null"]}},"required":["name"],"type":"object"},"CategoryUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; an explicit `null`\nclears `description` or makes the category top-level (`parent_id`).","properties":{"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]},"parent_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"Cnpj":{"description":"A CNPJ: 12 alphanumeric characters plus 2 numeric check digits. Numeric\nCNPJs are the special case where the first 12 are digits.","example":"11222333000181","type":"string"},"Collection":{"description":"A collection: a hand-picked set of products.","properties":{"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"product_count":{"description":"Products in the collection.","format":"int64","type":"integer"},"sales_channels":{"$ref":"#/components/schemas/SalesChannelAssignment"},"slug":{"description":"Derived from the name.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","slug","is_active","product_count","created_at","updated_at"],"type":"object"},"CollectionCreateRequest":{"description":"A new collection.","properties":{"description":{"type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"name":{"type":"string"}},"required":["name"],"type":"object"},"CollectionProductEntry":{"description":"A product in a collection.","properties":{"position":{"format":"int32","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["product_id","title"],"type":"object"},"CollectionUpdate":{"description":"The fields of a collection to change. A field left out keeps its value.","properties":{"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]},"sales_channels":{"$ref":"#/components/schemas/SalesChannelAssignment"}},"type":"object"},"Company":{"description":"A company (B2B account) and what its contacts bought.","properties":{"contact_count":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"document":{"description":"Tax id (CNPJ or CPF in Brazil), digits only.","type":["string","null"]},"domain":{"description":"E-mail domain of its people; new contacts on it join the company.","type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_order_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"order_count":{"description":"Paid orders of its contacts.","format":"int64","type":"integer"},"phone":{"type":["string","null"]},"total_spent_cents":{"description":"What its contacts spent, in cents.","format":"int64","type":"integer"},"trade_name":{"description":"The name the company trades under, when it is not its legal name.","type":["string","null"]}},"required":["id","name","contact_count","order_count","total_spent_cents","created_at"],"type":"object"},"CompanyCreate":{"description":"A new company. `name` is required.","properties":{"document":{"description":"Tax id (CNPJ or CPF in Brazil), digits only.","type":["string","null"]},"domain":{"type":["string","null"]},"email":{"type":["string","null"]},"name":{"description":"1 to 200 characters; required to create.","type":["string","null"]},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"trade_name":{"type":["string","null"]}},"type":"object"},"CompanyUpdate":{"description":"The fields of a company to change. A field left out keeps its value.","properties":{"document":{"description":"Tax id (CNPJ or CPF in Brazil), digits only.","type":["string","null"]},"domain":{"type":["string","null"]},"email":{"type":["string","null"]},"name":{"description":"1 to 200 characters; required to create.","type":["string","null"]},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"trade_name":{"type":["string","null"]}},"type":"object"},"ConsentChannel":{"enum":["email","whatsapp"],"type":"string"},"ConsentReq":{"properties":{"channel":{"$ref":"#/components/schemas/ConsentChannel"},"granted":{"description":"`true` records an opt-in, `false` an opt-out.","type":"boolean"},"note":{"description":"How the person agreed or asked to stop (\"pediu no balcão em 12/10\",\n\"respondeu SIM no WhatsApp\"). Required to record an opt-in: it is the\nevidence the store shows if asked.","type":["string","null"]},"source":{"description":"How consent was obtained, kept in the ledger. Defaults to `staff`.","example":"balcao","type":["string","null"]}},"required":["channel","granted"],"type":"object"},"Conversation":{"description":"A conversation with a customer on one channel (WhatsApp, Instagram, e-mail, the site's chat).","properties":{"assignee_id":{"description":"The team member it is assigned to.","format":"uuid","type":["string","null"]},"assignee_name":{"description":"Full name of the assignee, else their e-mail.","type":["string","null"]},"channel_id":{"description":"The channel it arrived on. Null when that channel was deleted.","format":"uuid","type":["string","null"]},"channel_kind":{"$ref":"#/components/schemas/ConversationChannelKind"},"contact_email":{"type":["string","null"]},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"csat_comment":{"type":["string","null"]},"csat_score":{"description":"Satisfaction score the contact gave, 1 to 5.","format":"int32","type":["integer","null"]},"customer_id":{"description":"The store customer this contact was matched to (by e-mail or phone).","format":"uuid","type":["string","null"]},"customer_name":{"description":"Name of the matched customer.","type":["string","null"]},"display_name":{"description":"Who to show (same rule as the list's `display_name`).","type":"string"},"handed_over_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_bot_active":{"description":"Whether the store's assistant answers it (until it is handed to the team).","type":"boolean"},"last_message_at":{"format":"date-time","type":["string","null"]},"last_message_preview":{"description":"The last message, shortened to 140 characters (or a label such as\n\"📎 Anexo\" for an attachment without text).","type":["string","null"]},"last_message_sender":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMessageSender"}]},"lead_stage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LeadStage","description":"`new`, `qualified`, `quoted`, `won` or `lost`; null for a contact\nwho already bought (support, not a lead)."}]},"notes":{"description":"The team's notes. Only on a read of one.","items":{"$ref":"#/components/schemas/ConversationNote"},"type":"array"},"origin_ad_id":{"description":"The ad the contact clicked (click-to-WhatsApp / click-to-Instagram).","type":["string","null"]},"origin_campaign":{"type":["string","null"]},"origin_channel":{"description":"`paid_social`, `paid_search`, `organic_social`, `organic_search`,\n`referral`, `offline`, `direct`...","type":["string","null"]},"origin_medium":{"type":["string","null"]},"origin_source":{"description":"Where the person came from, in the attribution report's words\n(`AttributionRow`); all null while unknown.","type":["string","null"]},"priority":{"$ref":"#/components/schemas/ConversationPriority"},"reply_window_expires_at":{"description":"Until when a free-form message can be sent (WhatsApp's 24 hours); after it, only a template. Only on a read of one.","format":"date-time","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"snooze_ends_at":{"description":"Set while `status` is `snoozed`: when it wakes up again.","format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/ConversationStatus"},"tags":{"description":"Labels, lowercase.","items":{"type":"string"},"type":"array"},"team_id":{"description":"The team the conversation is routed to (the channel's team, or set by hand).","format":"uuid","type":["string","null"]},"unread_count":{"description":"Messages from the customer the team has not read.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","priority","channel_kind","tags","is_bot_active","unread_count","created_at","updated_at"],"type":"object"},"ConversationAttachmentFile":{"description":"The bytes of a message attachment.","format":"binary","type":"string"},"ConversationChannelKind":{"description":"The channel a conversation runs on: the storefront chat widget (`web`),\nthe store's WhatsApp number, its e-mail inbox, its Instagram account, or a\nmarketplace's buyer questions (the marketplace's code: `mercado_livre`,\n`shopee`, `tiktok_shop`, `amazon`, `magalu`, `shein`, `carrefour`,\n`leroy_merlin`). More kinds may be\nadded; treat unknown values as a generic channel.","enum":["web","whatsapp","email","instagram","mercado_livre","shopee","tiktok_shop","amazon","magalu","shein","carrefour","leroy_merlin"],"type":"string"},"ConversationLabel":{"description":"A label of the store's catalog; conversations carry its `name` in `tags`.","properties":{"color":{"description":"`gray`, `red`, `orange`, `yellow`, `green`, `teal`, `blue`, `purple` or `pink`.","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"description":"Lowercase, as in conversation `tags`.","type":"string"},"open_count":{"description":"Open and pending conversations carrying it.","format":"int64","type":"integer"}},"required":["id","name","color","open_count"],"type":"object"},"ConversationLabelRequest":{"properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"name":{"type":["string","null"]}},"type":"object"},"ConversationMessage":{"description":"A message of a conversation, from the customer, the team, the assistant or the system.","properties":{"attachments":{"description":"Files that came with the message, each with a download URL.","items":{"$ref":"#/components/schemas/ConversationMessageAttachment"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"delivery_error":{"description":"Why delivery failed, as the provider said it.","type":["string","null"]},"delivery_status":{"$ref":"#/components/schemas/MessageDeliveryStatus"},"id":{"format":"uuid","type":"string"},"read_at":{"description":"When the other side read it.","format":"date-time","type":["string","null"]},"sender":{"$ref":"#/components/schemas/ConversationMessageSender"},"text":{"description":"Plain text. May be empty when the message is only an attachment or a card.","type":"string"}},"required":["id","sender","text","attachments","delivery_status","created_at"],"type":"object"},"ConversationMessageAttachment":{"description":"A file sent with a message.","properties":{"index":{"description":"Position in the message, as used in the download path.","format":"int32","type":"integer"},"kind":{"description":"`image`, `video`, `audio`, `sticker`, `document` or `file`.","type":"string"},"mime_type":{"type":["string","null"]},"name":{"description":"File name, when the sender gave one.","type":["string","null"]},"size":{"description":"Size in bytes, when known.","format":"int64","type":["integer","null"]},"transcript":{"description":"Audio: what was said, once transcribed (empty when nothing was).","type":["string","null"]},"transcript_status":{"description":"Audio: `pending` (being transcribed), `done`, `failed` or `unsupported`; null when never asked.","type":["string","null"]},"url":{"description":"Where to download it: this API's `GET /conversations/{conversation_id}/messages/{message_id}/attachments/{index}` (with the usual `Authorization` header), or the channel's own link.","format":"uri","type":["string","null"]}},"required":["index","kind","url"],"type":"object"},"ConversationMessageSender":{"description":"Who wrote a message. `visitor` is the contact (the customer, on any\nchannel), `agent` a team member, `bot` the store's AI agent, `system` an\nevent line (assignment, hand-over, resolution).","enum":["visitor","agent","bot","system"],"type":"string"},"ConversationMessageSent":{"description":"The message sent, and the conversation as it now is.","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"},"message":{"$ref":"#/components/schemas/ConversationMessage"}},"required":["message","conversation"],"type":"object"},"ConversationNote":{"description":"A note of the team on a conversation; the customer never sees it.","properties":{"author_name":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"text":{"type":"string"}},"required":["id","text","created_at"],"type":"object"},"ConversationNoteRequest":{"properties":{"text":{"type":"string"}},"required":["text"],"type":"object"},"ConversationPriority":{"enum":["low","normal","high","urgent"],"type":"string"},"ConversationReply":{"description":"A message to the customer, sent on the conversation's channel.","properties":{"payload":{"description":"Extras: `{\"quick_replies\": [\"Sim\", \"Não\"]}` (up to three buttons on WhatsApp) or `{\"product_ids\": [\"…\"]}` (up to five active products, sent as cards with title, price, image and link).","type":["object","null"]},"text":{"description":"The message text, up to 4096 characters.","type":"string"}},"type":"object"},"ConversationStatus":{"description":"Where a conversation stands. `open`: someone should answer; `pending`:\nthe bot handed over and nobody took it yet; `snoozed`: hidden until its\nsnooze ends (a new customer message wakes it); `resolved`: closed\n(a new customer message reopens it).","enum":["open","pending","snoozed","resolved"],"type":"string"},"ConversationUpdate":{"description":"Fields to change on a conversation; omitted fields keep their value.","properties":{"assignee_id":{"description":"A team member's user id, or null to unassign. Adds a system message.\nClients that drop null fields can send `unassign: true` instead.","format":"uuid","type":["string","null"]},"contact_email":{"type":["string","null"]},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"customer_id":{"description":"Link a customer of this store.","format":"uuid","type":["string","null"]},"is_bot_active":{"description":"`false` stops the store's assistant and hands the conversation to the team; `true` hands it back, as `POST /conversations/{conversation_id}/handback` does.","type":["boolean","null"]},"lead_stage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LeadStage","description":"Move the lead along, or null when the contact is not a lead."}]},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationPriority"}]},"snooze_ends_at":{"description":"Hide it until then; it comes back when the time comes or the customer writes.","format":"date-time","type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationStatus","description":"`resolved` closes it (adds a system message); `snoozed` hides it\nuntil `snoozed_until` (default: 4 hours from now); `open` reopens."}]},"tags":{"description":"Replaces the labels. Lowercased and trimmed.","items":{"type":"string"},"type":["array","null"]},"team_id":{"description":"Route to a team of this store, or null to remove the team.","format":"uuid","type":["string","null"]},"unassign":{"description":"`true` takes it from whoever has it.","type":["boolean","null"]}},"type":"object"},"ConversationsHandedBackEvent":{"description":"A conversation was handed back to the assistant.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Conversation"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"conversations.handed_back","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ConversationsHandedOverEvent":{"description":"A conversation was handed to the team.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Conversation"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"conversations.handed_over","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ConversationsMessageReceivedEvent":{"description":"A customer sent a message.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"sender":{"type":["string","null"]},"text":{"type":["string","null"]}},"required":["text","sender"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Conversation"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"conversations.message_received","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ConversationsResolvedEvent":{"description":"A conversation was resolved.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Conversation"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"conversations.resolved","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ConversationsStartedEvent":{"description":"A conversation started.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Conversation"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"conversations.started","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Cpf":{"example":"52998224725","type":"string"},"CreateOrderItem":{"description":"A line of a new order.","properties":{"quantity":{"description":"At least 1.","format":"int32","type":"integer"},"variant_id":{"description":"The variant sold (`product_variant_id` is accepted too, its older name).","format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"CreateOrderRequest":{"description":"A new order, priced from the catalog.","properties":{"customer_id":{"format":"uuid","type":["string","null"]},"discount_code":{"description":"An active discount code of the store.","type":["string","null"]},"items":{"items":{"$ref":"#/components/schemas/CreateOrderItem"},"type":"array"},"sales_channel_id":{"format":"uuid","type":["string","null"]},"scheduled_on":{"description":"The day the customer asks the order to be sent, from today up to a\nyear ahead; omit for as soon as possible.","format":"date","type":["string","null"]},"shipping_method_id":{"description":"Accepted for compatibility; not used.","type":["string","null"]}},"required":["items"],"type":"object"},"CreateWebhookRequest":{"properties":{"events":{"description":"Event names to subscribe to right away.","items":{"type":"string"},"type":"array"},"is_active":{"description":"Defaults to `true`.","type":["boolean","null"]},"secret":{"description":"Signing secret. Omit to have one generated.","type":["string","null"]},"url":{"description":"`https://` (or `http://`) URL that receives the POSTs.","example":"https://example.com/hooks/mobiari","type":"string"}},"required":["url"],"type":"object"},"CreditAccount":{"description":"Store credit: a customer's wallet, or a gift card.","properties":{"balance_cents":{"description":"What can be spent now (zero when disabled or expired).","format":"int64","type":"integer"},"code":{"description":"Gift cards only, masked (`••••-••••-••••-PQRS`): the code is a bearer secret, answered whole once, by `POST /credit-accounts` that sells the card.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"deliver_on":{"description":"The day the card is e-mailed to its recipient; empty means as soon as\nthe order was paid.","format":"date","type":["string","null"]},"delivered_at":{"description":"When the card's e-mail went out; empty while it waits or when there is\nnobody to send it to.","format":"date-time","type":["string","null"]},"delivery_error":{"description":"Why the card could not be e-mailed (`no_recipient`, or the mail\nprovider's refusal).","type":["string","null"]},"disabled_at":{"format":"date-time","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"initial_cents":{"description":"Gift cards only: the face value.","format":"int64","type":["integer","null"]},"kind":{"description":"`wallet` or `gift_card`.","type":"string"},"message":{"type":["string","null"]},"note":{"type":["string","null"]},"order_id":{"description":"The order that sold this card, when it was bought online or at the counter.","format":"uuid","type":["string","null"]},"recipient_email":{"type":["string","null"]},"recipient_name":{"type":["string","null"]},"sender_name":{"description":"Who the buyer said the card is from.","type":["string","null"]}},"required":["id","kind","balance_cents","currency","created_at"],"type":"object"},"CreditAccountDetail":{"description":"A credit account with its entries, newest first.","properties":{"account":{"$ref":"#/components/schemas/CreditAccount"},"entries":{"items":{"$ref":"#/components/schemas/CreditEntry"},"type":"array"}},"required":["account","entries"],"type":"object"},"CreditEntry":{"description":"One line of an account's history.","properties":{"actor_user_id":{"format":"uuid","type":["string","null"]},"amount_cents":{"description":"Signed: negative when money left the account.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"description":"Credit this entry brought expires on this day (spending takes what\nexpires first).","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`issue`, `adjust`, `redeem`, `release`, `restore`, `expire` or\n`cashback` (cashback that reached the wallet; negative when a refund\ntook it back). The set may grow: treat other values as unknown entries.","type":"string"},"note":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"return_id":{"format":"uuid","type":["string","null"]}},"required":["id","kind","amount_cents","created_at"],"type":"object"},"Customer":{"description":"A customer of the store. A read of one also carries their addresses.","properties":{"addresses":{"description":"Default first, then newest.","items":{"$ref":"#/components/schemas/CustomerAddress"},"type":"array"},"company_id":{"description":"The company (B2B account) the customer belongs to.","format":"uuid","type":["string","null"]},"company_name":{"description":"The company's name.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"description":"Values of the store's customer fields, by key.","type":"object"},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"Tax id (CPF/CNPJ in Brazil), digits only.","type":["string","null"]},"email":{"type":["string","null"]},"email_verified":{"type":"boolean"},"first_name":{"type":["string","null"]},"gender":{"type":["string","null"]},"group_id":{"description":"The customer group it is in (`/customer-groups`).","format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"ie_indicator":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIeIndicator","description":"Whether the customer pays ICMS (`indIEDest` of an NF-e). Null when\nnobody said: invoices then treat them as a non-contributor."}]},"last_name":{"type":["string","null"]},"last_order_at":{"format":"date-time","type":["string","null"]},"legal_name":{"description":"The registered name (razão social) of a customer that is a company.","type":["string","null"]},"lifecycle":{"$ref":"#/components/schemas/CustomerLifecycle","description":"Derived on every read, never stored."},"marketing_opt_in":{"type":"boolean"},"municipal_registration":{"description":"Municipal registration (inscrição municipal), for service invoices.","type":["string","null"]},"notes":{"description":"Internal notes; never shown to the customer.","type":["string","null"]},"order_count":{"description":"Paid orders.","format":"int32","type":"integer"},"phone":{"type":["string","null"]},"phone_verified":{"type":"boolean"},"state_registration":{"description":"State registration (inscrição estadual), digits only.","type":["string","null"]},"tags":{"items":{"type":"string"},"type":["array","null"]},"total_spent_cents":{"description":"Paid order totals, in cents.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","marketing_opt_in","email_verified","phone_verified","lifecycle","order_count","total_spent_cents","created_at","updated_at"],"type":"object"},"CustomerAddress":{"description":"A saved address of a customer.","properties":{"city":{"type":"string"},"city_code":{"description":"The city's IBGE code (7 digits), for a Brazilian address whose city\nand state name a municipality. Fiscal documents use it.","type":["string","null"]},"company":{"type":["string","null"]},"complement":{"description":"Apartment, block, floor...","type":["string","null"]},"country":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"first_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_default":{"description":"The default address of its type.","type":"boolean"},"last_name":{"type":["string","null"]},"neighborhood":{"description":"Neighborhood (bairro).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP for a Brazilian address, digits or with a dash.","type":["string","null"]},"state":{"description":"Two-letter state (UF) for a Brazilian address.","type":["string","null"]},"street":{"description":"The street, without its number.","type":["string","null"]},"type":{"description":"`shipping`, `billing`, `home`, `work` or `other`; clients should\ntolerate other values.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","type","is_default","city","country","created_at","updated_at"],"type":"object"},"CustomerAddressCreate":{"description":"A new address of a customer. `street` is required.","properties":{"city":{"type":"string"},"city_code":{"description":"The city's IBGE code. Left out, it is found from `city` and `state`.","type":["string","null"]},"company":{"type":["string","null"]},"complement":{"description":"Apartment, block, floor...","type":["string","null"]},"country":{"type":"string"},"first_name":{"type":["string","null"]},"is_default":{"description":"Make it the default of its type (clears the previous default).","type":["boolean","null"]},"last_name":{"type":["string","null"]},"neighborhood":{"description":"Neighborhood (bairro).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP for a Brazilian address, digits or with a dash.","type":["string","null"]},"state":{"description":"Two-letter state (UF) for a Brazilian address.","type":["string","null"]},"street":{"description":"The street, without its number.","type":"string"},"type":{"description":"`shipping`, `billing`, `home`, `work` or `other`.","type":"string"}},"required":["type","street","city","country"],"type":"object"},"CustomerAddressUpdate":{"description":"Fields to change on an address; omitted fields keep their value.","properties":{"city":{"type":["string","null"]},"city_code":{"description":"The city's IBGE code. Left out, it follows `city` and `state`.","type":["string","null"]},"company":{"type":["string","null"]},"complement":{"description":"Apartment, block, floor...","type":["string","null"]},"country":{"type":["string","null"]},"first_name":{"type":["string","null"]},"is_default":{"description":"`true` makes it the default of its type (clears the previous one).","type":["boolean","null"]},"last_name":{"type":["string","null"]},"neighborhood":{"description":"Neighborhood (bairro).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP for a Brazilian address, digits or with a dash.","type":["string","null"]},"state":{"description":"Two-letter state (UF) for a Brazilian address.","type":["string","null"]},"street":{"description":"The street, without its number.","type":["string","null"]},"type":{"type":["string","null"]}},"type":"object"},"CustomerCreate":{"description":"A new customer. Give at least an e-mail or a phone.","properties":{"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"Tax id (CPF/CNPJ in Brazil), digits only.","type":["string","null"]},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"gender":{"type":["string","null"]},"ie_indicator":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIeIndicator","description":"Whether the customer pays ICMS; `null` clears it. A `contributor`\nneeds a state registration; an `exempt` customer has none (it is\ncleared)."}]},"last_name":{"type":["string","null"]},"legal_name":{"description":"The registered name (razão social) of a company; blank clears it.","type":["string","null"]},"marketing_opt_in":{"description":"Defaults to false.","type":["boolean","null"]},"municipal_registration":{"description":"Municipal registration (inscrição municipal); blank clears it.","type":["string","null"]},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"state_registration":{"description":"State registration (inscrição estadual), 2 to 14 digits; punctuation\nis dropped and blank clears it. `ISENTO` records an exempt customer.\nGiven without `ie_indicator`, the customer becomes a `contributor`.","type":["string","null"]},"tags":{"items":{"type":"string"},"type":["array","null"]}},"type":"object"},"CustomerCredit":{"description":"A customer's wallet (null until they get credit) and its entries, newest first.","properties":{"entries":{"items":{"$ref":"#/components/schemas/CreditEntry"},"type":"array"},"wallet":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CreditAccount"}]}},"required":["entries"],"type":"object"},"CustomerGroup":{"properties":{"catalog_limited":{"description":"The group buys only the products of `collection_ids`.","type":"boolean"},"collection_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"customers":{"description":"Customers in the group.","format":"int64","type":"integer"},"discounts":{"description":"Automatic discounts limited to the group.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"min_item_quantity":{"description":"The fewest units of a product per order, sizes and colours together.","format":"int32","type":["integer","null"]},"min_order_cents":{"description":"Wholesale rules (`PUT .../wholesale`): the smallest order in cents, at the group's prices.","format":"int64","type":["integer","null"]},"name":{"type":"string"},"pack_size":{"description":"Products are sold in multiples of this many units.","format":"int32","type":["integer","null"]},"price_list_id":{"description":"The price list its customers pay (`/price-lists`); null for retail prices.","format":"uuid","type":["string","null"]},"price_list_name":{"type":["string","null"]}},"required":["id","name","customers","discounts","catalog_limited","collection_ids","created_at"],"type":"object"},"CustomerInteraction":{"description":"An entry on a customer's timeline: a note, call or e-mail the team logged, or something the store recorded.","properties":{"author_id":{"description":"Who logged it; null for system events.","format":"uuid","type":["string","null"]},"author_name":{"description":"Their name (else e-mail).","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_private":{"type":"boolean"},"metadata":{"description":"Free-form context, e.g. `{\"order_id\": ...}` on order events.","type":["object","null"]},"title":{"type":["string","null"]},"type":{"description":"`note`, `call`, `email`, `meeting`, `complaint`, `other` for team\nentries; system events use their own types. The set grows; tolerate\nunknown values.","type":"string"}},"required":["id","type","is_private","created_at"],"type":"object"},"CustomerInteractionCreate":{"description":"An entry the team logs on a customer's timeline.","properties":{"description":{"type":["string","null"]},"is_private":{"description":"Defaults to false.","type":["boolean","null"]},"metadata":{"type":["object","null"]},"title":{"type":["string","null"]},"type":{"description":"`note`, `call`, `email`, `meeting`, `complaint` or `other`.","type":"string"}},"required":["type"],"type":"object"},"CustomerInteractionUpdate":{"description":"Fields to change on an entry the team logged; omitted fields keep their value.","properties":{"description":{"type":["string","null"]},"is_private":{"type":["boolean","null"]},"title":{"type":["string","null"]}},"type":"object"},"CustomerLifecycle":{"description":"Where a customer is in their relationship with the store, derived from\ntheir paid orders (`infra::customers::classify_lifecycle`):\n\n| Stage | Meaning |\n| --- | --- |\n| `lead` | No paid order yet. |\n| `new` | One order, within 60 days. |\n| `active` | Last order within 60 days. |\n| `vip` | Spent at least the store's 90th percentile, last order within 180 days. |\n| `at_risk` | Last order 61 to 180 days ago. |\n| `dormant` | Last order more than 180 days ago. |","type":"string","x-extensible-enum":["lead","new","active","vip","at_risk","dormant"]},"CustomerLoyalty":{"description":"A customer's points and referrals.","properties":{"cashback":{"$ref":"#/components/schemas/CashbackBalance","description":"Their cashback: what waits, when it is released, what reached the wallet."},"cashback_entries":{"description":"The 100 most recent cashback entries, newest first.","items":{"$ref":"#/components/schemas/CashbackEntry"},"type":"array"},"entries":{"description":"The 100 most recent entries, newest first.","items":{"$ref":"#/components/schemas/LoyaltyEntry"},"type":"array"},"expires_at":{"description":"When the points expire if the customer earns nothing more.","format":"date-time","type":["string","null"]},"points":{"$ref":"#/components/schemas/Points"},"redeemable_cents":{"description":"The store credit the usable points can become now, in whole blocks.","format":"int64","type":"integer"},"referral_code":{"description":"Their referral code, once they have one.","type":["string","null"]},"referral_counts":{"$ref":"#/components/schemas/ReferralCounts"},"referrals":{"description":"The friends they referred, newest first.","items":{"$ref":"#/components/schemas/Referral"},"type":"array"},"referred_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Referral","description":"The referral that brought them, if one did."}]},"tier":{"$ref":"#/components/schemas/TierStanding","description":"Where they stand among the store's tiers (nothing current when there are none)."},"tier_changes":{"description":"Their tier changes, newest first.","items":{"$ref":"#/components/schemas/TierChange"},"type":"array"},"wallet_expiring":{"description":"Wallet credit that expires (cashback, a birthday bonus, an imported\nbalance), soonest first, with what is left of each.","items":{"$ref":"#/components/schemas/ExpiringCredit"},"type":"array"}},"required":["points","redeemable_cents","entries","referral_counts","referrals","tier","cashback","cashback_entries","tier_changes","wallet_expiring"],"type":"object"},"CustomerTag":{"description":"A tag and how many customers have it.","properties":{"customers":{"format":"int64","type":"integer"},"tag":{"type":"string"}},"required":["tag","customers"],"type":"object"},"CustomerUpdate":{"description":"The fields of a customer to change. A field left out keeps its value.","properties":{"company_id":{"description":"The company the customer belongs to; `null` takes them out of it.","format":"uuid","type":["string","null"]},"custom_fields":{"description":"Values of the store's customer fields, by key. A key left out keeps its value.","type":"object"},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"Tax id (CPF/CNPJ in Brazil), digits only.","type":["string","null"]},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"gender":{"type":["string","null"]},"group_id":{"description":"The customer group to put it in; null takes it out.","format":"uuid","type":["string","null"]},"ie_indicator":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIeIndicator","description":"Whether the customer pays ICMS; `null` clears it. A `contributor`\nneeds a state registration; an `exempt` customer has none (it is\ncleared)."}]},"last_name":{"type":["string","null"]},"legal_name":{"description":"The registered name (razão social) of a company; blank clears it.","type":["string","null"]},"marketing_opt_in":{"type":["boolean","null"]},"municipal_registration":{"description":"Municipal registration (inscrição municipal); blank clears it.","type":["string","null"]},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"state_registration":{"description":"State registration (inscrição estadual), 2 to 14 digits; punctuation\nis dropped and blank clears it. `ISENTO` records an exempt customer.\nGiven without `ie_indicator`, the customer becomes a `contributor`.","type":["string","null"]},"tags":{"items":{"type":"string"},"type":["array","null"]}},"type":"object"},"CustomersBirthdayEvent":{"description":"It is a customer's birthday.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.birthday","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersCreatedEvent":{"description":"A customer was created.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersDeletedEvent":{"description":"A customer was deleted.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"email":{"type":["string","null"]}},"required":["email"],"type":"object"},"object":{"$ref":"#/components/schemas/DeletedObject"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.deleted","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersErasedEvent":{"description":"A customer's personal data was erased at their request.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"$ref":"#/components/schemas/DeletedObject"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.erased","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersLifecycleChangedEvent":{"description":"A customer moved to another lifecycle stage.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"from":{"type":["string","null"]},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.lifecycle_changed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersMarketingOptInEvent":{"description":"A customer agreed to receive marketing.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.marketing_opt_in","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersMergedEvent":{"description":"Another customer was merged into this one.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"merged_customer_id":{"format":"uuid","type":"string"}},"required":["merged_customer_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.merged","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersNpsAnsweredEvent":{"description":"A customer answered the satisfaction survey (NPS).","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"category":{"type":"string"},"comment":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"score":{"type":"integer"}},"required":["order_id","score","category","comment"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.nps_answered","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersReorderDueEvent":{"description":"A customer reached the time they usually buy again.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"average_days_between_orders":{"type":["number","null"]}},"required":["average_days_between_orders"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.reorder_due","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersUnsubscribedEvent":{"description":"A customer stopped receiving marketing e-mail.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"broadcast_id":{"format":"uuid","type":["string","null"]}},"required":["broadcast_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.unsubscribed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"CustomersUpdatedEvent":{"description":"A customer changed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"customers.updated","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Deal":{"description":"A sale in progress, in a stage of a pipeline.","properties":{"closed_at":{"format":"date-time","type":["string","null"]},"company_id":{"format":"uuid","type":["string","null"]},"company_name":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"expected_close_on":{"format":"date","type":["string","null"]},"id":{"format":"uuid","type":"string"},"lost_reason":{"type":["string","null"]},"owner_id":{"description":"The team member who owns it (`GET /team-members`). A deal an API key makes without one has none.","format":"uuid","type":["string","null"]},"owner_name":{"type":["string","null"]},"pipeline_id":{"format":"uuid","type":"string"},"probability":{"format":"int32","type":"integer"},"source":{"type":["string","null"]},"stage_changed_at":{"format":"date-time","type":"string"},"stage_id":{"format":"uuid","type":"string"},"stage_name":{"type":"string"},"status":{"description":"`open`, `won` or `lost`: what its stage says.","type":"string"},"title":{"type":"string"},"value_cents":{"format":"int64","type":"integer"}},"required":["id","title","status","pipeline_id","stage_id","stage_name","value_cents","probability","stage_changed_at","created_at"],"type":"object"},"DealCreate":{"description":"A new deal: `title` is required. Without `pipeline_id` and `stage_id`, the first open stage of the first pipeline.","properties":{"company_id":{"format":"uuid","type":["string","null"]},"conversation_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"expected_close_on":{"format":"date","type":["string","null"]},"owner_id":{"description":"Defaults to the caller.","format":"uuid","type":["string","null"]},"pipeline_id":{"description":"Defaults to the store's first pipeline.","format":"uuid","type":["string","null"]},"source":{"type":["string","null"]},"stage_id":{"description":"Defaults to the pipeline's first open stage.","format":"uuid","type":["string","null"]},"title":{"description":"1 to 200 characters.","type":"string"},"value_cents":{"format":"int64","type":["integer","null"]}},"required":["title"],"type":"object"},"DealStageChange":{"description":"The stage a deal moves to; `lost_reason` with a lost stage.","properties":{"lost_reason":{"description":"Why it was lost; kept only for a lost stage.","type":["string","null"]},"stage_id":{"description":"A stage of the deal's pipeline. A won or lost stage closes the deal; an\nopen one reopens it.","format":"uuid","type":"string"}},"required":["stage_id"],"type":"object"},"DealUpdate":{"description":"Fields to change on a deal; omitted fields keep their value. Its stage changes with `POST /deals/{deal_id}/stage-changes`.","properties":{"company_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"expected_close_on":{"format":"date","type":["string","null"]},"owner_id":{"format":"uuid","type":["string","null"]},"title":{"type":["string","null"]},"value_cents":{"format":"int64","type":["integer","null"]}},"type":"object"},"DealsCreatedEvent":{"description":"A deal was created.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Deal"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"deals.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"DealsLostEvent":{"description":"A deal was lost.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"lost_reason":{"type":["string","null"]}},"required":["lost_reason"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Deal"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"deals.lost","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"DealsStageChangedEvent":{"description":"A deal moved to another stage: from `from_stage_id` to `to_stage_id`, when it happened.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"from_stage_id":{"format":"uuid","type":["string","null"]},"to_stage_id":{"format":"uuid","type":"string"}},"required":["from_stage_id","to_stage_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Deal"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"deals.stage_changed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"DealsWonEvent":{"description":"A deal was won.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Deal"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"deals.won","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"DeletedObject":{"description":"An object the event is about that no longer exists.","properties":{"deleted":{"const":true,"type":"boolean"},"id":{"format":"uuid","type":["string","null"]}},"required":["id","deleted"],"type":"object"},"DigitalDelivery":{"description":"What a product delivers once paid.","properties":{"instructions":{"description":"Plain text shown with it.","type":["string","null"]},"title":{"description":"Shown to the customer (\"Apostila em PDF\").","type":"string"},"url":{"description":"An https link to the download or the course.","type":["string","null"]}},"required":["title"],"type":"object"},"DiscountCode":{"description":"A discount code customers type at checkout.","properties":{"batch_id":{"description":"The batch of single-use codes it was generated in, if any.","format":"uuid","type":["string","null"]},"code":{"description":"What the shopper types. Unique within the store.","type":"string"},"combines_with_promotions":{"description":"Applies together with the store's automatic promotions. False: the\ncart gets the code or the promotions, whichever gives more.","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"customer_group_ids":{"description":"Only for customers in one of these groups; empty for everybody.","items":{"format":"uuid","type":"string"},"type":"array"},"discount_type":{"$ref":"#/components/schemas/DiscountType"},"exclude_sale_items":{"description":"Lines already on sale (a promotional price) get no discount and do\nnot count towards `min_quantity`.","type":"boolean"},"expires_at":{"description":"Not valid from this instant on.","format":"date-time","type":["string","null"]},"first_purchase_only":{"description":"Only for a customer's first paid order in the store.","type":"boolean"},"free_shipping":{"description":"Also makes freight free (up to `free_shipping_max_cents`) on\n`free_shipping_services`. A free-shipping-only code has `value` 0.","type":"boolean"},"free_shipping_max_cents":{"description":"The most freight it takes off; null for all of it.","format":"int64","type":["integer","null"]},"free_shipping_services":{"description":"The services made free; empty for every carrier service and local\ndelivery (not pickup).","items":{"$ref":"#/components/schemas/ShippingRuleService"},"type":"array"},"handed_out_at":{"description":"When a batch code was handed out (by a popup, a campaign).","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"min_order_cents":{"description":"Only valid from this order total up.","format":"int64","type":["integer","null"]},"min_quantity":{"description":"Only valid with at least this many eligible units.","format":"int32","type":["integer","null"]},"per_customer_limit":{"description":"How many orders one customer may use it in (matched by customer\nrecord, e-mail or CPF/CNPJ); null for no limit.","format":"int32","type":["integer","null"]},"scope":{"$ref":"#/components/schemas/DiscountScope","description":"The products, variants, collections or categories the discount is\nlimited to: it applies to those lines only. Every list empty: the\nwhole order."},"starts_at":{"description":"Not valid before this instant.","format":"date-time","type":["string","null"]},"usage_limit":{"description":"How many orders may use it; null for unlimited.","format":"int32","type":["integer","null"]},"used_count":{"description":"Orders that used it so far.","format":"int32","type":"integer"},"value":{"description":"Whole percent for `percentage`, cents for `fixed_amount`.","format":"int32","type":"integer"}},"required":["code","combines_with_promotions","created_at","customer_group_ids","discount_type","exclude_sale_items","first_purchase_only","free_shipping","free_shipping_services","id","is_active","scope","used_count","value"],"type":"object"},"DiscountCodeBatch":{"description":"A batch of unique single-use codes generated from a template code.","properties":{"created_at":{"format":"date-time","type":"string"},"handed_out":{"description":"Codes handed out (by a popup, a campaign).","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"prefix":{"description":"What every code starts with, before a dash and 8 random characters.","type":"string"},"quantity":{"description":"Codes generated.","format":"int32","type":"integer"},"store_id":{"format":"uuid","type":"string"},"template_code_id":{"description":"The code whose value, conditions and dates the codes copied; null once it is deleted.","format":"uuid","type":["string","null"]},"used":{"description":"Codes used in an order.","format":"int64","type":"integer"}},"required":["id","store_id","name","prefix","quantity","used","handed_out","created_at"],"type":"object"},"DiscountCodeBatchCreateRequest":{"description":"Generate a batch of single-use codes.","properties":{"name":{"description":"The team's name for the batch; the prefix when omitted.","type":["string","null"]},"prefix":{"description":"2 to 20 letters or digits; the template's code when omitted (cut to 20).","type":["string","null"]},"quantity":{"description":"1 to 5000.","format":"int32","type":"integer"},"template_code_id":{"description":"The code every generated code copies (value, conditions, dates,\nactive or not); each copy is valid for one order.","format":"uuid","type":"string"}},"required":["template_code_id","quantity"],"type":"object"},"DiscountCodeConditions":{"description":"A code's conditions and effects beyond its value (all optional on\ncreate; on update, omitted fields keep their value).","properties":{"combines_with_promotions":{"type":["boolean","null"]},"customer_group_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"exclude_sale_items":{"type":["boolean","null"]},"first_purchase_only":{"type":["boolean","null"]},"free_shipping":{"type":["boolean","null"]},"free_shipping_max_cents":{"format":"int64","type":["integer","null"]},"free_shipping_services":{"items":{"$ref":"#/components/schemas/ShippingRuleService"},"type":["array","null"]},"min_quantity":{"format":"int32","type":["integer","null"]},"per_customer_limit":{"format":"int32","type":["integer","null"]},"scope":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountScope","description":"Limit the discount to these products, variants, collections or categories."}]}},"type":"object"},"DiscountCodeCreateRequest":{"allOf":[{"$ref":"#/components/schemas/DiscountCodeConditions"},{"properties":{"code":{"description":"1 to 50 characters, unique within the store.","type":"string"},"discount_type":{"$ref":"#/components/schemas/DiscountType"},"expires_at":{"format":"date-time","type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"min_order_cents":{"format":"int64","type":["integer","null"]},"starts_at":{"format":"date-time","type":["string","null"]},"usage_limit":{"format":"int32","type":["integer","null"]},"value":{"description":"Whole percent (0 to 100) for `percentage`, cents for `fixed_amount`.","format":"int32","type":"integer"}},"required":["code","discount_type","value"],"type":"object"}],"description":"A new discount code."},"DiscountCodeUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/DiscountCodeConditions"},{"properties":{"code":{"type":["string","null"]},"discount_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountType"}]},"expires_at":{"format":"date-time","type":["string","null"]},"is_active":{"type":["boolean","null"]},"min_order_cents":{"format":"int64","type":["integer","null"]},"starts_at":{"format":"date-time","type":["string","null"]},"usage_limit":{"format":"int32","type":["integer","null"]},"value":{"format":"int32","type":["integer","null"]}},"type":"object"}],"description":"Fields to change. Omitted fields keep their value; for the nullable ones\nan explicit `null` clears them."},"DiscountPaymentMethod":{"description":"The payment method a rule is limited to.","enum":["pix","card","boleto"],"type":"string"},"DiscountScope":{"description":"Products a discount is limited to. A line matches when its product, its\nvariant, one of its product's collections or one of its product's own\ncategories is listed. Every list empty: every product.","properties":{"category_ids":{"description":"A parent category does not include its children.","items":{"format":"uuid","type":"string"},"type":"array"},"collection_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"variant_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object"},"DiscountType":{"description":"`percentage` (`value` is a whole percent, 0 to 100) or `fixed_amount`\n(`value` is cents).","enum":["percentage","fixed_amount"],"type":"string"},"DiscountUsage":{"description":"How much a code or a promotion was used.","properties":{"discount_cents":{"description":"What it took off those orders, in cents.","format":"int64","type":"integer"},"last_used_at":{"format":"date-time","type":["string","null"]},"orders":{"description":"Orders that got it (cancelled ones left out).","format":"int64","type":"integer"},"revenue_cents":{"description":"Those orders' totals, paid ones only, in cents.","format":"int64","type":"integer"}},"required":["orders","revenue_cents","discount_cents"],"type":"object"},"EmailsClickedEvent":{"description":"A customer clicked a link in a marketing e-mail.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"broadcast_id":{"format":"uuid","type":["string","null"]},"broadcast_name":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["broadcast_id","broadcast_name","url"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"emails.clicked","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"EmailsOpenedEvent":{"description":"A customer opened a marketing e-mail.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"broadcast_id":{"format":"uuid","type":["string","null"]},"broadcast_name":{"type":["string","null"]}},"required":["broadcast_id","broadcast_name"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"emails.opened","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"EraseReq":{"properties":{"reason":{"description":"Free-text reason kept in the audit trail (e.g. ticket number).","type":["string","null"]}},"type":"object"},"EraseResult":{"properties":{"erased":{"description":"Tables whose personal data was removed or scrubbed.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Always empty: erasure is all or nothing (a failed step fails the\nrequest). Kept for existing clients.","items":{"type":"string"},"type":"array"}},"required":["erased","skipped"],"type":"object"},"ErrorResponse":{"description":"Canonical error body. Every error response from the API has this shape,\nwhatever produced it: handlers that build an [`ApiError`], the older\nhelpers below, bare status codes and axum's own rejections (the last two\nare rewritten by `common::api::normalize_errors`).\n\n`error` stays the human-readable message so consumers written against\nthe original `{\"error\": \"...\"}` body keep working; `code` is the stable,\nmachine-readable part clients should branch on.","properties":{"code":{"description":"Stable snake_case identifier for the failure, e.g. `not_found`,\n`validation_failed`, `discount_code_expired`.","example":"not_found","type":"string"},"details":{"description":"Structured context for the failure, such as per-field validation\nmessages. Shape depends on `code`.","type":["object","null"]},"error":{"description":"Human-readable message. Wording may change; do not match on it.","example":"Order not found","type":"string"}},"required":["error","code"],"type":"object"},"Event":{"description":"Something that happened in the store. A webhook's body is this, with the `store_id`.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"description":"`object`: the object the event is about, as its `GET` answered it when the event was sent (`null` for a moment after it happened; `{id, deleted: true}` once the object is gone). `details`: what the event knows that the object does not, by `GET /event-types`. Both are withheld (`object` null, `details` empty, `withheld` naming the permission) from a key that may not read that kind of object.","type":"object"},"id":{"format":"uuid","type":"string"},"type":{"description":"The event's type, e.g. `orders.paid` (see `GET /event-types`).","type":"string"}},"required":["id","type","created_at","data"],"type":"object"},"EventType":{"description":"A type of event, for webhooks to subscribe to.","properties":{"description":{"description":"What happened, in one English sentence.","type":"string"},"details":{"description":"The fields of the event's `data.details`.","items":{"type":"string"},"type":"array"},"object":{"description":"The schema of the event's `data.object`, e.g. `Order`; null when the object is the event's own facts.","type":["string","null"]},"type":{"description":"The name webhooks subscribe with, e.g. `orders.paid`.","type":"string"}},"required":["type","description","details"],"type":"object"},"ExchangeItem":{"description":"What the customer gets instead, in an exchange.","properties":{"id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_price_cents":{"description":"What it is worth in the exchange: for a variant of a returned product,\nwhat the customer paid for it (net of the discount); else its price.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["id","variant_id","product_id","title","quantity","unit_price_cents"],"type":"object"},"ExchangeItemInput":{"description":"A variant the customer wants in exchange, and how many.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"ExchangeOption":{"description":"A variant the customer can get in exchange.","properties":{"available":{"description":"There is stock, or it is made to order.","type":"boolean"},"sku":{"type":["string","null"]},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","title","available"],"type":"object"},"ExpiringCredit":{"description":"Wallet credit that expires, with what is left of it.","properties":{"amount_cents":{"description":"What was given.","format":"int64","type":"integer"},"entry_id":{"format":"uuid","type":"string"},"expires_at":{"format":"date-time","type":"string"},"kind":{"description":"The entry that brought it: `cashback`, `issue` (a bonus) or `adjust`\n(an import or a correction).","type":"string"},"left_cents":{"description":"What is left of it to spend: spending takes what expires first.","format":"int64","type":"integer"},"note":{"type":["string","null"]}},"required":["entry_id","kind","amount_cents","left_cents","expires_at"],"type":"object"},"FiscalCorrection":{"description":"A correction letter (CC-e) registered on an NF-e.","properties":{"access_key":{"type":"string"},"correction":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"document_id":{"format":"uuid","type":["string","null"]},"environment":{"type":"string"},"id":{"format":"uuid","type":"string"},"nfe":{"$ref":"#/components/schemas/FiscalCorrectionNfe"},"order_id":{"format":"uuid","type":["string","null"]},"protocol":{"type":["string","null"]},"registered_at":{"format":"date-time","type":["string","null"]},"sequence":{"description":"`nSeqEvento`, 1 to 20.","format":"int32","type":"integer"},"status":{"description":"`sending`, `unknown` (answer lost: refresh it), `registered`,\n`rejected` (SEFAZ refused it) or `failed` (not registered).","type":"string"},"status_code":{"format":"int32","type":["integer","null"]},"status_message":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","access_key","sequence","correction","status","environment","nfe","created_at","updated_at"],"type":"object"},"FiscalCorrectionNfe":{"description":"The NF-e a correction letter is about, as its XML says.","properties":{"emitter_cnpj":{"type":["string","null"]},"emitter_ie":{"type":["string","null"]},"emitter_name":{"type":["string","null"]},"issued_at":{"description":"`dhEmi` as written in the note.","type":["string","null"]},"number":{"type":["string","null"]},"recipient_document":{"description":"CPF or CNPJ digits.","type":["string","null"]},"recipient_name":{"type":["string","null"]},"series":{"type":["string","null"]}},"type":"object"},"FiscalDocument":{"description":"An NF-e (model 55) or NFC-e (model 65) the store issued, and where it stands with SEFAZ.","properties":{"access_key":{"type":"string"},"authorized_at":{"format":"date-time","type":["string","null"]},"cancel_protocol":{"type":["string","null"]},"cancel_reason":{"type":["string","null"]},"cancelled_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"environment":{"type":"string"},"id":{"format":"uuid","type":"string"},"issued_at":{"format":"date-time","type":"string"},"issuer_id":{"description":"The issuer (CNPJ) that emitted it.","format":"uuid","type":"string"},"last_error":{"type":["string","null"]},"model":{"description":"55 (NF-e) or 65 (NFC-e).","format":"int32","type":"integer"},"number":{"format":"int64","type":"integer"},"offline":{"description":"An NFC-e issued offline (contingency): it can be printed before SEFAZ\nanswers, and is transmitted afterwards.","type":"boolean"},"order_id":{"format":"uuid","type":["string","null"]},"protocol":{"type":["string","null"]},"purpose":{"description":"`sale`, `future_billing` (simples faturamento), `future_delivery`\n(a shipment's remessa), `gift` (nota de bonificação), `return` (NF-e\nde devolução), `complement` (NF-e complementar), `supplier_return`\n(devolução de compra), `transfer`, `goods_sent` or `goods_returned`\n(goods notes).","type":"string"},"series":{"format":"int32","type":"integer"},"shipment_id":{"description":"The shipment a remessa covers.","format":"uuid","type":["string","null"]},"status":{"description":"`pending`, `unknown`, `authorized`, `rejected`, `denied`, `cancelled`.","type":"string"},"status_code":{"description":"SEFAZ `cStat` of the last verdict.","format":"int32","type":["integer","null"]},"status_message":{"type":["string","null"]},"total_cents":{"format":"int64","type":"integer"},"transmissions":{"description":"What was sent to SEFAZ and what it answered. Only on a read of one.","items":{"$ref":"#/components/schemas/SefazTransmission"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","model","series","number","access_key","purpose","status","environment","issuer_id","total_cents","offline","issued_at","created_at","updated_at"],"type":"object"},"FiscalDocumentModel":{"description":"`mod`: the fiscal document model.","enum":["nfe","nfce"],"type":"string"},"FiscalDocumentPurpose":{"description":"What a document is for.","enum":["sale","future_billing","future_delivery","gift","return","complement","supplier_return","transfer","goods_sent","goods_returned","write_off"],"type":"string"},"FiscalTaxClassAssignResult":{"properties":{"products":{"format":"int64","minimum":0,"type":"integer"},"variants":{"format":"int64","minimum":0,"type":"integer"}},"required":["products","variants"],"type":"object"},"FiscalVoiding":{"description":"A range of NF-e or NFC-e numbers voided (inutilização): numbers that will never be issued.","properties":{"created_at":{"format":"date-time","type":"string"},"environment":{"type":"string"},"first_number":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"issuer_id":{"description":"The issuer (CNPJ) whose numbers were voided.","format":"uuid","type":"string"},"justification":{"type":"string"},"last_number":{"format":"int64","type":"integer"},"protocol":{"type":["string","null"]},"series":{"format":"int32","type":"integer"},"status":{"description":"`done`, `rejected` or `failed`.","type":"string"},"status_code":{"format":"int32","type":["integer","null"]},"status_message":{"type":["string","null"]}},"required":["id","issuer_id","series","first_number","last_number","justification","status","environment","created_at"],"type":"object"},"FiscalVoidingCreate":{"description":"A range of numbers to void.","properties":{"first_number":{"format":"int64","type":"integer"},"justification":{"description":"15 to 255 characters.","type":"string"},"last_number":{"format":"int64","type":"integer"},"model":{"description":"`nfe` (default) or `nfce`.","type":["string","null"]}},"required":["first_number","last_number","justification"],"type":"object"},"Form":{"description":"A form the store publishes (contact, quote request, sign-up), and what it does with each answer.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_tags":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"$ref":"#/components/schemas/StoreFormField"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"redirect_url":{"type":["string","null"]},"save_customer":{"type":"boolean"},"slug":{"type":"string"},"submissions_count":{"format":"int32","type":"integer"},"submit_label":{"type":["string","null"]},"success_message":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","slug","fields","is_active","save_customer","customer_tags","notify_emails","submissions_count","created_at","updated_at"],"type":"object"},"FormsSubmittedEvent":{"description":"Someone submitted a sign-up form; the object is the customer it made or found.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"double_opt_in":{"type":"boolean"},"form_id":{"format":"uuid","type":"string"},"form_slug":{"type":"string"}},"required":["form_id","form_slug","double_opt_in"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"forms.submitted","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"FreightQuoteOption":{"description":"One freight option of a quote: a carrier service or a local delivery\nzone, with its price and delivery time.","properties":{"boxes":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/QuotedBoxes","description":"The boxes this option was quoted for, so an order can later compare\nwhat checkout charged for with what was packed."}]},"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"option_id":{"type":"string"},"provider_code":{"description":"Which module produced this option. A quote can now merge several\ncarriers plus the store's own local delivery, so provenance has to\ntravel with each option — it used to be recovered by sniffing\n`option_id.starts_with(\"local_delivery:\")` at checkout.\n\n`#[serde(default)]` because quotes persisted before this field existed\nare still deserialized; those fall back to the quote row's provider.","type":"string"},"quotation_code":{"description":"The provider's own quotation reference for this option, when it has\none. Stored per option because each carrier issues its own.","type":["string","null"]},"raw":{"description":"The carrier's own option payload.","type":"object"},"service_name":{"type":"string"},"shipping_cents":{"format":"int64","type":"integer"}},"required":["option_id","service_name","shipping_cents","raw"],"type":"object"},"FulfillmentMode":{"enum":["stocked","on_demand","stocked_or_on_demand"],"type":"string"},"GenerateRecipient":{"description":"Who receives the goods, for the carrier order.","properties":{"address_complement":{"type":["string","null"]},"address_number":{"type":["string","null"]},"document":{"description":"CPF/CNPJ.","type":"string"},"email":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["document","name"],"type":"object"},"GenerateShipmentRequest":{"description":"The carrier order to create from a quote.","properties":{"carrier_name":{"type":["string","null"]},"cce_issued":{"description":"A carta de correção issued elsewhere fixed the NF-e: books even when\nthe XML lacks what Central do Frete requires. One registered through\nMobiari counts without it.","type":"boolean"},"collect_here":{"description":"The carrier collects at the store.","type":"boolean"},"cost_cents":{"description":"The chosen option's price.","format":"int64","type":["integer","null"]},"declaration_ok":{"description":"Melhor Envio or Correios without a production NF-e: the person\nconfirms the sale needs no NF-e, so the label may go with a content\ndeclaration.\nRefused without it (`declaration_consent_required`).","type":"boolean"},"freight_payer":{"description":"`CIF` (store pays) or `FOB` (recipient pays). Anything else is CIF.","type":"string"},"price_id":{"description":"The chosen option's `option_id`; defaults to the saved selection.","format":"int64","type":["integer","null"]},"quotation_code":{"description":"Defaults to the saved quote's.","type":["string","null"]},"recipient":{"$ref":"#/components/schemas/GenerateRecipient"},"schedule_collect":{"description":"Collection date (`YYYY-MM-DD`).","type":["string","null"]},"sender_complement":{"type":["string","null"]},"sender_number":{"type":["string","null"]},"sign_exemption_term":{"type":"boolean"}},"required":["freight_payer","collect_here","sign_exemption_term","cce_issued","recipient"],"type":"object"},"GiftCardProduct":{"description":"Whether a product is a gift card, each variant a face value.","properties":{"custom_amount":{"description":"The buyer may type the amount (R$ 10,00 to R$ 50.000,00) instead of\npicking a variant's value.","type":"boolean"},"is_gift_card":{"type":"boolean"},"product_id":{"format":"uuid","type":"string"},"variant_count":{"description":"Its variants, each a face value.","format":"int64","type":"integer"}},"required":["product_id","is_gift_card","custom_amount","variant_count"],"type":"object"},"GiftCardProductUpdate":{"description":"Make a product a gift card, or stop.","properties":{"custom_amount":{"description":"Let the buyer type the amount. Left as it is when omitted; off when the\nproduct stops being a gift card.","type":["boolean","null"]},"is_gift_card":{"type":"boolean"}},"required":["is_gift_card"],"type":"object"},"GrantCredit":{"description":"Credit to give a customer.","properties":{"amount_cents":{"description":"In cents, at least 1.","format":"int64","type":"integer"},"note":{"description":"Why. Kept in the wallet's history.","type":"string"}},"required":["amount_cents","note"],"type":"object"},"GroupRequest":{"properties":{"name":{"description":"1 to 60 characters, unique in the store regardless of case.","type":"string"}},"required":["name"],"type":"object"},"GroupWholesaleUpdate":{"description":"A group's price list and wholesale rules.","properties":{"catalog_limited":{"description":"Only the products of `collection_ids` may be bought by the group.","type":"boolean"},"collection_ids":{"description":"The group's collections when `catalog_limited`.","items":{"format":"uuid","type":"string"},"type":"array"},"min_item_quantity":{"description":"The fewest units of a product per order (sizes and colours together); null for none.","format":"int32","type":["integer","null"]},"min_order_cents":{"description":"The smallest order in cents (goods at the group's prices); null for none.","format":"int64","type":["integer","null"]},"pack_size":{"description":"Products are sold in multiples of this many units (2 or more); null for any quantity.","format":"int32","type":["integer","null"]},"price_list_id":{"description":"The group's price list, or null for retail prices.","format":"uuid","type":["string","null"]}},"type":"object"},"HelpArticle":{"description":"An article of the store's help center, in Markdown.","properties":{"body_md":{"description":"Markdown.","type":"string"},"collection_id":{"format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_public":{"description":"Shown on the public help center once `status` is `published`; otherwise only the store's assistant reads it.","type":"boolean"},"slug":{"description":"Its address in the help center (`/ajuda/{slug}`), set the first time\nit is public.","type":["string","null"]},"status":{"$ref":"#/components/schemas/KbArticleStatus"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","title","body_md","status","is_public","created_at","updated_at"],"type":"object"},"HelpArticleCreate":{"description":"A new help center article.","properties":{"body_md":{"type":["string","null"]},"collection_id":{"format":"uuid","type":["string","null"]},"is_public":{"description":"Show it in the help center once published. Defaults to false.","type":["boolean","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/KbArticleStatus","description":"Defaults to `draft`."}]},"title":{"description":"Defaults to \"Novo artigo\".","type":["string","null"]}},"type":"object"},"HelpArticleSummary":{"description":"An article in a list: everything but its body.","properties":{"collection_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_public":{"description":"Shown in the help center when published.","type":"boolean"},"status":{"$ref":"#/components/schemas/KbArticleStatus"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","title","status","is_public","updated_at"],"type":"object"},"HelpArticleUpdate":{"description":"Fields to change on an article; omitted fields keep their value.","properties":{"body_md":{"type":["string","null"]},"collection_id":{"description":"A collection of this store, or null to take it out of its collection.","format":"uuid","type":["string","null"]},"is_public":{"type":["boolean","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/KbArticleStatus"}]},"title":{"type":["string","null"]}},"type":"object"},"IncomingAddress":{"properties":{"city":{"type":["string","null"]},"city_code":{"description":"IBGE code.","type":["string","null"]},"complement":{"type":["string","null"]},"district":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"Eight digits.","type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]}},"type":"object"},"IncomingAuthorization":{"description":"SEFAZ's authorization (`protNFe`), when the file carries it.","properties":{"environment":{"description":"`tpAmb`: 1 produção, 2 homologação (a test note, never real goods).","format":"int32","minimum":0,"type":["integer","null"]},"protocol":{"type":["string","null"]},"received_at":{"format":"date-time","type":["string","null"]},"status_code":{"description":"`cStat`: 100 authorized, 150 authorized late.","format":"int32","minimum":0,"type":["integer","null"]}},"type":"object"},"IncomingInstallment":{"description":"One installment of `cobr/dup`.","properties":{"cents":{"format":"int64","type":"integer"},"due_on":{"format":"date","type":"string"},"number":{"description":"`nDup`: \"001\", \"1/2\".","type":["string","null"]}},"required":["due_on","cents"],"type":"object"},"IncomingItem":{"description":"One line of the note, in the supplier's codes and units.","properties":{"cfop":{"type":["string","null"]},"cost_cents":{"description":"What the line costs the store: goods − discount + freight + insurance\n+ other + IPI + ST.","format":"int64","type":"integer"},"description":{"type":"string"},"discount_cents":{"format":"int64","type":"integer"},"ean":{"description":"`cEAN`, when it is a real barcode (\"SEM GTIN\" is dropped).","type":["string","null"]},"freight_cents":{"format":"int64","type":"integer"},"goods_cents":{"description":"`vProd`.","format":"int64","type":"integer"},"insurance_cents":{"format":"int64","type":"integer"},"ipi_cents":{"description":"IPI charged on top of the goods.","format":"int64","type":"integer"},"ncm":{"type":["string","null"]},"number":{"description":"`nItem`, from 1.","format":"int32","minimum":0,"type":"integer"},"other_cents":{"format":"int64","type":"integer"},"quantity":{"description":"`qCom`.","format":"double","type":"number"},"st_cents":{"description":"ICMS-ST (and its FCP) charged on top of the goods.","format":"int64","type":"integer"},"supplier_code":{"description":"`cProd`: the supplier's own code.","type":"string"},"tax":{"$ref":"#/components/schemas/IncomingLineTax","description":"The line's taxes as the supplier wrote them, for a return note that\ngives them back (`fiscal::supplier_return`). Absent in notes read\nbefore they were kept."},"unit":{"description":"`uCom`: the unit the supplier sold in (\"CX\", \"UN\", \"M\").","type":"string"},"unit_value_cents":{"description":"`vUnCom`, in cents with decimals kept (a screw at 0.0375).","format":"double","type":"number"}},"required":["number","supplier_code","description","unit","quantity","unit_value_cents","goods_cents","discount_cents","freight_cents","insurance_cents","other_cents","ipi_cents","st_cents","cost_cents"],"type":"object"},"IncomingLineTax":{"description":"What a line's `imposto` says, beyond the amounts its cost counts.","properties":{"cest":{"description":"`CEST`, from `prod`.","type":["string","null"]},"icms_base_cents":{"description":"`vBC` and `vICMS`: the supplier's own ICMS.","format":"int64","type":"integer"},"icms_cents":{"format":"int64","type":"integer"},"icms_code":{"description":"The ICMS group's `CST` or `CSOSN` (\"00\", \"102\").","type":["string","null"]},"icms_rate":{"description":"`pICMS`, as written (\"12.0000\").","type":["string","null"]},"ipi_rate":{"description":"`pIPI`, as written.","type":["string","null"]},"origin":{"description":"`orig`, 0..=8.","format":"int32","minimum":0,"type":["integer","null"]}},"required":["icms_base_cents","icms_cents"],"type":"object"},"IncomingNfe":{"description":"A supplier's NF-e, read.","properties":{"access_key":{"description":"44 digits.","type":"string"},"authorization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IncomingAuthorization"}]},"carrier_name":{"type":["string","null"]},"carrier_tax_id":{"description":"The carrier's CNPJ or CPF, digits only.","type":["string","null"]},"direction":{"description":"`tpNF`: 1 the issuer's exit (a sale to the store), 0 an entry.","format":"int32","minimum":0,"type":"integer"},"freight_mode":{"description":"`modFrete`: 0 issuer pays (CIF), 1 recipient pays (FOB), 2 third\nparty, 3/4 own transport, 9 no freight.","format":"int32","minimum":0,"type":["integer","null"]},"installments":{"items":{"$ref":"#/components/schemas/IncomingInstallment"},"type":"array"},"issued_at":{"format":"date-time","type":"string"},"issuer":{"$ref":"#/components/schemas/IncomingParty"},"items":{"items":{"$ref":"#/components/schemas/IncomingItem"},"type":"array"},"model":{"type":"string"},"notes":{"description":"`infCpl`.","type":["string","null"]},"number":{"format":"int32","minimum":0,"type":"integer"},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IncomingParty"}]},"series":{"format":"int32","minimum":0,"type":"integer"},"totals":{"$ref":"#/components/schemas/IncomingTotals"},"volumes":{"items":{"$ref":"#/components/schemas/IncomingVolume"},"type":"array"}},"required":["access_key","model","series","number","issued_at","direction","issuer","items","totals","volumes","installments"],"type":"object"},"IncomingParty":{"properties":{"address":{"$ref":"#/components/schemas/IncomingAddress"},"name":{"type":["string","null"]},"state_registration":{"description":"Inscrição estadual.","type":["string","null"]},"tax_id":{"description":"CNPJ or CPF, digits only.","type":["string","null"]},"trade_name":{"type":["string","null"]}},"required":["address"],"type":"object"},"IncomingTotals":{"properties":{"discount_cents":{"format":"int64","type":"integer"},"freight_cents":{"format":"int64","type":"integer"},"goods_cents":{"format":"int64","type":"integer"},"insurance_cents":{"format":"int64","type":"integer"},"invoice_cents":{"description":"`vNF`: what the note charges in all.","format":"int64","type":"integer"},"ipi_cents":{"format":"int64","type":"integer"},"other_cents":{"format":"int64","type":"integer"},"st_cents":{"format":"int64","type":"integer"}},"required":["goods_cents","discount_cents","freight_cents","insurance_cents","other_cents","ipi_cents","st_cents","invoice_cents"],"type":"object"},"IncomingVolume":{"properties":{"count":{"format":"int64","type":["integer","null"]},"gross_weight_kg":{"format":"double","type":["number","null"]},"kind":{"description":"`esp`: \"CAIXA\", \"VOLUME\".","type":["string","null"]},"net_weight_kg":{"format":"double","type":["number","null"]}},"type":"object"},"IntakeAnswer":{"description":"An answer as it is kept: the question as it was asked, so changing the\nform later does not change what the client said.","properties":{"answer":{"type":"string"},"question":{"type":"string"}},"required":["question","answer"],"type":"object"},"IntakeAnswerInput":{"description":"A client's answer to one question.","properties":{"question_id":{"type":"string"},"value":{"description":"The text; for `choice` one of the options; for `yes_no` `yes` or `no`.","type":"string"}},"required":["question_id","value"],"type":"object"},"IntakeQuestion":{"description":"One question of a service's form.","properties":{"id":{"description":"Stable id the answers refer to. Left out on a new question, it is made.","type":"string"},"kind":{"description":"`text` (one line), `long_text`, `choice` (one of `options`) or `yes_no`.","type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["label","kind"],"type":"object"},"InventoryBackInStockEvent":{"description":"A product a customer asked to hear about is back in stock; the object is that customer.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"email":{"type":"string"},"product_id":{"format":"uuid","type":"string"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["product_id","variant_id","email"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"inventory.back_in_stock","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"InventoryLocation":{"description":"Where stock is held.","properties":{"address":{"description":"Address as free text.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Inactive locations take no new stock.","type":"boolean"},"location_type":{"description":"Free-form kind, `warehouse` by default (e.g. `store`, `dropship`).","type":["string","null"]},"name":{"type":"string"},"priority":{"description":"Lower comes first. The active location with the lowest priority is\nthe store's default: stock writes that name no location go there.","format":"int32","type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["created_at","id","is_active","name","updated_at"],"type":"object"},"InventoryLocationCreateRequest":{"properties":{"address":{"type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"location_type":{"description":"Defaults to `warehouse`.","type":["string","null"]},"name":{"type":"string"},"priority":{"description":"Defaults to 100.","format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"InventoryLocationUpdateRequest":{"description":"Fields to change; omitted ones stay.","properties":{"address":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"location_type":{"type":["string","null"]},"name":{"type":["string","null"]},"priority":{"format":"int32","type":["integer","null"]}},"type":"object"},"InventoryLowStockEvent":{"description":"A variant's stock at a location fell to 5 or fewer.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"location_id":{"format":"uuid","type":"string"},"quantity":{"type":"integer"},"quantity_change":{"type":"integer"},"reserved_quantity":{"type":"integer"}},"required":["location_id","quantity","reserved_quantity","quantity_change"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"inventory.low_stock","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"InventoryUpdatedEvent":{"description":"A variant's stock at a location changed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"location_id":{"format":"uuid","type":"string"},"quantity":{"type":"integer"},"quantity_change":{"type":"integer"},"reserved_quantity":{"type":"integer"}},"required":["location_id","quantity","reserved_quantity","quantity_change"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"inventory.updated","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"InvoiceLineMatch":{"description":"One line's match, set by hand.","properties":{"ignored":{"description":"Not stock: left out of the receipt.","type":["boolean","null"]},"line_number":{"format":"int32","type":"integer"},"stock_item_id":{"description":"The stock item it is…","format":"uuid","type":["string","null"]},"units_per_unit":{"description":"Base units in one of the supplier's units (\"CX\" of 12 = 12). Kept\nwhen omitted.","format":"double","type":["number","null"]},"variant_id":{"description":"…or the product variant (one not mirrored as an item). Neither (and\nnot ignored) clears the match.","format":"uuid","type":["string","null"]}},"required":["line_number"],"type":"object"},"InvoiceWarning":{"description":"Something about a note worth a look before receiving it.","properties":{"code":{"description":"`not_authorized`, `recipient_mismatch`, `supplier_unknown`,\n`installments_mismatch`, `issuer_entry`.","type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"IssueGiftCard":{"description":"A gift card to issue.","properties":{"amount_cents":{"description":"Face value in cents (1 to 5.000.000).","format":"int64","type":"integer"},"expires_at":{"description":"After this instant the card cannot be spent. Brazilian consumer\nprotection practice is a validity of at least a year; leave empty for none.","format":"date-time","type":["string","null"]},"message":{"description":"A message for the person receiving it.","type":["string","null"]},"note":{"description":"Internal note (why it was issued).","type":["string","null"]},"recipient_email":{"type":["string","null"]},"recipient_name":{"type":["string","null"]}},"required":["amount_cents"],"type":"object"},"IssuedPackage":{"description":"A package just sold, with the code the customer books with.","properties":{"code":{"description":"Shown once: the client's key to book with it.","type":"string"},"package":{"$ref":"#/components/schemas/BookingPackage"}},"required":["package","code"],"type":"object"},"KbArticleStatus":{"enum":["draft","published"],"type":"string"},"KbCollection":{"description":"A group of knowledge base articles.","properties":{"article_count":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"}},"required":["id","name","description","position","article_count"],"type":"object"},"KbCollectionRequest":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"position":{"description":"Defaults to after the last collection.","format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"KitLinesRequest":{"properties":{"quantity":{"description":"How many kits.","format":"double","type":"number"},"stock_item_id":{"description":"…or by its stock item (a made item expands to its recipe too).","format":"uuid","type":["string","null"]},"variant_id":{"description":"The kit, by its product variant…","format":"uuid","type":["string","null"]}},"required":["quantity"],"type":"object"},"LeadStage":{"description":"Where a lead stands.","enum":["new","qualified","quoted","won","lost"],"type":"string"},"LicenseKeyPool":{"description":"How many license keys a product has, used and left. The keys themselves are never read back.","properties":{"available":{"description":"Not given to any order yet.","format":"int64","type":"integer"},"key_count":{"description":"Keys added in all.","format":"int64","type":"integer"},"used":{"format":"int64","type":"integer"}},"required":["key_count","used","available"],"type":"object"},"LoyaltyEntry":{"description":"One line of a customer's points history.","properties":{"actor_user_id":{"format":"uuid","type":["string","null"]},"available_at":{"description":"From when the points count.","format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"credit_cents":{"description":"A `redeem`: the store credit it became, in cents.","format":"int64","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`earn`, `reverse`, `redeem`, `adjust` or `expire`. The set may grow:\ntreat other values as unknown entries.","type":"string"},"note":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"points":{"description":"Signed: negative when points left the balance.","format":"int32","type":"integer"}},"required":["id","kind","points","available_at","created_at"],"type":"object"},"LoyaltyProgram":{"description":"A store's loyalty program: points and referrals, each switched on apart.","properties":{"cashback_bps":{"description":"Cashback as a share of what was paid with money for goods, in basis\npoints (500 is 5%); a tier can set its own.","format":"int32","type":"integer"},"cashback_enabled":{"description":"Customers earn cashback (store credit) on paid orders.","type":"boolean"},"cashback_enabled_at":{"description":"When cashback was last switched on: orders paid before earn none.","format":"date-time","type":["string","null"]},"cashback_expire_months":{"description":"Months a cashback amount stays spendable once it is in the wallet.\nEmpty: it never expires.","format":"int32","type":["integer","null"]},"expire_after_months":{"description":"Points expire after this many months without earning any. Empty: never.","format":"int32","type":["integer","null"]},"notify_points":{"description":"E-mail the customer when an order earns them points or cashback, when\nthey turn points into credit and when their tier changes.","type":"boolean"},"pending_days":{"description":"Days after payment before an order's points, and its referral\nreward, count. A refund in this window takes them back first.","format":"int32","type":"integer"},"points_enabled":{"description":"Customers earn points on paid orders.","type":"boolean"},"points_enabled_at":{"description":"When points were last switched on: orders paid before earn nothing.","format":"date-time","type":["string","null"]},"points_per_currency_unit":{"description":"Points per R$ 1,00 paid with money (freight and store credit do not count).","format":"int32","type":"integer"},"redeem_step_cents":{"description":"...each worth this much store credit, in cents.","format":"int64","type":"integer"},"redeem_step_points":{"description":"Points are turned into credit in blocks of this many points...","format":"int32","type":"integer"},"referee_reward_cents":{"description":"Store credit for the friend, after their first order, in cents.","format":"int64","type":"integer"},"referral_min_order_cents":{"description":"The friend's first order must reach this, paid with money, before freight.","format":"int64","type":"integer"},"referral_monthly_limit":{"description":"Rewards one customer can get for referring per month. Empty: no limit.","format":"int32","type":["integer","null"]},"referrals_enabled":{"description":"Customers can refer friends with their code.","type":"boolean"},"referrals_enabled_at":{"description":"When referrals were last switched on.","format":"date-time","type":["string","null"]},"referrer_reward_cents":{"description":"Store credit for the customer who referred, in cents.","format":"int64","type":"integer"},"tier_window_months":{"description":"The rolling window, in months, a customer's spend is counted over for\ntheir tier.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["points_enabled","points_per_currency_unit","redeem_step_points","redeem_step_cents","pending_days","referrals_enabled","referrer_reward_cents","referee_reward_cents","referral_min_order_cents","notify_points","cashback_enabled","cashback_bps","tier_window_months"],"type":"object"},"LoyaltyProgramUpdate":{"description":"The program's rules, all of them (a field left out is refused).","properties":{"cashback_bps":{"description":"1 to 5000 basis points (0,01% to 50%). Left out: unchanged.","format":"int32","type":["integer","null"]},"cashback_enabled":{"description":"Customers earn cashback. Left out: unchanged.","type":["boolean","null"]},"cashback_expire_months":{"description":"1 to 60 months; `null` for cashback that never expires. Left out: unchanged.","format":"int32","type":["integer","null"]},"expire_after_months":{"description":"1 to 60, or empty for points that never expire.","format":"int32","type":["integer","null"]},"notify_points":{"description":"E-mail customers about points and cashback earned, points redeemed and\ntier changes. Left out: unchanged.","type":["boolean","null"]},"pending_days":{"description":"0 to 120.","format":"int32","type":"integer"},"points_enabled":{"type":"boolean"},"points_per_currency_unit":{"description":"1 to 100.","format":"int32","type":"integer"},"redeem_step_cents":{"description":"1 to 1.000.000 cents.","format":"int64","type":"integer"},"redeem_step_points":{"description":"1 to 1.000.000.","format":"int32","type":"integer"},"referee_reward_cents":{"description":"0 to 1.000.000 cents.","format":"int64","type":"integer"},"referral_min_order_cents":{"description":"0 or more cents.","format":"int64","type":"integer"},"referral_monthly_limit":{"description":"1 to 1000, or empty for no limit.","format":"int32","type":["integer","null"]},"referrals_enabled":{"type":"boolean"},"referrer_reward_cents":{"description":"0 to 1.000.000 cents.","format":"int64","type":"integer"},"tier_window_months":{"description":"1 to 36 months. Left out: unchanged.","format":"int32","type":["integer","null"]}},"required":["points_enabled","points_per_currency_unit","redeem_step_points","redeem_step_cents","pending_days","referrals_enabled","referrer_reward_cents","referee_reward_cents","referral_min_order_cents"],"type":"object"},"LoyaltyTier":{"description":"A level of the program: what a customer spends in the program's window to\nreach it, how much faster they earn from then on, and its perks.","properties":{"birthday_bonus_cents":{"description":"Store credit given on the customer's birthday, in cents (0: none).","format":"int64","type":"integer"},"birthday_bonus_points":{"description":"Points given on the customer's birthday (0: none).","format":"int32","type":"integer"},"cashback_bps":{"description":"Cashback percent in this tier, in basis points (0 to 5000). Empty: the\nprogram's `cashback_bps`.","format":"int32","type":["integer","null"]},"free_shipping":{"description":"Shipping rules can give this tier free shipping\n(`loyalty_customer_tiers.free_shipping`).","type":"boolean"},"min_spend_cents":{"description":"Paid with money for goods (no freight, no credit) in the last\n`tier_window_months`. The lowest tier may start at zero (every\ncustomer is in it).","format":"int64","type":"integer"},"multiplier_bps":{"description":"Points multiplier: 10000 is 1x, 15000 is 1,5x; 10000 to 50000.","format":"int32","type":"integer"},"name":{"type":"string"}},"required":["name","min_spend_cents","multiplier_bps"],"type":"object"},"LoyaltyTiers":{"description":"The tiers","properties":{"tiers":{"description":"Up to 6, each needing more spend and a multiplier (and a cashback\npercent, when both set one) not below the one before.","items":{"$ref":"#/components/schemas/LoyaltyTier"},"type":"array"}},"required":["tiers"],"type":"object"},"ManualPaymentKind":{"description":"How a payment recorded by hand was taken.","enum":["cash","pix","bank_transfer","card_terminal","other"],"type":"string"},"ManualPaymentMethod":{"description":"How a counter sale is paid.","enum":["cash","pix","bank_transfer","card_terminal","pix_qr"],"type":"string"},"ManualSaleBilling":{"description":"Where a counter sale is billed: one of the customer's saved addresses\n(`address_id`), or an address typed here (the other fields, without\n`address_id`). Either is kept on the order as it is at the sale.","properties":{"additional_info":{"description":"The complement.","type":["string","null"]},"address_id":{"description":"One of the addresses of the sale's `customer_id`.","format":"uuid","type":["string","null"]},"city":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"state":{"description":"Two-letter state (UF).","type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"description":"CEP, 8 digits (formatting ignored).","type":["string","null"]}},"type":"object"},"ManualSaleContact":{"description":"Who bought at the counter.","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"description":"Brazilian (DDD + number) or with its country code.","type":["string","null"]}},"type":"object"},"ManualSaleFreight":{"description":"Freight picked at the counter. The POS quotes without a cart\n(`/freight/simulate`), so the chosen option travels with the sale; the\nprice is operator-supplied like a line price override.\n\nTwo modes: delivery (a carrier option, a local-delivery zone, or a\nhand-typed price) and store pickup (`pickup_location_id`, no CEP).","properties":{"address_id":{"description":"One of the customer's saved addresses, for a sale that ships: the\norder keeps it as its delivery address, so nobody types it again.\nNeeds `customer_id`, and `destination_postal_code` must be that\naddress's CEP. Ignored for pickup.","format":"uuid","type":["string","null"]},"base_shipping_cents":{"description":"What the carrier quoted before the rules (`base_shipping_cents` of the option).","format":"int64","type":["integer","null"]},"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"destination_postal_code":{"description":"CEP, 8 digits (formatting ignored). Required for delivery, ignored\nfor pickup.","type":["string","null"]},"option_id":{"type":["string","null"]},"pickup_location_id":{"description":"Store location the customer picks up from. Present means retirada:\nno destination CEP is needed and the order is marked for pickup.","format":"uuid","type":["string","null"]},"provider_code":{"description":"`central_do_frete`, `local_delivery`, `pickup`, `other_carrier`, ...\nBlank means a hand-typed price the store delivers itself.","type":["string","null"]},"quotation_code":{"description":"Carrier quotation code, when the option came from a carrier quote.\nLets the shipment dialog skip straight to generating a label.","type":["string","null"]},"service_name":{"type":["string","null"]},"shipping_cents":{"description":"0 to 10,000,000.","format":"int64","type":"integer"},"shipping_rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AppliedShippingRule","description":"The shipping rule that priced the option, as the estimate answered it\n(`shipping_rule` of the option). Kept on the order with the freight."}]}},"required":["shipping_cents"],"type":"object"},"ManualSaleItem":{"description":"A line of a counter sale.","properties":{"quantity":{"description":"At least 1.","format":"int32","type":"integer"},"unit_price_cents":{"description":"Price override in cents; the variant's price when omitted.","format":"int64","type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"ManualSalePayment":{"description":"One payment of a counter sale.","properties":{"amount_cents":{"description":"Cents this payment covers. Left out when it is the sale's only\npayment: it covers the total, whatever the server works that out to.","format":"int64","type":["integer","null"]},"amount_received_cents":{"description":"Cash: cents handed over for this payment, to compute the change.","format":"int64","type":["integer","null"]},"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CardDetail","description":"Credit or debit, and the installments, when `method` is\n`card_terminal`. Optional: without it the payment is \"card machine\"."}]},"method":{"$ref":"#/components/schemas/ManualPaymentMethod"}},"required":["method"],"type":"object"},"ManualSalePix":{"description":"The PIX charge of a `pix_qr` sale, to show as a QR code.","properties":{"expires_at":{"format":"date-time","type":["string","null"]},"intent_id":{"format":"uuid","type":"string"},"qr_code":{"description":"PIX copy-and-paste code.","type":["string","null"]},"qr_code_base64":{"description":"PNG of the QR code, base64.","type":["string","null"]}},"required":["intent_id"],"type":"object"},"MergeReq":{"properties":{"from_customer_id":{"description":"The duplicate to fold into the customer in the path. It is deleted.","format":"uuid","type":"string"}},"required":["from_customer_id"],"type":"object"},"MergeResult":{"properties":{"into":{"description":"The customer that remains.","format":"uuid","type":"string"},"removed":{"description":"The customer that was merged in and deleted.","format":"uuid","type":"string"},"tables":{"description":"How many tables had rows repointed.","minimum":0,"type":"integer"}},"required":["into","removed","tables"],"type":"object"},"MessageDeliveryStatus":{"description":"Delivery of an outbound (agent or bot) message. On WhatsApp it follows\nMeta's status callbacks: `sent` (accepted), `delivered` (on the phone),\n`read`, or `failed` with `delivery_error`. On the web widget `read` means\nthe visitor opened the chat. Messages from the contact stay `sent`.\nTolerate unknown values.","enum":["sent","delivered","read","failed"],"type":"string"},"MovementKind":{"description":"What kind of stock movement a ledger entry records:\n\n- `stock_in` / `stock_out`: goods received (a purchase receipt, an\n  opening balance) or removed outside an order.\n- `reserve` / `release` / `consume`: an order or build job holding units,\n  letting them go, or shipping them.\n- `adjustment`: a manual correction (with a `reason`), or the undo of an\n  earlier movement.\n- `transfer`: units moving between two locations (one entry per side).\n- `count`: the difference a posted stock count wrote.\n- `build_consume` / `build_produce`: parts used and kits made by a build.\n\nMirrors `inventory_events_type_check`. The set may grow; tolerate\nunknown values.","enum":["stock_in","stock_out","reserve","release","consume","adjustment","transfer","count","build_consume","build_produce"],"type":"string"},"MovementReferenceType":{"description":"The document a movement came from. The set grows; tolerate unknown\nvalues.","type":"string","x-extensible-enum":["order","cart","purchase_receipt","stock_count","transfer","erp_sync","reversal","build_job","production_run","supplier_return","manual_adjust","product_import","import_run","assistant","erp_webhook","goods_note"]},"NfeIeIndicator":{"description":"`indIEDest`.","enum":["contributor","exempt","non_contributor"],"type":"string"},"NfseCancel":{"description":"Cancel an NFS-e.","properties":{"justification":{"description":"15 to 255 characters.","type":"string"},"reason":{"description":"`issue_error`, `not_provided` or `other`.","type":"string"}},"required":["reason","justification"],"type":"object"},"NfseClient":{"description":"The client (`tomador`). Without a document the note is issued without\nnaming one, which municipalities accept for individuals.","properties":{"abroad":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfseClientAbroad","description":"A client abroad for the national system (see [`ClientAbroad`]); then\n`document` and `address` stay empty."}]},"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfseClientAddress"}]},"document":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaxDocument"}]},"email":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"place_abroad":{"description":"A client abroad (no CPF or CNPJ): \"Campbell, CA - Estados Unidos\".\nUsed by the Nota Paulistana, which has no field for the country.","type":["string","null"]}},"required":["name"],"type":"object"},"NfseClientAbroad":{"description":"A client abroad, as the national system takes it (`toma/end/endExt`). With\nthis set the note is an export of services: ISS \"não incidência\" (`tribISSQN`\n3), the country as the place of the service, and the `comExt` block.","properties":{"city":{"type":"string"},"complement":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2 (`US`).","type":"string"},"district":{"description":"`N/A` when the address has none.","type":["string","null"]},"number":{"type":"string"},"postal_code":{"description":"Postal code as written there; `00000000` when it has none.","type":["string","null"]},"region":{"description":"State or province; `EX` when the client has none.","type":["string","null"]},"street":{"type":"string"}},"required":["country","city","street","number"],"type":"object"},"NfseClientAddress":{"properties":{"cep":{"type":"string"},"city_code":{"description":"IBGE code.","type":"string"},"complement":{"type":["string","null"]},"district":{"type":"string"},"number":{"type":"string"},"street":{"type":"string"}},"required":["street","number","district","city_code","cep"],"type":"object"},"NfseCreate":{"description":"A service invoice to issue: what, for whom, how much.","properties":{"additional_info":{"type":["string","null"]},"amount_cents":{"format":"int64","type":"integer"},"client":{"$ref":"#/components/schemas/NfseClient"},"competence_on":{"description":"The day of the service (the invoice's competence); today when left out.","format":"date","type":["string","null"]},"description":{"type":["string","null"]},"iss_rate":{"description":"ISS rate in percent x 100.","format":"int32","minimum":0,"type":["integer","null"]},"iss_withheld":{"type":["boolean","null"]},"nbs":{"type":["string","null"]},"service_code":{"description":"São Paulo's own service code (4 or 5 digits), for the Nota Paulistana.","type":["string","null"]},"source_id":{"format":"uuid","type":["string","null"]},"source_kind":{"description":"What the note is for (`booking`), with its id: one live note each.","type":["string","null"]},"trib_mun":{"type":["string","null"]},"trib_nac":{"type":["string","null"]}},"required":["client","amount_cents"],"type":"object"},"NfseDocument":{"description":"An NFS-e (a service invoice) the store issued, and where it stands with the city.","properties":{"access_key":{"type":["string","null"]},"authorized_at":{"format":"date-time","type":["string","null"]},"cancel_reason":{"type":["string","null"]},"cancel_requested_at":{"format":"date-time","type":["string","null"]},"cancelled_at":{"format":"date-time","type":["string","null"]},"client_document":{"type":["string","null"]},"client_name":{"type":["string","null"]},"competence_on":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"dps_id":{"type":"string"},"environment":{"type":"string"},"id":{"format":"uuid","type":"string"},"issued_at":{"format":"date-time","type":"string"},"last_error":{"type":["string","null"]},"nfse_number":{"type":["string","null"]},"number":{"format":"int64","type":"integer"},"provider":{"description":"`national` or `paulistana`.","type":"string"},"series":{"format":"int32","type":"integer"},"source_id":{"format":"uuid","type":["string","null"]},"source_kind":{"type":["string","null"]},"status":{"description":"`pending`, `unknown`, `authorized`, `rejected` or `cancelled`.","type":"string"},"status_code":{"type":["string","null"]},"status_message":{"type":["string","null"]},"total_cents":{"format":"int64","type":"integer"},"transmissions":{"description":"What was sent to the city and what it answered. Only on a read of one.","items":{"$ref":"#/components/schemas/NfseTransmission"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"verification_code":{"description":"The city's verification code (Nota Paulistana).","type":["string","null"]},"verification_url":{"description":"Where the city shows the note (Nota Paulistana).","type":["string","null"]}},"required":["id","number","series","dps_id","provider","status","environment","description","competence_on","total_cents","issued_at","created_at","updated_at"],"type":"object"},"NfseTransmission":{"properties":{"created_at":{"format":"date-time","type":"string"},"elapsed_ms":{"format":"int32","type":["integer","null"]},"error":{"type":["string","null"]},"http_status":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"operation":{"type":"string"}},"required":["id","operation","created_at"],"type":"object"},"OptionGroup":{"description":"A product option such as Color or Size.","properties":{"definition_id":{"description":"The store's library option this option is linked to\n(`/stores/{store_id}/option-definitions`), if any. An option named\nlike a library option is linked when it is made.","format":"uuid","type":["string","null"]},"group_type":{"$ref":"#/components/schemas/OptionGroupType"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"}},"required":["id","product_id","name","position","group_type"],"type":"object"},"OptionGroupCreateRequest":{"description":"A new option group.","properties":{"group_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionGroupType","description":"Defaults to `text`."}]},"name":{"description":"Unique within the product, ignoring case.","type":"string"},"position":{"description":"Ignored: a new option goes after the product's others.","format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"OptionGroupType":{"description":"How an option group's values render: plain text or color swatches.","enum":["text","color"],"type":"string"},"OptionGroupUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"group_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionGroupType"}]},"name":{"type":["string","null"]},"position":{"format":"int32","type":["integer","null"]}},"type":"object"},"OptionGroupWithValues":{"allOf":[{"$ref":"#/components/schemas/OptionGroup"},{"properties":{"values":{"items":{"$ref":"#/components/schemas/OptionValue"},"type":"array"}},"required":["values"],"type":"object"}],"description":"An option group with its values, in display order."},"OptionValue":{"description":"One value of an option group, e.g. Blue.","properties":{"color_base_name":{"description":"For `color` groups: the base color name used for filtering and for\nthe swatch when there is no custom hex.","type":["string","null"]},"color_hex":{"description":"For `color` groups with `color_is_custom`: `#RRGGBB`, or up to\nseveral joined by `/` for multi-color swatches. Null otherwise.","type":["string","null"]},"color_is_custom":{"type":"boolean"},"definition_value_id":{"description":"The library value this value is linked to, if any. A value of a\nlinked option is linked (or added to the library) when it is made,\nand follows the library's renames.","format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"option_group_id":{"format":"uuid","type":"string"},"position":{"format":"int32","type":"integer"},"value":{"type":"string"}},"required":["id","option_group_id","value","position","color_is_custom"],"type":"object"},"OptionValueCreateRequest":{"description":"A new option value. The color fields only apply to `color` groups.","properties":{"color_base_name":{"description":"Defaults to `value`.","type":["string","null"]},"color_hex":{"description":"Required when `color_is_custom` is true: `#RRGGBB` or `RRGGBB`,\nseveral separated by `/`, `,`, `&` or `|`.","type":["string","null"]},"color_is_custom":{"type":["boolean","null"]},"position":{"description":"Defaults to after the option's other values.","format":"int32","type":["integer","null"]},"value":{"description":"Unique within the option, ignoring case.","type":"string"}},"required":["value"],"type":"object"},"OptionValueUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"color_base_name":{"description":"An empty string resets it to the value's name.","type":["string","null"]},"color_hex":{"type":["string","null"]},"color_is_custom":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]},"value":{"type":["string","null"]}},"type":"object"},"Order":{"description":"An order: what was bought, by whom, what it costs, how it is paid and how it gets there.","properties":{"cancel_reason":{"description":"Why the order was cancelled: `by_user`, `payment_expired`,\n`payment_failed`, `marketplace`, `kiosk_abandoned`. Null when it was\nnot, or was cancelled before reasons were kept.","type":["string","null"]},"cancelled_at":{"format":"date-time","type":["string","null"]},"change_cents":{"description":"Only in the answer to a request with `source: manual`. What goes back in cash: what was handed over above each cash\npayment's amount, never negative.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency":{"description":"ISO 4217 currency of every `*_cents` amount.","type":"string"},"customer_document":{"description":"The customer's tax id (CPF/CNPJ in Brazil), digits only.","type":["string","null"]},"customer_email":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"description":"Customer name, or the checkout contact's for guests.","type":["string","null"]},"customer_phone":{"type":["string","null"]},"discount_cents":{"format":"int64","type":"integer"},"fulfillment_method":{"description":"`shipping` or `pickup`.","type":"string"},"fulfillment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderFulfillmentStatus"}]},"id":{"format":"uuid","type":"string"},"is_test":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/OrderItem"},"type":"array"},"notes":{"description":"Internal notes; never shown to the customer.","type":["string","null"]},"number":{"description":"Per-store sequential number (`#1234`). Null on legacy orders.","type":["string","null"]},"owed_cents":{"description":"What is still to be paid on an order awaiting payment: the total minus what was received and minus store credit or a gift card held for it; 0 once paid. What `POST /orders/{order_id}/payments` records when the payment is received outside a gateway.","format":"int64","type":"integer"},"payment_expires_at":{"description":"When the latest payment attempt stops being payable (PIX codes).","format":"date-time","type":["string","null"]},"payment_method":{"description":"Method of the latest payment attempt: `pix`, `card`, `cash`,\n`bank_transfer` or `card_terminal`.","type":["string","null"]},"payment_provider":{"description":"Gateway of the latest payment attempt (`mercado_pago`, `manual`).","type":["string","null"]},"payment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderPaymentStatus"}]},"pickup_location_id":{"format":"uuid","type":["string","null"]},"pix":{"description":"Only in the answer to a request with `source: manual`. ","oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ManualSalePix","description":"Only for `pix_qr`: poll `GET .../orders/{order_id}/payments` until\nan intent is `approved`."}]},"placed_at":{"format":"date-time","type":["string","null"]},"refundable_cents":{"description":"What `POST /orders/{order_id}/refunds` can still return through the payment provider: the latest approved payment minus its refunds.","format":"int64","type":"integer"},"refunded_cents":{"description":"Refunded so far through the payment provider.","format":"int64","type":"integer"},"refunds":{"description":"Refunds, newest first.","items":{"$ref":"#/components/schemas/Refund"},"type":"array"},"sales_channel_id":{"format":"uuid","type":["string","null"]},"scheduled_on":{"description":"The day the customer asked the order to be sent (dispatched, or\nready for pickup), not before; null for as soon as possible. Set at\ncheckout or by the team (the order's partial update). Always sent\n(optional in the schema for older clients).","format":"date","type":["string","null"]},"shipments":{"description":"Shipments, oldest first, with their contents and tracking.","items":{"$ref":"#/components/schemas/Shipment"},"type":"array"},"shipping_address":{"description":"Where the order is delivered, and who receives it. Null for pickup.","oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingAddress"}]},"shipping_cents":{"format":"int64","type":"integer"},"shipping_option":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderShippingOption","description":"The chosen shipping option, when the order ships."}]},"status":{"$ref":"#/components/schemas/OrderStatus"},"status_history":{"description":"Every status change, oldest first, with who made it and why. Always\nsent (optional in the schema for older clients).","items":{"$ref":"#/components/schemas/OrderStatusEvent"},"type":"array"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"description":"What the order costs: the goods, freight and tax, plus the store's\ncard installment interest when `installment_interest_by` is `store`.","format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","fulfillment_method","currency","subtotal_cents","discount_cents","shipping_cents","tax_cents","total_cents","refunded_cents","refundable_cents","items","shipments","refunds","is_test","created_at","updated_at"],"type":"object"},"OrderCredit":{"description":"What credit paid on an order.","properties":{"credit_cents":{"description":"Total paid with credit, net of what was given back.","format":"int64","type":"integer"},"gift_cards_sold":{"description":"Gift cards this order sold (it bought gift cards rather than goods).","items":{"$ref":"#/components/schemas/SoldGiftCard"},"type":"array"},"parts":{"items":{"$ref":"#/components/schemas/OrderCreditPart"},"type":"array"}},"required":["credit_cents","parts","gift_cards_sold"],"type":"object"},"OrderCreditPart":{"description":"One account's share of an order.","properties":{"account_id":{"format":"uuid","type":"string"},"code_hint":{"description":"\"••••-••••-••••-PQRS\" for a gift card.","type":["string","null"]},"customer_name":{"type":["string","null"]},"kind":{"type":"string"},"spent_cents":{"description":"Spent on the order, net of releases and restores.","format":"int64","type":"integer"}},"required":["account_id","kind","spent_cents"],"type":"object"},"OrderFulfillmentStatus":{"description":"Where the goods are, derived from the order's shipments: `unfulfilled`\n(nothing out), `partially_fulfilled` (some units out, or all out and\nnot all delivered), `fulfilled` (every unit delivered), `cancelled`.","enum":["unfulfilled","partially_fulfilled","fulfilled","cancelled"],"type":"string"},"OrderInvoiceCancel":{"description":"Cancel an order's NF-e (or one of them).","properties":{"document_id":{"description":"The document to cancel; defaults to the order's authorized document\nin the store's current environment.","format":"uuid","type":["string","null"]},"force":{"description":"Cancel even though a shipment already left with this NF-e.","type":"boolean"},"justification":{"description":"15 to 255 characters, sent to SEFAZ.","type":"string"}},"required":["justification"],"type":"object"},"OrderInvoiceCorrectionCreate":{"description":"A correction letter (CC-e) on an order's NF-e.","properties":{"correction":{"description":"`xCorrecao`, 15 to 1000 characters. It replaces earlier cartas, so it\nmust repeat every correction still wanted.","type":"string"},"shipment_id":{"description":"A shipment with its own attached NF-e: correct that note instead of the order's.","format":"uuid","type":["string","null"]}},"required":["correction"],"type":"object"},"OrderInvoiceCreate":{"description":"The NF-e or NFC-e to issue for an order.","properties":{"model":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalDocumentModel","description":"`nfe` (default) or `nfce`: the NFC-e is a sale at the counter to a\nfinal consumer, with no address, freight or carrier. It takes no\n`purpose` other than `sale` and, as `edits`, only `recipient.document`\nand `recipient.name` (the consumer asked for the CPF on the note)."}]},"purpose":{"description":"`sale` (default): the ordinary NF-e, goods and sale together. `future_billing`: the simples faturamento of the whole order, whose shipments then get their own NF-e from the app.","oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalDocumentPurpose","description":"`sale` (default): the ordinary NF-e, goods and sale together.\n`future_billing`: venda para entrega futura, the simples faturamento\nof the whole order; each shipment then gets its own remessa\n(`POST /shipments/{id}/invoice`).\n`gift`: nota de bonificação (doação ou brinde) for an order whose total\nis R$ 0,00: the goods at their list value, CFOP 5910/6910, no payment."}]}},"type":"object"},"OrderItem":{"description":"A line of an order.","properties":{"delivered_quantity":{"description":"Units a delivered shipment brought to the customer.","format":"int32","type":["integer","null"]},"expected_ready_at":{"description":"Latest promised production date.","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image_url":{"description":"Variant image, falling back to the product's primary image: an\nabsolute URL, or a path on the API host.","type":["string","null"]},"preorder_available_on":{"description":"Pre-sale: the line was sold short of stock on a variant on pre-sale,\nand waits for its collection, expected this day. Null otherwise.\nAlways sent (optional in the schema for older clients).","format":"date","type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"shipped_quantity":{"description":"Units already out in a shipment.","format":"int32","type":["integer","null"]},"sku":{"type":["string","null"]},"title":{"type":"string"},"total_cents":{"description":"`unit_price_cents * quantity`.","format":"int64","type":"integer"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["id","product_id","variant_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"OrderListStatus":{"description":"The `status` filter of the order list: a superset of `OrderStatus`.\n\nEvery `OrderStatus` value filters on the order's status; the extra\nvalues are the fulfillment tabs `processing` (paid, nothing shipped),\n`to_ship` (paid, units still to go out), `shipped` (some or all units out)\nand `payment_expired` (waiting for a payment that can no longer come).\nThey never appear as an order's `status`.","enum":["draft","pending","paid","fulfilled","cancelled","refunded","processing","shipped","to_ship","payment_expired"],"type":"string"},"OrderNfe":{"description":"The order's nota fiscal. The XML itself is never returned (it can be\nlarge and is only needed server-side for freight orders); `has_nfe`\nsays whether it is present.","properties":{"danfe_url":{"type":["string","null"]},"has_nfe":{"type":"boolean"},"nf_value_cents":{"description":"Invoice total from the XML.","format":"int64","type":["integer","null"]},"nfe_key":{"description":"44-digit access key.","type":["string","null"]},"nfe_number":{"type":["string","null"]}},"required":["has_nfe"],"type":"object"},"OrderNfeAttach":{"description":"An NF-e issued elsewhere for an order: its XML, or the link to its DANFE.","properties":{"danfe_url":{"type":["string","null"]},"xml":{"description":"Raw NFe XML. Omit to attach only a DANFE link.","type":["string","null"]}},"type":"object"},"OrderPaymentStatus":{"description":"Where the money is. Follows the payment provider; `PATCH .../status`\ndoes not change it.\n\n`pending` (not paid yet), `authorized` (held, not captured), `captured`\n(paid), `partially_refunded`, `refunded`, `failed`.","enum":["pending","authorized","captured","partially_refunded","refunded","failed"],"type":"string"},"OrderPayments":{"description":"An order's payment attempts, newest first, and its refunds.","properties":{"order_id":{"format":"uuid","type":"string"},"payments":{"description":"Every attempt to pay the order, newest first: method, amount, status.","items":{"$ref":"#/components/schemas/Payment"},"type":"array"},"refunds":{"description":"Newest first.","items":{"$ref":"#/components/schemas/Refund"},"type":"array"}},"required":["order_id","payments","refunds"],"type":"object"},"OrderShippingOption":{"description":"The shipping option the customer (or the counter) chose, read from the\nfreight snapshot.","properties":{"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"destination_postal_code":{"type":["string","null"]},"service_name":{"type":["string","null"]},"shipping_cents":{"format":"int64","type":["integer","null"]}},"type":"object"},"OrderStatus":{"description":"Where an order is in its lifecycle.\n\n| Status | Meaning |\n| --- | --- |\n| `draft` | Being put together (quotes); not yet placed. |\n| `pending` | Placed, waiting for payment. |\n| `paid` | Paid; goods not all delivered yet. |\n| `fulfilled` | Every unit delivered (set by the shipments) or closed by hand. |\n| `cancelled` | Cancelled; reservations released. Terminal. |\n| `refunded` | Money returned. Terminal. |\n\nShipping progress is not an order status: read `fulfillment_status` and\nthe order's shipments.","enum":["draft","pending","paid","fulfilled","cancelled","refunded"],"type":"string"},"OrderStatusEvent":{"description":"A change of an order's status: from what, to what, by whom and why.","properties":{"actor_name":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"from_status":{"description":"Null for the first status an order is recorded with.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"note":{"description":"Free text typed with the change.","type":["string","null"]},"reason":{"description":"`by_user`, `payment_received`, `payment_expired`, `payment_failed`,\n`refunded`, `marketplace`, `kiosk_abandoned`, ...","type":["string","null"]},"to_status":{"type":"string"}},"required":["created_at","id","to_status"],"type":"object"},"OrderSummary":{"description":"An order as a list shows it.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"description":"ISO 4217 currency of every `*_cents` amount.","type":"string"},"customer_email":{"description":"Customer e-mail, or the e-mail typed at checkout for guests.","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"description":"Customer name, or the name typed at checkout for guests.","type":["string","null"]},"delivered_units":{"description":"Units a delivered shipment brought to the customer, capped per line\nat the ordered quantity. `fulfillment_status` alone cannot say this:\nan order closed by hand is `fulfilled` with nothing delivered.","format":"int64","type":"integer"},"discount_cents":{"format":"int64","type":"integer"},"fulfillment_method":{"description":"`shipping` or `pickup`.","type":"string"},"fulfillment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderFulfillmentStatus"}]},"id":{"format":"uuid","type":"string"},"is_test":{"description":"Test orders are hidden from the list unless `include_test=true`.","type":"boolean"},"item_count":{"description":"Order lines.","format":"int64","type":"integer"},"number":{"description":"Per-store sequential number, shown as `#1234`. Null on orders that\npredate numbering; fall back to the id.","type":["string","null"]},"ordered_units":{"description":"Units ordered across all lines.","format":"int64","type":"integer"},"payment_expires_at":{"description":"When the latest payment attempt stops being payable (PIX codes).","format":"date-time","type":["string","null"]},"payment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderPaymentStatus"}]},"scheduled_on":{"description":"The day the customer asked the order to be sent (dispatched, or\nready for pickup); null for as soon as possible. Always sent\n(optional in the schema for older clients).","format":"date","type":["string","null"]},"shipped_units":{"description":"Units that have left in a shipment, capped per line at the ordered\nquantity.","format":"int64","type":"integer"},"shipping_cents":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/OrderStatus"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","fulfillment_method","currency","subtotal_cents","discount_cents","shipping_cents","tax_cents","total_cents","item_count","ordered_units","shipped_units","delivered_units","is_test","created_at","updated_at"],"type":"object"},"OrderUpdate":{"description":"The fields of an order to change. A field left out keeps its value.","properties":{"notes":{"description":"Internal notes; never shown to the customer.","type":["string","null"]},"scheduled_on":{"description":"The day the customer asked the order to be sent (dispatched, or\nready for pickup), from today up to a year ahead; null clears it\n(as soon as possible), and leaving the field out keeps it.","format":"date","type":["string","null"]},"shipping_address":{"$ref":"#/components/schemas/ShippingAddressUpdate"}},"type":"object"},"OrdersCancelledEvent":{"description":"An order was cancelled.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.cancelled","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersCreatedEvent":{"description":"An order was placed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersDeliveredEvent":{"description":"An order was delivered.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"shipment_id":{"format":"uuid","type":["string","null"]},"tracking_code":{"type":["string","null"]}},"required":["shipment_id","tracking_code"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.delivered","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersFulfilledEvent":{"description":"Every item of an order was fulfilled.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"fulfillment_id":{"format":"uuid","type":["string","null"]}},"required":["fulfillment_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.fulfilled","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersPaidEvent":{"description":"An order was paid in full.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.paid","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersRefundedEvent":{"description":"Money was refunded on an order; `refund_cents` is this refund.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"refund_cents":{"type":"integer"}},"required":["refund_cents"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.refunded","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersShippedEvent":{"description":"An order left with a carrier.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"shipment_id":{"format":"uuid","type":["string","null"]},"tracking_code":{"type":["string","null"]}},"required":["shipment_id","tracking_code"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.shipped","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"OrdersUpdatedEvent":{"description":"An order changed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"orders.updated","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Page_AutomaticDiscount":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AutomaticDiscount"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Booking":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Booking"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingNote":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingNote"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingPackage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingPackage"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingPackagePlan":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingPackagePlan"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingProvider":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingProvider"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingService":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingService"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingSlot":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingSlot"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_BookingTimeOff":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BookingTimeOff"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_CartSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CartSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Category":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Category"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Collection":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Collection"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_CollectionProductEntry":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CollectionProductEntry"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Company":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Company"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Conversation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Conversation"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_ConversationLabel":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ConversationLabel"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_ConversationMessage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversationMessage"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_CreditAccount":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CreditAccount"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Customer":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Customer"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_CustomerAddress":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CustomerAddress"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_CustomerGroup":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerGroup"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_CustomerInteraction":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CustomerInteraction"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_CustomerTag":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomerTag"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_Deal":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Deal"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_DiscountCode":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DiscountCode"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_DiscountCodeBatch":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DiscountCodeBatch"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Event":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Event"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_EventType":{"description":"Every type of event, in one page.","properties":{"data":{"description":"Every event, in catalog order. A fixed list that grows with\nreleases; tolerate unknown names.","items":{"$ref":"#/components/schemas/EventType"},"type":"array"},"has_more":{"description":"Always `false`: every item is in this page.","type":"boolean"},"next_cursor":{"type":"null"}},"required":["data","has_more","next_cursor"],"type":"object"},"Page_FiscalCorrection":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FiscalCorrection"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_FiscalDocument":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FiscalDocument"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_FiscalVoiding":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/FiscalVoiding"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Form":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Form"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_HelpArticleSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/HelpArticleSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_InventoryLocation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/InventoryLocation"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_KbCollection":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/KbCollection"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_NfseDocument":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NfseDocument"},"type":"array"},"has_more":{"description":"Whether `next_cursor` gives another page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_OptionGroupWithValues":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/OptionGroupWithValues"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_OptionValue":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/OptionValue"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_OrderSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/OrderSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Payable":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Payable"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Pipeline":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Pipeline"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_PriceList":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PriceList"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_PriceListVariant":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PriceListVariant"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_ProductImage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductImage"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_ProductSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_PurchaseOrder":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PurchaseOrder"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_QuoteSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/QuoteSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Receivable":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Receivable"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_ReferenceTableSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ReferenceTableSummary"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Referral":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Referral"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Refund":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Refund"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_ResellerApplication":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ResellerApplication"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Return":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Return"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Review":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Review"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_SalesChannel":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SalesChannel"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Shipment":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Shipment"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StockListItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockListItem"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StockMovement":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockMovement"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StoreFormSubmission":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreFormSubmission"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_StoreLocation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreLocation"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Subscription":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Subscription"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Supplier":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Supplier"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_SupplierInvoice":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SupplierInvoice"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Task":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Task"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_TaxClass":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TaxClass"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_TeamMember":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TeamMember"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Ticket":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Ticket"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_UnshippedItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/UnshippedItem"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_Variant":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Variant"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_WaitlistEntry":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WaitlistEntry"},"type":"array"},"has_more":{"description":"Always false: the whole list is in one page.","type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more"],"type":"object"},"Page_Webhook":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Webhook"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Page_WebhookDelivery":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"},"has_more":{"description":"Whether another page follows.","type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"total":{"description":"Count of every matching row. Only present with `include_total=true`.","format":"int64","type":["integer","null"]}},"required":["data","has_more"],"type":"object"},"Payable":{"description":"One installment owed.","properties":{"amount_cents":{"format":"int64","type":"integer"},"category":{"description":"`inventory` for stock bought from suppliers; anything else is an\noperating expense in the DRE (see `finance::EXPENSE_CATEGORIES`).","type":"string"},"created_at":{"format":"date-time","type":"string"},"credited_cents":{"description":"Taken off by returns to the supplier (`supplier_returns`): the\ninstallment owes `amount_cents - credited_cents`.","format":"int64","type":"integer"},"description":{"type":["string","null"]},"due_on":{"format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"installment":{"description":"1-based position in its set of `installments`.","format":"int32","type":"integer"},"installments":{"format":"int32","type":"integer"},"invoice_label":{"description":"\"NF 1-4521\".","type":["string","null"]},"label":{"description":"The note's own label (\"001\").","type":["string","null"]},"method":{"type":["string","null"]},"notes":{"type":["string","null"]},"paid_cents":{"format":"int64","type":["integer","null"]},"paid_on":{"format":"date","type":["string","null"]},"purchase_order_id":{"format":"uuid","type":["string","null"]},"purchase_order_number":{"type":["string","null"]},"status":{"description":"`open`, `paid` or `cancelled`.","type":"string"},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_invoice_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":["string","null"]}},"required":["id","installment","installments","due_on","amount_cents","credited_cents","status","category","created_at"],"type":"object"},"PayableCreate":{"description":"A payable entered by hand: rent, payroll, taxes, a subscription.","properties":{"amount_cents":{"format":"int64","type":"integer"},"category":{"description":"One of `finance::EXPENSE_CATEGORIES`.","type":"string"},"description":{"description":"What it is (\"Aluguel da loja\").","type":"string"},"due_on":{"description":"Due day of the first installment.","format":"date","type":"string"},"notes":{"type":["string","null"]},"repeat_months":{"description":"Creates this many monthly installments (same amount, same day of the\nmonth, clamped to the month's last day). Defaults to 1, at most 36.","format":"int32","type":["integer","null"]},"supplier_id":{"format":"uuid","type":["string","null"]}},"required":["description","category","amount_cents","due_on"],"type":"object"},"PayableDraft":{"description":"An installment to create.","properties":{"amount_cents":{"format":"int64","type":"integer"},"due_on":{"format":"date","type":"string"},"label":{"type":["string","null"]}},"required":["due_on","amount_cents"],"type":"object"},"PayableUpdate":{"properties":{"amount_cents":{"format":"int64","type":["integer","null"]},"category":{"type":["string","null"]},"due_on":{"format":"date","type":["string","null"]},"method":{"description":"\"boleto\", \"pix\", \"transfer\", \"card\".","type":["string","null"]},"notes":{"type":["string","null"]},"paid_cents":{"description":"Defaults to the amount.","format":"int64","type":["integer","null"]},"paid_on":{"format":"date","type":["string","null"]},"status":{"description":"`paid` (needs `paid_on`, defaults to today), `open` (undoes a\npayment) or `cancelled`.","type":["string","null"]}},"type":"object"},"Payment":{"description":"An attempt to pay an order: method, amount and status.","properties":{"amount_cents":{"format":"int64","type":"integer"},"cart_id":{"format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"external_id":{"description":"The gateway's payment id.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"installments":{"description":"Card installments from the provider snapshot (1 = à vista).","format":"int32","type":["integer","null"]},"method":{"$ref":"#/components/schemas/PaymentIntentMethod"},"order_id":{"format":"uuid","type":"string"},"payer_document":{"description":"Payer document (CPF/CNPJ) extracted from the provider snapshot.\nThe merchant needs it to emit the nota fiscal.","type":["string","null"]},"provider":{"description":"`mercado_pago`, or `manual` for payments recorded at the counter.","type":"string"},"status":{"$ref":"#/components/schemas/PaymentIntentStatus"},"updated_at":{"format":"date-time","type":"string"}},"required":["amount_cents","created_at","currency","id","method","order_id","provider","status","updated_at"],"type":"object"},"PaymentAnchor":{"enum":["invoice","order","receipt"],"type":"string"},"PaymentInstallment":{"properties":{"days":{"description":"Days after the anchor date.","format":"int32","type":"integer"},"percent":{"description":"Share of the total, in percent.","format":"double","type":"number"}},"required":["days","percent"],"type":"object"},"PaymentIntentMethod":{"description":"How a payment attempt is paid.","enum":["pix","card","boleto","cash","bank_transfer","card_terminal"],"type":"string"},"PaymentIntentStatus":{"description":"State of a payment attempt: `pending` (waiting for the customer),\n`processing` (the gateway is settling), `requires_action`, `approved`\n(paid), `failed`, `cancelled`, `expired` (e.g. an unpaid PIX code) or\n`refunded`.","enum":["pending","processing","requires_action","approved","failed","cancelled","expired","refunded"],"type":"string"},"PaymentTerms":{"description":"When a purchase is paid: installments counted in days from the anchor\n(`invoice`: the supplier's invoice date; `order`: the day the order was\nsent; `receipt`: the first delivery), each a share of the total.","properties":{"anchor":{"$ref":"#/components/schemas/PaymentAnchor"},"installments":{"items":{"$ref":"#/components/schemas/PaymentInstallment"},"type":"array"},"method":{"description":"`boleto`, `pix`, `transfer`, `card`...","type":["string","null"]}},"required":["anchor","installments"],"type":"object"},"PaymentsFailedEvent":{"description":"A payment of an order was refused or failed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"failure_code":{"type":["string","null"]},"payment_id":{"format":"uuid","type":["string","null"]}},"required":["payment_id","failure_code"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"payments.failed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"PaymentsPendingEvent":{"description":"A payment of an order is waiting for the customer (a Pix code was issued).","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"expires_at":{"format":"date-time","type":["string","null"]},"method":{"type":["string","null"]},"payment_id":{"format":"uuid","type":["string","null"]}},"required":["payment_id","method","expires_at"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"payments.pending","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Pipeline":{"description":"The stages a deal goes through, in order.","properties":{"id":{"format":"uuid","type":"string"},"is_archived":{"type":"boolean"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"stages":{"items":{"$ref":"#/components/schemas/Stage"},"type":"array"}},"required":["id","name","position","is_archived","stages"],"type":"object"},"PipelineCreate":{"description":"A new pipeline: `name`, and its stages in order (without them it gets the default ones).","properties":{"name":{"type":"string"},"stages":{"description":"Defaults to Novo, Qualificado, Proposta, Negociação, Ganho, Perdido.","items":{"$ref":"#/components/schemas/StageInput"},"type":["array","null"]}},"required":["name"],"type":"object"},"PipelineUpdate":{"description":"Fields to change on a pipeline. `stages` is the whole list: a stage left out is removed (refused while deals are in it).","properties":{"is_archived":{"type":["boolean","null"]},"name":{"type":["string","null"]},"stages":{"description":"The full ordered list. Stages left out are removed, which needs them to\nhold no deals.","items":{"$ref":"#/components/schemas/StageInput"},"type":["array","null"]}},"type":"object"},"PixToPay":{"description":"A Pix to pay.","properties":{"amount_cents":{"format":"int64","type":"integer"},"expires_at":{"format":"date-time","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"qr_code":{"description":"The copy-and-paste code.","type":["string","null"]},"qr_code_base64":{"description":"The QR code image, PNG in base64.","type":["string","null"]}},"required":["order_id","amount_cents"],"type":"object"},"PlanIssue":{"properties":{"code":{"$ref":"#/components/schemas/PlanIssueCode"},"name":{"type":["string","null"]},"variant_id":{"description":"The variant (or part) the issue is about.","format":"uuid","type":["string","null"]}},"required":["code"],"type":"object"},"PlanIssueCode":{"description":"Something worth fixing about how lines ship.\n\nNew values are added as freight learns new problems to report; clients\nmust tolerate unknown values.","enum":["default_dimensions","default_weight","placeholder_box","recipe_cycle","fractional_count","inside_without_alone_box","inside_without_weight","profile_incomplete"],"type":"string"},"PlannedBox":{"description":"One box the lines ship as.","properties":{"catalog_box_id":{"format":"uuid","type":["string","null"]},"contents":{"items":{"$ref":"#/components/schemas/PlannedContent"},"type":"array"},"estimated":{"description":"Some size or weight is a default.","type":"boolean"},"gross_weight_g":{"description":"With packaging and everything inside.","format":"int32","type":"integer"},"height_mm":{"format":"int32","type":"integer"},"length_mm":{"format":"int32","type":"integer"},"name":{"type":"string"},"net_weight_g":{"description":"Goods only (NF-e pesoL).","format":"int32","type":"integer"},"origin":{"$ref":"#/components/schemas/BoxOrigin"},"width_mm":{"format":"int32","type":"integer"}},"required":["name","length_mm","width_mm","height_mm","gross_weight_g","net_weight_g","estimated","origin","contents"],"type":"object"},"PlannedContent":{"description":"One thing inside a planned box.","properties":{"inside":{"description":"Rides inside without a box of its own.","type":"boolean"},"line_key":{"description":"The line it belongs to: an order item for a shipment, the variant for\na cart or a preview.","format":"uuid","type":"string"},"name":{"type":"string"},"part_variant_id":{"description":"The part in the box, or the sold variant itself. Null for an item\nwith no variant (a raw material).","format":"uuid","type":["string","null"]},"quantity":{"format":"double","type":"number"},"sku":{"type":["string","null"]},"weight_g":{"description":"What these units weigh, in grams, when known.","format":"int32","type":["integer","null"]}},"required":["line_key","name","quantity","inside"],"type":"object"},"Points":{"description":"A customer's points.","properties":{"available":{"description":"Can be turned into credit now. Negative after a refund took back points\nalready spent.","format":"int64","type":"integer"},"pending":{"description":"Still waiting for their orders to stand (`pending_days`).","format":"int64","type":"integer"}},"required":["available","pending"],"type":"object"},"PriceList":{"description":"A price list.","properties":{"created_at":{"format":"date-time","type":"string"},"groups":{"description":"The groups whose customers pay it.","items":{"$ref":"#/components/schemas/PriceListGroup"},"type":"array"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"percent_off_bp":{"description":"Off the regular price, in basis points (1000 = 10%), for a variant the list has no price of its own for; 0\nmeans the retail price.","format":"int32","type":"integer"},"prices":{"description":"Prices written, quantity tiers included.","format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"},"variants":{"description":"Variants with a price of their own.","format":"int64","type":"integer"}},"required":["id","name","percent_off_bp","variants","prices","groups","created_at","updated_at"],"type":"object"},"PriceListCreate":{"description":"A new price list.","properties":{"name":{"description":"1 to 60 characters, unique in the store regardless of case.","type":"string"},"percent_off_bp":{"description":"Off the regular price for the variants without a price of their own, in basis points (0 to 9000). Defaults to 0\n(retail).","format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"PriceListGroup":{"description":"A group a list is given to.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"PriceListPriceInput":{"description":"One price to write.","properties":{"min_quantity":{"description":"From how many units of the product this price applies (1 to 100000). Defaults to 1: the plain list price.","format":"int32","type":["integer","null"]},"price_cents":{"description":"The unit price in cents; `null` removes this price (the variant falls back to the list's percent).","format":"int64","type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"PriceListPricesResult":{"description":"What a write did.","properties":{"removed":{"format":"int64","type":"integer"},"saved":{"format":"int64","type":"integer"}},"required":["saved","removed"],"type":"object"},"PriceListPricesUpdate":{"description":"Prices to write.","properties":{"prices":{"description":"Up to 2000.","items":{"$ref":"#/components/schemas/PriceListPriceInput"},"type":"array"}},"required":["prices"],"type":"object"},"PriceListUpdate":{"description":"Changes to a price list; fields left out keep their value.","properties":{"name":{"type":["string","null"]},"percent_off_bp":{"format":"int32","type":["integer","null"]}},"type":"object"},"PriceListVariant":{"description":"A variant of the store, with what the list charges for it.","properties":{"list_cents":{"description":"What one unit costs at the list (its own price, else the percent, else retail; never above retail).","format":"int64","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"regular_cents":{"description":"The regular price the list's percent applies to.","format":"int64","type":"integer"},"retail_cents":{"description":"What a shopper pays (the promotional price while it is lower).","format":"int64","type":"integer"},"sku":{"type":["string","null"]},"tiers":{"description":"The variant's own prices in the list, by quantity; empty when the list prices it by its percent.","items":{"$ref":"#/components/schemas/PriceTier"},"type":"array"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"description":"Null for a product sold in one variant.","type":["string","null"]}},"required":["variant_id","product_id","product_title","retail_cents","regular_cents","list_cents","tiers"],"type":"object"},"PriceTier":{"description":"A variant's own price in a list from `min_quantity` units of its product up.","properties":{"min_quantity":{"format":"int32","type":"integer"},"price_cents":{"format":"int64","type":"integer"}},"required":["min_quantity","price_cents"],"type":"object"},"Product":{"description":"A product: what is sold, with its variants (what is priced and stocked), option groups and images.","properties":{"allow_backorder":{"description":"Whether the product itself may be backordered (sold without stock on\nhand). Does not gate its components: missing parts that carry their\nown flag are still backordered and ordered.","type":"boolean"},"availability":{"description":"Resolved from the variants' stock: `in_stock`, `preorder` or\n`out_of_stock`.","type":["string","null"]},"brand":{"type":["string","null"]},"category_ids":{"description":"The categories the product is in.","items":{"format":"uuid","type":"string"},"type":"array"},"collection_ids":{"description":"The collections the product is in. Change them with `PUT` and `DELETE /collections/{collection_id}/products/{product_id}`.","items":{"format":"uuid","type":"string"},"type":"array"},"condition":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"description":"The values of the store's product fields (`/custom-fields`), by key.","type":"object"},"description":{"type":["string","null"]},"description_html":{"description":"HTML description the storefront renders.","type":["string","null"]},"ean":{"type":["string","null"]},"expected_availability_at":{"description":"For `preorder`: when the earliest variant is expected.","format":"date-time","type":["string","null"]},"highlights":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"images":{"description":"The active gallery (images and videos), as `GET /products/{product_id}/images` lists it.","items":{"$ref":"#/components/schemas/ProductImage"},"type":"array"},"internal_label":{"description":"Staff-only note, never shown to shoppers.","type":["string","null"]},"is_launch":{"type":"boolean"},"is_physical":{"type":["boolean","null"]},"isbn":{"type":["string","null"]},"model_url":{"description":"3D model (glb/gltf/usdz) URL for the storefront viewer.","type":["string","null"]},"option_groups":{"items":{"$ref":"#/components/schemas/OptionGroupWithValues"},"type":"array"},"priority":{"description":"Sort weight; lower first.","format":"int32","type":"integer"},"sales_channels":{"$ref":"#/components/schemas/SalesChannelAssignment"},"shipping_profile":{"$ref":"#/components/schemas/ShippingProfileView"},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"slug":{"description":"The storefront URL segment, made from the title when the product is created.","type":"string"},"specs":{"description":"The values of the store's specification fields (`field_id`) for this product.","items":{"$ref":"#/components/schemas/ProductSpecValue"},"type":"array"},"status":{"$ref":"#/components/schemas/ProductStatus"},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this product. A variant may override it.","format":"uuid","type":["string","null"]},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/ProductType"},"upc":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"variants":{"description":"Every variant, active or not, in display order.","items":{"$ref":"#/components/schemas/Variant"},"type":"array"},"video_poster_url":{"type":["string","null"]},"video_provider":{"type":["string","null"]},"video_url":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]}},"required":["id","title","slug","status","type","highlights","allow_backorder","is_launch","priority","custom_fields","option_groups","variants","images","created_at","updated_at"],"type":"object"},"ProductAvailability":{"description":"Whether a product can be bought now: from stock (`in_stock`), sold\nahead of stock with an expected date (`preorder`), or not at all\n(`out_of_stock`).","enum":["in_stock","preorder","out_of_stock"],"type":"string"},"ProductCreate":{"description":"A new product. Only `title` is required; it is created as a draft unless `status` says otherwise.","properties":{"allow_backorder":{"type":["boolean","null"]},"brand":{"description":"An empty string clears it.","type":["string","null"]},"condition":{"description":"Sets `condition` and `google_condition`.","type":["string","null"]},"custom_fields":{"description":"Values for the store's product fields, by key. Every field the store\nmarked `required` must be among them.","type":["object","null"]},"default_price_cents":{"description":"For a `single` product: also create its one variant at this price.","format":"int64","type":["integer","null"]},"description":{"type":["string","null"]},"description_html":{"description":"HTML description the storefront renders.","type":["string","null"]},"ean":{"type":["string","null"]},"highlights":{"items":{"type":"string"},"type":["array","null"]},"internal_label":{"type":["string","null"]},"is_launch":{"type":["boolean","null"]},"is_physical":{"type":["boolean","null"]},"isbn":{"type":["string","null"]},"model_url":{"type":["string","null"]},"priority":{"format":"int32","type":["integer","null"]},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductStatus"}]},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this product.","format":"uuid","type":["string","null"]},"title":{"type":"string"},"type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductType"}]},"upc":{"description":"Sets `upc` and `google_gtin` (unless `google_gtin` is also sent).","type":["string","null"]},"video_poster_url":{"type":["string","null"]},"video_provider":{"type":["string","null"]},"video_url":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]}},"required":["title"],"type":"object"},"ProductImage":{"description":"An item of a product's gallery: an image, or a video with its poster.","properties":{"alt_text":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"extra_variant_ids":{"description":"Other variants that show this item too.","items":{"format":"uuid","type":"string"},"type":"array"},"height":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"is_primary":{"type":"boolean"},"kind":{"description":"`gallery` (default) or `measurement` (size charts, kept out of the\nstorefront gallery).","type":"string"},"media_type":{"description":"`image` (default) or `video`.","type":"string"},"mime_type":{"type":"string"},"position":{"format":"int32","type":"integer"},"poster_url":{"description":"Poster image URL for video rows.","type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"provider":{"description":"For videos: `upload`, `youtube`, `vimeo` or `external`. Null for\nimages.","type":["string","null"]},"size_bytes":{"format":"int32","type":"integer"},"thumbnail_url":{"description":"A resized copy of an image, for lists. Null for a video.","format":"uri","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"url":{"description":"Where to load the file from.","format":"uri","type":["string","null"]},"variant_id":{"description":"The variant this item shows, when it is not for the whole product.","format":"uuid","type":["string","null"]},"width":{"format":"int32","type":["integer","null"]}},"required":["id","product_id","url","thumbnail_url","position","is_primary","kind","media_type","mime_type","size_bytes","created_at","updated_at"],"type":"object"},"ProductImageUpdate":{"description":"The fields of a gallery item to change. A field left out keeps its value.","properties":{"alt_text":{"type":["string","null"]},"extra_variant_ids":{"description":"Other variants that show this item too.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"is_primary":{"type":["boolean","null"]},"kind":{"description":"`gallery` or `measurement`.","type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"poster_url":{"type":["string","null"]},"variant_id":{"description":"The variant this item shows; null for the whole product.","format":"uuid","type":["string","null"]}},"type":"object"},"ProductImageUpload":{"description":"The gallery item an upload made.","properties":{"image":{"$ref":"#/components/schemas/ProductImage"}},"required":["image"],"type":"object"},"ProductImageUploadForm":{"description":"The multipart form of an image upload.","properties":{"alt_text":{"type":["string","null"]},"image":{"description":"The image file: JPEG, PNG or WebP, up to 10 MB.","format":"binary","type":"string"},"is_primary":{"type":["boolean","null"]},"kind":{"description":"`gallery` (default) or `measurement` (`image_kind` is accepted too).","type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"variant_id":{"description":"Attach the image to one variant of the product\n(`product_variant_id` is accepted too, its older name).","format":"uuid","type":["string","null"]}},"required":["image"],"type":"object"},"ProductReferenceTable":{"description":"A table that applies to a product.","properties":{"hidden_reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReferenceTableHiddenReason","description":"Why it is not shown; null when it is."}]},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ReferenceTableKind"},"name":{"type":"string"},"shown":{"description":"On the product page.","type":"boolean"},"source":{"$ref":"#/components/schemas/ReferenceTableSource"},"source_id":{"description":"The category or collection it is inherited from; null for the\nproduct's own.","format":"uuid","type":["string","null"]},"source_name":{"type":["string","null"]}},"required":["id","name","kind","source","shown"],"type":"object"},"ProductReferenceTables":{"description":"The reference tables of a product.","properties":{"hidden_table_ids":{"description":"Inherited tables the product keeps off its page.","items":{"format":"uuid","type":"string"},"type":"array"},"table_ids":{"description":"Tables attached to the product itself, in the order it shows them.","items":{"format":"uuid","type":"string"},"type":"array"},"tables":{"description":"Every table that applies: its own first, then those of its categories\n(nearest first) and collections, each once, with whether the product\npage shows it.","items":{"$ref":"#/components/schemas/ProductReferenceTable"},"type":"array"}},"required":["table_ids","hidden_table_ids","tables"],"type":"object"},"ProductReferenceTablesRequest":{"description":"The tables a product has of its own and the inherited ones it hides.","properties":{"hidden_table_ids":{"description":"Inherited tables to keep off this product's page.","items":{"format":"uuid","type":"string"},"type":"array"},"table_ids":{"description":"Tables of the store to attach to the product, in order. Replaces the\nproduct's own list.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["table_ids"],"type":"object"},"ProductSpecValue":{"properties":{"collection_ids":{"description":"References into the store's `collections` table — populated for\n`kind = 'collection_ref'` fields. Sourced from `collection_products`,\nnot stored on `product_specs`, so the spec sheet stays in sync with\nwhatever wrote the product↔collection relationship (importer,\nproduct form, this endpoint).","items":{"format":"uuid","type":"string"},"type":"array"},"field_id":{"format":"uuid","type":"string"},"term_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"value_text":{"type":["string","null"]},"value_texts":{"description":"Multiple freeform string values — used by `taxonomy` fields whose\n`allow_freeform` is true and the user types custom values\nalongside picked terms.","items":{"type":"string"},"type":"array"}},"required":["field_id","term_ids","value_texts","collection_ids"],"type":"object"},"ProductStatus":{"description":"Lifecycle of a product. Only `active` products are sold. Requests also\naccept the capitalized forms (`Active`) older clients send.","enum":["draft","active","archived"],"type":"string"},"ProductSummary":{"description":"A product as a list shows it: what it is, its price range, stock and first image.","properties":{"availability":{"$ref":"#/components/schemas/ProductAvailability"},"available_stock":{"description":"`total_stock` minus units reserved by open orders.","format":"int32","type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"description":"The product's plain-text description (what a kiosk or a list view shows in full).","type":["string","null"]},"expected_availability_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image_url":{"description":"URL of the primary image's original; null when the product has no\nimage.","type":["string","null"]},"is_launch":{"type":"boolean"},"price_max_cents":{"description":"Highest price over the active variants; null without any.","format":"int64","type":["integer","null"]},"price_min_cents":{"description":"Lowest price over the active variants; null without any.","format":"int64","type":["integer","null"]},"priority":{"format":"int32","type":"integer"},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/ProductStatus"},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this product.","format":"uuid","type":["string","null"]},"thumbnail_url":{"description":"URL of the primary image resized for lists (medium, about 600px).","type":["string","null"]},"title":{"type":"string"},"total_stock":{"description":"Units on hand over the active variants and every location.","format":"int32","type":"integer"},"type":{"$ref":"#/components/schemas/ProductType"},"updated_at":{"format":"date-time","type":"string"},"variant_count":{"description":"Active variants.","format":"int32","type":"integer"},"variants":{"description":"The active variants, in display order, with their stock.","items":{"$ref":"#/components/schemas/Variant"},"type":"array"}},"required":["id","title","slug","status","type","availability","is_launch","priority","variant_count","total_stock","available_stock","variants","created_at","updated_at"],"type":"object"},"ProductType":{"description":"`single` (one variant), `variable` (options such as size and color) or\n`kit` (built from other products' variants).","enum":["single","variable","kit"],"type":"string"},"ProductUpdate":{"description":"The fields of a product to change. A field left out keeps its value.","properties":{"allow_backorder":{"type":["boolean","null"]},"brand":{"description":"An empty string clears it.","type":["string","null"]},"category_ids":{"description":"The categories the product is in: all of them, the ones left out are removed.","items":{"format":"uuid","type":"string"},"type":"array"},"condition":{"description":"Sets `condition` and `google_condition`.","type":["string","null"]},"custom_fields":{"description":"Values of the store's product fields, by key. A key left out keeps its value.","type":"object"},"description":{"type":["string","null"]},"description_html":{"description":"HTML description the storefront renders.","type":["string","null"]},"ean":{"type":["string","null"]},"highlights":{"items":{"type":"string"},"type":["array","null"]},"internal_label":{"type":["string","null"]},"is_launch":{"type":["boolean","null"]},"is_physical":{"type":["boolean","null"]},"isbn":{"type":["string","null"]},"model_url":{"type":["string","null"]},"priority":{"format":"int32","type":["integer","null"]},"sales_channels":{"$ref":"#/components/schemas/SalesChannelAssignment"},"shipping_profile":{"$ref":"#/components/schemas/ShippingProfileInput"},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"slug":{"description":"The storefront URL segment. The old one keeps working as a redirect.","type":"string"},"specs":{"description":"Specification values to set, one per `field_id`; fields left out keep their value, and an entry with only `field_id` clears it.","items":{"allOf":[{"$ref":"#/components/schemas/UpsertSpecValueRequest"},{"properties":{"field_id":{"description":"The specification field to set.","format":"uuid","type":"string"}},"required":["field_id"],"type":"object"}]},"type":"array"},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductStatus"}]},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this product.","format":"uuid","type":["string","null"]},"title":{"type":["string","null"]},"type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductType"}]},"upc":{"description":"Sets `upc` and `google_gtin` (unless `google_gtin` is also sent).","type":["string","null"]},"video_poster_url":{"type":["string","null"]},"video_provider":{"type":["string","null"]},"video_url":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]}},"type":"object"},"ProductsCreatedEvent":{"description":"A product was created.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"products.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ProductsDeletedEvent":{"description":"A product was deleted.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"slug":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["title","slug"],"type":"object"},"object":{"$ref":"#/components/schemas/DeletedObject"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"products.deleted","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ProductsPriceDroppedEvent":{"description":"A product a customer asked to hear about got cheaper; the object is that customer.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"email":{"type":"string"},"new_price_cents":{"type":["integer","null"]},"old_price_cents":{"type":["integer","null"]},"product_id":{"format":"uuid","type":"string"}},"required":["product_id","email","old_price_cents","new_price_cents"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"products.price_dropped","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ProductsUpdatedEvent":{"description":"A product changed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"products.updated","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"PurchaseBoxGroup":{"description":"Identical boxes of one line.","properties":{"count":{"format":"int64","type":"integer"},"description":{"type":["string","null"]},"height_mm":{"format":"int32","type":["integer","null"]},"label":{"description":"The pack's name for pack boxes, the base unit for loose units.","type":"string"},"length_mm":{"format":"int32","type":["integer","null"]},"purchase_order_item_id":{"format":"uuid","type":"string"},"sku":{"type":["string","null"]},"source":{"$ref":"#/components/schemas/BoxSource"},"units_each":{"description":"Base units in one box.","format":"double","type":"number"},"weight_g":{"description":"Gross weight of one box.","format":"int32","type":["integer","null"]},"width_mm":{"format":"int32","type":["integer","null"]}},"required":["purchase_order_item_id","label","source","count","units_each"],"type":"object"},"PurchaseBoxes":{"description":"The boxes still to come on an order (ordered minus received).","properties":{"box_count":{"description":"Boxes with a known size.","format":"int64","type":"integer"},"groups":{"items":{"$ref":"#/components/schemas/PurchaseBoxGroup"},"type":"array"},"missing_sizes":{"description":"Lines with boxes of unknown size: give their pack (or the item) a\nsize and weight to have them quoted.","items":{"format":"uuid","type":"string"},"type":"array"},"volume_mm3":{"description":"Sum of the outer volumes, in cubic millimetres.","format":"int64","type":"integer"},"weight_g":{"format":"int64","type":"integer"}},"required":["groups","box_count","weight_g","volume_mm3","missing_sizes"],"type":"object"},"PurchaseFreightChoice":{"description":"A freight option picked for an order.","properties":{"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"option_id":{"type":"string"},"provider_code":{"type":["string","null"]},"quotation_code":{"type":["string","null"]},"service_name":{"type":"string"},"shipping_cents":{"format":"int64","type":"integer"}},"required":["option_id","service_name","shipping_cents"],"type":"object"},"PurchaseFreightQuote":{"description":"FOB freight options for an order.","properties":{"boxes":{"$ref":"#/components/schemas/PurchaseBoxes","description":"The boxes quoted."},"destination_postal_code":{"description":"The CEP of the location receiving the goods.","type":"string"},"free_freight":{"description":"The supplier ships free at this order's value (its free-freight\nminimum is met): no freight needs to be booked.","type":"boolean"},"invoice_cents":{"description":"The goods value declared to the carriers, in cents.","format":"int64","type":"integer"},"options":{"description":"Cheapest first.","items":{"$ref":"#/components/schemas/FreightQuoteOption"},"type":"array"},"origin_postal_code":{"description":"The supplier's CEP.","type":"string"}},"required":["origin_postal_code","destination_postal_code","boxes","invoice_cents","free_freight","options"],"type":"object"},"PurchaseOrder":{"description":"An order the store places with a supplier, and what of it arrived.","properties":{"boxes":{"$ref":"#/components/schemas/PurchaseBoxes","description":"The supplier's boxes still to come. Only on a read of one."},"closed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"expected_on":{"description":"The day it is expected.","format":"date","type":["string","null"]},"freight_quote":{"description":"The FOB freight option chosen: `carrier`, `service`, `price_cents`,\n`delivery_days`, `quoted_at`.","type":["object","null"]},"freight_terms":{"description":"`FOB` or `CIF`, as agreed when the supplier was set.","type":["string","null"]},"goods_cents":{"description":"Line totals only; shipping and other costs are separate.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"line_count":{"format":"int64","type":"integer"},"lines":{"description":"Only on a read of one.","items":{"$ref":"#/components/schemas/PurchaseOrderLine"},"type":"array"},"location_id":{"description":"Where received goods go by default.","format":"uuid","type":["string","null"]},"notes":{"type":["string","null"]},"number":{"description":"Sequential per store, e.g. `PO-0042`.","type":"string"},"ordered_at":{"format":"date-time","type":["string","null"]},"other_cents":{"format":"int64","type":"integer"},"payment_terms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentTerms","description":"The supplier's payment terms when the supplier was set."}]},"receipts":{"description":"What arrived, newest first. Only on a read of one.","items":{"$ref":"#/components/schemas/PurchaseReceipt"},"type":"array"},"shipping_cents":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatus"},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":["string","null"]},"total_ordered":{"format":"int64","type":"integer"},"total_received":{"format":"int64","type":"integer"},"units_ordered":{"description":"Base units ordered and received, with decimals.","format":"double","type":"number"},"units_received":{"format":"double","type":"number"}},"required":["id","number","status","currency","goods_cents","shipping_cents","other_cents","line_count","total_ordered","total_received","units_ordered","units_received","created_at"],"type":"object"},"PurchaseOrderCreate":{"description":"A new purchase order, in `draft`.","properties":{"currency":{"description":"Defaults to `BRL`.","type":["string","null"]},"expected_on":{"description":"The day it is expected.","format":"date","type":["string","null"]},"freight_terms":{"description":"`FOB` or `CIF`; defaults to the supplier's.","type":["string","null"]},"lines":{"items":{"$ref":"#/components/schemas/PurchaseOrderLineInput"},"type":"array"},"location_id":{"description":"Where received goods go by default.","format":"uuid","type":["string","null"]},"notes":{"type":["string","null"]},"payment_terms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentTerms","description":"Defaults to the supplier's payment terms; an empty `installments`\nlist means none."}]},"supplier_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"PurchaseOrderLine":{"description":"One line of a purchase order.","properties":{"base_unit":{"description":"The item's base unit today.","type":["string","null"]},"current_name":{"description":"The variant's name today.","type":["string","null"]},"description":{"description":"Name when the line was added.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"item_id":{"description":"The variant ordered; null when it was deleted since.","format":"uuid","type":["string","null"]},"pack_id":{"description":"Pack selected when the order was written. Its fields below are\nsnapshots, so the order stays readable after the pack changes.","format":"uuid","type":["string","null"]},"pack_name":{"type":["string","null"]},"pack_supplier_sku":{"type":["string","null"]},"pack_units":{"description":"Base units in one selected pack.","format":"double","type":["number","null"]},"packs_ordered":{"description":"Packs ordered; null when the line was written in base units.","format":"int32","type":["integer","null"]},"packs_received":{"description":"Base units received divided by the snapshotted pack size.","format":"double","type":["number","null"]},"quantity_ordered":{"format":"int32","type":"integer"},"quantity_received":{"format":"int32","type":"integer"},"sku":{"description":"SKU when the line was added.","type":["string","null"]},"stock_item_id":{"description":"The stock item bought (any item, also one with no variant behind it).","format":"uuid","type":["string","null"]},"unit_cost_cents":{"description":"Cost of one purchase unit: one pack when `packs_ordered` is set,\notherwise one base unit.","format":"int64","type":"integer"},"units_ordered":{"description":"Base units ordered and received, with decimals (`quantity_*` are the\nsame rounded to whole units).","format":"double","type":"number"},"units_received":{"format":"double","type":"number"},"warehouse_item_id":{"description":"The warehouse item mirrored from `item_id` (the legacy variant id).","format":"uuid","type":["string","null"]}},"required":["id","quantity_ordered","quantity_received","unit_cost_cents","units_ordered","units_received"],"type":"object"},"PurchaseOrderLineInput":{"description":"One line to order.","properties":{"pack_id":{"description":"One of the warehouse item's named packs.","format":"uuid","type":["string","null"]},"packs_ordered":{"description":"Whole packs to order. Requires `pack_id`; the backend stores the\nconverted base units as `quantity_ordered` for stock projections.","format":"int32","minimum":1,"type":["integer","null"]},"quantity_ordered":{"description":"Base units to order. Send this or `packs_ordered`, not both.","format":"int32","minimum":1,"type":["integer","null"]},"stock_item_id":{"description":"The stock item to order: any item, also one with no product variant\nbehind it. Send this or `variant_id`.","format":"uuid","type":["string","null"]},"unit_cost_cents":{"description":"Cost of one pack when ordering in packs, otherwise one base unit.\nDefaults to 0.","format":"int64","type":["integer","null"]},"units":{"description":"Base units to order, with decimals (metres of fabric). Send this,\n`quantity_ordered` or `packs_ordered`.","format":"double","type":["number","null"]},"variant_id":{"description":"The variant to order (its mirrored item). Send this or `stock_item_id`.","format":"uuid","type":["string","null"]}},"type":"object"},"PurchaseOrderStatus":{"description":"Where a purchase order stands (see the tag description).","enum":["draft","ordered","partial","received","cancelled"],"type":"string"},"PurchaseOrderUpdate":{"description":"Fields to change on a purchase order; omitted fields keep their value.","properties":{"expected_on":{"description":"The day it is expected.","format":"date","type":["string","null"]},"freight_option":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PurchaseFreightChoice","description":"The FOB freight option chosen from `quotePurchaseFreight`: kept on the\norder, and its price becomes `shipping_cents` (unless that is sent too).\nChanging the supplier, location, freight terms or lines afterwards\ndrops it (and its price), since it was quoted for the old ones."}]},"freight_terms":{"description":"`FOB` or `CIF`. Changing the supplier without sending terms takes\nthe new supplier's.","type":["string","null"]},"lines":{"description":"Replaces every line. Only while the order is a draft.","items":{"$ref":"#/components/schemas/PurchaseOrderLineInput"},"type":["array","null"]},"location_id":{"format":"uuid","type":["string","null"]},"notes":{"type":["string","null"]},"other_cents":{"format":"int64","type":["integer","null"]},"payment_terms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentTerms"}]},"shipping_cents":{"format":"int64","type":["integer","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PurchaseOrderStatus","description":"`ordered` (from `draft`: sends it, its lines become incoming) or\n`cancelled` (from `draft`, `ordered` or `partial`)."}]},"supplier_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"PurchaseReceipt":{"description":"One delivery booked against an order.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/PurchaseReceiptItem"},"type":"array"},"location_name":{"type":["string","null"]},"note":{"type":["string","null"]},"quantity":{"description":"Units received in this drop.","format":"int64","type":"integer"},"received_by":{"description":"Name of who booked it.","type":["string","null"]}},"required":["id","created_at","quantity","items"],"type":"object"},"PurchaseReceiptItem":{"description":"One line of a receipt.","properties":{"description":{"type":["string","null"]},"pack_name":{"type":["string","null"]},"packs":{"format":"int32","type":["integer","null"]},"quantity":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]},"unit_cost_cents":{"description":"Landed cost of one base unit: the line cost plus its share of\nshipping and other costs, shared by line value.","format":"int64","type":"integer"},"units":{"description":"Base units received, with decimals (`quantity` rounded).","format":"double","type":["number","null"]}},"required":["quantity","unit_cost_cents"],"type":"object"},"PurchaseReceiptResult":{"properties":{"levels":{"description":"The new level of every variant received, at the receiving location.","items":{"$ref":"#/components/schemas/StockLevelChange"},"type":"array"},"receipt_id":{"format":"uuid","type":"string"},"received":{"description":"Units received in this drop.","format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatus","description":"The order's status after the receipt: `partial` or `received`."},"unlocks":{"description":"Kits fed by the received components, with what they can now ship.","items":{"$ref":"#/components/schemas/ReceiptUnlock"},"type":"array"}},"required":["receipt_id","received","status","unlocks","levels"],"type":"object"},"PurchaseReceiveLine":{"properties":{"packs":{"description":"Whole packs that arrived, using the pack snapshotted on the order.","format":"int32","type":["integer","null"]},"purchase_order_item_id":{"description":"`PurchaseOrderLine.id`.","format":"uuid","type":"string"},"quantity":{"description":"Base units that arrived (whole).","format":"int32","type":["integer","null"]},"units":{"description":"Base units that arrived, with decimals. Send this, `quantity` or\n`packs`. Lines with 0 are skipped; more than ordered is allowed and\nrecorded as is.","format":"double","type":["number","null"]}},"required":["purchase_order_item_id"],"type":"object"},"PurchaseReceiveRequest":{"properties":{"force":{"description":"Receive even though an ERP owns this store's stock.","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/PurchaseReceiveLine"},"type":"array"},"location_id":{"description":"Where this drop goes; defaults to the order's location, then the\nstore's default location.","format":"uuid","type":["string","null"]},"note":{"type":["string","null"]}},"required":["lines"],"type":"object"},"QuoteContactInput":{"description":"The customer's contact and delivery details, pre-filled at checkout.","properties":{"additional_info":{"type":["string","null"]},"billing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BillingAddress","description":"Where the order is billed, when not at the delivery address: the\nlink's checkout opens with \"use the same address for billing\"\nunticked and this address filled in. Left out, the box is ticked."}]},"city":{"type":["string","null"]},"document":{"description":"CPF/CNPJ, validated (check digits). The checkout will not advance\nwithout one and Pix requires it, so a quote that omits it can never\nbe a link the customer just pays.","type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"type":["string","null"]}},"type":"object"},"QuoteCreateRequest":{"description":"A new quote.","properties":{"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/QuoteContactInput"}]},"customer_id":{"description":"Attaches the quote to a known customer, so the resulting order lands\non their record instead of creating a stranger.","format":"uuid","type":["string","null"]},"discount_cents":{"description":"Fixed negotiated discount in cents. Mutually exclusive with\ndiscount_pct_bp (basis points win when both are sent).","format":"int64","type":["integer","null"]},"discount_pct_bp":{"format":"int32","type":["integer","null"]},"expires_in_days":{"description":"Days until the link stops working, 1 to 90. Defaults to 7.","format":"int64","type":["integer","null"]},"freight":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/QuoteFreightInput","description":"The freight the seller quoted at the counter. Applied to the cart here\nrather than by the POS, because it has to actually stick: the price the\ncounter saw and the price the link charges must be the same number."}]},"items":{"description":"At least one line with a positive quantity.","items":{"$ref":"#/components/schemas/QuoteItemInput"},"type":"array"},"lock_address":{"type":["boolean","null"]},"lock_freight":{"type":["boolean","null"]},"lock_price":{"description":"Per-quote locks: what the seller froze so the customer just pays.","type":["boolean","null"]},"max_installments":{"description":"Payment-link config: cap the installment count the customer may\npick on the /q link. NULL → the storefront default (6). Validated\nto 1..=12.","format":"int32","type":["integer","null"]},"note":{"type":["string","null"]},"sales_channel_id":{"format":"uuid","type":["string","null"]}},"required":["items"],"type":"object"},"QuoteCreated":{"description":"The quote just created.","properties":{"cart_id":{"description":"The quote is a cart; this is its id.","format":"uuid","type":"string"},"expires_at":{"description":"When the link stops working. Returned so the seller can tell the\ncustomer a date instead of guessing at the default.","format":"date-time","type":["string","null"]},"freight_applied":{"description":"False when the seller picked a freight and it could not be reapplied to\nthe cart. The quote is still valid — the customer picks on the link —\nbut the seller has to be told, because the total just moved.","type":"boolean"},"freight_price_changed":{"description":"Set when the carrier re-quoted at a different price than the counter\nsaw, so the seller learns the real number before sending the link.","type":"boolean"},"quote_url":{"description":"The link to send the customer.","type":"string"},"share_token":{"type":"string"},"shipping_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["cart_id","share_token","quote_url","total_cents","shipping_cents","freight_applied","freight_price_changed"],"type":"object"},"QuoteFreightInput":{"description":"The freight the seller picked at the counter.","properties":{"carrier_name":{"type":["string","null"]},"destination_postal_code":{"type":"string"},"option_id":{"description":"The option the seller picked in the cart-less simulation. Central do\nFrete mints a fresh id per quotation, so this rarely matches and the\ncarrier name is what actually identifies the choice.","type":["string","null"]},"service_name":{"type":["string","null"]},"shipping_cents":{"description":"What the counter was quoted, kept only to report the drift.","format":"int64","type":["integer","null"]}},"required":["destination_postal_code"],"type":"object"},"QuoteItemInput":{"description":"One line of a new quote.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"type":"string"}},"required":["variant_id","quantity"],"type":"object"},"QuoteShipmentRequest":{"description":"What to quote. The boxes are the shipment's own.","properties":{"declared_value_cents":{"description":"Declared value of the goods, in cents. Central do Frete wants the\nNF-e's value, so the quote uses that (the sum of the orders' in a\ncombined shipment; before the note exists, the order total it will\nbe) and ignores this. It only stands in when there is no value to\nderive, such as a free gift order, and is kept for the next quotes.","format":"int64","type":["integer","null"]},"destination_postal_code":{"description":"CEP, 8 digits (formatting ignored). Defaults to the order's\ndelivery address.","type":["string","null"]},"recipient_document":{"type":["string","null"]},"recipient_name":{"type":["string","null"]}},"type":"object"},"QuoteStatus":{"description":"`open` (the link works), `expired` (past its date or expired by hand)\nor `converted` (the customer checked out; see `order_id`).","enum":["open","expired","converted"],"type":"string"},"QuoteSummary":{"description":"A quote in the list.","properties":{"cart_id":{"description":"The quote is a cart; this is its id.","format":"uuid","type":"string"},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"discount_cents":{"format":"int64","type":"integer"},"expires_at":{"format":"date-time","type":["string","null"]},"item_count":{"format":"int32","type":"integer"},"note":{"type":["string","null"]},"order_id":{"description":"The order the customer's checkout created.","format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"order_paid":{"description":"The order was paid. `converted` alone means the customer checked the\nquote out (online, or it was sold at the counter): its payment may still\nbe waiting.","type":"boolean"},"quote_url":{"description":"The link sent to the customer.","type":"string"},"share_token":{"type":"string"},"status":{"$ref":"#/components/schemas/QuoteStatus"},"subtotal_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["cart_id","share_token","quote_url","item_count","subtotal_cents","discount_cents","total_cents","status","order_paid","created_at"],"type":"object"},"QuotedBoxes":{"description":"The boxes a quote was made with.","properties":{"count":{"format":"int32","type":"integer"},"gross_weight_g":{"format":"int64","type":"integer"},"volume_mm3":{"description":"Sum of the boxes' outer volumes, in cubic millimetres.","format":"int64","type":"integer"}},"required":["count","gross_weight_g","volume_mm3"],"type":"object"},"ReceiptUnlock":{"description":"A kit this receipt made more buildable.","properties":{"limiting_sku":{"type":["string","null"]},"max_shippable":{"description":"Whole kits shippable after the receipt.","format":"int32","type":"integer"},"name":{"type":"string"},"product_id":{"format":"uuid","type":"string"},"sku":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","product_id","sku","name","max_shippable"],"type":"object"},"Receivable":{"description":"One approved payment waiting for, or past, its expected day.","properties":{"confirmed_on":{"description":"The day the bank statement showed it arriving, once a statement line\nwas matched to it (`bank_statements`).","format":"date","type":["string","null"]},"expected_on":{"format":"date","type":"string"},"fee_cents":{"description":"The processor's fee: the store's estimate by method, or a marketplace's\nown commission (see `fee_source`).","format":"int64","type":"integer"},"fee_source":{"description":"Where the fee comes from: `marketplace` (the commission the\nmarketplace reported for the sale) or `estimate` (the store's terms for\nthe method).","type":"string"},"gross_cents":{"description":"Paid, less refunds.","format":"int64","type":"integer"},"method":{"type":"string"},"net_cents":{"description":"`gross_cents` less `fee_cents`.","format":"int64","type":"integer"},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"paid_on":{"format":"date","type":"string"},"payment_id":{"format":"uuid","type":"string"},"status":{"description":"`open` until `expected_on` has passed, then `received`.","type":"string"}},"required":["payment_id","order_id","method","gross_cents","fee_cents","fee_source","net_cents","paid_on","expected_on","status"],"type":"object"},"ReceivePlan":{"description":"What receiving a note of one operation does.","properties":{"needs_decision":{"description":"Receiving is refused until a member chooses another operation.","type":"boolean"},"payables":{"type":"boolean"},"stock":{"$ref":"#/components/schemas/ReceiveStock"}},"required":["stock","payables","needs_decision"],"type":"object"},"ReceiveReturnRequest":{"properties":{"items":{"description":"The state of each item; items left out are taken as `sellable`.","items":{"$ref":"#/components/schemas/ReceivedItem"},"type":"array"},"location_id":{"description":"Where the stock goes; defaults to the store's first location.","format":"uuid","type":["string","null"]},"restock":{"description":"Put sellable items back in stock. Defaults to true.","type":["boolean","null"]}},"type":"object"},"ReceiveStock":{"description":"Where received goods go.","enum":["own_at_cost","own_at_zero_cost","third_party","none"],"type":"string"},"ReceivedItem":{"properties":{"condition":{"description":"`sellable` or `damaged`. Defaults to `sellable`.","type":["string","null"]},"return_item_id":{"format":"uuid","type":"string"}},"required":["return_item_id"],"type":"object"},"ReceiverOperation":{"description":"What receiving a supplier's note means for the store: the entry\noperation its lines name, or a member's decision.","enum":["purchase","future_delivery","future_billing","bonus","sample","consignment","repair","demonstration","own_goods_return","transfer","sale_return","use_consumption","fixed_asset","other"],"type":"string"},"RecordPaymentRequest":{"description":"A payment taken outside the platform.","properties":{"amount_cents":{"description":"Cents received: must equal what is still owed (`Order.owed_cents`), as\na payment by hand pays the order in full. Omit for everything still\nowed.","format":"int64","type":["integer","null"]},"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CardDetail","description":"Credit or debit, and the installments, when `method` is\n`card_terminal`. Optional."}]},"method":{"$ref":"#/components/schemas/ManualPaymentKind"},"note":{"description":"Kept with the payment and in the order's history.","type":["string","null"]},"paid_at":{"description":"When it was received (not in the future). Now when omitted.","format":"date-time","type":["string","null"]}},"required":["method"],"type":"object"},"RecurringOrderItem":{"description":"One line of a subscription.","properties":{"quantity":{"format":"int32","type":"integer"},"title":{"description":"Product title, with the variant's when it has one.","type":"string"},"unit_price_cents":{"description":"What one unit costs today.","format":"int64","type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity","title"],"type":"object"},"RecurringOrderLine":{"description":"A line of a new subscription.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"RedeemPoints":{"description":"Points to turn into credit.","properties":{"points":{"description":"A multiple of the program's `redeem_step_points`.","format":"int64","type":"integer"}},"required":["points"],"type":"object"},"ReferenceTable":{"description":"A reference table with its entries and where it is attached.","properties":{"category_ids":{"description":"Categories whose products (and their subcategories' products) show it.","items":{"format":"uuid","type":"string"},"type":"array"},"collection_ids":{"description":"Collections whose products show it.","items":{"format":"uuid","type":"string"},"type":"array"},"columns":{"description":"The headings of the value columns (\"Busto\", \"Cintura\"; \"Largura\",\n\"Altura\", \"Profundidade\"). A palette usually has none.","items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"description":{"description":"A note shown with the table (how to measure, care of the fabric).","type":["string","null"]},"entries":{"description":"The rows, in order.","items":{"$ref":"#/components/schemas/ReferenceTableEntry"},"type":"array"},"id":{"format":"uuid","type":"string"},"image_file_id":{"description":"A picture shown with the table (how to measure, the piece's shape).","format":"uuid","type":["string","null"]},"kind":{"$ref":"#/components/schemas/ReferenceTableKind"},"name":{"description":"The table's name, also its heading on the storefront (\"Tabela de\ncores Lonita\", \"Guia de tamanhos\").","type":"string"},"product_ids":{"description":"Products it is attached to directly.","items":{"format":"uuid","type":"string"},"type":"array"},"unit":{"description":"The unit of every value (\"cm\"); null when the values carry none.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","kind","columns","entries","product_ids","category_ids","collection_ids","created_at","updated_at"],"type":"object"},"ReferenceTableCreateRequest":{"description":"A new table.","properties":{"category_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"collection_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"columns":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"entries":{"items":{"$ref":"#/components/schemas/ReferenceTableEntryInput"},"type":"array"},"image_file_id":{"format":"uuid","type":["string","null"]},"kind":{"$ref":"#/components/schemas/ReferenceTableKind"},"name":{"type":"string"},"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"unit":{"type":["string","null"]}},"required":["name","kind"],"type":"object"},"ReferenceTableEntry":{"description":"One row of a table: a swatch, a size or a shape.","properties":{"code":{"description":"A swatch's code (\"LA45C075\"); null when it has none.","type":["string","null"]},"color_hex":{"description":"A swatch's color as `RRGGBB` (several joined by `/` for a two-tone\nswatch), shown when it has no picture; null otherwise.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image_file_id":{"description":"A picture from the file library: the swatch's texture, the shape's\ndrawing.","format":"uuid","type":["string","null"]},"label":{"description":"The swatch's name (\"GREGE\"), the size (\"M\", \"10\", \"18M\"), the shape.","type":"string"},"option_value":{"description":"The variant option value this swatch stands for (\"Grege\"). On a\nproduct with a variant of that value (ignoring case and accents),\nclicking the swatch selects it. Null when it stands for none.","type":["string","null"]},"values":{"description":"One text per column of the table, in the same order (\"86-90\").","items":{"type":"string"},"type":"array"}},"required":["id","label","values"],"type":"object"},"ReferenceTableEntryInput":{"description":"A row to write. An `id` the table already has keeps that entry's id;\nanything else is a new entry.","properties":{"code":{"type":["string","null"]},"color_hex":{"description":"`RRGGBB` or `#RRGGBB`; several joined by `/` for a two-tone swatch.","type":["string","null"]},"id":{"format":"uuid","type":["string","null"]},"image_file_id":{"description":"A picture of the file library of the store's organization.","format":"uuid","type":["string","null"]},"label":{"type":"string"},"option_value":{"type":["string","null"]},"values":{"description":"One text per column; missing ones are empty, extra ones refused.","items":{"type":"string"},"type":"array"}},"required":["label"],"type":"object"},"ReferenceTableHiddenReason":{"description":"Why an inherited table is not on the product page.","enum":["hidden","replaced"],"type":"string"},"ReferenceTableKind":{"description":"What a table holds and how the storefront shows it.","enum":["swatches","measurements","dimensions"],"type":"string"},"ReferenceTableSource":{"description":"Where a table on a product comes from.","enum":["product","category","collection"],"type":"string"},"ReferenceTableSummary":{"description":"A table in the list: no entries, the counts instead.","properties":{"category_count":{"format":"int64","type":"integer"},"collection_count":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"entry_count":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ReferenceTableKind"},"name":{"type":"string"},"preview_file_ids":{"description":"The pictures of its first entries (up to 6), for a preview.","items":{"format":"uuid","type":"string"},"type":"array"},"product_count":{"format":"int64","type":"integer"},"unit":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","kind","entry_count","preview_file_ids","product_count","category_count","collection_count","created_at","updated_at"],"type":"object"},"ReferenceTableUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; an explicit `null`\nclears `unit`, `description` or `image_file_id`. `entries` replaces every\nrow; `product_ids`, `category_ids` and `collection_ids` replace that set\nof attachments (a product that hid this table and is now listed shows it\nagain).","properties":{"category_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"collection_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"columns":{"items":{"type":"string"},"type":["array","null"]},"description":{"type":["string","null"]},"entries":{"items":{"$ref":"#/components/schemas/ReferenceTableEntryInput"},"type":["array","null"]},"image_file_id":{"format":"uuid","type":["string","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReferenceTableKind"}]},"name":{"type":["string","null"]},"product_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"unit":{"type":["string","null"]}},"type":"object"},"Referral":{"description":"A referral: who referred whom, by which order, and what came of it.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"mature_at":{"description":"When a pending referral rewards both.","format":"date-time","type":"string"},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"referee_reward_cents":{"format":"int64","type":"integer"},"referred_customer_id":{"format":"uuid","type":"string"},"referred_name":{"type":["string","null"]},"referrer_customer_id":{"format":"uuid","type":"string"},"referrer_name":{"type":["string","null"]},"referrer_reward_cents":{"format":"int64","type":"integer"},"rewarded_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`pending` (waiting for the order to stand), `rewarded` or `void`.","type":"string"},"void_reason":{"description":"Why a void referral gave nothing: `self_referral`, `not_first_order`,\n`below_minimum`, `monthly_limit`, `already_referred`, `order_refunded`\nor `program_off`.","type":["string","null"]}},"required":["id","order_id","referrer_customer_id","referred_customer_id","status","referrer_reward_cents","referee_reward_cents","mature_at","created_at"],"type":"object"},"ReferralCounts":{"description":"How a customer's referrals went.","properties":{"earned_cents":{"description":"Store credit their referrals earned them, in cents.","format":"int64","type":"integer"},"pending":{"format":"int64","type":"integer"},"rewarded":{"format":"int64","type":"integer"}},"required":["pending","rewarded","earned_cents"],"type":"object"},"Refund":{"description":"Money given back on an order.","properties":{"amount_cents":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"id":{"format":"uuid","type":"string"},"order_id":{"format":"uuid","type":"string"},"provider":{"description":"Who returned the money: the payment provider's code, or `manual`.","type":"string"},"reason":{"type":["string","null"]}},"required":["id","order_id","amount_cents","currency","provider","created_at"],"type":"object"},"RefundReturnRequest":{"properties":{"amount_cents":{"description":"Cents to return; defaults to what is left of the suggested refund.","format":"int64","type":["integer","null"]},"bonus_percent":{"description":"With `store_credit`: extra credit on top, in percent of the refund\n(0 to 100), as an incentive for choosing credit over money.","format":"int32","type":["integer","null"]},"destination":{"description":"`original` (default): back to how the customer paid. `store_credit`:\ninto the customer's wallet; the money stays in the business and the\ncustomer spends it at checkout.","type":["string","null"]},"manual":{"description":"The money already went back outside Mobiari (cash, a manual Pix):\nonly record it. Without this the order's payment is refunded through\nits gateway.","type":["boolean","null"]}},"type":"object"},"RejectReturnRequest":{"properties":{"reason":{"description":"Shown to the customer.","type":["string","null"]}},"type":"object"},"RescheduleBooking":{"properties":{"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at"],"type":"object"},"ResellerApplication":{"description":"A reseller sign-up request.","properties":{"city":{"type":["string","null"]},"cnpj":{"description":"Digits (or the letters of an alphanumeric CNPJ).","type":"string"},"company_name":{"description":"Razão social.","type":"string"},"complement":{"type":["string","null"]},"contact_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"description":"The customer record: the shopper who asked while signed in, or the one approval linked or created.","format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"decided_at":{"format":"date-time","type":["string","null"]},"email":{"type":"string"},"existing_customer_id":{"description":"Before approval: a customer the store already has with this e-mail or CNPJ, whom approving would link.","format":"uuid","type":["string","null"]},"group_id":{"description":"The group it was approved into.","format":"uuid","type":["string","null"]},"group_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"ie_exempt":{"type":"boolean"},"message":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"description":"E.164.","type":["string","null"]},"postal_code":{"type":["string","null"]},"rejection_reason":{"type":["string","null"]},"sales_channels":{"description":"`store`, `online`, `catalog`.","items":{"type":"string"},"type":"array"},"state":{"type":["string","null"]},"state_registration":{"description":"Digits; null when exempt or not given.","type":["string","null"]},"status":{"$ref":"#/components/schemas/ApplicationStatus"},"street":{"type":["string","null"]},"trade_name":{"description":"Nome fantasia.","type":["string","null"]}},"required":["id","status","company_name","cnpj","ie_exempt","contact_name","email","sales_channels","created_at"],"type":"object"},"Return":{"description":"A return (or exchange) of items of an order.","properties":{"approved_at":{"format":"date-time","type":["string","null"]},"closed_at":{"format":"date-time","type":["string","null"]},"code":{"description":"\"D-0007\".","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"discount_share_cents":{"description":"The part of the order's discount that falls on these items.","format":"int64","type":"integer"},"events":{"description":"Only in the detail response.","items":{"$ref":"#/components/schemas/ReturnEvent"},"type":"array"},"exchange_items":{"description":"For an exchange: what the customer gets instead.","items":{"$ref":"#/components/schemas/ExchangeItem"},"type":"array"},"exchange_order_id":{"description":"The replacement order of an exchange.","format":"uuid","type":["string","null"]},"exchange_order_number":{"type":["string","null"]},"exchanged_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/ReturnItem"},"type":"array"},"note":{"type":["string","null"]},"number":{"description":"1, 2, 3... per store.","format":"int32","type":"integer"},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"reason":{"description":"One of `REASONS`.","type":"string"},"received_at":{"format":"date-time","type":["string","null"]},"refund_cents":{"description":"What the items are worth: quantity times unit price, less\n`discount_share_cents`. The suggested refund, and the credit an\nexchange gets.","format":"int64","type":"integer"},"refunded_at":{"format":"date-time","type":["string","null"]},"refunded_cents":{"description":"Refunded, or credited for an exchange.","format":"int64","type":"integer"},"rejection_reason":{"type":["string","null"]},"requested_at":{"format":"date-time","type":"string"},"requested_by":{"description":"`customer` or `merchant`.","type":"string"},"resolution":{"description":"`refund` or `exchange`.","type":"string"},"return_carrier":{"type":["string","null"]},"return_code":{"description":"The carrier's authorization or postage code for sending it back.","type":["string","null"]},"return_instructions":{"description":"How to send the goods back, for the customer.","type":["string","null"]},"return_label_url":{"description":"A link to the prepaid return label.","type":["string","null"]},"status":{"description":"`requested`, `approved`, `received`, `refunded`, `exchanged`, `rejected`, `cancelled`.","type":"string"}},"required":["code","discount_share_cents","exchange_items","id","items","number","order_id","reason","refund_cents","refunded_cents","requested_at","requested_by","resolution","status"],"type":"object"},"ReturnEvent":{"description":"Something that happened to a return.","properties":{"actor_kind":{"description":"`team` or `customer`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"data":{"description":"What the step did, for the screens to word: `received` has `restock`\nand `restocked_qty`; `refunded` has `cents` and `manual` (and\n`store_credit`, `bonus_cents`); `exchanged` has `order_id`,\n`order_number`, `credit_cents`, `paid_cents`, `due_cents` and\n`left_in_credit_cents`.","type":["object","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`requested`, `approved`, `rejected`, `received`, `refunded`,\n`exchanged`, `cancelled`, `shipping_updated`, `exchange_changed`.","type":"string"},"note":{"type":["string","null"]}},"required":["actor_kind","created_at","id","kind"],"type":"object"},"ReturnItem":{"description":"One order line in a return.","properties":{"condition":{"description":"Set on receipt: `sellable` or `damaged`.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"order_item_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"restocked_qty":{"description":"How many went back on the shelf.","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["id","order_item_id","product_id","variant_id","title","quantity","unit_price_cents","restocked_qty"],"type":"object"},"ReturnItemInput":{"properties":{"order_item_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"}},"required":["order_item_id","quantity"],"type":"object"},"ReturnShipping":{"description":"How the customer sends the goods back.","properties":{"carrier":{"description":"The carrier, e.g. \"Correios\".","type":["string","null"]},"code":{"description":"The carrier's authorization or postage code for the return.","type":["string","null"]},"instructions":{"description":"What to do, in the store's words (address, packing, where to drop\nit). On approval, defaults to the store's default instructions.","type":["string","null"]},"label_url":{"description":"A link (https) to the prepaid label.","type":["string","null"]}},"type":"object"},"Returnable":{"description":"What can be returned from an order, and whether a customer may ask now.","properties":{"closed_reason":{"description":"Why not: `disabled`, `not_paid`, `not_delivered`, `window_closed`,\n`nothing_left`.","type":["string","null"]},"delivered_at":{"description":"When the last shipment was delivered, or the order was marked done.","format":"date-time","type":["string","null"]},"exchanges_enabled":{"description":"Whether a customer can ask for an exchange instead of a refund.","type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/ReturnableItem"},"type":"array"},"open_for_customer":{"description":"Whether a customer can ask right now.","type":"boolean"},"window_days":{"format":"int32","type":"integer"},"window_ends_on":{"description":"The last day a customer can ask, in São Paulo days.","format":"date","type":["string","null"]}},"required":["items","window_days","open_for_customer","exchanges_enabled"],"type":"object"},"ReturnableItem":{"description":"An order line and how much of it can still be returned.","properties":{"exchange_options":{"description":"The product's other active variants, for an exchange. Empty when the\nline has nothing left to return.","items":{"$ref":"#/components/schemas/ExchangeOption"},"type":"array"},"order_item_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"returnable":{"format":"int32","type":"integer"},"returned":{"description":"Already in a return that was not rejected or cancelled.","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_price_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["order_item_id","product_id","variant_id","title","quantity","unit_price_cents","returned","returnable","exchange_options"],"type":"object"},"ReturnsApprovedEvent":{"description":"A return was approved.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.approved","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReturnsExchangedEvent":{"description":"A return's exchange order was sent.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.exchanged","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReturnsReceivedEvent":{"description":"A return's items arrived.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.received","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReturnsRefundedEvent":{"description":"A return was refunded.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.refunded","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReturnsRejectedEvent":{"description":"A return was rejected.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.rejected","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReturnsRequestedEvent":{"description":"A return was requested.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"returns.requested","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Review":{"description":"A customer's review of a product.","properties":{"author_email":{"type":"string"},"author_name":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_verified_purchase":{"description":"The author's e-mail bought the product in this store.","type":"boolean"},"order_id":{"format":"uuid","type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"product_slug":{"type":"string"},"product_title":{"type":"string"},"rating":{"description":"1 to 5.","format":"int32","type":"integer"},"status":{"$ref":"#/components/schemas/ReviewStatus"},"title":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","product_id","rating","body","status","author_name","author_email","is_verified_purchase","created_at","updated_at"],"type":"object"},"ReviewStatus":{"description":"`pending` (waiting for moderation), `approved` (shown on the storefront)\nor `rejected`.","enum":["pending","approved","rejected"],"type":"string"},"ReviewUpdateRequest":{"description":"A moderation decision.","properties":{"status":{"$ref":"#/components/schemas/ReviewStatus"}},"required":["status"],"type":"object"},"ReviewsApprovedEvent":{"description":"A product review was approved.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"reviews.approved","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ReviewsSubmittedEvent":{"description":"A product review was submitted.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"reviews.submitted","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SalesChannel":{"description":"Where the store sells: its storefront, a marketplace, a point of sale. Products, collections and orders name them by id.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"location_id":{"description":"For a point of sale, the store location it is at.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/SalesChannelType","description":"What kind of channel it is. A sale recorded with `source: manual` needs a `pos` one."},"updated_at":{"format":"date-time","type":"string"},"url":{"type":["string","null"]}},"required":["id","name","type","is_active","created_at","updated_at"],"type":"object"},"SalesChannelAssignment":{"description":"Which sales channels show a product or a collection.","properties":{"all":{"description":"Every channel, present and future. `sales_channel_ids` is then empty.","type":"boolean"},"sales_channel_ids":{"description":"The channels, when `all` is false.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["all","sales_channel_ids"],"type":"object"},"SalesChannelType":{"description":"The kind of channel. A store has at most one `web` channel: its\nstorefront.","enum":["web","instagram","marketplace","whatsapp","pos"],"type":"string"},"SefazTransmission":{"properties":{"created_at":{"format":"date-time","type":"string"},"elapsed_ms":{"format":"int32","type":["integer","null"]},"error":{"type":["string","null"]},"http_status":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"service":{"type":"string"},"status_code":{"format":"int32","type":["integer","null"]}},"required":["id","service","created_at"],"type":"object"},"SelectQuoteRequest":{"properties":{"option_id":{"description":"An `option_id` of the shipment's saved quote.","type":"string"}},"required":["option_id"],"type":"object"},"SetDigitalDelivery":{"description":"A delivery to set.","properties":{"instructions":{"type":["string","null"]},"title":{"type":"string"},"url":{"type":["string","null"]}},"required":["title"],"type":"object"},"SetExchangeItemsRequest":{"properties":{"items":{"description":"What the customer gets instead; replaces what the return had.","items":{"$ref":"#/components/schemas/ExchangeItemInput"},"type":"array"}},"required":["items"],"type":"object"},"SetShipmentItemsRequest":{"description":"A shipment's new contents.","properties":{"items":{"items":{"$ref":"#/components/schemas/ShipmentItemInput"},"type":"array"},"reset_boxes":{"description":"The boxes were edited or packed: replace them with freshly computed\nones. Without it such a change is refused (`boxes_packed`).","type":"boolean"}},"required":["items"],"type":"object"},"Shipment":{"description":"A shipment: what of an order leaves, in which boxes, with which carrier, and where it is.","properties":{"auto_created":{"description":"Created by the system when the order was paid.","type":"boolean"},"box_count":{"format":"int32","type":"integer"},"boxes":{"description":"The boxes (volumes) it ships as, with what is in each.","items":{"$ref":"#/components/schemas/ShipmentBox"},"type":"array"},"carrier_name":{"type":["string","null"]},"carrier_order_code":{"description":"The carrier's own code for this shipment, when it has one.","type":["string","null"]},"cost_cents":{"description":"What the freight cost the store.","format":"int64","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"declared_value_cents":{"description":"Declared value of the goods for the carrier, when set.","format":"int64","type":["integer","null"]},"delivered_at":{"format":"date-time","type":["string","null"]},"freight_payer":{"description":"`CIF` (store pays) or `FOB` (recipient pays).","type":["string","null"]},"gross_weight_g":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"items":{"description":"The order lines in this shipment. Empty only for a shipment created\noutside the normal flow; creation fills it with whatever is still\nunshipped.","items":{"$ref":"#/components/schemas/ShipmentItem"},"type":"array"},"net_weight_g":{"format":"int64","type":"integer"},"notes":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"orders":{"description":"Every order this shipment carries, the lead (`order_id`) first. More\nthan one when the merchant combined orders of the same customer and\naddress into one freight.","items":{"$ref":"#/components/schemas/ShipmentOrderRef"},"type":"array"},"provider":{"description":"How the shipment travels: `central_do_frete` (booked and tracked through the carrier platform), `local_delivery`, `other_carrier` or `pickup`.","type":["string","null"]},"quote":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentQuote"}]},"quote_expires_at":{"format":"date-time","type":["string","null"]},"shipped_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"tracking_code":{"type":["string","null"]},"tracking_events":{"description":"Tracking events from the carrier, oldest first.","items":{"$ref":"#/components/schemas/TrackingEvent"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"volume_mm3":{"description":"Sum of the boxes' outer volumes, in cubic millimetres.","format":"int64","type":"integer"}},"required":["id","order_id","orders","status","tracking_events","items","boxes","box_count","gross_weight_g","net_weight_g","volume_mm3","auto_created","created_at","updated_at"],"type":"object"},"ShipmentBox":{"description":"A box (volume) a shipment travels in, with what is in it.","properties":{"catalog_box_id":{"format":"uuid","type":["string","null"]},"contents":{"items":{"$ref":"#/components/schemas/ShipmentBoxContent"},"type":"array"},"estimated":{"description":"Some size or weight is a default.","type":"boolean"},"gross_weight_g":{"description":"With packaging and contents.","format":"int32","type":"integer"},"height_mm":{"format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"length_mm":{"format":"int32","type":"integer"},"measures_corrected_at":{"description":"Weight or sides corrected after the boxes froze, and by whom.","format":"date-time","type":["string","null"]},"name":{"type":"string"},"net_weight_g":{"description":"Goods only (NF-e pesoL).","format":"int32","type":"integer"},"seq":{"description":"Volume number, from 1.","format":"int32","type":"integer"},"source":{"description":"`computed`, `edited` or `measured` (taken from the real box).","type":"string"},"tracking_code":{"type":["string","null"]},"width_mm":{"format":"int32","type":"integer"}},"required":["contents","estimated","gross_weight_g","height_mm","id","length_mm","name","net_weight_g","seq","source","width_mm"],"type":"object"},"ShipmentBoxContent":{"description":"Something inside a box.","properties":{"inside":{"description":"Rides inside without a box of its own.","type":"boolean"},"name":{"type":"string"},"order_item_id":{"format":"uuid","type":"string"},"part_variant_id":{"description":"The part in the box (a component of a kit), or the sold variant.","format":"uuid","type":["string","null"]},"quantity":{"format":"double","type":"number"},"sku":{"type":["string","null"]},"weight_g":{"description":"What these units weigh, in grams, when known.","format":"int32","type":["integer","null"]}},"required":["order_item_id","name","quantity","inside"],"type":"object"},"ShipmentCreate":{"description":"A new shipment of an order. Without `items`, it takes every line not yet shipped.","properties":{"carrier_name":{"type":["string","null"]},"carrier_order_code":{"description":"Link an order already created at the carrier.","type":["string","null"]},"items":{"description":"Omit to load the box with everything still unshipped.","items":{"$ref":"#/components/schemas/ShipmentItemInput"},"type":["array","null"]},"notes":{"type":["string","null"]},"order_id":{"description":"The order it ships.","format":"uuid","type":"string"},"provider":{"description":"How the shipment travels: `central_do_frete`, `local_delivery`, `other_carrier` or `pickup`.","type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentStatus","description":"Defaults to `draft`."}]},"tracking_code":{"type":["string","null"]}},"required":["order_id"],"type":"object"},"ShipmentItem":{"description":"Units of one order line in a shipment.","properties":{"order_item_id":{"format":"uuid","type":"string"},"ordered_quantity":{"description":"Units of the line on the order.","format":"int32","type":"integer"},"parts":{"description":"The kit parts this shipment carries when it ships the line by parts;\nempty for whole units.","items":{"$ref":"#/components/schemas/ShipmentItemPart"},"type":"array"},"quantity":{"description":"Whole units of the line in this shipment; 0 when it carries only\nsome parts of a kit (see `parts`).","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"}},"required":["order_item_id","quantity","title","ordered_quantity"],"type":"object"},"ShipmentItemInput":{"description":"Units of one order line, or some parts of a kit line.","properties":{"order_item_id":{"format":"uuid","type":"string"},"parts":{"description":"Ship only these parts of a kit line (its recipe's items), each at\nmost what no other shipment carries; see `GET .../unshipped-items`.","items":{"$ref":"#/components/schemas/ShipmentPartInput"},"type":["array","null"]},"quantity":{"description":"Whole units of the line; ignored when `parts` is given. A line with\n0 and no parts is dropped.","format":"int32","type":"integer"}},"required":["order_item_id","quantity"],"type":"object"},"ShipmentItemPart":{"description":"Some of one kit part in a shipment.","properties":{"item_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"quantity":{"description":"In the part's units, for the whole line (recipe quantity per kit\nunit times the kit units covered).","format":"double","type":"number"},"sku":{"type":["string","null"]}},"required":["item_id","name","quantity"],"type":"object"},"ShipmentLabel":{"description":"A link to print the label.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"ShipmentOrderRef":{"description":"An order a shipment carries.","properties":{"lead":{"description":"The order whose destination, recipient and NF-e the shipment uses.","type":"boolean"},"number":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"}},"required":["order_id","lead"],"type":"object"},"ShipmentPartInput":{"description":"Some of one kit part.","properties":{"item_id":{"format":"uuid","type":"string"},"quantity":{"description":"In the part's units, for the whole line.","format":"double","type":"number"}},"required":["item_id","quantity"],"type":"object"},"ShipmentQuote":{"description":"The freight quote kept on a shipment.","properties":{"box_count":{"description":"The boxes it was quoted with; booking refuses when they changed.","format":"int32","type":"integer"},"boxes_signature":{"type":"string"},"declared_value_cents":{"format":"int64","type":"integer"},"destination_postal_code":{"type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"options":{"items":{"$ref":"#/components/schemas/ShipmentQuoteOption"},"type":"array"},"quotation_code":{"type":["string","null"]},"quoted_at":{"format":"date-time","type":"string"},"selected_option_id":{"description":"The option chosen for booking.","type":["string","null"]}},"required":["box_count","declared_value_cents","destination_postal_code","options","quoted_at"],"type":"object"},"ShipmentQuoteOption":{"description":"One freight option of a quote.","properties":{"carrier_name":{"type":["string","null"]},"delivery_days":{"format":"int32","type":["integer","null"]},"option_id":{"description":"For Central do Frete, the `price_id` to generate with.","type":"string"},"provider":{"type":"string"},"quotation_code":{"type":["string","null"]},"service_name":{"type":"string"},"shipping_cents":{"format":"int64","type":"integer"}},"required":["option_id","service_name","shipping_cents"],"type":"object"},"ShipmentStatus":{"description":"Where a shipment is.\n\n`draft` (being prepared), `ordered` (freight order created at the\ncarrier), `collected` (picked up), `in_transit`, `shipped` (left, for\nshipments the store delivers itself), `delivered`, `cancelled`.\n`ordered` through `delivered` count as out the door.","enum":["draft","ordered","collected","in_transit","shipped","delivered","cancelled"],"type":"string"},"ShipmentUpdate":{"description":"The fields of a shipment to change. A field left out keeps its value.","properties":{"carrier_name":{"type":["string","null"]},"carrier_order_code":{"description":"The carrier's own code for this shipment.","type":["string","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"delivered":{"description":"`true` stamps `delivered_at` (and `shipped_at`, when missing) once and\nmoves the shipment to `delivered`, unless it was cancelled.","type":["boolean","null"]},"freight_payer":{"description":"`CIF` or `FOB`.","type":["string","null"]},"notes":{"type":["string","null"]},"provider":{"description":"How the shipment travels: `local_delivery`, `other_carrier` or `pickup`.","type":["string","null"]},"shipped":{"description":"`true` stamps `shipped_at` (once) and moves a `draft` shipment to\n`shipped`, so the order's fulfillment follows.","type":["boolean","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentStatus"}]},"tracking_code":{"type":["string","null"]}},"type":"object"},"ShipmentsUpdatedEvent":{"description":"A shipment changed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"shipments.updated","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"ShippingAddress":{"description":"Where an order is delivered, and who receives it.","properties":{"city":{"type":["string","null"]},"complement":{"description":"Apartment, block, floor...","type":["string","null"]},"document":{"description":"CPF/CNPJ typed at checkout.","type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"neighborhood":{"description":"Neighborhood (bairro).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP for a Brazilian address, digits or with a dash.","type":["string","null"]},"state":{"description":"Two-letter state (UF) for a Brazilian address.","type":["string","null"]},"street":{"description":"The street, without its number.","type":["string","null"]}},"type":"object"},"ShippingAddressUpdate":{"description":"An order's new delivery address: the whole address (the recipient's name, e-mail, phone and document stay).","properties":{"city":{"type":"string"},"complement":{"description":"Apartment, block, floor...","type":["string","null"]},"neighborhood":{"description":"Neighborhood (bairro).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":"string"},"postal_code":{"description":"CEP for a Brazilian address, digits or with a dash.","type":"string"},"state":{"description":"Two-letter state (UF) for a Brazilian address.","type":"string"},"street":{"description":"The street, without its number.","type":"string"}},"required":["street","number","city","state","postal_code"],"type":"object"},"ShippingMode":{"description":"How one unit of a variant ships.","enum":["own_boxes","from_parts","inside","loose","none"],"type":"string"},"ShippingPlan":{"description":"The boxes some lines ship as.","properties":{"boxes":{"items":{"$ref":"#/components/schemas/PlannedBox"},"type":"array"},"issues":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array"}},"required":["boxes","issues"],"type":"object"},"ShippingProfile":{"description":"A stored shipping profile.","properties":{"alone_boxes":{"description":"`inside`: the box used when nothing in the shipment can carry it.","items":{"$ref":"#/components/schemas/ShippingProfileBox"},"type":"array"},"boxes":{"description":"`own_boxes`: the boxes one unit ships as.","items":{"$ref":"#/components/schemas/ShippingProfileBox"},"type":"array"},"height_mm":{"format":"int32","type":["integer","null"]},"host_variant_id":{"description":"`inside`: the part it prefers to ride in.","format":"uuid","type":["string","null"]},"length_mm":{"description":"`loose`: the item's own size.","format":"int32","type":["integer","null"]},"mode":{"$ref":"#/components/schemas/ShippingMode"},"needs_review":{"description":"Guessed by the migration; saving it marks it reviewed.","type":"boolean"},"weight_g":{"description":"`inside` / `loose`: the item's own weight.","format":"int32","type":["integer","null"]},"width_mm":{"format":"int32","type":["integer","null"]}},"required":["mode","boxes","alone_boxes","needs_review"],"type":"object"},"ShippingProfileBox":{"description":"A box in a profile.","properties":{"catalog_box_id":{"description":"A carton of the store's catalog (`/shipping-boxes`); lends its empty\nweight so the NF-e net weight leaves the packaging out.","format":"uuid","type":["string","null"]},"gross_weight_g":{"description":"With packaging and contents.","format":"int32","type":"integer"},"height_mm":{"format":"int32","type":"integer"},"length_mm":{"format":"int32","type":"integer"},"name":{"type":"string"},"width_mm":{"format":"int32","type":"integer"}},"required":["name","length_mm","width_mm","height_mm","gross_weight_g"],"type":"object"},"ShippingProfileInput":{"description":"A profile to store. `mode: null` removes it (automatic, or the product's).","properties":{"alone_boxes":{"items":{"$ref":"#/components/schemas/ShippingProfileBox"},"type":"array"},"boxes":{"items":{"$ref":"#/components/schemas/ShippingProfileBox"},"type":"array"},"height_mm":{"format":"int32","type":["integer","null"]},"host_variant_id":{"format":"uuid","type":["string","null"]},"length_mm":{"format":"int32","type":["integer","null"]},"mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingMode"}]},"weight_g":{"format":"int32","type":["integer","null"]},"width_mm":{"format":"int32","type":["integer","null"]}},"type":"object"},"ShippingProfileView":{"description":"A variant's or product's shipping, as stored and as it works out.","properties":{"product_profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingProfile","description":"For a variant: the product's profile, which applies when the variant\nhas none."}]},"profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingProfile","description":"The profile stored at this level; null when none is."}]},"unit_plan":{"$ref":"#/components/schemas/ShippingPlan","description":"The boxes one unit ships as (for a product, its first variant)."}},"required":["unit_plan"],"type":"object"},"ShippingRuleService":{"description":"A service a rule touches. Every field given must match; names ignore case\nand surrounding spaces.","properties":{"name":{"description":"The option's `service_name` or `carrier_name`, such as `SEDEX` or `Jadlog`.","type":["string","null"]},"provider_code":{"description":"The module that quotes it: `central_do_frete`, `melhor_envio`,\n`local_delivery`, `pickup`, ... (the option's `provider_code`).","type":["string","null"]}},"type":"object"},"SkippedSession":{"description":"A session of the series that could not be booked.","properties":{"code":{"description":"The reason's code, such as `slot_taken` or `provider_unavailable`.","type":"string"},"message":{"type":"string"},"starts_at":{"format":"date-time","type":"string"}},"required":["starts_at","code","message"],"type":"object"},"SoldGiftCard":{"description":"A gift card an order sold, and how its e-mail went.","properties":{"account_id":{"format":"uuid","type":"string"},"balance_cents":{"description":"What can be spent now (zero when disabled).","format":"int64","type":"integer"},"code_hint":{"description":"\"••••-••••-••••-PQRS\".","type":"string"},"deliver_on":{"format":"date","type":["string","null"]},"delivered_at":{"format":"date-time","type":["string","null"]},"delivery_error":{"description":"`no_recipient` or the mail provider's refusal.","type":["string","null"]},"disabled_at":{"format":"date-time","type":["string","null"]},"face_cents":{"format":"int64","type":"integer"},"recipient_email":{"type":["string","null"]},"recipient_name":{"type":["string","null"]}},"required":["account_id","code_hint","face_cents","balance_cents"],"type":"object"},"Stage":{"description":"A stage of a pipeline.","properties":{"id":{"format":"uuid","type":"string"},"kind":{"description":"`open`, `won` or `lost`.","type":"string"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"probability":{"description":"Chance of winning, 0 to 100, used to weight the forecast.","format":"int32","type":"integer"}},"required":["id","name","position","kind","probability"],"type":"object"},"StageInput":{"description":"A stage as the admin sends it.","properties":{"id":{"description":"Keeps an existing stage (and its deals); omit to add one.","format":"uuid","type":["string","null"]},"kind":{"description":"`open` (default), `won` or `lost`.","type":["string","null"]},"name":{"type":"string"},"probability":{"format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"StockAdjustResult":{"description":"The outcome of a stock write.","properties":{"location_id":{"description":"The location that was adjusted.","format":"uuid","type":"string"},"loss_note":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockLossNote","description":"A loss adjustment: its NF-e de baixa de estoque, or why it did not\ngo out (the adjustment stands either way). Absent when none was due."}]},"movement_id":{"description":"The ledger entry written; null when nothing changed (`delta` 0, or\n`set_to` equal to the current count). Undo it with\n`reverseStockMovement`.","format":"uuid","type":["string","null"]},"stock":{"$ref":"#/components/schemas/VariantStock","description":"The variant's stock after the write."}},"required":["location_id","stock"],"type":"object"},"StockLevel":{"description":"A variant's stock at one inventory location. Same shape as the\n`stock_by_location` rows on product and variant reads, plus `is_default`\nand `is_active` (and `available` here never goes below zero).","properties":{"available":{"description":"`on_hand - reserved`, floored at zero: what can still be promised.","format":"int32","type":"integer"},"is_active":{"description":"Inactive locations only appear while they still hold stock.","type":"boolean"},"is_default":{"description":"Where a write goes when it names no location: the store's active\nlocation with the lowest priority.","type":"boolean"},"location_id":{"format":"uuid","type":"string"},"location_name":{"type":"string"},"on_hand":{"description":"Units physically at the location.","format":"int32","type":"integer"},"reserved":{"description":"Units held for open orders and build jobs.","format":"int32","type":"integer"}},"required":["location_id","location_name","is_default","is_active","on_hand","reserved","available"],"type":"object"},"StockLevelChange":{"description":"A variant's stock at one location after a write.","properties":{"available":{"description":"`on_hand - reserved`, floored at zero.","format":"int32","type":"integer"},"location_id":{"format":"uuid","type":"string"},"movement_id":{"description":"The ledger entry written; null when the line changed nothing.","format":"uuid","type":["string","null"]},"on_hand":{"format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","location_id","on_hand","reserved","available"],"type":"object"},"StockListItem":{"description":"One stocked item (a variant) in the store-wide list.","properties":{"available":{"description":"`on_hand - reserved`, floored at zero.","format":"int32","type":"integer"},"buildable":{"description":"For kits: whole kits the components can still build. Null otherwise.","format":"int32","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"incoming":{"description":"Outstanding units on ordered, not yet received purchase orders.","format":"int32","type":"integer"},"is_active":{"type":"boolean"},"is_component":{"description":"True when some kit is built from this item.","type":"boolean"},"item_id":{"description":"The variant id.","format":"uuid","type":"string"},"limiting_sku":{"description":"For kits: SKU of the component that caps `buildable`.","type":["string","null"]},"logical":{"description":"Logical stock: what can still be promised (same as `available`).","format":"int32","type":"integer"},"name":{"type":"string"},"on_hand":{"format":"int32","type":"integer"},"parent_name":{"description":"Product title.","type":["string","null"]},"physical":{"description":"Physical stock: what is on the shelves, ignoring reservations\n(same as `on_hand`).","format":"int32","type":"integer"},"product_id":{"format":"uuid","type":["string","null"]},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"},"uses_bom":{"description":"True for kits (the item has a bill of materials).","type":"boolean"}},"required":["item_id","sku","name","on_hand","reserved","available","physical","logical","uses_bom","incoming","is_active","is_component"],"type":"object"},"StockLossNote":{"description":"What a loss adjustment's NF-e de baixa de estoque came to.","properties":{"error":{"description":"Why none was issued although due or asked (or it failed): the\nadjustment stands either way.","type":["string","null"]},"note_id":{"description":"The note issued (a goods note of kind `write_off`), when one was.","format":"uuid","type":["string","null"]},"number":{"description":"Its NF-e number and SEFAZ status (`pending` until SEFAZ answers,\nthen `authorized`, `rejected`...).","format":"int64","type":["integer","null"]},"status":{"type":["string","null"]}},"type":"object"},"StockMovement":{"description":"A quantity of stock that moved, with why and who.","properties":{"actor_name":{"description":"Their name, else their e-mail.","type":["string","null"]},"balance_after":{"description":"Units on hand at the location right after this movement.","format":"int32","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"event_type":{"$ref":"#/components/schemas/MovementKind"},"id":{"format":"uuid","type":"string"},"location_id":{"format":"uuid","type":["string","null"]},"location_name":{"type":["string","null"]},"name":{"type":["string","null"]},"note":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"product_id":{"format":"uuid","type":["string","null"]},"quantity_delta":{"description":"Signed change to on-hand units (for `reserve`/`release`, the change\nto reserved units).","format":"int32","type":"integer"},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdjustReason","description":"Set on manual adjustments."}]},"reference_id":{"format":"uuid","type":["string","null"]},"reference_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MovementReferenceType"}]},"reversal_of":{"description":"The movement this one undoes.","format":"uuid","type":["string","null"]},"reversed_by":{"description":"The movement that undid this one.","format":"uuid","type":["string","null"]},"sku":{"type":["string","null"]},"unit_cost_cents":{"description":"Landed unit cost, on purchase receipts.","format":"int64","type":["integer","null"]},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["created_at","event_type","id","quantity_delta"],"type":"object"},"StockReversalResult":{"properties":{"reversal_id":{"description":"The new `adjustment` movement that undoes the original.","format":"uuid","type":"string"},"stock":{"$ref":"#/components/schemas/VariantStock","description":"The variant's stock after the reversal."}},"required":["reversal_id","stock"],"type":"object"},"StockReverseRequest":{"properties":{"force":{"description":"Write even though an ERP owns this store's stock.","type":"boolean"},"note":{"description":"Shown on the reversal in the history. Defaults to \"Estorno\".","type":["string","null"]}},"type":"object"},"StockTransferResult":{"properties":{"stock":{"$ref":"#/components/schemas/VariantStock","description":"The variant's stock after the transfer."},"transfer_id":{"description":"Links the two `transfer` ledger entries (their `reference_id`).","format":"uuid","type":"string"}},"required":["transfer_id","stock"],"type":"object"},"Store":{"description":"The store a key works on: its name, address, currency, language and time zone.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"description":"ISO 4217 code its prices are in, e.g. `BRL`.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_test":{"description":"A test store (see Test mode): its orders are test orders and it cannot connect outside providers.","type":"boolean"},"kind":{"$ref":"#/components/schemas/StoreKind"},"locale":{"description":"The language its storefront and messages default to, e.g. `pt-BR`.","type":["string","null"]},"name":{"type":"string"},"slug":{"description":"Its address: storefront links and the default storefront host use it.","type":"string"},"timezone":{"description":"IANA time zone its days, reports and schedules follow, e.g. `America/Sao_Paulo`.","type":["string","null"]}},"required":["id","name","slug","kind","created_at"],"type":"object"},"StoreFormConsentChannel":{"enum":["email","whatsapp"],"type":"string"},"StoreFormField":{"properties":{"consent_channel":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StoreFormConsentChannel","description":"For `consent`: ticked, it is an opt-in to offers on this channel\n(`email` or `whatsapp`), recorded on the customer with the label as\nthe words agreed to. Without it the box is an acceptance only (terms,\nprivacy policy) and records no marketing consent."}]},"key":{"description":"`a-z`, `0-9`, `_`; the submission's key.","type":"string"},"label":{"type":"string"},"max_length":{"description":"For text fields; defaults to 500 (`textarea`: 5000).","format":"int32","minimum":0,"type":["integer","null"]},"options":{"description":"For `select`, `radio`, `checkboxes`.","items":{"type":"string"},"type":"array"},"placeholder":{"type":["string","null"]},"required":{"type":"boolean"},"type":{"$ref":"#/components/schemas/StoreFormFieldType"}},"required":["key","label","type"],"type":"object"},"StoreFormFieldType":{"description":"What a field accepts. Brazilian types are validated and stored\ncanonical: `phone` as E.164, `cpf`/`cnpj`/`document`/`cep` as digits.","enum":["text","textarea","email","phone","cpf","cnpj","document","cep","number","date","select","radio","checkboxes","consent"],"type":"string"},"StoreFormInput":{"properties":{"customer_tags":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"$ref":"#/components/schemas/StoreFormField"},"type":"array"},"is_active":{"type":"boolean"},"name":{"type":"string"},"notify_emails":{"items":{"type":"string"},"type":"array"},"redirect_url":{"description":"Where to send the visitor after sending (else the message shows).","type":["string","null"]},"save_customer":{"type":"boolean"},"slug":{"description":"Defaults to the name, slugified.","type":["string","null"]},"submit_label":{"type":["string","null"]},"success_message":{"type":["string","null"]}},"required":["name","fields"],"type":"object"},"StoreFormSubmission":{"properties":{"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"data":{"description":"Field key -> canonical value.","type":"object"},"form_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"page_url":{"type":["string","null"]},"status":{"description":"`new`, `read`, `archived` or `spam`.","type":"string"}},"required":["id","form_id","data","status","created_at"],"type":"object"},"StoreFormSubmissionUpdate":{"properties":{"status":{"description":"`new`, `read`, `archived` or `spam`.","type":"string"}},"required":["status"],"type":"object"},"StoreKind":{"description":"What a workspace is for: `store` sells products (catalog, storefront,\norders); `service` only serves its customers (inbox, tickets, CRM), and\nits storefront host answers 404. A setting: either can become the other.","enum":["store","service"],"type":"string"},"StoreLocation":{"description":"A physical place of the store: a shop, a pickup point.","properties":{"amenities":{"description":"Amenity labels, e.g. `estacionamento`.","items":{"type":"string"},"type":"array"},"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"country":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"email":{"type":["string","null"]},"hours":{"description":"Opening hours, as the admin editor writes them.","type":"object"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_locator_visible":{"description":"Listed in the storefront store locator.","type":"boolean"},"is_pickup_enabled":{"description":"Shoppers can pick orders up here.","type":"boolean"},"latitude":{"format":"double","type":["number","null"]},"longitude":{"format":"double","type":["number","null"]},"name":{"type":"string"},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"photos":{"items":{"$ref":"#/components/schemas/StoreLocationPhoto"},"type":"array"},"pickup_fee_cents":{"description":"Charged as shipping when a shopper picks up here.","format":"int64","type":"integer"},"pickup_instructions":{"type":["string","null"]},"pickup_lead_minutes":{"description":"How long after the order the pickup is ready.","format":"int32","type":"integer"},"position":{"description":"Sort order, ascending.","format":"int32","type":"integer"},"postal_code":{"type":["string","null"]},"slug":{"description":"Unique within the store.","type":"string"},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"timezone":{"description":"IANA time zone of `hours_json`.","type":"string"},"updated_at":{"format":"date-time","type":"string"},"whatsapp":{"type":["string","null"]}},"required":["amenities","country","created_at","hours","id","is_active","is_locator_visible","is_pickup_enabled","name","photos","pickup_fee_cents","pickup_lead_minutes","position","slug","timezone","updated_at"],"type":"object"},"StoreLocationCreate":{"description":"A new location of the store.","properties":{"amenities":{"items":{"type":"string"},"type":["array","null"]},"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"country":{"description":"Defaults to `BR`.","type":["string","null"]},"description":{"type":["string","null"]},"email":{"type":["string","null"]},"hours":{"type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_locator_visible":{"type":["boolean","null"]},"is_pickup_enabled":{"type":["boolean","null"]},"latitude":{"format":"double","type":["number","null"]},"longitude":{"format":"double","type":["number","null"]},"name":{"type":"string"},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"photos":{"items":{"$ref":"#/components/schemas/StoreLocationPhoto"},"type":["array","null"]},"pickup_fee_cents":{"format":"int64","type":["integer","null"]},"pickup_instructions":{"type":["string","null"]},"pickup_lead_minutes":{"format":"int32","type":["integer","null"]},"position":{"format":"int32","type":["integer","null"]},"postal_code":{"type":["string","null"]},"slug":{"description":"Defaults to one derived from the name.","type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"timezone":{"description":"Defaults to `America/Sao_Paulo`.","type":["string","null"]},"whatsapp":{"type":["string","null"]}},"required":["name"],"type":"object"},"StoreLocationPhoto":{"description":"A photo of a location.","properties":{"alt":{"type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"StoreLocationUpdate":{"description":"The fields of a location to change. A field left out keeps its value.","properties":{"amenities":{"items":{"type":"string"},"type":["array","null"]},"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"country":{"type":["string","null"]},"description":{"type":["string","null"]},"email":{"type":["string","null"]},"hours":{"type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_locator_visible":{"type":["boolean","null"]},"is_pickup_enabled":{"type":["boolean","null"]},"latitude":{"format":"double","type":["number","null"]},"longitude":{"format":"double","type":["number","null"]},"name":{"type":"string"},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"photos":{"items":{"$ref":"#/components/schemas/StoreLocationPhoto"},"type":["array","null"]},"pickup_fee_cents":{"format":"int64","type":["integer","null"]},"pickup_instructions":{"type":["string","null"]},"pickup_lead_minutes":{"format":"int32","type":["integer","null"]},"position":{"format":"int32","type":["integer","null"]},"postal_code":{"type":["string","null"]},"slug":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"type":["string","null"]},"timezone":{"type":["string","null"]},"whatsapp":{"type":["string","null"]}},"required":["name"],"type":"object"},"StorefrontsProductViewedEvent":{"description":"A known customer viewed a product on the storefront.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"product_id":{"format":"uuid","type":["string","null"]}},"required":["product_id"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"storefronts.product_viewed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Subscription":{"description":"An order placed again for a customer every few days, weeks or months.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":"string"},"customer_name":{"type":["string","null"]},"cycles_placed":{"format":"int32","type":"integer"},"delivery_order_id":{"description":"The order whose delivery address and freight each cycle copies.","format":"uuid","type":["string","null"]},"discount_code":{"description":"A discount code of the store that every cycle's order applies.","type":["string","null"]},"failures_in_a_row":{"format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"interval_count":{"format":"int32","type":"integer"},"interval_unit":{"description":"`week` or `month`.","type":"string"},"items":{"items":{"$ref":"#/components/schemas/RecurringOrderItem"},"type":"array"},"last_error":{"type":["string","null"]},"next_run_at":{"description":"When the next order is placed (active ones only).","format":"date-time","type":"string"},"paused_reason":{"type":["string","null"]},"status":{"description":"`active`, `paused` or `cancelled`.","type":"string"}},"required":["id","status","customer_id","items","interval_unit","interval_count","next_run_at","cycles_placed","failures_in_a_row","created_at"],"type":"object"},"SubscriptionCreate":{"description":"A new subscription: whose, what and how often.","properties":{"customer_id":{"format":"uuid","type":"string"},"delivery_order_id":{"description":"An earlier order of the customer whose delivery every cycle repeats.","format":"uuid","type":["string","null"]},"discount_code":{"description":"A discount code of the store that every cycle's order applies.","type":["string","null"]},"first_run_at":{"description":"When the first order is placed; now when absent.","format":"date-time","type":["string","null"]},"interval_count":{"description":"Every how many weeks or months, 1 to 52.","format":"int32","type":"integer"},"interval_unit":{"description":"`week` or `month`.","type":"string"},"items":{"items":{"$ref":"#/components/schemas/RecurringOrderLine"},"type":"array"}},"required":["customer_id","items","interval_unit","interval_count"],"type":"object"},"SubscriptionUpdate":{"description":"Fields to change on a subscription; omitted fields keep their value.","properties":{"delivery_order_id":{"format":"uuid","type":["string","null"]},"discount_code":{"description":"A discount code of the store; an empty string removes it.","type":["string","null"]},"interval_count":{"format":"int32","type":["integer","null"]},"interval_unit":{"type":["string","null"]},"items":{"description":"The full list of lines.","items":{"$ref":"#/components/schemas/RecurringOrderLine"},"type":["array","null"]},"next_run_at":{"format":"date-time","type":["string","null"]},"skip_next":{"description":"Jump over the next order: its date moves one interval on.","type":["boolean","null"]},"status":{"description":"`active`, `paused` or `cancelled`. A cancelled subscription stays\ncancelled; resuming a paused one schedules its next order at\n`next_run_at` or now.","type":["string","null"]}},"type":"object"},"SubscriptionsCancelledEvent":{"description":"A subscription was cancelled.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"status":{"type":"string"}},"required":["status"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.cancelled","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SubscriptionsCreatedEvent":{"description":"A subscription was created.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"status":{"type":"string"}},"required":["status"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.created","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SubscriptionsCycleFailedEvent":{"description":"A subscription could not place its order for a cycle.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"last_error":{"type":["string","null"]},"status":{"type":"string"}},"required":["status","last_error"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.cycle_failed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SubscriptionsOrderPlacedEvent":{"description":"A subscription placed its order for a cycle.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"status":{"type":"string"}},"required":["status","order_id","order_number"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.order_placed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SubscriptionsPausedEvent":{"description":"A subscription was paused.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"paused_reason":{"type":["string","null"]},"status":{"type":"string"}},"required":["status","paused_reason"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.paused","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"SubscriptionsResumedEvent":{"description":"A subscription was resumed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{"status":{"type":"string"}},"required":["status"],"type":"object"},"object":{"description":"The object as its `GET` answered when the event was sent; `null` if it could not be read then.","oneOf":[{"$ref":"#/components/schemas/Subscription"},{"$ref":"#/components/schemas/DeletedObject"},{"type":"null"}]}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"subscriptions.resumed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"},"Supplier":{"description":"Someone the store buys from.","properties":{"address":{"description":"Where the supplier ships from: `postal_code`, `street`, `number`,\n`complement`, `district`, `city`, `state`.","type":["object","null"]},"contact_name":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"free_freight_min_cents":{"description":"CIF from this order value up (below it the supplier charges freight).","format":"int64","type":["integer","null"]},"freight_terms":{"description":"`FOB`: the store pays and arranges the freight. `CIF`: the supplier\ndelivers, freight in the price.","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"lead_time_days":{"description":"Typical days from order to delivery.","format":"int32","type":["integer","null"]},"legal_name":{"type":["string","null"]},"min_order_cents":{"description":"The supplier's minimum order value.","format":"int64","type":["integer","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"open_orders":{"description":"Purchase orders ordered and not fully received.","format":"int64","type":"integer"},"payment_terms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentTerms","description":"When and how its purchases are paid."}]},"phone":{"type":["string","null"]},"tax_id":{"description":"CNPJ or CPF.","type":["string","null"]}},"required":["id","name","freight_terms","is_active","open_orders","created_at"],"type":"object"},"SupplierInvoice":{"description":"An imported supplier invoice.","properties":{"access_key":{"type":"string"},"authorized":{"description":"SEFAZ's authorization came with the file (100 or 150).","type":"boolean"},"auto_receive_blocked_by":{"description":"Why auto-receive left it pending, when it tried (codes, see\n`SupplierInvoiceAutoReceive`).","items":{"type":"string"},"type":["array","null"]},"cancelled_at":{"description":"Its issuer cancelled the note (an event from SEFAZ): it cannot be\nreceived.","format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"detected_operation":{"description":"What the CFOPs say, whatever was chosen.","type":["string","null"]},"discount_cents":{"format":"int64","type":"integer"},"freight_cents":{"format":"int64","type":"integer"},"goods_cents":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"invoice_cents":{"description":"What the note charges in all.","format":"int64","type":"integer"},"ipi_cents":{"format":"int64","type":"integer"},"issued_at":{"format":"date-time","type":"string"},"issuer_name":{"type":["string","null"]},"issuer_tax_id":{"type":["string","null"]},"line_count":{"format":"int64","type":"integer"},"manifest_event":{"description":"The last manifestação do destinatário sent for the note: `210200`\nconfirmação, `210220` desconhecimento, `210240` operação não\nrealizada. Null when none was sent.","type":["string","null"]},"manifest_message":{"type":["string","null"]},"manifest_status":{"description":"SEFAZ's cStat for it (135/136/573 registered).","format":"int32","type":["integer","null"]},"manifested_at":{"description":"When SEFAZ registered it; null while refused or unsent.","format":"date-time","type":["string","null"]},"number":{"format":"int32","type":"integer"},"operation":{"description":"What receiving the note means: a member's choice, else what its\nCFOPs say (a `ReceiverOperation`), `mixed` when its lines disagree,\n`unknown` when none is known.","type":["string","null"]},"operation_overridden":{"description":"A member chose the operation.","type":"boolean"},"purchase_order_id":{"format":"uuid","type":["string","null"]},"purchase_order_number":{"type":["string","null"]},"received_at":{"format":"date-time","type":["string","null"]},"received_automatically":{"description":"Received by auto-receive, not by a person.","type":"boolean"},"reversal_decided_at":{"format":"date-time","type":["string","null"]},"reversal_proposed_at":{"format":"date-time","type":["string","null"]},"reversal_status":{"description":"After its issuer cancelled a received note: `pending` (a reversal of\nits stock and open installments waits for a decision), `applied`,\n`dismissed`; `none` otherwise.","type":"string"},"series":{"format":"int32","type":"integer"},"st_cents":{"format":"int64","type":"integer"},"status":{"description":"`pending`, `received`, `discarded` (imported by mistake) or\n`not_goods` (an expense, not goods for resale: never received, still\nin the accountant's package).","type":"string"},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":["string","null"]},"unmatched_count":{"description":"Lines with no stock item yet (ignored lines excluded).","format":"int64","type":"integer"}},"required":["id","access_key","series","number","issued_at","goods_cents","discount_cents","freight_cents","ipi_cents","st_cents","invoice_cents","status","authorized","reversal_status","created_at","line_count","unmatched_count","operation_overridden","received_automatically"],"type":"object"},"SupplierInvoiceAutoReceive":{"description":"Whether the note can be received with nobody looking.\n\n`blocked_by` codes: `cancelled`, `not_authorized`, `homologation`, `recipient_mismatch`,\n`recipient_unknown`, `supplier_unknown`, `issuer_entry`,\n`operation_needs_decision`, `lines_unmatched`, `line_matched_by_sku`,\n`units_not_whole`, `unit_unverified`, `installments_mismatch`, `stock_managed_externally`,\nand `receive_failed` (it tried and receiving refused).","properties":{"blocked_by":{"description":"What stops this note (pending notes; empty when nothing does).","items":{"type":"string"},"type":"array"},"enabled":{"description":"The store receives notes automatically.","type":"boolean"}},"required":["enabled","blocked_by"],"type":"object"},"SupplierInvoiceDetail":{"allOf":[{"$ref":"#/components/schemas/SupplierInvoice"},{"properties":{"auto_receive":{"$ref":"#/components/schemas/SupplierInvoiceAutoReceive"},"lines":{"items":{"$ref":"#/components/schemas/SupplierInvoiceLine"},"type":"array"},"note":{"$ref":"#/components/schemas/IncomingNfe","description":"The note as read from its XML."},"payables":{"description":"The installments created (received invoices).","items":{"$ref":"#/components/schemas/Payable"},"type":"array"},"payables_preview":{"description":"The installments receiving would create (pending invoices).","items":{"$ref":"#/components/schemas/PayableDraft"},"type":"array"},"receive_plan":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReceivePlan","description":"What receiving it will do (pending) or did: where the goods go and\nwhether it owes anything. Null while the operation needs a decision."}]},"warnings":{"items":{"$ref":"#/components/schemas/InvoiceWarning"},"type":"array"}},"required":["lines","note","warnings","payables_preview","payables","auto_receive"],"type":"object"}],"description":"A supplier invoice with its lines, the note as read and its payables."},"SupplierInvoiceImport":{"properties":{"xml":{"description":"The note's XML (`nfeProc`, as the supplier sends it).","type":"string"}},"required":["xml"],"type":"object"},"SupplierInvoiceLine":{"description":"One line of a supplier invoice and what it is in stock.","properties":{"base_unit":{"type":["string","null"]},"cfop":{"type":["string","null"]},"cost_cents":{"description":"What the line costs: goods − discount + freight + insurance + other +\nIPI + ST.","format":"int64","type":"integer"},"description":{"type":"string"},"ean":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"ignored":{"type":"boolean"},"item_name":{"type":["string","null"]},"item_sku":{"type":["string","null"]},"line_number":{"format":"int32","type":"integer"},"match_source":{"description":"`code` (learned from this supplier), `ean`, `sku` or `manual`.","type":["string","null"]},"ncm":{"type":["string","null"]},"operation":{"description":"What the line's CFOP says for the store (a `ReceiverOperation`).","type":["string","null"]},"purchase_order_item_id":{"format":"uuid","type":["string","null"]},"quantity":{"format":"double","type":"number"},"stock_item_id":{"description":"The stock item it is.","format":"uuid","type":["string","null"]},"supplier_code":{"type":"string"},"unit":{"description":"The supplier's unit (\"CX\") and quantity in it.","type":"string"},"unit_cost_cents":{"description":"`cost_cents / units`: what one base unit costs.","format":"double","type":"number"},"units":{"description":"`quantity × units_per_unit`.","format":"double","type":"number"},"units_per_unit":{"description":"Base units in one of the supplier's units.","format":"double","type":"number"},"variant_id":{"description":"The product variant, for one not mirrored as an item.","format":"uuid","type":["string","null"]}},"required":["id","line_number","supplier_code","description","unit","quantity","cost_cents","units_per_unit","units","unit_cost_cents","ignored"],"type":"object"},"SupplierInvoiceReceive":{"properties":{"force":{"description":"Receive even though an ERP owns this store's stock.","type":"boolean"},"location_id":{"description":"Where the goods go; defaults to the order's location, then the\nstore's default location.","format":"uuid","type":["string","null"]}},"type":"object"},"SupplierInvoiceUpdate":{"properties":{"create_supplier":{"description":"Register the note's issuer as a supplier (name, CNPJ, address) and use\nit. One with the same CNPJ is used instead when it exists.","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineMatch"},"type":"array"},"operation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReceiverOperation","description":"What receiving the note means, chosen by a member (for \"outras\", a\nnote whose lines disagree, or one the CFOPs got wrong). Send `null`\nto go back to what the CFOPs say."}]},"purchase_order_id":{"description":"The order the note fills. Send `null` to receive without one (an\norder is created from the note).","format":"uuid","type":["string","null"]},"supplier_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"SupplierRequest":{"description":"A supplier's fields. On update every field is replaced.","properties":{"address":{"description":"`postal_code`, `street`, `number`, `complement`, `district`, `city`, `state`.","type":["object","null"]},"contact_name":{"description":"The fields below, omitted on update, keep their current value.","type":["string","null"]},"email":{"type":["string","null"]},"free_freight_min_cents":{"description":"0 clears it.","format":"int64","type":["integer","null"]},"freight_terms":{"description":"`FOB` (default) or `CIF`.","type":["string","null"]},"is_active":{"description":"Defaults to true on create; omitted on update keeps the current value.","type":["boolean","null"]},"lead_time_days":{"format":"int32","type":["integer","null"]},"legal_name":{"type":["string","null"]},"min_order_cents":{"description":"0 clears it.","format":"int64","type":["integer","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"payment_terms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentTerms","description":"An empty `installments` list clears them."}]},"phone":{"type":["string","null"]},"tax_id":{"type":["string","null"]}},"required":["name"],"type":"object"},"Task":{"description":"Something the team has to do: a call, a meeting, a follow-up.","properties":{"assignee_id":{"description":"The team member it is for (`GET /team-members`). A task an API key makes without one has none.","format":"uuid","type":["string","null"]},"assignee_name":{"type":["string","null"]},"booking_id":{"description":"The booking this meeting came from (a client booked through a link).","format":"uuid","type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"conversation_id":{"format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"deal_id":{"format":"uuid","type":["string","null"]},"deal_title":{"type":["string","null"]},"due_at":{"format":"date-time","type":["string","null"]},"ends_at":{"description":"A meeting's end (`due_at` is its start).","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"invite_sent_at":{"description":"When the calendar invite last went to the customer.","format":"date-time","type":["string","null"]},"kind":{"description":"`todo`, `call`, `meeting`, `visit` or `email`.","type":"string"},"location":{"description":"Where it happens: an address or a video link.","type":["string","null"]},"notes":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"priority":{"description":"`low`, `normal`, `high` or `urgent`; set on the tasks a stale-lead\nfollow-up creates, empty on others.","type":["string","null"]},"repeat":{"description":"`daily`, `weekly` or `monthly`: completing it opens the next one.","type":["string","null"]},"title":{"type":"string"}},"required":["id","title","kind","created_at"],"type":"object"},"TaskCreate":{"description":"A new task: `title` is required.","properties":{"assignee_id":{"description":"Defaults to the caller.","format":"uuid","type":["string","null"]},"conversation_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"deal_id":{"format":"uuid","type":["string","null"]},"due_at":{"format":"date-time","type":["string","null"]},"ends_at":{"description":"A meeting's end: after `due_at` (its start), within 24 hours.","format":"date-time","type":["string","null"]},"kind":{"description":"Defaults to `todo`.","type":["string","null"]},"location":{"description":"An address or a video link, up to 500 characters.","type":["string","null"]},"notes":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"repeat":{"description":"`daily`, `weekly` or `monthly`; needs a due time.","type":["string","null"]},"title":{"description":"1 to 300 characters.","type":"string"}},"required":["title"],"type":"object"},"TaskUpdate":{"description":"Fields to change on a task; omitted fields keep their value. `done: true` completes it, `false` reopens it.","properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"done":{"description":"`true` completes the task, `false` reopens it.","type":["boolean","null"]},"due_at":{"format":"date-time","type":["string","null"]},"ends_at":{"format":"date-time","type":["string","null"]},"kind":{"type":["string","null"]},"location":{"type":["string","null"]},"notes":{"type":["string","null"]},"repeat":{"type":["string","null"]},"title":{"type":["string","null"]}},"type":"object"},"TaxClass":{"description":"How a kind of product is taxed and invoiced: its NCM, origin, CSTs, CFOPs and rates. Products and variants take its id as `tax_class_id`.","properties":{"approx_tax_rate":{"format":"int32","type":["integer","null"]},"approx_tax_source":{"description":"Citation of the table the rate came from; null for a hand-typed rate.","type":["string","null"]},"cbs_rate":{"format":"int32","type":["integer","null"]},"cest":{"type":["string","null"]},"cfop_internal":{"type":"string"},"cfop_interstate":{"type":"string"},"cfop_interstate_consumer":{"type":"string"},"cofins_cst":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"csosn":{"type":"string"},"ibs_cbs_class":{"type":["string","null"]},"ibs_cbs_cst":{"type":["string","null"]},"ibs_mun_rate":{"format":"int32","type":["integer","null"]},"ibs_uf_rate":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"ncm":{"type":"string"},"origin":{"format":"int32","type":"integer"},"pis_cst":{"type":"string"},"product_count":{"description":"Products that carry this class directly (not through the store\ndefault). Only the list returns it.","format":"int64","type":["integer","null"]},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"variant_count":{"description":"Variants that carry this class directly. Only the list returns it.","format":"int64","type":["integer","null"]}},"required":["id","name","ncm","unit","origin","csosn","pis_cst","cofins_cst","cfop_internal","cfop_interstate","cfop_interstate_consumer","created_at","updated_at"],"type":"object"},"TaxClassAssign":{"description":"Give a tax class to products and variants, or take it away (`unassign`).","properties":{"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"unassign":{"description":"Detach these products/variants instead (they fall back to the\nproduct's class, then the store default).","type":"boolean"},"variant_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object"},"TaxClassInput":{"description":"A tax class: `name` and `ncm` are required; on PUT, the whole class.","properties":{"approx_tax_rate":{"format":"int32","type":["integer","null"]},"cbs_rate":{"format":"int32","type":["integer","null"]},"cest":{"type":["string","null"]},"cfop_internal":{"type":["string","null"]},"cfop_interstate":{"type":["string","null"]},"cfop_interstate_consumer":{"type":["string","null"]},"cofins_cst":{"type":["string","null"]},"csosn":{"type":["string","null"]},"ibs_cbs_class":{"type":["string","null"]},"ibs_cbs_cst":{"type":["string","null"]},"ibs_mun_rate":{"format":"int32","type":["integer","null"]},"ibs_uf_rate":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"ncm":{"type":"string"},"origin":{"format":"int32","type":["integer","null"]},"pis_cst":{"type":["string","null"]},"unit":{"type":["string","null"]}},"required":["name","ncm"],"type":"object"},"TaxDocument":{"description":"A recipient's or carrier's document.","oneOf":[{"properties":{"kind":{"enum":["cnpj"],"type":"string"},"value":{"$ref":"#/components/schemas/Cnpj"}},"required":["value","kind"],"type":"object"},{"properties":{"kind":{"enum":["cpf"],"type":"string"},"value":{"$ref":"#/components/schemas/Cpf"}},"required":["value","kind"],"type":"object"}]},"TeamMember":{"description":"Someone on the store's team.","properties":{"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_owner":{"type":"boolean"},"name":{"type":["string","null"]}},"required":["id","email","is_owner","is_active"],"type":"object"},"Ticket":{"description":"A ticket as the team's queue shows it.","properties":{"assignee_id":{"format":"uuid","type":["string","null"]},"assignee_name":{"type":["string","null"]},"category":{"$ref":"#/components/schemas/TicketResponseCategory"},"channel":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"description":"The workspace's ticket fields filled in, by key.","type":"object"},"customer_id":{"format":"uuid","type":["string","null"]},"first_response_at":{"format":"date-time","type":["string","null"]},"id":{"description":"The conversation's id.","format":"uuid","type":"string"},"last_message_at":{"format":"date-time","type":["string","null"]},"last_message_preview":{"type":["string","null"]},"last_sender":{"description":"Who wrote last: `visitor` (the customer), `agent`, `bot`.","type":["string","null"]},"number":{"format":"int64","type":"integer"},"organization":{"description":"The company the requester belongs to: their CRM company, or on\nMobiari's own desk, the merchant's store.","type":["string","null"]},"priority":{"$ref":"#/components/schemas/TicketPriority"},"rating":{"description":"The customer's rating once resolved, 1 to 5.","format":"int32","type":["integer","null"]},"reply_due_at":{"description":"When the team owes the next reply.","format":"date-time","type":["string","null"]},"requester_email":{"type":["string","null"]},"requester_name":{"description":"Who asked: their name, e-mail and phone.","type":["string","null"]},"requester_phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"sla":{"$ref":"#/components/schemas/TicketSla"},"status":{"description":"The conversation's status: `open`, `pending`, `snoozed`, `resolved`.","type":"string"},"subject":{"type":"string"},"unread":{"format":"int32","type":"integer"}},"required":["id","number","subject","category","priority","status","unread","channel","created_at","sla","custom_fields"],"type":"object"},"TicketCategory":{"enum":["payments","shipping","invoices","store","account","other","feature_request"],"type":"string"},"TicketPriority":{"description":"How soon the desk owes a first reply.","enum":["low","normal","high","urgent"],"type":"string"},"TicketResponseCategory":{"description":"Categories in the published v1 ticket response. Keep this closed set\nstable for existing clients; internal feature requests retain their\ndedicated queue/tag but are represented as `other` on this surface.","enum":["payments","shipping","invoices","store","account","other"],"type":"string"},"TicketSla":{"description":"Where a ticket stands against its reply deadline.","enum":["none","on_track","at_risk","breached"],"type":"string"},"Tier":{"description":"One step of a progressive promotion.","properties":{"min":{"description":"From this many units, or from this amount in cents, per the basis.","format":"int64","type":"integer"},"value":{"description":"Whole percent or cents, per `value_type`.","format":"int32","type":"integer"}},"required":["min","value"],"type":"object"},"TierBasis":{"description":"What a tier is measured on.","enum":["quantity","subtotal"],"type":"string"},"TierChange":{"description":"One change of a customer's tier.","properties":{"created_at":{"format":"date-time","type":"string"},"from_tier":{"description":"The tier before; empty when they were below the lowest (or new).","type":["string","null"]},"id":{"format":"uuid","type":"string"},"notified_at":{"description":"When the customer was e-mailed about it.","format":"date-time","type":["string","null"]},"reason":{"description":"`payment`, `refund`, `nightly` (the window moved on),\n`tiers_changed` (the store edited its tiers) or `birthday` (the\ntier's birthday bonus was given; the tier did not change).","type":"string"},"spend_cents":{"description":"What they had paid in the window then.","format":"int64","type":"integer"},"to_tier":{"description":"The tier now; empty when they fell below the lowest.","type":["string","null"]}},"required":["id","spend_cents","reason","created_at"],"type":"object"},"TierStanding":{"description":"Where a customer stands among the tiers.","properties":{"current":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LoyaltyTier","description":"The tier they are in now; none below the lowest."}]},"next":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LoyaltyTier","description":"The next tier up, if there is one."}]},"spend_cents":{"description":"What they paid for goods in the last `window_months`.","format":"int64","type":"integer"},"to_next_cents":{"description":"What is still to spend to reach it.","format":"int64","type":["integer","null"]},"window_months":{"description":"The window the spend is counted over, in months.","format":"int32","type":"integer"}},"required":["spend_cents","window_months"],"type":"object"},"TierValue":{"description":"How a tier's `value` reads.","enum":["percent","fixed"],"type":"string"},"Tiered":{"description":"Progressive tiers: the highest tier the eligible products reach applies\n(\"5% from R$ 300, 10% from R$ 500\"; \"3 units: 10% off\"). One tier with\n`min` 0 is a plain automatic discount on some products.","properties":{"basis":{"$ref":"#/components/schemas/TierBasis"},"exclude_sale_items":{"description":"Items already on sale neither count nor get the discount.","type":"boolean"},"scope":{"$ref":"#/components/schemas/DiscountScope","description":"The products it applies to and counts; empty is every product."},"tiers":{"description":"One to ten tiers; the order does not matter.","items":{"$ref":"#/components/schemas/Tier"},"type":"array"},"value_type":{"$ref":"#/components/schemas/TierValue"}},"required":["basis","value_type","tiers"],"type":"object"},"TrackingEvent":{"description":"One carrier tracking event, newest last as the carrier reports them.","properties":{"comment":{"type":["string","null"]},"datetime":{"description":"As the carrier sent it: RFC 3339 or `YYYY-MM-DD HH:MM:SS` (local).\nPrefer `occurred_at`.","type":["string","null"]},"event":{"type":["string","null"]},"occurred_at":{"description":"`datetime` parsed, as RFC 3339 UTC. Times without an offset are\nread as Brasília time (`America/Sao_Paulo`), the carriers' local\ntime. Null when `datetime` is missing or unreadable.","format":"date-time","type":["string","null"]}},"type":"object"},"UnshippedItem":{"description":"An order line with how much of it no shipment has claimed.","properties":{"order_item_id":{"format":"uuid","type":"string"},"ordered_quantity":{"format":"int32","type":"integer"},"parts":{"description":"A kit line's parts (its recipe), each with what is left to ship:\npick some to ship the line in several goes. Empty for other lines.","items":{"$ref":"#/components/schemas/UnshippedPart"},"type":"array"},"remaining_quantity":{"description":"Whole units not in any non-cancelled shipment. For a kit line some\nshipment carries parts of, the units whose every part is still free.","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"}},"required":["order_item_id","title","ordered_quantity","remaining_quantity"],"type":"object"},"UnshippedPart":{"description":"One part of a kit line and what of it no shipment carries yet.","properties":{"item_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"needed":{"description":"Part units the whole line needs.","format":"double","type":"number"},"per_unit":{"description":"Part units per kit unit.","format":"double","type":"number"},"remaining":{"description":"Part units not in any non-cancelled shipment.","format":"double","type":"number"},"sku":{"type":["string","null"]}},"required":["item_id","name","per_unit","needed","remaining"],"type":"object"},"UpdateTicketRequest":{"properties":{"category":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketCategory"}]},"custom_fields":{"description":"Ticket field values by key, merged into the ticket's; `null` clears\none. Keys and kinds follow the workspace's ticket fields.","type":["object","null"]},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketPriority","description":"The conversation's priority; while no reply was sent, the first\nreply's deadline follows it."}]},"subject":{"type":["string","null"]}},"type":"object"},"UpsertSpecValueRequest":{"properties":{"collection_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"term_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"value_text":{"type":["string","null"]},"value_texts":{"items":{"type":"string"},"type":["array","null"]}},"type":"object"},"Variant":{"description":"A variant: what is priced, stocked and sold. A read of one variant also carries its options, its stock per location and its custom fields.","properties":{"available_quantity":{"description":"Units on hand minus units reserved by open orders.","format":"int32","type":"integer"},"backorderable":{"description":"Whether one more unit may sell without stock on hand: an on-demand\nfulfillment mode, or a kit whose missing parts can be purchased.","type":"boolean"},"barcode":{"description":"GTIN/EAN/UPC printed on the item, when it has one.","type":["string","null"]},"compare_at_cents":{"description":"Promotional price: while it is above zero and lower than\n`price_cents`, the customer pays it and the storefront shows\n`price_cents` struck through. Null or zero means no promotion.","format":"int64","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"description":"The values of the store's variant fields (`/custom-fields`), by key.","type":"object"},"dimensions":{"$ref":"#/components/schemas/VariantShippingUpdate"},"expected_availability_at":{"description":"When a unit ordered now is expected to be available, for variants\nsold without stock on hand. Null when it ships from stock.","format":"date-time","type":["string","null"]},"fulfillment_mode":{"$ref":"#/components/schemas/FulfillmentMode"},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Inactive variants are hidden from the storefront and the POS.","type":"boolean"},"lead_time_days":{"description":"Days to make or source the item when it is sold without stock.","format":"int32","type":["integer","null"]},"options":{"items":{"$ref":"#/components/schemas/VariantOptionValue"},"type":"array"},"position":{"description":"Display order within the product.","format":"int32","type":"integer"},"preorder_available_on":{"description":"Pre-sale: the day stock is expected (a collection's arrival), for a\nvariant that sells without stock (`fulfillment_mode` `on_demand` or\n`stocked_or_on_demand`). While it is ahead, units sold short are due\nthat day and the order line records it; once it has passed it no\nlonger counts. Null when the variant is not on pre-sale.","format":"date","type":["string","null"]},"price_cents":{"format":"int64","type":"integer"},"product_id":{"format":"uuid","type":"string"},"reserved_quantity":{"description":"Units reserved by open orders.","format":"int32","type":"integer"},"shipping_profile":{"$ref":"#/components/schemas/ShippingProfileView"},"sku":{"description":"Unique within the store, ignoring case.","type":"string"},"stock_by_location":{"items":{"$ref":"#/components/schemas/VariantLocationStock"},"type":"array"},"stock_quantity":{"description":"Units on hand over every location.","format":"int32","type":"integer"},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this variant, when it is not the product's.","format":"uuid","type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"uses_components":{"description":"Whether the variant is a kit whose stock comes from its components.","type":"boolean"}},"required":["id","product_id","sku","title","price_cents","is_active","position","fulfillment_mode","backorderable","uses_components","stock_quantity","reserved_quantity","available_quantity","created_at","updated_at"],"type":"object"},"VariantCreate":{"description":"A new variant of a product. Only `price_cents` is required.","properties":{"barcode":{"description":"A GTIN (EAN-8, UPC-A, EAN-13 or GTIN-14) with a valid check digit.","type":["string","null"]},"compare_at_cents":{"description":"Promotional price, see [`ProductVariant::compare_at_cents`].","format":"int64","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"fulfillment_mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FulfillmentMode","description":"Defaults to `stocked`."}]},"is_active":{"description":"Defaults to true. Send false to create a variant before its options\n(they are required only for an active variant).","type":["boolean","null"]},"lead_time_days":{"format":"int32","type":["integer","null"]},"option_value_ids":{"description":"One value of each of the product's options. Required for an active\nvariant of a product that has options.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"preorder_available_on":{"description":"Pre-sale day, see [`ProductVariant::preorder_available_on`].","format":"date","type":["string","null"]},"price_cents":{"format":"int64","type":"integer"},"sku":{"description":"Unique within the store, ignoring case. Omit it (or send it empty)\nand one is generated from the product's SKU prefix or slug and the\noption values.","type":["string","null"]},"title":{"description":"Defaults to the option values (\"Azul / M\"), or to the product's\ntitle for a product without options.","type":["string","null"]}},"required":["price_cents"],"type":"object"},"VariantLocationStock":{"description":"Stock of a variant at one inventory location.","properties":{"available":{"description":"`on_hand - reserved`.","format":"int32","type":"integer"},"location_id":{"format":"uuid","type":"string"},"location_name":{"type":"string"},"on_hand":{"format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"}},"required":["location_id","location_name","on_hand","reserved","available"],"type":"object"},"VariantOptionValue":{"description":"One option a variant carries, e.g. Color: Blue.","properties":{"color_hex":{"description":"`#RRGGBB`, or several joined by `/`, for custom colors.","type":["string","null"]},"option_group_id":{"format":"uuid","type":"string"},"option_group_name":{"type":"string"},"option_value":{"type":"string"},"option_value_id":{"format":"uuid","type":"string"}},"required":["option_group_id","option_group_name","option_value_id","option_value"],"type":"object"},"VariantShippingUpdate":{"description":"A variant's own size and weight; omitted fields stay, null clears.","properties":{"height_cm":{"format":"double","type":["number","null"]},"length_cm":{"description":"Outer size of one unit in centimetres, 0.1 to 1000.","format":"double","type":["number","null"]},"weight_grams":{"description":"Weight of one unit in grams, 1 to 1000000.","format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"type":"object"},"VariantStock":{"description":"A variant's stock: totals, per location, and what governs writes to it.","properties":{"available":{"description":"Units that can still be promised: the sum of `available` over the\nlocations, or `buildable` for a kit.","format":"int32","type":"integer"},"barcode":{"type":["string","null"]},"buildable":{"description":"For a kit: whole units the components can still build. Null otherwise.","format":"int32","type":["integer","null"]},"incoming":{"description":"Units on purchase orders that are ordered and not received yet.","format":"int32","type":"integer"},"limiting_sku":{"description":"For a kit: SKU of the component that caps `buildable`.","type":["string","null"]},"name":{"description":"The variant's title, or the product's when the variant has none.","type":"string"},"on_hand":{"description":"Units on hand over every location.","format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"reorder_point":{"description":"At or below this available quantity the variant counts as low stock.","format":"int32","type":["integer","null"]},"reorder_quantity":{"description":"Quantity a reorder draft proposes.","format":"int32","type":["integer","null"]},"reserved":{"description":"Units reserved over every location.","format":"int32","type":"integer"},"sku":{"type":"string"},"stock_by_location":{"description":"The default location first, then every other active location of the\nstore (zero when nothing is stocked there), then inactive ones that\nstill hold stock. Empty for kits.","items":{"$ref":"#/components/schemas/StockLevel"},"type":"array"},"stock_owner":{"description":"The ERP module that owns this store's stock (the store's\n`inventory_mode`, e.g. `tiny`), or null when Mobiari does (`mobi`). While an ERP owns it,\nmanual writes answer 409 `inventory_managed_externally` unless sent\nwith `force: true`, because the next sync would overwrite them.","type":["string","null"]},"stock_owner_name":{"description":"Display name of `stock_owner`.","type":["string","null"]},"uses_components":{"description":"True for a kit whose stock is computed from its components. Its\n`stock_by_location` is empty and stock writes to it answer 409\n`logical_stock_readonly`: adjust the components instead.","type":"boolean"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","product_id","sku","name","product_title","on_hand","reserved","available","uses_components","incoming","stock_by_location"],"type":"object"},"VariantUpdate":{"description":"The fields of a variant to change. A field left out keeps its value.","properties":{"barcode":{"type":["string","null"]},"clear_compare_at":{"description":"True removes the promotional price, the same as\n`compare_at_cents: null`, for clients that drop null fields. Cannot\nbe combined with a non-null `compare_at_cents`.","type":["boolean","null"]},"compare_at_cents":{"format":"int64","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"custom_fields":{"description":"Values of the store's variant fields, by key. A key left out keeps its value.","type":"object"},"dimensions":{"$ref":"#/components/schemas/VariantShippingUpdate"},"fulfillment_mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FulfillmentMode"}]},"is_active":{"type":["boolean","null"]},"lead_time_days":{"format":"int32","type":["integer","null"]},"preorder_available_on":{"description":"Pre-sale day, see [`ProductVariant::preorder_available_on`];\n`null` takes the variant off pre-sale. Open pre-sale lines of\norders still waiting for stock move to the new day.","format":"date","type":["string","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"shipping_profile":{"$ref":"#/components/schemas/ShippingProfileInput"},"sku":{"type":["string","null"]},"tax_class_id":{"description":"The tax class the store's fiscal documents use for this variant, when it is not the product's.","format":"uuid","type":["string","null"]},"title":{"type":["string","null"]}},"type":"object"},"WaitlistEntry":{"description":"Someone waiting for a free slot of a service on a day.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_email":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"notified_at":{"format":"date-time","type":["string","null"]},"provider_id":{"format":"uuid","type":["string","null"]},"provider_name":{"type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"service_name":{"type":"string"},"status":{"description":"`waiting`, `notified` or `removed`.","type":"string"},"wanted_on":{"description":"The day wanted, in the provider's zone.","format":"date","type":"string"}},"required":["id","service_id","service_name","wanted_on","customer_name","status","created_at"],"type":"object"},"WaitlistEntryCreate":{"description":"Someone to tell when a slot frees up.","properties":{"customer_email":{"description":"An e-mail or a phone is required; only an e-mail is told by itself.","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"provider_id":{"description":"Empty: anyone who delivers the service.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"wanted_on":{"description":"`YYYY-MM-DD`, today or later.","format":"date","type":"string"}},"required":["service_id","wanted_on","customer_name"],"type":"object"},"Webhook":{"description":"An endpoint that receives the store's events.","properties":{"created_at":{"format":"date-time","type":"string"},"events":{"description":"Subscribed event names (see `GET /events/catalog`).","items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"secret":{"description":"Signing secret: deliveries carry an HMAC-SHA256 of the body made\nwith it.","type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["created_at","events","id","is_active","secret","updated_at","url"],"type":"object"},"WebhookDelivery":{"description":"One attempt to deliver an event to a webhook.","properties":{"attempted_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"payload":{"description":"The body that was sent.","type":"object"},"response_body":{"type":["string","null"]},"response_status":{"description":"HTTP status the endpoint answered with; absent when it could not be\nreached.","format":"int32","type":["integer","null"]},"success":{"type":"boolean"},"webhook_id":{"format":"uuid","type":"string"}},"required":["attempted_at","id","payload","success","webhook_id"],"type":"object"},"WebhookUpdate":{"description":"The fields of a webhook to change. A field left out keeps its value.","properties":{"events":{"description":"The events it receives: all of them, the ones left out are no longer sent.","items":{"type":"string"},"type":"array"},"is_active":{"type":["boolean","null"]},"secret":{"type":["string","null"]},"url":{"type":["string","null"]}},"type":"object"},"WorkflowsRunFailedEvent":{"description":"An automation run failed.","properties":{"created_at":{"description":"When it happened.","format":"date-time","type":"string"},"data":{"properties":{"details":{"properties":{},"required":[],"type":"object"},"object":{"additionalProperties":true,"description":"The event's own facts.","type":"object"}},"required":["object","details"],"type":"object"},"id":{"description":"The event's id: the same in `GET /events`, and the same on every delivery of it.","format":"uuid","type":"string"},"store_id":{"description":"The store it happened in.","format":"uuid","type":"string"},"type":{"const":"workflows.run_failed","type":"string"}},"required":["id","type","created_at","store_id","data"],"type":"object"}},"securitySchemes":{"bearer_auth":{"bearerFormat":"store API key (mobi_sa_...)","description":"`Authorization: Bearer <key>`. A store API key (`mobi_sa_…`) belongs to a service account of one store: it works only for that store and can do at most what the account's permission sets allow there. With any other credential, name the store in the `Mobiari-Store` header.","scheme":"bearer","type":"http"}}},"info":{"description":"The public API of a Mobiari store: catalog, inventory, orders and fulfilment, customers, discounts, webhooks and events. Authenticate with `Authorization: Bearer <key>`. A store API key names its store; with any other credential, send the store's id in the `Mobiari-Store` header.\n\nConventions that hold for every endpoint (errors, pagination, idempotency, rate limits, versioning) are described at https://docs.mobiari.com/docs/api-conventions.","title":"Mobiari API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/automatic-discounts":{"get":{"description":"Highest `priority` first, then newest.","operationId":"listAutomaticDiscounts","parameters":[{"description":"Include inactive rules. Defaults to true.","in":"query","name":"include_inactive","required":false,"schema":{"type":"boolean"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AutomaticDiscount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List automatic discounts","tags":["Discounts"]},"post":{"description":"Takes effect on the storefront right away: every cached storefront page\nis purged, since the discount preview appears on all of them.","operationId":"createAutomaticDiscount","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticDiscountCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticDiscount"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: value out of range"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an automatic discount","tags":["Discounts"]}},"/automatic-discounts/{discount_id}":{"delete":{"description":"Orders that already applied it keep their discount. Purges the cached\nstorefront pages.","operationId":"deleteAutomaticDiscount","parameters":[{"description":"Automatic discount id","in":"path","name":"discount_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such discount in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete an automatic discount","tags":["Discounts"]},"get":{"operationId":"getAutomaticDiscount","parameters":[{"description":"Automatic discount id","in":"path","name":"discount_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticDiscount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such discount in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get an automatic discount","tags":["Discounts"]},"patch":{"description":"Partial: omitted fields keep their value, an explicit `null` clears a\nnullable one. Purges the cached storefront pages.","operationId":"updateAutomaticDiscount","parameters":[{"description":"Automatic discount id","in":"path","name":"discount_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticDiscountUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaticDiscount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such discount in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: value out of range"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an automatic discount","tags":["Discounts"]}},"/automatic-discounts/{discount_id}/usage":{"get":{"description":"Orders that got it (a promotion, or a payment-method rule once the order\nwas charged with that method), their revenue and the discount it gave.","operationId":"getAutomaticDiscountUsage","parameters":[{"description":"Automatic discount id","in":"path","name":"discount_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountUsage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such discount in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"An automatic discount's usage","tags":["Discounts"]}},"/booking-package-plans":{"get":{"description":"What the store sells as packages of sessions, active or not.","operationId":"listBookingPackagePlans","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingPackagePlan"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Package plans","tags":["Bookings"]},"post":{"description":"`service_id`, `name` and `sessions` are required. `sold_online` puts it on\nthe booking page, paid by Pix.","operationId":"createBookingPackagePlan","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlanCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlan"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_*` or `service_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a package plan","tags":["Bookings"]}},"/booking-package-plans/{plan_id}":{"delete":{"description":"Packages already sold stay (they keep their own name and sessions).","operationId":"deleteBookingPackagePlan","parameters":[{"description":"Package plan id","in":"path","name":"plan_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_plan_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a package plan","tags":["Bookings"]},"get":{"operationId":"getBookingPackagePlan","parameters":[{"description":"Plan id","in":"path","name":"plan_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlan"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A package plan","tags":["Bookings"]},"patch":{"description":"Fields left out stay. Packages already sold keep what they were sold with.","operationId":"updateBookingPackagePlan","parameters":[{"description":"Package plan id","in":"path","name":"plan_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlanUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlan"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_plan_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_*`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a package plan","tags":["Bookings"]}},"/booking-packages":{"get":{"description":"Clients' packages, newest first (up to 500), with the sessions spent.","operationId":"listBookingPackages","parameters":[{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"`pending_payment`, `active` or `cancelled`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"description":"Name, e-mail or phone.","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingPackage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Packages","tags":["Bookings"]},"post":{"description":"For a client who paid at the counter or by other means: active at once.\nThe client's e-mail, if any, gets the code.","operationId":"issueBookingPackage","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackageIssue"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedPackage"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_plan_not_found` or `service_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_*`, `contact_required`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Issue a package","tags":["Bookings"]}},"/booking-packages/{package_id}":{"get":{"operationId":"getBookingPackage","parameters":[{"description":"Package id","in":"path","name":"package_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A package","tags":["Bookings"]}},"/booking-packages/{package_id}/cancellation":{"post":{"description":"It can no longer be booked with; bookings already made stay. Refunding\nwhat was paid is done on its order, if it has one.","operationId":"cancelBookingPackage","parameters":[{"description":"Package id","in":"path","name":"package_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a package","tags":["Bookings"]}},"/booking-providers":{"get":{"description":"Every provider of the store with the services they deliver and their\nweekly hours.","operationId":"listBookingProviders","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingProvider"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Providers","tags":["Bookings"]},"post":{"description":"`name` is required; the zone defaults to `America/Sao_Paulo`. A new\nprovider has no hours, so nobody can book them until `hours` is set.","operationId":"createBookingProvider","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProviderCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProvider"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_name`, `invalid_email`, `invalid_time_zone` or `service_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a provider","tags":["Bookings"]}},"/booking-providers/{provider_id}":{"delete":{"description":"Only one nobody ever booked; otherwise switch them off (`active: false`).","operationId":"deleteBookingProvider","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_in_use`: they have bookings; switch them off instead"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a provider","tags":["Bookings"]},"get":{"operationId":"getBookingProvider","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProvider"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A provider","tags":["Bookings"]},"patch":{"description":"Fields left out stay as they are; `service_ids` replaces the list. A new\nzone moves the weekly hours with it: the same wall-clock times, there.","operationId":"updateBookingProvider","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProviderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProvider"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_*` or `service_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a provider","tags":["Bookings"]}},"/booking-providers/{provider_id}/time-off":{"get":{"description":"Spans that have not ended yet, soonest first.","operationId":"listBookingTimeOff","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingTimeOff"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A provider's time off","tags":["Bookings"]},"post":{"description":"Nobody can book the provider inside it. Bookings already there stay; the\nteam moves or cancels them.","operationId":"createBookingTimeOff","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingTimeOffInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingTimeOff"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_span`: the end is not after the start, or the span is over a year"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Block a span","tags":["Bookings"]}},"/booking-providers/{provider_id}/time-off/{time_off_id}":{"delete":{"operationId":"deleteBookingTimeOff","parameters":[{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Time off id","in":"path","name":"time_off_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_not_found` or `time_off_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove a blocked span","tags":["Bookings"]}},"/booking-services":{"get":{"description":"Every service of the store, active or not, in the order the team set.","operationId":"listBookingServices","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingService"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Services","tags":["Bookings"]},"post":{"description":"`name` and `duration_min` are required. Defaults: no buffer, free, two\nhours of notice, 60 days ahead, 24 hours to cancel, a start every 30\nminutes, active.","operationId":"createBookingService","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingServiceCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingService"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_name`, `invalid_duration` and the other `invalid_*` codes, or `provider_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a service","tags":["Bookings"]}},"/booking-services/{service_id}":{"delete":{"description":"Only a service nobody ever booked. One with bookings is switched off\ninstead (`active: false`), so its history stays.","operationId":"deleteBookingService","parameters":[{"description":"Service id","in":"path","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_in_use`: it has bookings; switch it off instead"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a service","tags":["Bookings"]},"get":{"operationId":"getBookingService","parameters":[{"description":"Service id","in":"path","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingService"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A service","tags":["Bookings"]},"patch":{"description":"Fields left out stay as they are; `provider_ids` replaces the list.\nBookings already made keep the name and price they were made with.","operationId":"updateBookingService","parameters":[{"description":"Service id","in":"path","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingServiceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingService"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_*` or `provider_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a service","tags":["Bookings"]}},"/booking-slots":{"get":{"description":"The start times a client could book for a service, as the booking page\nwould offer them: inside the provider's hours, clear of other bookings and\ntime off, and outside the notice period. `except_booking` is for moving one.","operationId":"listBookingSlots","parameters":[{"in":"query","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only this provider's times.","in":"query","name":"provider_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"First local day (in each provider's zone), `YYYY-MM-DD`.","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"Last local day, at most 62 days after `from`.","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"A booking being moved: its own place does not hold it, so times that\noverlap its current one are offered.","in":"query","name":"except_booking","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingSlot"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_range`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Times on offer","tags":["Bookings"],"x-admin-operation":"getBookingAvailability"}},"/booking-waitlist":{"get":{"description":"Clients waiting for a time, by day then arrival (up to 500).","operationId":"listBookingWaitlist","parameters":[{"in":"query","name":"service_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"From this day on (default: today).","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"`waiting` (default), `notified` or `all`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WaitlistEntry"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Waitlist","tags":["Bookings"]},"post":{"description":"For a client who called. They are e-mailed when a time opens that day.","operationId":"addToBookingWaitlist","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistEntryCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistEntry"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`waitlist_disabled`, `invalid_day`, `contact_required` and the other contact codes"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add someone to the waitlist","tags":["Bookings"]}},"/booking-waitlist/{entry_id}":{"delete":{"operationId":"removeFromBookingWaitlist","parameters":[{"description":"Waitlist entry id","in":"path","name":"entry_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`waitlist_entry_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove someone from the waitlist","tags":["Bookings"]}},"/bookings":{"get":{"description":"Bookings starting in a window of at most 62 days, soonest first (up to\n1000).","operationId":"listBookings","parameters":[{"description":"Bookings starting at or after this instant. Default: a day ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":["string","null"]}},{"description":"Bookings starting before this instant. Default: a week after `from`.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":["string","null"]}},{"in":"query","name":"provider_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"`pending_payment`, `confirmed`, `completed`, `no_show` or `cancelled`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_range`: the window is longer than 62 days"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Bookings","tags":["Bookings"]},"post":{"description":"Books `starts_at` with the provider (or the first free one) and e-mails\nthe client the confirmation. The team may book outside the provider's\nhours and inside the notice period; two bookings of one provider can\nnever overlap. The client becomes a customer of the store.\n\n**With `every_weeks`:** Book a repeating series. The same time every `every_weeks` weeks (the provider's wall clock), with\nthe first session's provider. The first must be bookable; a later date\nthat is not (time off, taken) is skipped and listed in `skipped`.","operationId":"createBooking","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/BookingCreate"},{"not":{"required":["every_weeks"]}}]},{"description":"A weekly series of bookings: the first at `starts_at`, then every `every_weeks` weeks, `count` in all.","properties":{"consent":{"description":"The client agreed to the use of sensitive answers.","type":"boolean"},"count":{"description":"2 to 52 sessions, the first included.","format":"int32","type":"integer"},"customer_email":{"description":"An e-mail or a phone is required.","type":["string","null"]},"customer_name":{"type":"string"},"customer_phone":{"type":["string","null"]},"every_weeks":{"description":"Every 1 to 8 weeks.","format":"int32","type":"integer"},"intake":{"description":"Answers to the service's intake form, if the client gave them.","items":{"$ref":"#/components/schemas/IntakeAnswerInput"},"type":"array"},"notes":{"type":["string","null"]},"package_id":{"description":"Spend a session of this package (one of the client's, for this service).","format":"uuid","type":["string","null"]},"provider_id":{"description":"Empty: the first provider of the service who is free.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"},"starts_at":{"format":"date-time","type":"string"}},"required":["service_id","starts_at","customer_name","every_weeks","count"],"title":"Book a repeating series","type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Booking"},{"$ref":"#/components/schemas/BookedSeries"}]}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`class_full`, `already_booked` or `package_used_up`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_name`, `invalid_email`, `invalid_phone`, `contact_required`, `service_inactive`, `no_provider`, `intake_required`, `consent_required` or a `package_*` code"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Book a client","tags":["Bookings"]}},"/bookings/{booking_id}":{"get":{"operationId":"getBooking","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A booking","tags":["Bookings"]}},"/bookings/{booking_id}/cancellation":{"post":{"description":"Frees the time and e-mails the client. The team can cancel any time.","operationId":"cancelBooking","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBooking"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`: it is already closed or cancelled"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a booking","tags":["Bookings"]}},"/bookings/{booking_id}/completion":{"post":{"description":"For a confirmed booking whose time has come.","operationId":"completeBooking","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state` or `not_started`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Mark a booking as done","tags":["Bookings"]}},"/bookings/{booking_id}/intake":{"get":{"description":"What the client answered when booking. Only with `bookings.notes`, or for\nthe provider linked to the member; every read is audited.","operationId":"getBookingIntake","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingIntake"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Intake answers","tags":["Bookings"]}},"/bookings/{booking_id}/no-show":{"post":{"description":"For a confirmed booking whose time has come and the client did not.","operationId":"markBookingNoShow","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state` or `not_started`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Mark a no-show","tags":["Bookings"]}},"/bookings/{booking_id}/notes":{"get":{"description":"Notes about a booking, oldest first. Only with `bookings.notes`, or for\nthe provider linked to the member; every read is audited.","operationId":"listBookingNotes","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_BookingNote"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Session notes","tags":["Bookings"]},"post":{"operationId":"createBookingNote","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingNoteInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingNote"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_note`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Write a session note","tags":["Bookings"]}},"/bookings/{booking_id}/notes/{note_id}":{"delete":{"description":"Only its author, or with `bookings.notes`.","operationId":"deleteBookingNote","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Note id","in":"path","name":"note_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_note_author`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`note_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a session note","tags":["Bookings"]},"patch":{"description":"Only its author, or with `bookings.notes`.","operationId":"updateBookingNote","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Note id","in":"path","name":"note_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingNoteInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingNote"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_note_author`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`note_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a session note","tags":["Bookings"]}},"/bookings/{booking_id}/rescheduling":{"post":{"description":"To another start with the same provider; e-mails the client. The team\nmay move it outside the provider's hours.","operationId":"rescheduleBooking","parameters":[{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduleBooking"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`booking_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slot_taken` or `invalid_state`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Move a booking","tags":["Bookings"]}},"/carts":{"get":{"description":"Most recently updated first. Storefront carts by default; pass\n`kind=quote` for carts built as quotes.","operationId":"listCarts","parameters":[{"in":"query","name":"status","required":false,"schema":{"description":"`open` (being filled), `abandoned` (no activity for a while; recovery\nmessages go out) or `converted` (became an order).","enum":["open","abandoned","converted"],"type":"string"}},{"description":"Defaults to `storefront`.","in":"query","name":"kind","required":false,"schema":{"description":"`storefront` (a shopper's cart) or `quote` (built at the counter and\nshared as a link; see Quotes).","enum":["storefront","quote"],"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CartSummary"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List carts","tags":["Carts"]}},"/carts/{cart_id}":{"get":{"description":"The cart with its lines, oldest line first.","operationId":"getCart","parameters":[{"description":"Cart id","in":"path","name":"cart_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such cart in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a cart","tags":["Carts"]}},"/categories":{"get":{"description":"Every category of the store by name, or only the children of\n`parent_id`, or only the top-level ones with `root_only=true`.","operationId":"listCategories","parameters":[{"description":"Only the direct children of this category.","in":"query","name":"parent_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only top-level categories. Ignored with `parent_id`.","in":"query","name":"root_only","required":false,"schema":{"type":"boolean"}},{"description":"Matches part of the name, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Category"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List categories","tags":["Categories"]},"post":{"operationId":"createCategory","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found`: the parent is not in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a category","tags":["Categories"]}},"/categories/{category_id}":{"delete":{"description":"Products lose the category; the products themselves are kept. Refused\nwhile the category has subcategories. Emits the `category.deleted`\nwebhook.","operationId":"deleteCategory","parameters":[{"description":"Category id","in":"path","name":"category_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_has_children`: delete or move its subcategories first"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a category","tags":["Categories"]},"get":{"operationId":"getCategory","parameters":[{"description":"Category id","in":"path","name":"category_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a category","tags":["Categories"]},"patch":{"description":"Renaming also changes the slug.","operationId":"updateCategory","parameters":[{"description":"Category id","in":"path","name":"category_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_not_found` (the category or the new parent)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, also when the parent would create a cycle"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a category","tags":["Categories"]}},"/collections":{"get":{"description":"By name.","operationId":"listCollections","parameters":[{"description":"Matches part of the name, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Collection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List collections","tags":["Collections"]},"post":{"description":"Emits the `collections.created` webhook.","operationId":"createCollection","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a collection","tags":["Collections"]}},"/collections/{collection_id}":{"delete":{"description":"The products are kept. Emits the `collections.deleted` webhook.","operationId":"deleteCollection","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`collection_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a collection","tags":["Collections"]},"get":{"operationId":"getCollection","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`collection_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a collection","tags":["Collections"]},"patch":{"description":"Renaming also changes the slug. Emits the `collections.updated` webhook\nand purges the collection's storefront cache.","operationId":"updateCollection","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`collection_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a collection","tags":["Collections"]}},"/collections/{collection_id}/products":{"get":{"description":"Ids and titles in collection order. For full rows use\n`GET /products?collection_id=`.","operationId":"listCollectionProducts","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CollectionProductEntry"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`collection_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a collection's products","tags":["Collections"]}},"/collections/{collection_id}/products/{product_id}":{"delete":{"operationId":"removeProductFromCollection","parameters":[{"in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, `collection_not_found`, or `not_found` when the product is not in the collection"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove a product from a collection","tags":["Collections"]},"put":{"description":"Idempotent.","operationId":"addProductToCollection","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}},{"in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Added"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, `collection_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add a product to a collection","tags":["Collections"]}},"/companies":{"get":{"description":"By name, with how many contacts each has and what they bought. Covers\n1,000 companies.","operationId":"listCompanies","parameters":[{"description":"Matches name, CNPJ (digits), domain or phone.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Company"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List companies","tags":["Companies"]},"post":{"description":"A domain also puts the store's contacts on it (without a company) in it.","operationId":"createCompany","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`company_document_exists`, `company_domain_exists`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a company","tags":["Companies"]}},"/companies/{company_id}":{"delete":{"description":"Its contacts stay, without a company.","operationId":"deleteCompany","parameters":[{"description":"Company id","in":"path","name":"company_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such company in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a company","tags":["Companies"]},"get":{"operationId":"getCompany","parameters":[{"description":"Company id","in":"path","name":"company_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such company in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a company","tags":["Companies"]},"patch":{"operationId":"updateCompany","parameters":[{"description":"Company id","in":"path","name":"company_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such company in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`company_document_exists`, `company_domain_exists`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a company","tags":["Companies"]}},"/conversation-labels":{"get":{"description":"The store's label catalog with how many open conversations carry each.\nTags used on conversations but missing from the catalog are added (gray)\nthe first time the catalog is read.","operationId":"listConversationLabels","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ConversationLabel"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List labels","tags":["Conversation Settings"]},"post":{"operationId":"createConversationLabel","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationLabelRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationLabel"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`label_exists`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a label","tags":["Conversation Settings"]}},"/conversation-labels/{label_id}":{"delete":{"description":"Removes it from the catalog and from every conversation.","operationId":"deleteConversationLabel","parameters":[{"description":"Label id","in":"path","name":"label_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such label"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a label","tags":["Conversation Settings"]},"patch":{"description":"Renaming a label renames it on every conversation that carries it.","operationId":"updateConversationLabel","parameters":[{"description":"Label id","in":"path","name":"label_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationLabelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationLabel"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such label"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`label_exists`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a label","tags":["Conversation Settings"]}},"/conversations":{"get":{"description":"","operationId":"listConversations","parameters":[{"description":"Only conversations in this status. Omit for every status. `open`\nincludes `pending` (handed over by the assistant, not taken yet):\nboth are waiting on the team.","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"description":"`me` (the caller), `unassigned`, or a user id.","in":"query","name":"assignee","required":false,"schema":{"type":"string"}},{"description":"Only conversations on this kind of channel.","in":"query","name":"channel_kind","required":false,"schema":{"$ref":"#/components/schemas/ConversationChannelKind"}},{"description":"Only conversations on this channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only conversations with this label.","in":"query","name":"tag","required":false,"schema":{"type":"string"}},{"in":"query","name":"priority","required":false,"schema":{"$ref":"#/components/schemas/ConversationPriority"}},{"description":"Only conversations with this customer.","in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only conversations with contact messages the team has not read.","in":"query","name":"unread","required":false,"schema":{"type":"boolean"}},{"description":"A team id, or `none` for conversations without a team.","in":"query","name":"team","required":false,"schema":{"type":"string"}},{"description":"Only conversations whose customer has waited longer than the\nstore's first-response target (SLA).","in":"query","name":"sla_breached","required":false,"schema":{"type":"boolean"}},{"description":"Free text over the contact's name, e-mail, phone, WhatsApp number\nand the messages.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Conversation"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_assignee`: `assignee` is not `me`, `unassigned` or a user id; `invalid_team`; `invalid_cursor`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List conversations","tags":["Conversations"]}},"/conversations/{conversation_id}":{"get":{"description":"The conversation with its internal notes, the matched customer and\ntheir latest orders. Messages are paged separately.","operationId":"getConversation","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a conversation","tags":["Conversations"]},"patch":{"description":"Change status (resolve, reopen, snooze), assignee, priority, labels,\nbot, contact details, the linked customer, the contact's origin or the\nlead stage. Linking a customer reads the origin again from their\nstorefront visits unless the team picked it, and clears an automatic\n`new` stage when they already bought. Publishes\n`conversation:updated`; resolving also emits the\n`conversations.resolved` event, turning the bot off hands over, and\nturning it on hands back (`conversations.handed_back`).","operationId":"updateConversation","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `snoozed_until` in the past, an assignee who is not on the store's team, `unassign` together with an assignee, or a customer of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a conversation","tags":["Conversations"]}},"/conversations/{conversation_id}/block":{"delete":{"description":"Lifts the team's block in WhatsApp and in Mobiari. An opt-out the person\nmade themselves stays (they turn offers back on with VOLTAR).","operationId":"unblockConversationContact","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_whatsapp`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `whatsapp_unblock_failed`: WhatsApp refused, the block stays so the team can retry"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Unblock the contact","tags":["Conversations"]},"put":{"description":"Blocks the conversation's WhatsApp number for real: WhatsApp stops\ndelivering their messages and calls, and Mobiari sends them nothing\n(order updates included) and ignores anything that still arrives. WhatsApp\nonly blocks people who wrote in the last 24 hours: otherwise the block\nholds in Mobiari only and `meta_synced` is false.","operationId":"blockConversationContact","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_whatsapp`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Block the contact","tags":["Conversations"]}},"/conversations/{conversation_id}/handback":{"post":{"description":"The assistant answers the customer again: `bot_active` turns on,\n`handed_over_at` is cleared, a system message records it and the\n`conversations.handed_back` event is emitted. When the customer's last\nmessage has no answer yet, the assistant answers it. The assignee is\nkept. Handing back a conversation the assistant already has changes\nnothing. `PATCH` with `bot_active: true` does the same.","operationId":"handBackConversation","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bot_disabled`: the store's assistant is off, nobody would answer"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Hand a conversation back to the AI","tags":["Conversations"]}},"/conversations/{conversation_id}/messages":{"get":{"description":"Newest first, paged by cursor: the first page is the latest `limit`\nmessages, `next_cursor` (or `before`) goes further back. Reverse a page\nto render it top to bottom.\n\nWith `after` (a message id) or `created_after` (a time) the order flips\nto oldest first and the page holds what came after it: use it to fetch\nwhat you missed while the WebSocket was down, following `next_cursor`\n(together with the same `after`) until `has_more` is false.\n\nInternal notes are not messages; they come with the conversation.","operationId":"listConversationMessages","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only messages older than this message: scroll back from it. Same as\nfollowing `next_cursor`.","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only messages newer than this message, **oldest first**: catch up\nafter a reconnect. Keep passing it with `cursor` to continue.","in":"query","name":"after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only messages created after this instant, oldest first (like\n`after`, when you have a time rather than a message).","in":"query","name":"created_after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ConversationMessage"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_cursor`, or `before` combined with `after`/`created_after` (`conflicting_parameters`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation, or the `before`/`after` message is not in it (`message_not_found`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a conversation's messages","tags":["Conversations"]},"post":{"description":"Posts a team message and delivers it on the conversation's channel\n(WhatsApp, e-mail, or the widget live). Answering takes the conversation\nover: the bot stops, the sender becomes the assignee if there is none,\nand a pending or snoozed conversation reopens.\n\nDelivery is asynchronous: the message comes back with\n`delivery_status` `sent`, and `message:updated` events on the WebSocket\nreport `delivered`, `read` or `failed` (with `delivery_error`).\n\n**WhatsApp 24-hour rule.** Meta accepts free-form messages only within\n24 hours of the contact's last message. Outside that window this call\nanswers 422 `whatsapp_window_closed` and nothing is stored; the\nconversation's `reply_window_expires_at` says when the window closes.\n\nSend an `Idempotency-Key` header: a retry after a lost response then\nreturns the first message instead of sending it twice.","operationId":"sendConversationMessage","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationReply"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageSent"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`empty_message`, `message_too_long` (over 4096 characters), or `whatsapp_window_closed` (details: `window_expired_at`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a reply","tags":["Conversations"]}},"/conversations/{conversation_id}/messages/{message_id}/attachments/{index}":{"get":{"description":"The file of a message attachment, streamed from where it lives\n(WhatsApp media or the e-mail mailbox). This is the `url` of the\nmessage's `attachments` entries; call it with the usual\n`Authorization` header.","operationId":"downloadConversationAttachment","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Message id","in":"path","name":"message_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The attachment's `index`","in":"path","name":"index","required":true,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/ConversationAttachmentFile"}},"application/pdf":{"schema":{"$ref":"#/components/schemas/ConversationAttachmentFile"}},"audio/*":{"schema":{"$ref":"#/components/schemas/ConversationAttachmentFile"}},"image/*":{"schema":{"$ref":"#/components/schemas/ConversationAttachmentFile"}},"video/*":{"schema":{"$ref":"#/components/schemas/ConversationAttachmentFile"}}},"description":"The file, with the content type it was sent with (`image/*`, `audio/*`, `video/*`, `application/pdf`, ...; `application/octet-stream` when unknown) and a `Content-Disposition` carrying its name"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such message or attachment"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `attachment_unavailable`: the provider did not return the file (WhatsApp media expires after 30 days)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download an attachment","tags":["Conversations"]}},"/conversations/{conversation_id}/notes":{"post":{"description":"A note only the team sees; it is never delivered to the contact.\nPublishes `note:new` to the agent WebSocket.","operationId":"createConversationNote","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNoteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNote"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty text"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add an internal note","tags":["Conversations"]}},"/conversations/{conversation_id}/notes/{note_id}":{"delete":{"operationId":"deleteConversationNote","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Note id","in":"path","name":"note_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such note on this conversation"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete an internal note","tags":["Conversations"]}},"/conversations/{conversation_id}/orders/{order_id}":{"delete":{"description":"The order was not sold in this conversation. It stays unlinked: a phone\nmatch never links it again. Attribution is redone.","operationId":"unlinkConversationOrder","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Unlinked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation in this store, or the order is not linked to it"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Unlink an order from the conversation","tags":["Conversations"]},"put":{"description":"\"Vincular pedido\": the order was sold in this conversation. Replaces any\nlink the order had (from the inbox, a phone match or the team); attribution\nis redone, and for an order paid in the last seven days a Meta Purchase\nnot sent yet goes out (to the WhatsApp ad's dataset when the conversation\ncame from a click-to-WhatsApp ad, unless an earlier attempt already fixed\nwhere the order's Purchase goes: that never changes).","operationId":"linkConversationOrder","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Linked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such conversation or order in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Link an order to the conversation","tags":["Conversations"]}},"/credit-accounts":{"get":{"description":"Gift cards and customer wallets, newest first.","operationId":"listCreditAccounts","parameters":[{"description":"`wallet` or `gift_card`.","in":"query","name":"kind","required":false,"schema":{"type":["string","null"]}},{"description":"Matches a gift card code, a customer's name or email, or a recipient.","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}},{"description":"Only accounts with something left to spend.","in":"query","name":"with_balance","required":false,"schema":{"type":["boolean","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CreditAccount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List credit accounts","tags":["Store credit"]},"post":{"description":"Makes a card with a fresh code and its full face value. The response\ncarries the code, which only the team sees: hand it to whoever receives it.","operationId":"createGiftCard","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueGiftCard"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccount"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_amount`, `invalid_expiry` or `invalid_email`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Issue a gift card","tags":["Store credit"],"x-admin-operation":"issueGiftCard"}},"/credit-accounts/{account_id}":{"get":{"operationId":"getCreditAccount","parameters":[{"description":"Credit account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccountDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`credit_account_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a credit account","tags":["Store credit"]}},"/credit-accounts/{account_id}/adjustments":{"post":{"operationId":"adjustCreditAccount","parameters":[{"description":"Credit account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustCredit"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`credit_account_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_amount`, `note_required` or `insufficient_balance` (`details.balance_cents`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Adjust an account's balance","tags":["Store credit"]}},"/credit-accounts/{account_id}/disabled":{"delete":{"operationId":"enableGiftCard","parameters":[{"description":"Credit account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`credit_account_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Enable a gift card","tags":["Store credit"]},"put":{"description":"A lost or misused card stops being spendable at once. Its balance is kept\nand can be spent again if the card is enabled.","operationId":"disableGiftCard","parameters":[{"description":"Credit account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccount"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`credit_account_not_found` (also for a wallet)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Disable a gift card","tags":["Store credit"]}},"/customer-groups":{"get":{"description":"By name, with how many customers and discounts each has.","operationId":"listCustomerGroups","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CustomerGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List customer groups","tags":["Customers"]},"post":{"operationId":"createCustomerGroup","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`group_name_taken`, or `too_many_groups` (50 per store)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a customer group","tags":["Customers"]}},"/customer-groups/{group_id}":{"delete":{"description":"Its customers are left without a group, and the discounts limited to it are deleted with it (so none becomes\npublic by accident).","operationId":"deleteCustomerGroup","parameters":[{"description":"Customer group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such group in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a customer group","tags":["Customers"]},"get":{"description":"With how many customers and discounts it has.","operationId":"getCustomerGroup","parameters":[{"description":"Group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such group in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a customer group","tags":["Customers"]},"patch":{"operationId":"renameCustomerGroup","parameters":[{"description":"Customer group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such group in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`group_name_taken`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Rename a customer group","tags":["Customers"]}},"/customer-groups/{group_id}/wholesale":{"put":{"description":"Replaces all of them at once. Its customers' open carts are priced and checked by the new terms the next time\nthey are read. Giving or taking a price list also needs `discounts.write`.","operationId":"updateCustomerGroupWholesale","parameters":[{"description":"Customer group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupWholesaleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such group in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an unknown price list or collection, a limit out of range, or a limited catalog without collections"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a group's price list and wholesale rules","tags":["Customers"]}},"/customer-tags":{"get":{"description":"Every tag the store's customers have, most used first.","operationId":"listCustomerTags","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CustomerTag"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List customer tags","tags":["Customers"]}},"/customers":{"get":{"description":"Newest first (`created_at`, then `id`). Each row carries its `lifecycle` stage; `acquisition`\nis only on the customer record.","operationId":"listCustomers","parameters":[{"description":"Matches name (first, last or full), e-mail, phone, company or\ndocument. Digits in the query also match phone and document\nignoring punctuation, so `11 98765-4321` finds `+5511987654321`.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only customers with this tag.","in":"query","name":"tag","required":false,"schema":{"type":"string"}},{"in":"query","name":"lifecycle","required":false,"schema":{"description":"Where a customer is in their relationship with the store, derived from\ntheir paid orders (`infra::customers::classify_lifecycle`):\n\n| Stage | Meaning |\n| --- | --- |\n| `lead` | No paid order yet. |\n| `new` | One order, within 60 days. |\n| `active` | Last order within 60 days. |\n| `vip` | Spent at least the store's 90th percentile, last order within 180 days. |\n| `at_risk` | Last order 61 to 180 days ago. |\n| `dormant` | Last order more than 180 days ago. |","enum":["lead","new","active","vip","at_risk","dormant"],"type":"string"}},{"description":"`me`, `unassigned`, or a team member's user id.","in":"query","name":"owner","required":false,"schema":{"type":"string"}},{"description":"Only the members of this e-mail segment.","in":"query","name":"segment_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only the contacts of this company.","in":"query","name":"company_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"field","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Customer"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_cursor`, `invalid_limit` or `invalid_offset`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List customers","tags":["Customers"]},"post":{"description":"Emits the `customers.created` webhook.","operationId":"createCustomer","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_email_exists`: the e-mail belongs to another customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_document`, `invalid_phone`, `invalid_state_registration`, `state_registration_required` (a contributor without one)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a customer","tags":["Customers"]}},"/customers/{customer_id}":{"delete":{"description":"Removes the customer with their addresses, identities and timeline;\ntheir orders stay, without a customer. For an LGPD erasure that keeps\nthe order history anonymized, use `POST /customers/{customer_id}/erasure`. Emits the\n`customers.deleted` webhook.","operationId":"deleteCustomer","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_in_use`: records that cannot lose their customer still point at it; `customer_has_credit`: the customer still has store credit"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a customer","tags":["Customers"]},"get":{"description":"The customer record: profile, lifecycle stage, first-touch acquisition,\nsaved addresses, the 50 most recent timeline entries and the 50 most\nrecent orders with their payment method and shipments. To find the\ncustomer of an order, read the order's `customer_id`.","operationId":"getCustomer","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a customer","tags":["Customers"]},"patch":{"description":"Partial: omitted fields keep their value. Emits the `customers.updated`\nwebhook.","operationId":"updateCustomer","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_email_exists`: the e-mail belongs to another customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_document`, `invalid_phone`, `invalid_state_registration`, `state_registration_required` (a contributor without one)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a customer","tags":["Customers"]}},"/customers/{customer_id}/addresses":{"get":{"description":"Default addresses first, then newest.","operationId":"listCustomerAddresses","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CustomerAddress"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a customer's addresses","tags":["Customers"]},"post":{"description":"With `is_default: true`, the customer's previous default address of the\nsame type stops being the default.","operationId":"createCustomerAddress","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddressCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddress"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_postal_code`, `invalid_state` (a Brazilian address)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add an address to a customer","tags":["Customers"]}},"/customers/{customer_id}/addresses/{address_id}":{"delete":{"operationId":"deleteCustomerAddress","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Address id","in":"path","name":"address_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such address for this customer"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a customer address","tags":["Customers"]},"patch":{"description":"Partial: omitted fields keep their value. `is_default: true` clears the\nprevious default of the (resulting) address type.","operationId":"updateCustomerAddress","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Address id","in":"path","name":"address_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddressUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAddress"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such address for this customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_postal_code`, `invalid_state` (a Brazilian address)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a customer address","tags":["Customers"]}},"/customers/{customer_id}/consent":{"put":{"description":"Staff records consent obtained outside the storefront (verbally at the\ncounter, a WhatsApp opt-in) with where it came from and a note on how it\nwas given, kept in the consent ledger with who recorded it. Granting\nlifts an earlier opt-out of the channel; revoking stops marketing and\nsurveys on it.","operationId":"setCustomerConsent","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentReq"}}},"required":true},"responses":{"204":{"description":"Consent recorded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`consent_note_required`: an opt-in needs a note on how it was given"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Record a customer's consent","tags":["Customers"]}},"/customers/{customer_id}/credit":{"get":{"operationId":"getCustomerCredit","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a customer's store credit","tags":["Store credit"]},"post":{"description":"Adds to the customer's wallet, made on first use. The customer spends it\nat checkout while signed in.","operationId":"grantCustomerCredit","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCredit"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccount"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_amount` or `note_required`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Give a customer store credit","tags":["Store credit"]}},"/customers/{customer_id}/erasure":{"post":{"description":"Scrubs personal fields from the customer and every record that holds\nthem, deletes addresses, identities, notes and subscriptions, and adds\nthe address to the suppression list so the person is never e-mailed\nagain. Orders, charges and fiscal documents stay, as the law requires, pointing\nat the anonymized record. Cannot be undone.","operationId":"eraseCustomerData","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EraseReq"}]}}},"description":"Optional reason, kept in the audit log"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EraseResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Erase a customer's personal data (LGPD)","tags":["Customers"]}},"/customers/{customer_id}/interactions":{"get":{"description":"","operationId":"listCustomerInteractions","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CustomerInteraction"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a customer's timeline entries","tags":["Customers"]},"post":{"description":"A note, call, e-mail or meeting logged by the signed-in user, who is\nrecorded as its author.","operationId":"createCustomerInteraction","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInteractionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInteraction"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty interaction_type"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Log a timeline entry","tags":["Customers"]}},"/customers/{customer_id}/interactions/{interaction_id}":{"delete":{"description":"Its author can; so can whoever may delete customers. System events\ncannot be deleted.","operationId":"deleteCustomerInteraction","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Interaction id","in":"path","name":"interaction_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`interaction_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`system_interaction`: a system event"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a timeline entry","tags":["Customers"]},"patch":{"description":"Its author can; so can whoever may delete customers. System events\ncannot be edited.","operationId":"updateCustomerInteraction","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Interaction id","in":"path","name":"interaction_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInteractionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInteraction"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`interaction_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`system_interaction`: a system event"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Edit a timeline entry","tags":["Customers"]}},"/customers/{customer_id}/loyalty":{"get":{"operationId":"getCustomerLoyalty","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLoyalty"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a customer's points and referrals","tags":["Loyalty"]}},"/customers/{customer_id}/loyalty/adjustments":{"post":{"operationId":"adjustCustomerPoints","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustPoints"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLoyalty"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_points`, `note_required` or `insufficient_points` (`details.available_points`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Adjust a customer's points","tags":["Loyalty"]}},"/customers/{customer_id}/loyalty/redemptions":{"post":{"description":"For the team, on the customer's behalf (they can do it themselves in\ntheir account). The credit goes to the customer's wallet.","operationId":"redeemCustomerPoints","parameters":[{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemPoints"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLoyalty"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`loyalty_off`, `invalid_points` (`details.step_points`) or `insufficient_points` (`details.available_points`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Turn a customer's points into store credit","tags":["Loyalty"]}},"/customers/{customer_id}/merges":{"post":{"description":"Every record pointing at `from_customer_id` (orders, conversations,\ne-mail activity, identities, consent) is repointed to the customer in\nthe path, profile gaps are filled from the duplicate, tags and consent\nare unioned, and the duplicate is deleted. The merge is recorded in the\naudit log with a snapshot of the deleted record.","operationId":"mergeCustomers","parameters":[{"description":"The customer to keep","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeReq"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Either customer is not in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`same_customer`: both ids are the same"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Merge a duplicate into a customer","tags":["Customers"]}},"/deals":{"get":{"description":"Open deals first, by stage change, newest first; then the closed ones by\nclose time. Covers 500 deals, so the closed ones are the first to be cut.","operationId":"listDeals","parameters":[{"in":"query","name":"pipeline_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"stage_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`open` (default), `won`, `lost` or `all`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"`me`, `unassigned`, or a user id.","in":"query","name":"owner","required":false,"schema":{"type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"company_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the title.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Deal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List deals","tags":["Deals"]},"post":{"operationId":"createDeal","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deal"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a title out of range, a stage outside the pipeline, an owner outside the team or a record of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a deal","tags":["Deals"]}},"/deals/{deal_id}":{"delete":{"operationId":"deleteDeal","parameters":[{"description":"Deal id","in":"path","name":"deal_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such deal in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a deal","tags":["Deals"]},"get":{"operationId":"getDeal","parameters":[{"description":"Deal id","in":"path","name":"deal_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such deal in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a deal","tags":["Deals"]},"patch":{"description":"Edits title, value, expected close date, owner and links. Use the move\ncall to change its stage.","operationId":"updateDeal","parameters":[{"description":"Deal id","in":"path","name":"deal_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such deal in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a deal","tags":["Deals"]}},"/deals/{deal_id}/stage-changes":{"post":{"description":"Puts it in another stage of its pipeline. A won or lost stage closes it, an\nopen stage reopens it. Emits `deals.stage_changed`, and `deals.won` or\n`deals.lost` when it closes.","operationId":"changeDealStage","parameters":[{"description":"Deal id","in":"path","name":"deal_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealStageChange"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such deal in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a stage outside the deal's pipeline"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Move a deal","tags":["Deals"],"x-admin-operation":"moveDeal"}},"/discount-code-batches":{"get":{"description":"Newest first, with how many codes were used and handed out.","operationId":"listDiscountCodeBatches","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DiscountCodeBatch"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List batches of single-use codes","tags":["Discounts"]},"post":{"description":"Creates `quantity` unique codes (`PREFIX-XXXXXXXX`) that copy the\ntemplate code's value, conditions, dates and state, each valid for one\norder. They are left out of the code list unless it is filtered by\n`batch_id`; export them with `exportDiscountCodeBatch`.","operationId":"createDiscountCodeBatch","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeBatchCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeBatch"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such template code in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a quantity or prefix out of range"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Generate single-use codes","tags":["Discounts"]}},"/discount-codes":{"get":{"description":"Newest first.","operationId":"listDiscountCodes","parameters":[{"description":"Matches part of the code, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only active (`true`) or inactive (`false`) codes.","in":"query","name":"is_active","required":false,"schema":{"type":"boolean"}},{"description":"Only the codes of this batch. Without it, codes generated in a batch\nare left out of the list.","in":"query","name":"batch_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DiscountCode"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List discount codes","tags":["Discounts"]},"post":{"description":"Emits the `discount.created` webhook.","operationId":"createDiscountCode","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCode"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`discount_code_exists`: the store already has this code"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a discount code","tags":["Discounts"]}},"/discount-codes/{code_id}":{"delete":{"description":"A code that orders already used cannot be deleted (their records point\nat it): deactivate it instead. Emits the `discount.deleted` webhook.","operationId":"deleteDiscountCode","parameters":[{"description":"Discount code id","in":"path","name":"code_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such code in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`discount_code_in_use`: orders used this code; deactivate it instead"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a discount code","tags":["Discounts"]},"get":{"operationId":"getDiscountCode","parameters":[{"description":"Discount code id","in":"path","name":"code_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCode"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such code in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a discount code","tags":["Discounts"]},"patch":{"description":"Partial: omitted fields keep their value, an explicit `null` clears a\nnullable one. Emits the `discount.updated` webhook.","operationId":"updateDiscountCode","parameters":[{"description":"Discount code id","in":"path","name":"code_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCode"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such code in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`discount_code_exists`: the store already has this code"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a discount code","tags":["Discounts"]}},"/discount-codes/{code_id}/usage":{"get":{"description":"Orders that used it, their revenue and the discount it gave.","operationId":"getDiscountCodeUsage","parameters":[{"description":"Discount code id","in":"path","name":"code_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountUsage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such code in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A discount code's usage","tags":["Discounts"]}},"/event-types":{"get":{"description":"Every domain event with its payload keys, for webhook subscriptions and\nworkflow triggers. With `store_id`, also how many workflows, webhooks\nand team alerts listen to each in that store.","operationId":"listEventTypes","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_EventType"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the event catalog","tags":["Events"],"x-admin-operation":"getEventCatalog"}},"/events":{"get":{"description":"The store's domain events (the outbox that feeds webhooks, workflows\nand team alerts), newest first, with their delivery status.","operationId":"listEvents","parameters":[{"description":"Only events of this type, e.g. `orders.paid`.","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Event"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List store events","tags":["Events"],"x-admin-operation":"listStoreEvents"}},"/fiscal-corrections/{correction_id}/pdf":{"get":{"description":"To staple to the DANFE before the goods leave.","operationId":"downloadFiscalCorrectionPdf","parameters":[{"description":"Correction id","in":"path","name":"correction_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"CC-e PDF"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_correction_not_registered`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Print a carta de correção (PDF).","tags":["Fiscal"]}},"/fiscal-corrections/{correction_id}/status-check":{"post":{"description":"Queries the note at SEFAZ: the correction becomes `registered` when its\nsequence is there, `failed` otherwise. Other states come back as they\nare.","operationId":"checkFiscalCorrectionStatus","parameters":[{"description":"Correction id","in":"path","name":"correction_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalCorrection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `sefaz_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Settle a carta de correção whose answer was lost.","tags":["Fiscal"],"x-admin-operation":"refreshFiscalCorrection"}},"/fiscal-corrections/{correction_id}/xml":{"get":{"description":"The procEventoNFe (the signed event with SEFAZ's answer) once\nregistered.","operationId":"downloadFiscalCorrectionXml","parameters":[{"description":"Correction id","in":"path","name":"correction_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/xml":{}},"description":"XML file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download a carta de correção's XML.","tags":["Fiscal"]}},"/fiscal-documents":{"get":{"operationId":"listFiscalDocuments","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"environment","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Only the notes of this issuer (CNPJ).","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FiscalDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List NF-e documents.","tags":["Fiscal"]}},"/fiscal-documents/{document_id}":{"get":{"operationId":"getFiscalDocument","parameters":[{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Read an NF-e document and its SEFAZ exchanges.","tags":["Fiscal"]}},"/fiscal-documents/{document_id}/danfe":{"get":{"operationId":"downloadFiscalDocumentDanfe","parameters":[{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"DANFE PDF"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_not_authorized`: only authorized or cancelled documents have a DANFE"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download the DANFE (PDF).","tags":["Fiscal"]}},"/fiscal-documents/{document_id}/receipt":{"get":{"description":"The same receipt as the DANFE, for a thermal printer: code page PC860,\nnative QR Code, partial cut. For devices that cannot render a PDF.","operationId":"downloadFiscalDocumentReceipt","parameters":[{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Paper width in millimeters: `58` (32 columns) or `80` (48 columns). Default 58.","in":"query","name":"width","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/octet-stream":{}},"description":"ESC/POS bytes"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown width, or the document is not an NFC-e"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_not_authorized`: only authorized or cancelled documents have a receipt"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download the NFC-e as ESC/POS bytes.","tags":["Fiscal"]}},"/fiscal-documents/{document_id}/status-check":{"post":{"description":"Retries a document without a verdict, or detects a cancellation done\nelsewhere.","operationId":"checkFiscalDocumentStatus","parameters":[{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `sefaz_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reconcile a document with SEFAZ.","tags":["Fiscal"],"x-admin-operation":"refreshFiscalDocument"}},"/fiscal-documents/{document_id}/xml":{"get":{"description":"The nfeProc (with SEFAZ's protocol) once authorized; the cancellation\nevent with `kind=cancel`.","operationId":"downloadFiscalDocumentXml","parameters":[{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`nfe` (default: nfeProc when authorized, else the signed NF-e) or\n`cancel` (procEventoNFe of the cancellation).","in":"query","name":"kind","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/xml":{}},"description":"XML file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download the NF-e XML.","tags":["Fiscal"]}},"/fiscal-voidings":{"get":{"operationId":"listFiscalVoidings","parameters":[{"description":"","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FiscalVoiding"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List number voidings (inutilizações).","tags":["Fiscal"]},"post":{"operationId":"createFiscalVoiding","parameters":[{"description":"","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalVoidingCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalVoiding"}}},"description":"Recorded; `status` says whether SEFAZ accepted it"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_number_in_use`, `fiscal_invalid_range`, `fiscal_invalid_justification`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Void a range of unused numbers (inutilização).","tags":["Fiscal"]}},"/form-submissions/{submission_id}":{"delete":{"operationId":"deleteFormSubmission","parameters":[{"description":"Submission id","in":"path","name":"submission_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a submission.","tags":["Forms"],"x-admin-operation":"deleteStoreFormSubmission"},"patch":{"operationId":"updateFormSubmission","parameters":[{"description":"Submission id","in":"path","name":"submission_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFormSubmissionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFormSubmission"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Mark a submission read, archived or spam.","tags":["Forms"],"x-admin-operation":"updateStoreFormSubmission"}},"/forms":{"get":{"operationId":"listForms","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Form"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the store's forms.","tags":["Forms"],"x-admin-operation":"listStoreForms"},"post":{"operationId":"createForm","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFormInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`form_slug_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` with `details.fields`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a form.","tags":["Forms"],"x-admin-operation":"createStoreForm"}},"/forms/{form_id}":{"delete":{"operationId":"deleteForm","parameters":[{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a form and its submissions.","tags":["Forms"],"x-admin-operation":"deleteStoreForm"},"get":{"operationId":"getForm","parameters":[{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"One form.","tags":["Forms"],"x-admin-operation":"getStoreForm"},"put":{"description":"Submissions keep the values they were sent with; removing a field does\nnot touch them.","operationId":"updateForm","parameters":[{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFormInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`form_slug_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` with `details.fields`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Replace a form.","tags":["Forms"],"x-admin-operation":"updateStoreForm"}},"/forms/{form_id}/submissions":{"get":{"operationId":"listFormSubmissions","parameters":[{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`new`, `read`, `archived` or `spam`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StoreFormSubmission"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a form's submissions, newest first.","tags":["Forms"],"x-admin-operation":"listStoreFormSubmissions"}},"/help-articles":{"get":{"description":"Most recently edited first.","operationId":"listHelpArticles","parameters":[{"in":"query","name":"collection_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/KbArticleStatus"}},{"description":"Matches title and text.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_HelpArticleSummary"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List knowledge base articles","tags":["Knowledge Base"],"x-admin-operation":"listKbArticles"},"post":{"description":"A published article is indexed in the background (`indexed_at` fills\nin when the bot can read it).","operationId":"createHelpArticle","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpArticleCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpArticle"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a collection of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a knowledge base article","tags":["Knowledge Base"],"x-admin-operation":"createKbArticle"}},"/help-articles/{article_id}":{"delete":{"operationId":"deleteHelpArticle","parameters":[{"description":"Article id","in":"path","name":"article_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such article in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a knowledge base article","tags":["Knowledge Base"],"x-admin-operation":"deleteKbArticle"},"get":{"operationId":"getHelpArticle","parameters":[{"description":"Article id","in":"path","name":"article_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpArticle"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such article in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a knowledge base article","tags":["Knowledge Base"],"x-admin-operation":"getKbArticle"},"patch":{"description":"Re-indexes it in the background when published.","operationId":"updateHelpArticle","parameters":[{"description":"Article id","in":"path","name":"article_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpArticleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpArticle"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such article in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a collection of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a knowledge base article","tags":["Knowledge Base"],"x-admin-operation":"updateKbArticle"}},"/help-collections":{"get":{"description":"Ordered by position, then name.","operationId":"listHelpCollections","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_KbCollection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List knowledge base collections","tags":["Knowledge Base"],"x-admin-operation":"listKbCollections"},"post":{"operationId":"createHelpCollection","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbCollectionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbCollection"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: missing name"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a knowledge base collection","tags":["Knowledge Base"],"x-admin-operation":"createKbCollection"}},"/help-collections/{collection_id}":{"delete":{"description":"Its articles stay, without a collection.","operationId":"deleteHelpCollection","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such collection in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a knowledge base collection","tags":["Knowledge Base"],"x-admin-operation":"deleteKbCollection"},"patch":{"operationId":"updateHelpCollection","parameters":[{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbCollectionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbCollection"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such collection in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: missing name"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a knowledge base collection","tags":["Knowledge Base"],"x-admin-operation":"updateKbCollection"}},"/inventory-adjustments":{"post":{"description":"Changes the units on hand at one location by a signed `delta`, or sets\nthem to an absolute count with `set_to`, with a reason and an optional\nnote. Writes an `adjustment` entry to the ledger and answers with the\nvariant's new levels. Emits the `inventory.updated` webhook\n(`inventory.out_of_stock` / `inventory.low_stock` too when the location\nreaches 0 / 5 or fewer).\n\nSafe on a flaky network: send an `Idempotency-Key` and retry with the\nsame key until you get an answer; a `set_to` is idempotent even without\none.\n\nRefused while an ERP owns the store's stock (409\n`inventory_managed_externally`, unless `force: true`) and for kits\n(409 `logical_stock_readonly`).\n\n**With `items`:** Adjust stock in bulk. Up to 500 adjustments at one location in one transaction: all apply or\nnone do. Each line is a `delta` or a `set_to`, like `adjustVariantStock`.\nSend an `Idempotency-Key`.","operationId":"adjustVariantStock","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"description":"A manual stock adjustment: exactly one of `delta` and `set_to`.","properties":{"delta":{"description":"Signed change to the units on hand, e.g. `-2` for two broken units.\nNot idempotent: send an `Idempotency-Key` so a retry cannot apply it\ntwice. May not take on-hand below zero.","format":"int32","type":["integer","null"]},"force":{"description":"Write even though an ERP owns this store's stock (see\n`VariantStock.stock_owner`). Use for a variant the ERP does not know.","type":"boolean"},"location_id":{"description":"Location to adjust. Defaults to the store's default location. Required\nwith `set_to` when the variant holds stock at more than one location.","format":"uuid","type":["string","null"]},"loss_note":{"description":"A loss (`damaged`, `lost`, `theft`, `expired`) that takes units out:\nissue the NF-e de baixa de estoque (CFOP 5.927) with it. Follows the\nlocation's issuer setting `issue_loss_notes`: `ask` issues it only\nwhen this is true, `always` always, `off` never.","type":["boolean","null"]},"note":{"description":"Free text shown next to the reason in the history.","type":["string","null"]},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdjustReason","description":"Why. Defaults to `correction`."}]},"set_to":{"description":"Absolute count of units on hand at the location, e.g. what a shelf\ncount found. Idempotent by nature. The ledger records the difference.","format":"int32","minimum":0,"type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},{"not":{"required":["items"]}}]},{"properties":{"force":{"type":"boolean"},"items":{"description":"1 to 500 lines.","items":{"$ref":"#/components/schemas/BulkStockAdjustItem"},"type":"array"},"location_id":{"description":"Defaults to the store's default location.","format":"uuid","type":["string","null"]},"note":{"type":["string","null"]},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdjustReason","description":"Applies to every line. Defaults to `correction`."}]}},"required":["items"],"title":"Adjust stock in bulk","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StockAdjustResult"},{"$ref":"#/components/schemas/BulkStockAdjustResult"}]}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` (a negative `delta` larger than the units on hand; `details.on_hand`), `multiple_locations` (`set_to` without `location_id` on a variant stocked in several places), `inventory_managed_externally` (`details.owner`, `details.owner_name`), `logical_stock_readonly` (a kit; `details.max_shippable`, `details.limiting_sku`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ambiguous_adjustment` (both or neither of `delta` and `set_to`), `location_not_in_store`, `no_inventory_location` (the store has no active location), `validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Adjust a variant's stock","tags":["Inventory"]}},"/inventory-levels":{"get":{"description":"One row per stocked variant, variants and components together (`role`\nnarrows). Quantities sum across locations unless `location_id` names\none. Items at or below their reorder point come first, then by name.","operationId":"listStock","parameters":[{"description":"Quantities at this location only; omitted sums every location.","in":"query","name":"location_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the SKU, the variant name or the product name.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"role","required":false,"schema":{"description":"Which role of stocked item to list. Being a component is a role, not a\ncategory: a component can also be sold on its own.","enum":["all","product","component"],"type":"string"}},{"description":"Only items at or below their reorder point.","in":"query","name":"low_stock","required":false,"schema":{"type":"boolean"}},{"description":"Only items with nothing to sell: buildable 0 for kits, available 0\notherwise.","in":"query","name":"out_of_stock","required":false,"schema":{"type":"boolean"}},{"description":"Only items with something to sell.","in":"query","name":"in_stock_only","required":false,"schema":{"type":"boolean"}},{"description":"Only this variant.","in":"query","name":"variant_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only this product's variants. For a kit, `buildable` says how many\nits components allow.","in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StockListItem"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List stock","tags":["Inventory"]}},"/inventory-locations":{"get":{"description":"By priority, then name. The first active one is the default location.","operationId":"listInventoryLocations","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InventoryLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List inventory locations","tags":["Inventory"]},"post":{"description":"Emits the `inventory_location.created` webhook.","operationId":"createInventoryLocation","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLocationCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLocation"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an inventory location","tags":["Inventory"]}},"/inventory-locations/{location_id}":{"delete":{"description":"Refused while the location holds stock rows, transfers or receipts\n(409 `location_in_use`): deactivate it instead. Emits the\n`inventory_location.deleted` webhook.","operationId":"deleteInventoryLocation","parameters":[{"description":"Inventory location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_in_use`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete an inventory location","tags":["Inventory"]},"get":{"operationId":"getInventoryLocation","parameters":[{"description":"Inventory location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get an inventory location","tags":["Inventory"]},"patch":{"description":"Changes the fields sent. Emits the `inventory_location.updated` webhook.","operationId":"updateInventoryLocation","parameters":[{"description":"Inventory location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLocationUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an inventory location","tags":["Inventory"]}},"/inventory-movements":{"get":{"description":"The store's stock ledger, newest first: every quantity that moved, with\nits kind, reason, the document behind it (order, receipt, count,\ntransfer) and who made it.","operationId":"listStockMovements","parameters":[{"in":"query","name":"kind","required":false,"schema":{"description":"What kind of stock movement a ledger entry records:\n\n- `stock_in` / `stock_out`: goods received (a purchase receipt, an\n  opening balance) or removed outside an order.\n- `reserve` / `release` / `consume`: an order or build job holding units,\n  letting them go, or shipping them.\n- `adjustment`: a manual correction (with a `reason`), or the undo of an\n  earlier movement.\n- `transfer`: units moving between two locations (one entry per side).\n- `count`: the difference a posted stock count wrote.\n- `build_consume` / `build_produce`: parts used and kits made by a build.\n\nMirrors `inventory_events_type_check`. The set may grow; tolerate\nunknown values.","enum":["stock_in","stock_out","reserve","release","consume","adjustment","transfer","count","build_consume","build_produce"],"type":"string"}},{"in":"query","name":"reason","required":false,"schema":{"description":"Why stock was adjusted by hand. A closed list so the history can be\ngrouped and reported on; put anything else in the free-text `note`.\n\n`opening_balance` (first load of a real shelf count), `damaged`, `lost`,\n`theft`, `found` (on the shelf but not in the book), `correction` (the\nbook was wrong; the default), `customer_return`, `supplier_return`,\n`expired`, `sample`, `other`; and, written by the system only,\n`shipment_cancelled` (units a shipment had taken out came back because\nthe shipment no longer carries them).","enum":["opening_balance","damaged","lost","theft","found","correction","customer_return","supplier_return","expired","sample","other","shipment_cancelled"],"type":"string"}},{"in":"query","name":"location_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Movements made by this user.","in":"query","name":"actor_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"reference_type","required":false,"schema":{"description":"The document a movement came from. The set grows; tolerate unknown\nvalues.","enum":["order","cart","purchase_receipt","stock_count","transfer","erp_sync","reversal","build_job","production_run","supplier_return","manual_adjust","product_import","import_run","assistant","erp_webhook","goods_note"],"type":"string"}},{"in":"query","name":"variant_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Matches SKU, variant or product title.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"created_after","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"created_before","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StockMovement"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List stock movements","tags":["Inventory"]}},"/inventory-movements/{movement_id}/reversal":{"post":{"description":"Undoes a manual adjustment, a transfer side, a receipt, a removal or a\ncount line by writing the opposite `adjustment` (reason `correction`)\nand linking the two (`reversed_by` / `reversal_of`). Reservations and\norder movements are not reversible here. A movement can be reversed\nonce, so a retried reversal answers 409 `already_reversed`.","operationId":"reverseStockMovement","parameters":[{"description":"Movement id","in":"path","name":"movement_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockReverseRequest"}]}}},"description":"Optional"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockReversalResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`movement_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`already_reversed`, `insufficient_stock` (the units to take back are no longer on hand), `inventory_managed_externally`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`movement_not_reversible`, `cannot_reverse_a_reversal`, `nothing_to_reverse`, `movement_has_note` (it moved with a fiscal document: cancel the note instead)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reverse a stock movement","tags":["Inventory"]}},"/inventory-transfers":{"post":{"description":"Moves units from one location to another in one transaction: two\n`transfer` ledger entries sharing a `reference_id` (the `transfer_id`).\nAnswers with the variant's new levels. Send an `Idempotency-Key`: a\ntransfer retried without one moves the units twice.","operationId":"transferVariantStock","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Move units between two of the store's locations.","properties":{"force":{"description":"Write even though an ERP owns this store's stock.","type":"boolean"},"from_location_id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"quantity":{"description":"Units to move; at most what is available (on hand minus reserved) at\nthe source.","format":"int32","minimum":1,"type":"integer"},"to_location_id":{"format":"uuid","type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["from_location_id","to_location_id","quantity","variant_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockTransferResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` (`details.available` at the source), `inventory_managed_externally`, `logical_stock_readonly`, `transfer_needs_note` (the locations belong to different issuers: emit a transfer goods note), `location_issuer_ambiguous`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`quantity_must_be_positive`, `same_location`, `location_not_in_store`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Transfer a variant's stock between locations","tags":["Inventory"]}},"/locations":{"get":{"description":"By `position`, then name.","operationId":"listLocations","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StoreLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List store locations","tags":["Locations"],"x-admin-operation":"listStoreLocations"},"post":{"operationId":"createLocation","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocationCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocation"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_slug_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no name"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a store location","tags":["Locations"],"x-admin-operation":"createStoreLocation"}},"/locations/{location_id}":{"delete":{"operationId":"deleteLocation","parameters":[{"description":"Location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such location in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_in_use`: carts or orders still point at it"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a store location","tags":["Locations"],"x-admin-operation":"deleteStoreLocation"},"get":{"operationId":"getLocation","parameters":[{"description":"Location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such location in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a store location","tags":["Locations"],"x-admin-operation":"getStoreLocation"},"patch":{"description":"A partial update: omitted fields keep their value; send `null` to clear\na nullable one (description, contact, address, coordinates, pickup\ninstructions). `name` is required.","operationId":"updateLocation","parameters":[{"description":"Location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocationUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocation"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such location in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_slug_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no name"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a store location","tags":["Locations"],"x-admin-operation":"updateStoreLocation"}},"/loyalty-program":{"get":{"operationId":"getLoyaltyProgram","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyProgram"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the loyalty program","tags":["Loyalty"]},"put":{"description":"Saves every rule at once (the cashback and tier fields, when left out,\nkeep what they were). Switching points, cashback or referrals on applies\nto orders paid from then on; switching them off stops new points,\ncashback and referrals, while what customers already have stays theirs\n(pending cashback still reaches the wallet, pending referrals still reward\nwhen due).","operationId":"updateLoyaltyProgram","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyProgramUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyProgram"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (`details.fields`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change the loyalty program","tags":["Loyalty"]}},"/loyalty-referrals":{"get":{"description":"Newest first.","operationId":"listLoyaltyReferrals","parameters":[{"description":"`pending`, `rewarded` or `void`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Referral"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List referrals","tags":["Loyalty"]}},"/loyalty-tiers":{"get":{"operationId":"getLoyaltyTiers","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyTiers"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Loyalty tiers","tags":["Loyalty"]},"put":{"description":"Replaces the list. A customer who paid at least a tier's `min_spend_cents`\nfor goods in the program's window (`tier_window_months`) earns points at\nits multiplier and cashback at its percent on orders paid from then on;\nwhat was already earned is not recalculated. Every customer's level is\nworked out again in the background, without e-mailing them about it. An\nempty list turns tiers off.","operationId":"setLoyaltyTiers","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyTiers"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyTiers"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set the loyalty tiers","tags":["Loyalty"]}},"/nfse-documents":{"get":{"operationId":"listNfseDocuments","parameters":[{"description":"Only the notes of one record (`booking`).","in":"query","name":"source_kind","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"source_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Items per page, 1 to 199 (default 50).","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Where the page starts: the `next_cursor` of the page before.","in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_NfseDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the service invoices, newest first.","tags":["NFS-e"],"x-admin-operation":"listNfse"},"post":{"description":"Takes a number, signs the DPS with the store's certificate and sends it\nto the national system. The answer is the note as it stands after up to\n30 seconds; a slow system is followed up by a background job.","operationId":"createNfseDocument","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nfse_exists`, `nfse_production_locked`, `nfse_numbering_not_confirmed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Issue a service invoice (NFS-e).","tags":["NFS-e"],"x-admin-operation":"emitNfse"}},"/nfse-documents/{document_id}":{"get":{"operationId":"getNfseDocument","parameters":[{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"One service invoice with its exchanges with the national system.","tags":["NFS-e"],"x-admin-operation":"getNfse"}},"/nfse-documents/{document_id}/cancellation":{"post":{"operationId":"cancelNfseDocument","parameters":[{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nfse_not_cancellable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `sefaz_error`: the national system refused or did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel an authorized service invoice.","tags":["NFS-e"],"x-admin-operation":"cancelNfse"}},"/nfse-documents/{document_id}/pdf":{"get":{"operationId":"downloadNfseDocumentPdf","parameters":[{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"PDF file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download the DANFSE (PDF) of an authorized invoice.","tags":["NFS-e"],"x-admin-operation":"downloadNfsePdf"}},"/nfse-documents/{document_id}/status-check":{"post":{"operationId":"checkNfseDocumentStatus","parameters":[{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Settle a note whose answer was lost, or send one that is still waiting.","tags":["NFS-e"],"x-admin-operation":"refreshNfse"}},"/nfse-documents/{document_id}/xml":{"get":{"operationId":"downloadNfseDocumentXml","parameters":[{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/xml":{}},"description":"XML file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Download the NFS-e XML the national system generated.","tags":["NFS-e"],"x-admin-operation":"downloadNfseXml"}},"/option-groups/{option_group_id}":{"delete":{"description":"Deletes its values too. Refused while a variant carries one of them.\nEmits the `option_group.deleted` webhook.","operationId":"deleteOptionGroup","parameters":[{"description":"Option group id","in":"path","name":"option_group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_in_use`: a variant carries one of its values"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete an option group","tags":["Products"]},"patch":{"description":"Positions are kept 0, 1, 2… in display order; variant titles that\nfollowed the options' order follow the new one. A rename that leaves the\nlibrary option's name behind links the option to the one it now\nmatches, or to none. Emits the `option_group.updated` webhook.","operationId":"updateOptionGroup","parameters":[{"description":"Option group id","in":"path","name":"option_group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionGroupUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_name_taken`: the product has another option with this name"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an option group","tags":["Products"]}},"/option-groups/{option_group_id}/values":{"get":{"operationId":"listOptionValues","parameters":[{"description":"Option group id","in":"path","name":"option_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OptionValue"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List an option group's values","tags":["Products"]},"post":{"description":"In an option linked to the store's library, the value is linked to the\nlibrary value it matches (by value or alias, ignoring case and accents)\nor added to the library; the value keeps the spelling given.","operationId":"createOptionValue","parameters":[{"description":"Option group id","in":"path","name":"option_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionValueCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionValue"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_value_taken`: the option already has this value"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, or `invalid_color` for a custom color without a valid `color_hex`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an option value","tags":["Products"]}},"/option-values/{option_value_id}":{"delete":{"description":"Refused while a variant carries it. Emits the `option_value.deleted`\nwebhook.","operationId":"deleteOptionValue","parameters":[{"description":"Option value id","in":"path","name":"option_value_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_value_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_value_in_use`: a variant carries this value"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete an option value","tags":["Products"]},"patch":{"description":"Variant titles that followed the old value follow the new one. A value\nrenamed to something its library value does not read as is linked to\nthe library value it now matches. Emits the `option_value.updated`\nwebhook.","operationId":"updateOptionValue","parameters":[{"description":"Option value id","in":"path","name":"option_value_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionValueUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionValue"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_value_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_value_taken`: the option already has this value"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, or `invalid_color`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an option value","tags":["Products"]}},"/orders":{"get":{"description":"Newest first (`created_at`, then `id`). Paged by keyset: follow\n`next_cursor` for an infinite list; orders placed meanwhile never shift\nor repeat rows, whatever the filters.\n\nEach row carries what a list or card needs (status, customer, totals,\nfirst item, unit counts, per-line shipped counts); fetch the order for\nthe rest.","operationId":"listOrders","parameters":[{"description":"An order status, or `processing` / `to_ship` / `shipped` /\n`payment_expired` (the work tabs).","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/OrderListStatus"}},{"description":"Only this customer's orders.","in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the order number, the customer's name, e-mail, phone or\nCPF/CNPJ (on the profile or typed at checkout; digits are compared\nwithout punctuation), a line's SKU, a shipment's or box's tracking\ncode, and the NF-e number or access key. A brand reading a\nfranchise's store without its customers grant matches none of the\ncustomer's fields.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Include orders flagged as test data. Defaults to false.","in":"query","name":"include_test","required":false,"schema":{"type":"boolean"}},{"description":"Only orders created at or after this instant.","in":"query","name":"created_after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Only orders created before this instant.","in":"query","name":"created_before","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Only scheduled orders (`scheduled_on` set) for this day or later.","in":"query","name":"scheduled_from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Only scheduled orders for this day or earlier.","in":"query","name":"scheduled_to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrderSummary"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_cursor`, `invalid_limit` or `invalid_offset`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List orders","tags":["Orders"]},"post":{"description":"Prices every line from the catalog, applies an active discount code,\nand reserves stock (or queues production for made-to-order lines) line\nby line. The order starts `pending`. Emits the `orders.created` webhook.\n\nFor a sale taken at the counter, with payment, use\n`POST /orders` with `source: manual`.\n\n**With `source: manual`:** Record a counter sale. Creates a numbered order with its lines, reserves stock (queuing\nproduction for made-to-order lines) and records the payment, in one\ntransaction.\n\nEvery method but `pix_qr` records an in-person payment: the order is\n`paid` / `captured` at once and `orders.paid` fires. `pix_qr` creates a\nreal PIX charge through the store's gateway and returns its QR code; the\norder stays `pending` until the gateway confirms, and if the charge\ncannot be created the order is cancelled and its stock released.\n\nEmits the `orders.created` webhook.","operationId":"createOrder","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/CreateOrderRequest"},{"not":{"required":["source"]}}]},{"description":"A sale taken at the counter.","properties":{"billing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ManualSaleBilling","description":"Where the sale is billed (the invoice's address), when it is not where\nit goes. Left out, it is billed at the delivery address (for a sale\npicked up, the customer's)."}]},"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ManualSaleContact","description":"The buyer's name, phone and e-mail, kept on the order. A sale needs a\nphone or an e-mail (here or on the customer), or `no_contact`."}]},"customer_id":{"format":"uuid","type":["string","null"]},"discount_code":{"description":"A discount code of the store, valid now.","type":["string","null"]},"freight":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ManualSaleFreight","description":"Freight chosen at the counter for a sale that ships."}]},"items":{"items":{"$ref":"#/components/schemas/ManualSaleItem"},"type":"array"},"manual_discount_cents":{"description":"Negotiated discount in cents, stacked on the discount code and\nrecorded in `discount_cents` (not hidden in line prices).","format":"int64","type":["integer","null"]},"no_contact":{"description":"\"Cliente sem contato\": the buyer left neither phone nor e-mail, and\nthe seller says so on purpose (`true`, recorded on the order). `false`\nasks for the rule: without a phone or an e-mail the sale is refused\n(`contact_required`). Left out, nothing is asked: apps from before the\nrule (the mobile POS) keep selling. Not needed at a self-service kiosk.","type":["boolean","null"]},"notes":{"type":["string","null"]},"payments":{"description":"How the sale is paid: one payment, or several in-person ones that\nadd up to the total (cash plus the card machine, two cards). A PIX\ncharge through the gateway (`pix_qr`) is always the only payment.","items":{"$ref":"#/components/schemas/ManualSalePayment"},"type":"array"},"quote_id":{"description":"The quote (its cart id) this sale pays at the counter. The quote is\nmarked converted to this order, so its link no longer charges it. A\nquote the customer already paid online refuses the sale\n(`quote_already_paid`), and so does one whose online order is still\nwaiting for its payment (`quote_order_pending`: cancel that order first).","format":"uuid","type":["string","null"]},"sales_channel_id":{"format":"uuid","type":["string","null"]},"source":{"enum":["manual"],"type":"string"}},"required":["items","payments","source"],"title":"Record a counter sale","type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`: a variant is not in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock` or `insufficient_component_stock` (with `details.max_shippable`, `details.limiting_sku`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no items, a quantity below 1, or an unknown customer / sales channel; `invalid_discount_code`: the code does not apply (not found, inactive, outside its dates, below its minimum or used up; `message` says which)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an order","tags":["Orders"]}},"/orders/{order_id}":{"get":{"description":"Everything an order screen shows in one call: lines with images and\nproduction state, customer and delivery address, totals in cents,\npayment state, shipments with contents and tracking, refunds, and the\nstatus changes allowed from here (`allowed_status_transitions`).\n\nThe payment attempts themselves (PIX codes, gateway events) are at\n`GET /orders/{order_id}/payments`.","operationId":"getOrder","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get an order","tags":["Orders"]},"patch":{"description":"Free text for the team (the counter sale's note, what the customer asked\nfor on the phone). Replaces what was there. Not sent to the customer.\nAlso sets the day the order is scheduled to be sent (`scheduled_on`).\nNeeds `orders.edit`.","operationId":"updateOrderNotes","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: longer than 5,000 characters; `scheduled_on_too_soon` (a day in the past) or `scheduled_on_too_late` (more than a year ahead)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set an order's notes","tags":["Orders"]}},"/orders/{order_id}/cancellation":{"post":{"description":"Cancels the order (stock released, open production cancelled) and, with\n`refund`, first returns what was paid: the whole refundable amount\nthrough the gateway, then what was paid by hand recorded as refunded.\nThe customer's \"Pedido cancelado\" e-mail says what actually happened\n(refunded, or not).\n\nIdempotent: an order already cancelled is returned as it is, and a retry\nafter a refund went through does not refund again (nothing is left to\nrefund). Send an `Idempotency-Key` header; it also reaches the gateway.\nIf the refund went through but the order could not be cancelled (409),\nthe error has `details.refunded = true`: retry to finish the cancel.\n\nAn unpaid order's open charges (a PIX code) are voided at the gateway\nfirst (a charge being made at that moment finishes and is voided with\nthem; none starts until the order is cancelled); 502 `charge_not_voided`\nwhen that fails, and nothing changes.\nCarrier bookings and authorized NF-e are not touched: cancel them on the\nshipment and the nota fiscal (the order screen lists them).\n\nNeeds `orders.cancel`, and `orders.refund` with `refund`.","operationId":"cancelOrder","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique key per cancellation the user intends (e.g. a UUID).","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_status_transition`, `marketplace_order`, `inventory_conflict` (with `details.refunded` when the refund already went through)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A refund error: `refund_not_supported`, `payment_provider_not_configured`, `missing_provider_reference`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `provider_error`: the gateway refused the refund, or `charge_not_voided`: an open charge could not be voided; nothing was cancelled"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel an order","tags":["Orders"]}},"/orders/{order_id}/credit":{"get":{"operationId":"getOrderCredit","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCredit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get what credit paid on an order","tags":["Store credit"]}},"/orders/{order_id}/invoice-cancellation":{"post":{"description":"Sends the cancellation event (SEFAZ-SP accepts it within 24 hours of\nauthorization). Refused while a shipment is out, unless `force`.","operationId":"cancelOrderInvoice","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoiceCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_not_authorized`, `shipment_in_transit` (pass `force`), `future_deliveries_active` (cancel the remessas first), `fiscal_invalid_justification`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `sefaz_error`: SEFAZ refused the cancellation (e.g. past the 24-hour window)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel the order's NF-e.","tags":["Fiscal"]}},"/orders/{order_id}/invoice-corrections":{"get":{"operationId":"listOrderInvoiceCorrections","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FiscalCorrection"}}},"description":"Newest first"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the order's cartas de correção.","tags":["Fiscal"]},"post":{"description":"Event 110110 at SEFAZ for the NF-e on the order, which may have been\nissued elsewhere under the store's CNPJ. Corrects anything but the tax\nvalues, the parties and the dates, up to 30 days after authorization.\nThe numbering continues from the note's events at SEFAZ.","operationId":"createOrderInvoiceCorrection","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoiceCorrectionCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalCorrection"}}},"description":"Registered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_without_nfe`, `fiscal_invalid_correction`, `fiscal_correction_other_emitter`, `fiscal_correction_cancelled_nfe`, `fiscal_correction_nfe_not_found`, `fiscal_correction_limit`, `fiscal_correction_in_flight`, `fiscal_correction_rejected` (SEFAZ refused it; 501 is past the 30 days), `fiscal_not_configured`, `fiscal_certificate_missing`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `sefaz_error`; when the answer was lost the correction stays `unknown`: refresh it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Issue a carta de correção for the order's NF-e.","tags":["Fiscal"]}},"/orders/{order_id}/invoices":{"get":{"operationId":"listOrderInvoices","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FiscalDocument"}}},"description":"Newest first"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the order's NF-e documents.","tags":["Fiscal"]},"post":{"description":"Numbers, signs, stores and transmits it. A document whose answer is\npending keeps being retried in the background.","operationId":"emitOrderInvoice","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoiceCreate"}}},"description":"Optional; defaults to the sale NF-e"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"Stored and transmitted once; `status` says where it stands (a `pending`/`unknown` document keeps being retried)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`save_recipient` without permission to edit the order's customer"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_document_exists`, `order_has_external_nfe`, `fiscal_not_configured`, `fiscal_certificate_missing`, `fiscal_production_locked`, `fiscal_numbering_not_confirmed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_validation_failed` with `details.issues`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Emit the order's NF-e.","tags":["Fiscal"]}},"/orders/{order_id}/nfe":{"put":{"description":"One NFe per order, however many boxes it ships in. The XML is parsed\nfor the access key, number and total; a Central do Frete order cannot\nbe generated without it.","operationId":"attachOrderNfe","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNfeAttach"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNfe"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (neither XML nor DANFE link) or `nfe_key_not_found` (no access key in the XML)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Attach a nota fiscal","tags":["Shipments"]}},"/orders/{order_id}/payments":{"get":{"description":"Every payment attempt on the order (newest first) with its status, the\ngateway events that concern them (at most 100, newest first) and the\nrefunds issued. Provider snapshots are sanitized; card data and secrets\nare never returned.\n\nPoll this while a PIX charge is pending: an intent turning `approved`\nmeans the order is paid.","operationId":"listOrderPayments","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPayments"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List an order's payments","tags":["Payments"]},"post":{"description":"Records money received outside the platform (cash, a PIX to the store's\nown key, a transfer, the store's card machine) as an approved payment of\nthe order, so reports, finance, loyalty, returns and refunds see it. It\npays everything still owed (`Order.owed_cents`; part of it is refused\nwith `manual_payment_must_be_full`): the order becomes `paid` /\n`captured` in the same transaction (`paid_at` the date given) and\n`orders.paid` fires (the customer's receipt and the team's alert).\n\nNeeds `orders.manage_payments`.","operationId":"recordOrderPayment","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique key per payment recorded (e.g. a UUID): a retry does not record it twice.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPaymentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_closed` (cancelled or refunded) or `already_paid`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (amount below 1, a date in the future), `manual_payment_must_be_full` (the amount is not everything still owed, `details.owed_cents`), `card_detail_not_applicable` (`card` with a method other than `card_terminal`) or `invalid_installments`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `charge_not_voided`: the order's open gateway charge (a PIX code) could not be voided; nothing was recorded"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Record a payment","tags":["Payments"]}},"/orders/{order_id}/refunds":{"post":{"description":"Returns money through the gateway that took it (Mercado Pago), from the\norder's latest approved payment. Omit `amount_cents` to refund what is\nleft on it; pass it for a partial refund. Local state changes only after\nthe gateway accepts: the refund is recorded, and once the payment is fully\nrefunded the order becomes `refunded` (stock released, open production\ncancelled, `orders.updated` webhook and `orders.refunded` event);\notherwise its `payment_status` becomes `partially_refunded`.\n\n**Send an `Idempotency-Key` header.** Every call that passes the checks\ncreates a new refund at the gateway, so a blind retry of a partial refund\nreturns money twice. With the header, a retry replays the first response\nfor 24 hours, and the key is also forwarded to the gateway. A retry\nwithout it is still bounded by the refundable amount: once the payment is\nfully refunded, further calls fail with `already_refunded`.\n\nA boleto paid at a bank goes back by a transfer the store makes: Banco\nInter has no refund for one, and Asaas refunds one only when it was paid\nby its Pix. Such a refund is recorded here without calling the gateway,\nwith `provider_code` `manual`; make the transfer to the customer.\n\n**With `method: manual`:** Record a manual refund. Records money the store gave back itself for what was paid by hand\n(cash, its own PIX key, a transfer, its card machine): nothing reaches a\ngateway. Spread over the order's approved manual payments. Once every\npayment of the order is refunded it becomes `refunded` (stock released,\n`orders.refunded` and the customer's e-mail); otherwise its\n`payment_status` becomes `partially_refunded`. For a gateway's payment use\n`POST /orders/{order_id}/refunds`.\n\nNeeds `orders.refund`.","operationId":"refundOrder","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Strongly recommended: a unique key per refund the user intends (e.g. a UUID).","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/AdminRefundRequest"},{"not":{"required":["method"]}}]},{"description":"A refund the store made by hand.","properties":{"amount_cents":{"description":"Cents given back, at least 1. Omit for everything paid by hand that\nis still unrefunded.","format":"int64","type":["integer","null"]},"method":{"enum":["manual"],"type":"string"},"reason":{"description":"Kept with the refund for the team; not sent to the customer.","type":["string","null"]}},"required":["method"],"title":"Record a manual refund","type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_refundable_payment` (no approved payment), `already_refunded` (nothing left to refund) or `idempotency_request_in_progress`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`refund_exceeds_refundable` (`details.refundable_cents` says the most you can refund), `validation_failed` (amount below 1), `refund_not_supported` (the payment was not taken by a gateway that refunds through the API), `payment_provider_not_configured` or `missing_provider_reference`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `provider_error`: the gateway refused or failed; nothing was recorded"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Refund an order","tags":["Payments"]}},"/orders/{order_id}/returnable-items":{"get":{"description":"Per line: how many were ordered, already in a return and still returnable;\nplus whether a customer could ask now and until when.","operationId":"getOrderReturnable","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returnable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"What an order still has to return","tags":["Returns"]}},"/orders/{order_id}/unfulfilled-items":{"get":{"description":"Every line of the order, in order, with the units no (non-cancelled)\nshipment has claimed yet. Feeds a picker for a shipment's contents.","operationId":"listUnshippedItems","parameters":[{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UnshippedItem"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List an order's unshipped items","tags":["Shipments"]}},"/payables":{"get":{"description":"Open ones first by due date; paid and cancelled ones newest due first.","operationId":"listPayables","parameters":[{"description":"`open`, `paid` or `cancelled`; all when omitted.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"supplier_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Due on or before this day (for \"this week\", \"overdue\").","in":"query","name":"due_before","required":false,"schema":{"format":"date","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Payable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List payables","tags":["Purchasing"]},"post":{"description":"Adds an expense that did not come from a supplier receipt. With\n`repeat_months` it creates one installment per month.","operationId":"createPayable","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayableCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Payable"},"type":"array"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_category`, `amount_must_be_positive`, `invalid_repeat`, `description_required`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a payable","tags":["Purchasing"]}},"/payables/{payable_id}":{"patch":{"description":"Marks an installment paid (with the day, amount and method), reopens it,\ncancels it, or changes its due date, amount or notes.","operationId":"updatePayable","parameters":[{"description":"Payable id","in":"path","name":"payable_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayableUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`payable_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_status`, `amount_must_be_positive`, `amount_below_credit` (a return to the supplier took more off it)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a payable","tags":["Purchasing"]}},"/pipelines":{"get":{"description":"Every pipeline with its stages in order. A store's first reading creates\nthe default \"Vendas\" pipeline.","operationId":"listPipelines","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Pipeline"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List pipelines","tags":["Deals"]},"post":{"operationId":"createPipeline","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a name out of range or no open stage"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a pipeline","tags":["Deals"]}},"/pipelines/{pipeline_id}":{"get":{"description":"With its stages in order.","operationId":"getPipeline","parameters":[{"description":"Pipeline id","in":"path","name":"pipeline_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such pipeline in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a pipeline","tags":["Deals"]},"patch":{"description":"Renames, archives or restores it, and replaces its stages with the ordered\nlist sent. A stage with deals cannot be removed.","operationId":"updatePipeline","parameters":[{"description":"Pipeline id","in":"path","name":"pipeline_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such pipeline in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no open stage, an unknown stage id or a removed stage that holds deals"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a pipeline","tags":["Deals"]}},"/price-lists":{"get":{"description":"The store's price lists, by name, with how many variants each prices and the groups that pay it.","operationId":"listPriceLists","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PriceList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List price lists","tags":["Discounts"]},"post":{"description":"Give it to customer groups with `PUT /customer-groups/{group_id}/wholesale`.","operationId":"createPriceList","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_name_taken`, or `too_many_price_lists` (50 per store)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a price list","tags":["Discounts"]}},"/price-lists/{price_list_id}":{"delete":{"description":"The groups that paid it go back to retail prices; their open carts are re-priced when next read.","operationId":"deletePriceList","parameters":[{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a price list","tags":["Discounts"]},"get":{"operationId":"getPriceList","parameters":[{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a price list","tags":["Discounts"]},"patch":{"description":"Its name, or the percent off the regular price for the variants without a price of their own. Carts are priced by\nthe new terms the next time they are read.","operationId":"updatePriceList","parameters":[{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_name_taken`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a price list","tags":["Discounts"]}},"/price-lists/{price_list_id}/prices":{"get":{"description":"The store's variants (gift cards and archived products left out), by product, with the list's price for one unit\nand its quantity tiers. `priced=true` keeps those the list has a price of its own for.","operationId":"listPriceListPrices","parameters":[{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product title, variant title or SKU.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"`true`: only the variants with a price of their own in the list.","in":"query","name":"priced","required":false,"schema":{"type":"boolean"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PriceListVariant"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A list's prices","tags":["Discounts"]},"patch":{"description":"Writes each price (a variant, from a quantity up); `price_cents: null` removes one. All or nothing.","operationId":"setPriceListPrices","parameters":[{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListPricesUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListPricesResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`price_list_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: more than 2000 prices, a variant of another store, a quantity or price out of range"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set prices in a list","tags":["Discounts"]}},"/products":{"get":{"description":"Each row carries its primary image, price range, stock totals, variant\ncount and active variants, so a list screen needs no further requests.\nKit components that are not themselves active products are left out.","operationId":"listProducts","parameters":[{"description":"Only products in this status. Without it, drafts are hidden unless\n`include_drafts=true`.","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/ProductStatus"}},{"description":"Include drafts when no `status` is given.","in":"query","name":"include_drafts","required":false,"schema":{"type":"boolean"}},{"description":"Matches part of the title, the SKU prefix, a variant's SKU or\nbarcode, or the product's GTIN/EAN/UPC, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only products in this category.","in":"query","name":"category_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only products in this collection.","in":"query","name":"collection_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"description":"How to order the product list.","enum":["priority","updated_at","title"],"type":"string"}},{"description":"Only products whose own NF-e tax class is this one.","in":"query","name":"fiscal_tax_class_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only products with no tax class of their own nor on any variant\n(they use the store default, or cannot be invoiced without one).","in":"query","name":"missing_tax_class","required":false,"schema":{"type":"boolean"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductSummary"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List products","tags":["Products"]},"post":{"description":"The slug is derived from the title and made unique within the store. A\n`single` product with `default_price_cents` also gets its one variant,\nwith a SKU read from the SKU prefix or the slug (`CAMA-BOSSA-NOVA`, then\n`-2`… while the store uses it). New products are drafts\nunless `status` says otherwise. Emits the `products.created` webhook.","operationId":"createProduct","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sku_taken`: the default variant's SKU is already used"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a product","tags":["Products"]}},"/products/{product_id}":{"delete":{"description":"Deletes the product with its variants, options, stock rows, gallery and\ncategory/collection memberships. Refused while any order references it\n(archive it instead), while a variant is a part of another product's kit,\nwhile units of it are held, and while it has units in stock (zero them,\nwith the reason, first). Emits the `products.deleted` webhook.","operationId":"deleteProduct","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_has_orders`: orders reference this product; `product_used_in_kits` (`details.kits`): a variant is a part of another kit; `product_has_holds`: units are held; `product_has_stock` (`details.on_hand`): units are in stock"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a product","tags":["Products"]},"get":{"description":"The product with its variants (options, stock per location), option\ngroups and gallery. `availability` is resolved from the variants' stock.","operationId":"getProduct","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a product","tags":["Products"]},"patch":{"description":"Partial: omitted fields keep their value. Send `{\"status\": \"archived\"}`\nto archive. Prices live on the variants (`PATCH /variants/{variant_id}`). Emits the\n`products.updated` webhook and purges the product's storefront cache.","operationId":"updateProduct","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a product","tags":["Products"]}},"/products/{product_id}/digital-delivery":{"delete":{"operationId":"removeProductDigitalDelivery","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed (also when there was none)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remove a product's digital delivery","tags":["Products"]},"get":{"operationId":"getProductDigitalDelivery","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalDelivery"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product, or it delivers nothing digital"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A product's digital delivery","tags":["Products"]},"put":{"description":"What a customer gets after paying: a title, an https link and/or\ninstructions (a license key, the steps to join a course). Orders already\npaid are not sent it; use the resend call for those.","operationId":"setProductDigitalDelivery","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDigitalDelivery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalDelivery"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a title is needed, the link is https, and there is a link or instructions"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a product's digital delivery","tags":["Products"]}},"/products/{product_id}/gift-card":{"get":{"operationId":"getProductGiftCard","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardProduct"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Is this product a gift card?","tags":["Store credit"]},"put":{"description":"Turns a product into a gift card (each variant is a face value, R$ 10,00\nto R$ 50.000,00) or back into an ordinary product. A gift card product is\nnot physical: it needs no stock and no freight.","operationId":"setProductGiftCard","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardProductUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardProduct"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_variants` or `invalid_variant_price` (a face value outside R$ 10,00 to R$ 50.000,00)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sell a product as a gift card","tags":["Store credit"]}},"/products/{product_id}/images":{"get":{"description":"The active gallery: images (with their resized renditions in `variants`)\nand videos (`media_type = video`, `cdn_url` is the playable URL).\nProduct-wide entries first, then variant-specific ones, each by position.","operationId":"listProductImages","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProductImage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a product's media","tags":["Products"]},"post":{"description":"`multipart/form-data` with the file in `image` (JPEG, PNG or WebP, up\nto 10 MB). The image is stored with resized JPEG and WebP renditions.\nEmits the `product.image.created` webhook.","operationId":"uploadProductImage","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ProductImageUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImageUpload"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: malformed multipart body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, `variant_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_image`: not a supported image or too large; `validation_failed`: bad `image_kind` or no `image` part"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Upload a product image","tags":["Products"]}},"/products/{product_id}/images/{image_id}":{"delete":{"description":"Removes the gallery entry and its stored files. Emits the\n`product.image.deleted` webhook.","operationId":"deleteProductImage","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Image id","in":"path","name":"image_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, `image_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a product image","tags":["Products"]},"patch":{"description":"Alt text, position, primary flag, visibility, the owning variant, the\nimage kind, a video's poster, and (with `extra_variant_ids`) the other\nvariants the image is shared with. Emits the `product.image.updated`\nwebhook.","operationId":"updateProductImage","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Image id","in":"path","name":"image_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImageUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, `image_not_found`, or `variant_not_found` (a variant id not on this product)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: bad `image_kind`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a product image","tags":["Products"]}},"/products/{product_id}/license-keys":{"get":{"operationId":"getProductLicenseKeys","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyPool"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"A product's license keys in numbers","tags":["Products"]},"post":{"description":"Adds keys to a digital product's pool. A key already in the pool counts as\na duplicate and is not added again.","operationId":"addProductLicenseKeys","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLicenseKeys"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddedLicenseKeys"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such product"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no keys, too many, or a key too long"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Load license keys","tags":["Products"]}},"/products/{product_id}/option-groups":{"get":{"description":"In display order, each with its values.","operationId":"listOptionGroups","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OptionGroupWithValues"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a product's option groups","tags":["Products"]},"post":{"description":"A product has at most three options (the storefront picker shows\n`option1` to `option3`), with distinct names. The new option goes after\nthe others. An option\nnamed like one of the store's library options (ignoring case, accents\nand plural) is linked to it (`definition_id`).","operationId":"createOptionGroup","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionGroupCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionGroup"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_group_name_taken`: the product has an option with this name; `too_many_option_groups`: it already has three"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an option group","tags":["Products"]}},"/products/{product_id}/reference-tables":{"get":{"description":"The tables attached to the product, the inherited ones from its\ncategories (and their parents) and collections, and which of them the\nproduct page shows. A product's own table replaces inherited tables of the\nsame kind; tables of other kinds add up.","operationId":"getProductReferenceTables","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReferenceTables"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a product's reference tables","tags":["Reference Tables"]},"put":{"description":"Replaces the tables attached to the product itself (in order) and the\ninherited ones it hides. Returns what applies to the product now.","operationId":"setProductReferenceTables","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReferenceTablesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReferenceTables"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a table is not in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a product's reference tables","tags":["Reference Tables"]}},"/products/{product_id}/variants":{"get":{"description":"Every variant, active or not, in display order, with stock summed over\nthe store's locations and the option values each carries.","operationId":"listProductVariants","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Variant"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a product's variants","tags":["Products"]},"post":{"description":"Adds a variant to the product. The SKU must be unique within the store\n(ignoring case). On a product with options, an active variant names one\nvalue of each in `option_value_ids`, in a combination no other variant\nhas. On a product that is on sale, an active variant needs a price above\nzero.","operationId":"createProductVariant","parameters":[{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`product_not_found`, or `option_value_not_found` when a value is not one of the product's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sku_taken`: another variant or item of the store already uses this SKU; `variant_combination_taken`: another variant has these options"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `invalid_barcode` (not a GTIN with a valid check digit), `variant_options_incomplete` (a value for every option is required), `option_group_repeated`, or `variant_price_required` (an active variant of a product on sale needs a price above zero)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a variant","tags":["Products"]}},"/purchase-orders":{"get":{"description":"Newest first, with supplier and totals.","operationId":"listPurchaseOrders","parameters":[{"in":"query","name":"status","required":false,"schema":{"description":"Where a purchase order stands (see the tag description).","enum":["draft","ordered","partial","received","cancelled"],"type":"string"}},{"in":"query","name":"supplier_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PurchaseOrder"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List purchase orders","tags":["Purchasing"]},"post":{"description":"A `draft` order, numbered `PO-NNNN` per store. Each line snapshots the\nvariant's SKU and name as they read today.","operationId":"createPurchaseOrder","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`kit_not_purchasable` (a kit is built from its parts; `details.item_id`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_not_found`, `location_not_in_store`, `item_required`, `item_not_found_in_store`, `pack_not_found`, `purchase_quantity_ambiguous`, `quantity_must_be_positive`, `pack_not_whole_units`, `units_must_be_whole`, `unit_cost_must_be_nonnegative`, `invalid_freight_terms`, `invalid_payment_terms`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a purchase order","tags":["Purchasing"]}},"/purchase-orders/{po_id}":{"get":{"operationId":"getPurchaseOrder","parameters":[{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`purchase_order_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a purchase order","tags":["Purchasing"]},"patch":{"description":"Changes the fields sent (omitted ones stay). `lines` replaces every line\nand is only allowed on a draft. `status` moves a draft to `ordered`, or\ncancels an order that is not received.","operationId":"updatePurchaseOrder","parameters":[{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`purchase_order_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_editable` (lines on a non-draft), `invalid_status_transition`, `kit_not_purchasable`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_not_found`, `location_not_in_store`, `item_required`, `item_not_found_in_store`, `pack_not_found`, `purchase_quantity_ambiguous`, `quantity_must_be_positive`, `pack_not_whole_units`, `units_must_be_whole`, `unit_cost_must_be_nonnegative`, `invalid_freight_terms`, `invalid_payment_terms`, `invalid_freight_option`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a purchase order","tags":["Purchasing"]}},"/purchase-orders/{po_id}/freight-quote":{"post":{"description":"Asks every active carrier for the boxes still to come on the order, from\nthe supplier's CEP (its address) to the CEP of the location receiving\nthem (the order's, else the store's default location as receiving picks\nit, else the store's shipping origin). Nothing is saved: send the chosen\noption back as `freight_option` on `PATCH /purchase-orders/{po_id}`.","operationId":"quotePurchaseFreight","parameters":[{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseFreightQuote"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`purchase_order_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_paid_by_supplier` (a CIF order)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_postal_code_missing`, `destination_postal_code_missing`, `box_sizes_missing` (no box has a size; `details.lines`), `freight_not_configured`, `freight_quote_invalid`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `freight_quote_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Quote FOB freight for a purchase order","tags":["Purchasing"]}},"/purchase-orders/{po_id}/kit-lines":{"post":{"description":"A kit is bought as the parts it is made of. Adds `quantity` kits' worth\nof each purchased part (made items and kits inside it expand too) to the\ndraft, in base units at each item's cost; a part already on the order in\nbase units gets the extra units on its line. Items that count whole units\nround up. A freight option chosen before is dropped (it was quoted for the\nold lines).","operationId":"addPurchaseKitLines","parameters":[{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitLinesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`purchase_order_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_editable` (not a draft), `recipe_too_deep`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`item_required`, `item_not_found_in_store`, `not_a_kit` (no recipe), `quantity_must_be_positive`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add a kit's parts to a purchase order","tags":["Purchasing"]}},"/purchase-orders/{po_id}/receipts":{"post":{"description":"Books one delivery in base units (decimals allowed for items counted by\nthe metre, kilo and so on) or in the pack snapshotted on its order line.\nPacks are converted before the `stock_in` movement is written. The\nmovement carries the landed base-unit cost (shipping and other costs\nshared over the lines by their value), and the item's moving average\ncost and order status change in the same transaction. Orders and builds\nwaiting for the item take the new units.\n\nOnly an order that was sent (`ordered` or `partial`) can be received.\n\nEvery call books a new delivery, so send an `Idempotency-Key`: a retry\nwith the same key replays the first answer instead of receiving the\ngoods twice.","operationId":"receivePurchaseOrder","parameters":[{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiveRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiptResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`purchase_order_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_cancelled`, `order_not_sent` (still a draft), `inventory_managed_externally`, `logical_stock_readonly` (a kit on the order; `details.variant_id`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`line_not_on_order`, `location_not_in_store`, `no_inventory_location`, `nothing_to_receive`, `purchase_quantity_ambiguous`, `quantity_must_be_positive`, `pack_not_whole_units`, `units_must_be_whole`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Receive a purchase order","tags":["Purchasing"]}},"/quotes":{"get":{"description":"Newest first.","operationId":"listQuotes","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_QuoteSummary"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List quotes","tags":["Quotes"]},"post":{"description":"Builds a cart at storefront prices (stock is checked and reserved like a\nshopper's add to cart), applies the negotiated discount and, when the\nseller picked one, re-quotes and applies the freight. Answers with the\nlink to send the customer, who pays it through the normal checkout.\n\n`freight_applied` is false when the seller's carrier was not offered on\nthe re-quote (the customer then picks one on the link);\n`freight_price_changed` when it was, at a different price.","operationId":"createQuote","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreated"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found` or `customer_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock`: not enough stock for a line"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pos_channel_required` / `pos_channel_invalid` (a quote belongs to an active PDV), `empty_quote`, `invalid_max_installments` (1 to 12), `invalid_discount` (percent under 100%) or `invalid_document` (the contact's CPF/CNPJ fails its check digits)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a quote","tags":["Quotes"]}},"/quotes/{cart_id}/expiration":{"post":{"description":"The link stops working right away. A quote the customer already paid is\nunaffected.","operationId":"expireQuote","parameters":[{"description":"The quote's cart id","in":"path","name":"cart_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"204":{"description":"Expired"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such quote in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Expire a quote","tags":["Quotes"]}},"/receivables":{"get":{"description":"Open ones first by expected day; received ones newest first.","operationId":"listReceivables","parameters":[{"description":"`open` or `received`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"method","required":false,"schema":{"type":["string","null"]}},{"description":"Expected on or after this day.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Expected on or before this day.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Receivable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List receivables","tags":["Finance"]}},"/reference-tables":{"get":{"description":"The store's palettes, size charts and dimension tables by name, with how\nmany entries each has and where it is attached.","operationId":"listReferenceTables","parameters":[{"description":"Only tables of this kind.","in":"query","name":"kind","required":false,"schema":{"description":"What a table holds and how the storefront shows it.","enum":["swatches","measurements","dimensions"],"type":"string"}},{"description":"Matches part of the name, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ReferenceTableSummary"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List reference tables","tags":["Reference Tables"]},"post":{"description":"A palette, a size chart or a dimensions table, with its entries and,\noptionally, the products, categories and collections that show it.","operationId":"createReferenceTable","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceTableCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceTable"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a message per field (`entries[3].label`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a reference table","tags":["Reference Tables"]}},"/reference-tables/{reference_table_id}":{"delete":{"description":"Removes the table, its entries and every attachment. Products keep their\nvariants and options. Cannot be undone.","operationId":"deleteReferenceTable","parameters":[{"description":"Reference table id","in":"path","name":"reference_table_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reference_table_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a reference table","tags":["Reference Tables"]},"get":{"description":"The table with every entry and where it is attached.","operationId":"getReferenceTable","parameters":[{"description":"Reference table id","in":"path","name":"reference_table_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceTable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reference_table_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a reference table","tags":["Reference Tables"]},"patch":{"description":"Changes the fields sent. `entries` replaces every row (send the whole\nlist); `product_ids`, `category_ids` and `collection_ids` each replace\nthat set of attachments.","operationId":"updateReferenceTable","parameters":[{"description":"Reference table id","in":"path","name":"reference_table_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceTableUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceTable"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reference_table_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a message per field (`entries[3].label`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a reference table","tags":["Reference Tables"]}},"/refunds":{"get":{"description":"Refunds issued through the payment provider, newest first, keyset-paged\n(follow `next_cursor`). Refunds made before the refund ledger existed\nare not listed.","operationId":"listRefunds","parameters":[{"description":"Only this order's refunds.","in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only refunds issued at or after this instant.","in":"query","name":"created_after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Only refunds issued before this instant.","in":"query","name":"created_before","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Refund"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List refunds","tags":["Payments"]}},"/reseller-applications":{"get":{"description":"Newest first; filter by `status` (`pending` is the queue).","operationId":"listResellerApplications","parameters":[{"description":"Only requests in this status.","in":"query","name":"status","required":false,"schema":{"description":"Where a request stands.","enum":["pending","approved","rejected"],"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ResellerApplication"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List reseller sign-up requests","tags":["Customers"]}},"/reseller-applications/{application_id}":{"get":{"operationId":"getResellerApplication","parameters":[{"description":"Reseller application id","in":"path","name":"application_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerApplication"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a reseller sign-up request","tags":["Customers"]}},"/reseller-applications/{application_id}/approval":{"post":{"description":"Links the request to its customer (the shopper who sent it signed in, else the one with its e-mail or phone,\nelse a new customer), fills in what the record lacks (CNPJ, company name, state registration, phone, address:\nnothing the record already has is written over), puts the customer in the group and e-mails the business\n(`resellers.approved`). 409 `application_decided` when it was already approved or rejected.","operationId":"approveResellerApplication","parameters":[{"description":"Reseller application id","in":"path","name":"application_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationApproval"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerApplication"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_decided`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no group given and no default group, or a group of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Approve a reseller sign-up request","tags":["Customers"]}},"/reseller-applications/{application_id}/rejection":{"post":{"description":"E-mails the business (`resellers.rejected`) with the reason, when one is given. 409 `application_decided` when it\nwas already approved or rejected.","operationId":"rejectResellerApplication","parameters":[{"description":"Reseller application id","in":"path","name":"application_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRejection"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerApplication"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`application_decided`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reject a reseller sign-up request","tags":["Customers"]}},"/returns":{"get":{"description":"Open ones (requested, approved, received) first, oldest request first;\nclosed ones newest first.","operationId":"listReturns","parameters":[{"description":"`requested`, `approved`, `received`, `refunded`, `rejected` or `cancelled`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List returns","tags":["Returns"]},"post":{"description":"For when a customer asked outside the storefront. The store's return\nwindow does not apply to the team.","operationId":"createReturn","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approve":{"description":"Approves it right away (the customer already agreed by phone or chat).","type":["boolean","null"]},"exchange_items":{"description":"With `exchange`: the variants the customer gets instead. Any active\nvariant of the store; a variant of a returned product is worth what\nthe customer paid for it, another product its price.","items":{"$ref":"#/components/schemas/ExchangeItemInput"},"type":"array"},"items":{"items":{"$ref":"#/components/schemas/ReturnItemInput"},"type":"array"},"note":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"reason":{"description":"One of `REASONS`.","type":"string"},"resolution":{"description":"`refund` (default) or `exchange`.","type":["string","null"]},"shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReturnShipping","description":"With `approve`: how the customer sends the goods back."}]}},"required":["items","reason","order_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_reason`, `invalid_resolution`, `no_items`, `invalid_quantity`, `duplicate_item`, `item_not_in_order`, `quantity_exceeds_returnable`, `no_exchange_items`, `duplicate_exchange_item`, `exchange_variant_not_found`, `exchange_variant_unavailable`, `invalid_shipping`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Register a return","tags":["Returns"]}},"/returns/{return_id}":{"get":{"operationId":"getReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a return","tags":["Returns"]}},"/returns/{return_id}/approval":{"post":{"description":"With how the customer sends the goods back: instructions (the store's\ndefault instructions when left out), the carrier, its authorization or\npostage code and a link to a prepaid label. The customer gets them by\ne-mail and on their order page.","operationId":"approveReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReturnShipping"}]}}},"description":"Optional: without it the store's default instructions apply"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_shipping`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Approve a return","tags":["Returns"]}},"/returns/{return_id}/cancellation":{"post":{"operationId":"cancelReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`, `return_note_issued` (cancel the NF-e de devolução first)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a return","tags":["Returns"]}},"/returns/{return_id}/exchange":{"post":{"description":"For an approved or received exchange: the return's value goes into the\ncustomer's store credit and pays a replacement order of the exchange\nitems (stock reserved, delivered like the original, no freight). The\norder is paid when the credit covers it; otherwise it waits for the\ndifference (`due_cents` in the `exchanged` step). Credit left over stays\nin the customer's wallet. Safe to retry.","operationId":"exchangeReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`; `insufficient_stock` (and the other `createOrder` conflicts) for the replacement order"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_an_exchange`, `no_customer`, `refund_exceeds_refundable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Make the exchange","tags":["Returns"]}},"/returns/{return_id}/exchange-charge":{"post":{"description":"When the exchange's replacement order is not covered by the return's\ncredit, charges what is still due by Pix (the live Pix of that order when\nthere is one) and answers its copy-and-paste code to show or send. 409\n`invalid_state` before the exchange is made, `nothing_due` once the order\nis paid, `exchange_order_cancelled` when the Pix expired or was refused and\nthe order was cancelled; 422 `not_an_exchange`, `payment_unavailable` (the\nstore takes no Pix), `customer_email_required` or `pix_intent_failed`.","operationId":"chargeExchangeDifference","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PixToPay"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`, `nothing_due` or `exchange_order_cancelled` (the Pix expired or was refused and the order was cancelled)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_an_exchange`, `payment_unavailable`, `customer_email_required` (the gateway needs the customer's e-mail and there is none) or `pix_intent_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Charge the difference of an exchange","tags":["Returns"]}},"/returns/{return_id}/exchange-items":{"put":{"description":"Turns the return into an exchange (or changes it): any active variant of\nthe store. A variant of a returned product is worth what the customer\npaid for it; another product, its price, and the customer pays any\ndifference on the replacement order. Until the exchange is made.","operationId":"setReturnExchangeItems","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetExchangeItemsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_exchange_items`, `invalid_quantity`, `duplicate_exchange_item`, `exchange_variant_not_found`, `exchange_variant_unavailable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set what an exchange gives","tags":["Returns"]}},"/returns/{return_id}/receipt":{"post":{"description":"Marks the return received, and puts sellable items back on the shelf\nunless `restock` is false. Also for an exchange made before the goods\narrived, which stays `exchanged`. Nothing goes back when the store's stock is\nowned by an ERP, for a variant that is not stocked, or beyond what the\norder took out of stock.","operationId":"receiveReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiveReturnRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`item_not_in_return`, `invalid_condition`, `location_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Receive the goods","tags":["Returns"]}},"/returns/{return_id}/refunds":{"post":{"description":"Refunds the order's payment through its gateway (see `refundOrder`, which\nthis calls: same errors, same idempotency) and closes the return as\n`refunded`. What a gift card or store credit paid on the order goes back\nto that credit; the gateway is refunded first, then credit. With `manual`\nit only records a refund made elsewhere. With `destination: store_credit`\nthe refund goes into the customer's wallet (optionally with a bonus) and\nno payment is touched.","operationId":"refundReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundReturnRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`, or any `refundOrder` conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nothing_to_refund`, or any `refundOrder` validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `provider_error`: the gateway refused; nothing was recorded"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Refund a return","tags":["Returns"]}},"/returns/{return_id}/rejection":{"post":{"operationId":"rejectReturn","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectReturnRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`, `return_note_issued` (cancel the NF-e de devolução first)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reject a return","tags":["Returns"]}},"/returns/{return_id}/shipping":{"put":{"description":"Rewrites the instructions, carrier, code and label link while the goods\nhave not arrived (`requested` or `approved`).","operationId":"setReturnShipping","parameters":[{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnShipping"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_shipping`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change how the goods go back","tags":["Returns"]}},"/reviews":{"get":{"description":"For the moderation\nqueue's badge, count pending reviews with\n`status=pending&limit=1&include_total=true`.","operationId":"listReviews","parameters":[{"in":"query","name":"status","required":false,"schema":{"description":"`pending` (waiting for moderation), `approved` (shown on the storefront)\nor `rejected`.","enum":["pending","approved","rejected"],"type":"string"}},{"in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Review"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List reviews","tags":["Reviews"]}},"/reviews/{review_id}":{"delete":{"operationId":"deleteReview","parameters":[{"description":"Review id","in":"path","name":"review_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such review in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a review","tags":["Reviews"]},"patch":{"description":"Approve, reject or send a review back to pending. Records who decided\nand when. Only `approved` reviews show on the storefront.","operationId":"updateReview","parameters":[{"description":"Review id","in":"path","name":"review_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such review in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Moderate a review","tags":["Reviews"]}},"/sales-channels":{"get":{"description":"By name.","operationId":"listSalesChannels","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SalesChannel"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List sales channels","tags":["Sales Channels"]}},"/sales-channels/{channel_id}":{"get":{"operationId":"getSalesChannel","parameters":[{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannel"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such channel in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a sales channel","tags":["Sales Channels"]}},"/shipments":{"get":{"description":"The store's shipments, newest first, each with its lines, boxes and\ntracking; with `order_id`, that order's, oldest first. Filters combine.","operationId":"listShipments","parameters":[{"description":"One order's shipments (oldest first then).","in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated statuses, e.g. `draft,ordered`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Comma-separated box states, e.g. `computed,edited`.","in":"query","name":"boxes_state","required":false,"schema":{"type":"string"}},{"description":"`central_do_frete`, `local_delivery`, `other_carrier` or `pickup`.","in":"query","name":"freight_provider_code","required":false,"schema":{"type":"string"}},{"description":"Include cancelled shipments (excluded unless `status` names them).","in":"query","name":"include_cancelled","required":false,"schema":{"type":"boolean"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List shipments","tags":["Shipments"]},"post":{"description":"Adds a shipment to an order. Without `items` it takes every unit not yet\nclaimed by another (non-cancelled) shipment. Its boxes are computed from\nthe lines right away (see `boxes_state`). The order's\n`fulfillment_status` (and `fulfilled` status once everything is\ndelivered) follows its shipments.","operationId":"createShipment","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`item_not_available` (the line is not on this order or nothing of it is left), `quantity_exceeds_remaining`, `combined_items` (the shipment carries several orders: separate them first), or for parts `not_a_kit`, `part_not_in_kit`, `part_exceeds_remaining`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a shipment","tags":["Shipments"]}},"/shipments/{shipment_id}":{"delete":{"description":"Removes the box and frees its units to ship again. Nothing is cancelled\nat the carrier; use `POST /shipments/{shipment_id}/cancellation` for that.","operationId":"deleteShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order or shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipment_has_nfe`: the shipment has a live NF-e"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a shipment","tags":["Shipments"]},"get":{"description":"One shipment with its lines, boxes, quote and tracking.","operationId":"getShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such shipment"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a shipment","tags":["Shipments"]},"patch":{"description":"For shipments managed by hand (own delivery, other carriers, pickup):\nstatus, carrier, tracking, cost, notes, and the shipped / delivered\nstamps. Central do Frete shipments move through quote, generate, sync\nand cancel instead. The order's fulfillment follows.","operationId":"updateShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order or shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipment_has_nfe`: cancelling a shipment that has a live sale NF-e"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a shipment","tags":["Shipments"]}},"/shipments/{shipment_id}/booking":{"post":{"description":"Creates the freight order at Central do Frete from the saved quote and\nchosen option, moves the shipment to `ordered` and freezes its boxes.\nRefused when the boxes changed since the quote (`quote_outdated`) or the\nquote expired. The order's NFe XML must be attached first\n(`PUT /orders/{order_id}/nfe`) and say what Central do Frete requires\nof it: refused otherwise, unless a carta de correção is registered for\nthe note (or was issued elsewhere: `cce_issued`).","operationId":"bookShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"One key per booking the user asks for: a retry replays the answer instead of booking twice.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateShipmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order or shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_quote`, `quote_outdated` (boxes changed: quote again), `quote_expired`, `boxes_frozen`, `already_booked`, `booking_in_progress` (another booking of this shipment is running, or died less than ten minutes ago: sync the shipment first) or `order_closed` (the order was cancelled or refunded)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`box_empty`, `boxes_items_unplaced` or `boxes_items_mismatch`: the boxes do not hold exactly what ships (`details.problems`); `nfe_volumes_mismatch`: the NF-e declares another number of volumes than the shipment has boxes (accepted once a carta de correção is registered, or with `cce_issued`); `nfe_required`: attach the NFe XML first; `nfe_freight_mismatch`: the NF-e lacks what Central do Frete requires (freight mode 2, the chosen carrier, their text in the additional information; `details.problems`, and `details.suggested_correction` for a carta de correção), accepted once a carta de correção is registered for the note (or `cce_issued`); or a freight error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `freight_provider_not_configured` or `freight_invalid_input` (422), `freight_not_found` (404), `freight_provider_error` (502, the carrier refused or failed)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Book the carrier order","tags":["Shipments"]}},"/shipments/{shipment_id}/cancellation":{"post":{"description":"Cancels the carrier order first when there is one, then marks the\nshipment `cancelled`; its units are free to ship again. Units it had\nalready taken out of stock come back to the locations they left from\n(a `stock_in` with reason `shipment_cancelled`), held for the order while\nit is open, and the next shipment takes them out again. A delivered\nshipment is refused (409 `shipment_delivered`): its goods are with the\ncustomer, and a return brings them back.","operationId":"cancelShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelShipmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order or shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipment_has_nfe`: the shipment has a live sale NF-e; `shipment_delivered`: the shipment was delivered"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `freight_provider_not_configured` or `freight_invalid_input` (422), `freight_not_found` (404), `freight_provider_error` (502, the carrier refused or failed)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a shipment","tags":["Shipments"]}},"/shipments/{shipment_id}/labels":{"post":{"description":"A fresh public link to the label of a Melhor Envio shipment (anyone\nwith it can open it), kept on the shipment.","operationId":"shipmentLabel","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentLabel"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such order or shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_freight_order`: no label bought; `label_not_ready`: Melhor Envio has not generated it yet"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `freight_provider_not_configured` or `freight_invalid_input` (422), `freight_not_found` (404), `freight_provider_error` (502, the carrier refused or failed)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Print the shipment's label","tags":["Shipments"]}},"/shipments/{shipment_id}/lines":{"put":{"description":"Replaces which order lines (and how many units) the shipment carries.\nEach line can take at most what no other (non-cancelled) shipment has\nclaimed; see `GET /orders/{order_id}/unfulfilled-items`. Computed boxes follow; edited or\npacked boxes need `reset_boxes`.","operationId":"setShipmentLines","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetShipmentItemsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`boxes_packed` (send `reset_boxes`), `boxes_frozen` or `shipment_has_nfe`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`item_not_available` (the line is not on this order or nothing of it is left), `quantity_exceeds_remaining`, `combined_items` (the shipment carries several orders: separate them first), or for parts `not_a_kit`, `part_not_in_kit`, `part_exceeds_remaining`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Set a shipment's lines","tags":["Shipments"]}},"/shipments/{shipment_id}/quotes":{"post":{"description":"Asks the store's carrier integration (Central do Frete) for options with\nthe shipment's saved boxes (computed first when it has none yet). The\nquote is kept on the shipment (`quote`). The option of the carrier the\norder's NF-e names comes back already chosen (else the carrier chosen\non the previous quote, else the customer's at checkout); change it with\n`PUT /shipments/{shipment_id}/selected-quote`, then book it.","operationId":"quoteShipment","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteShipmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such shipment"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (no destination CEP or declared value), `no_boxes`, `box_empty`, `boxes_items_unplaced` or `boxes_items_mismatch` (the boxes do not hold exactly what ships, `details.problems`), `invalid_recipient_document`, or a freight error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The store's payment gateway or carrier failed, or its answer could not be read: whether it acted is unknown. A retry runs the operation again (an answer of 5xx is not kept for its `Idempotency-Key`), so look at the object first (an order's `refunds`, a shipment's `status`). `freight_provider_not_configured` or `freight_invalid_input` (422), `freight_not_found` (404), `freight_provider_error` (502, the carrier refused or failed)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Quote a shipment","tags":["Shipments"]}},"/shipments/{shipment_id}/selected-quote":{"put":{"description":"Keeps the chosen option on the shipment; booking uses it.","operationId":"selectShipmentQuote","parameters":[{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectQuoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such shipment"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_quote` or `quote_option_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Choose a quote option","tags":["Shipments"]}},"/store":{"get":{"description":"Its name, address (`slug`), currency, language and time zone.","operationId":"getStore","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a store","tags":["Stores"]}},"/subscriptions":{"get":{"description":"Soonest next order first.","operationId":"listSubscriptions","parameters":[{"description":"`active`, `paused` or `cancelled`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Subscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List subscriptions","tags":["Recurring orders"],"x-admin-operation":"listRecurringOrders"},"post":{"operationId":"createSubscription","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such customer in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `variant_not_found`; `invalid_delivery_order`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a subscription","tags":["Recurring orders"],"x-admin-operation":"createRecurringOrder"}},"/subscriptions/{subscription_id}":{"get":{"operationId":"getRecurringSubscription","parameters":[{"description":"RecurringOrder id","in":"path","name":"subscription_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"One subscription","tags":["Recurring orders"],"x-admin-operation":"getRecurringOrder"},"patch":{"description":"Pause, resume, cancel, skip the next order, change the interval, the date\nor the lines.","operationId":"updateSubscription","parameters":[{"description":"RecurringOrder id","in":"path","name":"subscription_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cancelled`: a cancelled subscription cannot change"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `variant_not_found`; `invalid_delivery_order`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change a subscription","tags":["Recurring orders"],"x-admin-operation":"updateRecurringOrder"}},"/supplier-invoices":{"get":{"description":"Newest note first.","operationId":"listSupplierInvoices","parameters":[{"description":"`pending`, `received`, `discarded` or `not_goods`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"supplier_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`pending`: received notes their issuer cancelled, whose reversal waits\nfor a decision.","in":"query","name":"reversal_status","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SupplierInvoice"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List supplier invoices","tags":["Purchasing"]},"post":{"description":"Reads a supplier's NF-e from its XML, finds the supplier by CNPJ, matches\nthe lines to stock items (codes learned from this supplier, barcodes,\nSKUs) and links the open purchase order it most likely fills (one its\nnotes name, else the supplier's with the most of its items). Nothing is\nreceived yet.","operationId":"importSupplierInvoice","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceImport"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceDetail"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invoice_already_imported` (`details.invoice_id`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_nfe` (`details.reason`: not_xml, not_nfe, bad_key, missing)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Import a supplier invoice","tags":["Purchasing"]}},"/supplier-invoices/{invoice_id}":{"get":{"operationId":"getSupplierInvoice","parameters":[{"description":"Supplier invoice id","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_invoice_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a supplier invoice","tags":["Purchasing"]},"patch":{"description":"Sets the supplier (or registers it from the note), the purchase order the\nnote fills, and line matches by hand. A line matched by hand teaches the\nsupplier's code, so its next notes match it. Changing the supplier\nre-matches the lines not matched by hand.","operationId":"updateSupplierInvoice","parameters":[{"description":"Supplier invoice id","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_invoice_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invoice_not_pending`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_not_found`, `purchase_order_not_found`, `order_not_open`, `order_supplier_mismatch`, `line_not_on_invoice`, `item_not_found_in_store`, `invalid_conversion`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a supplier invoice","tags":["Purchasing"]}},"/supplier-invoices/{invoice_id}/discard":{"post":{"description":"For a note imported by mistake: it is kept, marked `discarded`, and can\nno longer be received. Its key stays taken, so it is not imported twice.","operationId":"discardSupplierInvoice","parameters":[{"description":"Supplier invoice id","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_invoice_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invoice_not_pending`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Discard a supplier invoice","tags":["Purchasing"]}},"/supplier-invoices/{invoice_id}/receipt":{"post":{"description":"Books the note's goods into stock on its purchase order (sending a draft\norder; creating an order from the note when it has none, and adding lines\nthe order lacked) at the note's cost per base unit, plus the order's own\nfreight and other costs shared by value. The note's installments, or the\norder's payment terms counted from their anchor, become payables, and so\ndoes the order's FOB freight (to the carrier, due on the receipt). Every\nmatched code is remembered for the supplier's next notes.\n\nWhat it does depends on the note's `operation` (see `receive_plan`): a\npurchase as above; bonificação, amostra grátis and the store's own goods\ncoming back enter stock at no cost and owe nothing; a transfer or a\nfuture delivery enters stock at the note's cost and owes nothing;\nconsignação, conserto and demonstração are booked as goods held for\ntheir owner, never as the store's stock; uso e consumo, ativo and a\nsimples faturamento create payables only.","operationId":"receiveSupplierInvoice","parameters":[{"description":"Supplier invoice id","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceReceive"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceDetail"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_invoice_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invoice_not_pending`, `invoice_cancelled` (its issuer cancelled it), `order_not_open` (the linked order was received or cancelled since), `order_supplier_mismatch`, `inventory_managed_externally`, `logical_stock_readonly`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`operation_needs_decision` (\"outras\", a customer's return or a note whose lines disagree: choose its `operation` first), `lines_unmatched` (`details.lines`), `nothing_to_receive`, `units_must_be_whole` (a conversion that leaves part of a unit; `details.line_number`), `location_not_in_store`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Receive a supplier invoice","tags":["Purchasing"]}},"/suppliers":{"get":{"description":"Active suppliers first, then by name, with their open order counts.","operationId":"listSuppliers","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Supplier"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List suppliers","tags":["Purchasing"]},"post":{"operationId":"createSupplier","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Supplier"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a supplier","tags":["Purchasing"]}},"/suppliers/{supplier_id}":{"put":{"description":"Replaces every field (`is_active` omitted keeps the current value).","operationId":"updateSupplier","parameters":[{"description":"Supplier id","in":"path","name":"supplier_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Supplier"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a supplier","tags":["Purchasing"]}},"/tasks":{"get":{"description":"Open tasks by due time (no due time last), done ones newest first.\nCovers 500 tasks.","operationId":"listTasks","parameters":[{"description":"`open` (default), `done` or `all`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"`me`, `unassigned`, or a user id. Omit for everyone's.","in":"query","name":"assignee","required":false,"schema":{"type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"conversation_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"deal_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only this kind: `todo`, `call`, `meeting`, `visit` or `email`.","in":"query","name":"kind","required":false,"schema":{"type":"string"}},{"description":"Open tasks due by then: `overdue`, `today` or `week`.","in":"query","name":"due","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Task"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List tasks","tags":["Tasks"]},"post":{"operationId":"createTask","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a title out of range, an assignee outside the team or a record of another store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a task","tags":["Tasks"]}},"/tasks/{task_id}":{"delete":{"operationId":"deleteTask","parameters":[{"description":"Task id","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such task in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a task","tags":["Tasks"]},"get":{"operationId":"getTask","parameters":[{"description":"Task id","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such task in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a task","tags":["Tasks"]},"patch":{"description":"Edits, reassigns, completes (`done: true`) or reopens it. A new due time\nreminds again.","operationId":"updateTask","parameters":[{"description":"Task id","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such task in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a task","tags":["Tasks"]}},"/tax-classes":{"get":{"operationId":"listTaxClasses","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TaxClass"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List tax classes.","tags":["Fiscal"],"x-admin-operation":"listFiscalTaxClasses"},"post":{"description":"NCM, CEST, origin, CSOSN, PIS/COFINS CST, CFOPs by destination and the\noptional IBS/CBS group.","operationId":"createTaxClass","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxClassInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxClass"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`duplicate_name`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a tax class.","tags":["Fiscal"],"x-admin-operation":"createFiscalTaxClass"}},"/tax-classes/{tax_class_id}":{"delete":{"operationId":"deleteTaxClass","parameters":[{"description":"Tax class id","in":"path","name":"tax_class_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted; products that used it fall back to the store default"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a tax class.","tags":["Fiscal"],"x-admin-operation":"deleteFiscalTaxClass"},"put":{"operationId":"updateTaxClass","parameters":[{"description":"Tax class id","in":"path","name":"tax_class_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxClassInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxClass"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a tax class.","tags":["Fiscal"],"x-admin-operation":"updateFiscalTaxClass"}},"/tax-classes/{tax_class_id}/assignments":{"post":{"operationId":"assignTaxClass","parameters":[{"description":"Tax class id","in":"path","name":"tax_class_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxClassAssign"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalTaxClassAssignResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Assign a tax class to products or variants.","tags":["Fiscal"],"x-admin-operation":"assignFiscalTaxClass"}},"/team-members":{"get":{"description":"The owner first, then everyone an attachment reaches here, by name.","operationId":"listTeamMembers","parameters":[{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_TeamMember"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List store members","tags":["Team"],"x-admin-operation":"listStoreMembers"}},"/tickets":{"get":{"description":"The workspace's tickets of a view, most urgent first: late ones, then by\nwhen the next reply is due (the first by the priority's target; after\nthat, whenever the customer writes again, the same target from their\nmessage), then the newest. Up to 300; the order and the views consider\nevery open ticket.","operationId":"listTickets","parameters":[{"description":"`open` (default), `waiting_us`, `breached`, `mine`, `unassigned`,\n`waiting_customer` or `resolved`.","in":"query","name":"view","required":false,"schema":{"type":"string"}},{"description":"Number, subject, requester name or e-mail, or organization.","in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Ticket"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List tickets","tags":["Tickets"]}},"/tickets/{conversation_id}":{"get":{"description":"A ticket by its conversation's id, with its deadline and where it stands.","operationId":"getTicket","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The conversation is not a ticket of this workspace"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a ticket","tags":["Tickets"]},"patch":{"description":"Subject, category and priority. Fields left out keep their value.","operationId":"updateTicket","parameters":[{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The conversation is not a ticket of this workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty subject, or a ticket field that does not exist or has the wrong kind of value"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a ticket","tags":["Tickets"]}},"/variants/{variant_id}":{"delete":{"description":"Refused while any order references the variant, it has stock on hand or\nreserved, it is a part in another variant's kit or recipe, an open quote\nholds it, or a marketplace listing is tied to it; deactivate it instead.\nShopping carts holding it lose the line and get their totals recomputed.\nEmits the `product_variant.deleted` webhook.","operationId":"deleteVariant","parameters":[{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_has_orders`: orders reference this variant; `variant_has_stock`: it has units on hand or reserved; `variant_in_bom`: it is a part of a kit (`details.kits` lists them); `variant_in_recipe`: its item is used in a recipe; `variant_in_open_quote`: an open quote holds it; `variant_has_listing`: a marketplace listing is tied to it; `last_active_variant`: it is the only active variant of a product on sale"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a variant","tags":["Products"]},"get":{"operationId":"getVariant","parameters":[{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a variant","tags":["Products"]},"patch":{"description":"Partial: omitted fields keep their value, an explicit `null` clears a\nnullable one (`clear_compare_at: true` also clears the promotional\nprice). An empty `title` goes back to the one derived from the options.\nUse it to change a price (`price_cents`, `compare_at_cents`) or to hide\na variant (`is_active`). Price, availability and title changes are\npushed to the Meta catalog when the store has one.","operationId":"updateVariant","parameters":[{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sku_taken`: another variant or item of the store already uses this SKU; `last_active_variant`: it is the only active variant of a product on sale"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `invalid_barcode`, `variant_price_required` (an active variant of a product on sale needs a price above zero) or `variant_options_incomplete` (activating a variant that lacks a value of one of the product's options)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a variant","tags":["Products"]}},"/webhooks":{"get":{"description":"Newest first. `event` narrows to webhooks subscribed to that event.","operationId":"listWebhooks","parameters":[{"description":"Only webhooks subscribed to this event.","in":"query","name":"event","required":false,"schema":{"type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Webhook"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List webhooks","tags":["Webhooks"]},"post":{"description":"Registers an endpoint for the store's events.","operationId":"createWebhook","parameters":[{"description":"A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries `Idempotent-Replayed: true`. Reusing a key for a different request is a 422 `idempotency_key_reused`; retrying while the first is still running is a 409 `idempotency_request_in_progress`. JSON bodies up to 1 MB.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: invalid URL, or an event name not in `GET /event-types`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a webhook","tags":["Webhooks"]}},"/webhooks/{webhook_id}":{"delete":{"description":"Removes the webhook with its subscriptions and delivery log.","operationId":"deleteWebhook","parameters":[{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Webhook deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such webhook in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a webhook","tags":["Webhooks"]},"get":{"description":"With the events it is subscribed to and its signing secret.","operationId":"getWebhook","parameters":[{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such webhook in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a webhook","tags":["Webhooks"]},"patch":{"description":"Fields left out stay as they are.","operationId":"updateWebhook","parameters":[{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such webhook in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: invalid URL"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a webhook","tags":["Webhooks"]}},"/webhooks/{webhook_id}/deliveries":{"get":{"description":"Delivery attempts, newest first.","operationId":"listWebhookDeliveries","parameters":[{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size, 1 to 200. Defaults to 50.","example":50,"in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":200,"minimum":1,"type":"integer"}},{"description":"`next_cursor` from the previous page. Omit for the first page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Also return `total`, the count of all matching rows. Costs an extra\nquery; leave off when you only walk pages.","in":"query","name":"include_total","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookDelivery"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`forbidden` / `missing_permission`: the caller lacks the permission this operation needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such webhook in this store"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a webhook's deliveries","tags":["Webhooks"]}}},"security":[{"bearer_auth":[]}],"servers":[{"description":"Production","url":"https://api.mobiari.com/v1"},{"description":"Local development","url":"http://localhost:4000/v1"}],"tags":[{"description":"Stores and their settings","name":"Stores"},{"description":"Store members, invites, roles and permissions","name":"Team"},{"description":"Outbound event subscriptions and deliveries","name":"Webhooks"},{"description":"Domain events: the store's outbox and the catalog of event names","name":"Events"},{"description":"Products, variants, options, media, and the SKU/barcode lookup. Stock per location comes with the product and the variant; stock movements are under Inventory","name":"Products"},{"description":"Product categories and the Google/Meta marketplace taxonomies","name":"Categories"},{"description":"Curated product collections","name":"Collections"},{"description":"Tables a store defines once and shows on many product pages: fabric palettes (swatches with a code, a name and a texture picture), size charts and dimension tables. A table is attached to products, or to categories and collections whose products inherit it","name":"Reference Tables"},{"description":"Stock per variant and location, adjustments, transfers, the movement ledger, reservations, counts and locations. Stock writes refuse kits (`logical_stock_readonly`: adjust the components) and, while an ERP owns the store's stock (`inventory_mode`), answer 409 `inventory_managed_externally` unless sent with `force: true`. Send an `Idempotency-Key` on every stock write","name":"Inventory"},{"description":"Suppliers, purchase orders and receiving. An order goes draft, ordered, partial, received (or cancelled); receiving writes the stock","name":"Purchasing"},{"description":"Receivables derived from approved payments (fee and settlement days per payment method), the cash flow built from them and the open payables, and the DRE. Money is integer cents; days are São Paulo days","name":"Finance"},{"description":"Services people book, the providers who deliver them (weekly hours and time off), and the bookings: the calendar, booking for a client, moving, cancelling and closing, with the times on offer. Clients book through the storefront API or the hosted booking page","name":"Bookings"},{"description":"Orders, status changes and manual sales","name":"Orders"},{"description":"Open and abandoned carts","name":"Carts"},{"description":"Quotes built at the counter and shared with the customer as a payment link","name":"Quotes"},{"description":"Fulfillment, freight quotes, labels and tracking","name":"Shipments"},{"description":"NF-e emission (São Paulo): fiscal profile, A1 certificate, tax classes, documents, cancellation and number voiding","name":"Fiscal"},{"description":"Service invoices through the national NFS-e system: settings, production checklist, issuing, cancellation, XML and DANFSE","name":"NFS-e"},{"description":"Payments, providers and refunds","name":"Payments"},{"description":"Store credit and gift cards: customer wallets and cards with a code, spent at checkout. An account's balance is the sum of its ledger entries; issue cards, top up or correct wallets, disable a lost card","name":"Store credit"},{"description":"Loyalty points and referrals: customers earn points on paid orders and turn them into store credit; a referral code on a new customer's first order rewards both with credit once the order stands","name":"Loyalty"},{"description":"Subscriptions: a customer's standing order of some variants, placed again every N weeks or months and paid by a Pix e-mailed to the customer","name":"Recurring orders"},{"description":"Return requests (RMA): a customer, or the team for them, asks to send back part of an order. requested, approved, received, refunded (or rejected, cancelled). The refund goes through the order's payment; receiving can put sellable goods back in stock","name":"Returns"},{"description":"Physical stores, pickup points and the store locator","name":"Locations"},{"description":"Discount codes and automatic promotions","name":"Discounts"},{"description":"Where orders come from","name":"Sales Channels"},{"description":"Product reviews and moderation","name":"Reviews"},{"description":"Customers, addresses, identities, consent and data rights","name":"Customers"},{"description":"The businesses behind B2B customers: their contacts, what they bought, the e-mail domain that brings new contacts in, and their public registry data by CNPJ","name":"Companies"},{"description":"The team's to-do list: follow-ups tied to a customer, an order or a conversation, assigned to a member and reminded when due. A meeting task has an end and a place, and can be sent to its customer as a calendar invite","name":"Tasks"},{"description":"The sales pipeline: pipelines with ordered stages, and the deals moving through them, with the funnel, owner and forecast reports. Moving a deal to a won or lost stage closes it and emits deals.* events for workflows and webhooks","name":"Deals"},{"description":"Store forms (contact, quote request, anything) with typed, validated fields, and their submissions","name":"Forms"},{"description":"The shared inbox: WhatsApp, e-mail and storefront chat. Conversations, messages, attachments, notes, assignment and the assisted-sale cart. Live updates come over the agent WebSocket (see the realtime guide)","name":"Conversations"},{"description":"Inbox channels (site chat, WhatsApp, e-mail), WhatsApp signup, the chat bot and canned replies","name":"Conversation Settings"},{"description":"Conversations the team commits to answer by a deadline: a number per workspace, a subject, a category, the conversation's priority and a first-reply deadline by it. Each workspace chooses in the inbox settings whether tickets open never, when the team turns a conversation into one, or for every conversation a customer starts","name":"Tickets"},{"description":"Articles the chat bot answers from","name":"Knowledge Base"}],"webhooks":{"bookings.cancelled":{"post":{"description":"A booking was cancelled. Sent to the webhooks subscribed to `bookings.cancelled`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsCancelledEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.cancelled","tags":["Webhooks"]}},"bookings.completed":{"post":{"description":"A booked service was given. Sent to the webhooks subscribed to `bookings.completed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsCompletedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.completed","tags":["Webhooks"]}},"bookings.confirmed":{"post":{"description":"A booking's deposit was paid. Sent to the webhooks subscribed to `bookings.confirmed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsConfirmedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.confirmed","tags":["Webhooks"]}},"bookings.created":{"post":{"description":"A booking was made. Sent to the webhooks subscribed to `bookings.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.created","tags":["Webhooks"]}},"bookings.no_show":{"post":{"description":"A customer missed their booking. Sent to the webhooks subscribed to `bookings.no_show`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsNoShowEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.no_show","tags":["Webhooks"]}},"bookings.rescheduled":{"post":{"description":"A booking moved to another time. Sent to the webhooks subscribed to `bookings.rescheduled`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsRescheduledEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"bookings.rescheduled","tags":["Webhooks"]}},"calls.analyzed":{"post":{"description":"A call's recording was analyzed. Sent to the webhooks subscribed to `calls.analyzed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsAnalyzedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"calls.analyzed","tags":["Webhooks"]}},"calls.completed":{"post":{"description":"A call was answered and ended. Sent to the webhooks subscribed to `calls.completed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsCompletedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"calls.completed","tags":["Webhooks"]}},"calls.logged":{"post":{"description":"The outcome of a call was recorded. Sent to the webhooks subscribed to `calls.logged`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsLoggedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"calls.logged","tags":["Webhooks"]}},"calls.missed":{"post":{"description":"A call was missed. Sent to the webhooks subscribed to `calls.missed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsMissedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"calls.missed","tags":["Webhooks"]}},"carts.abandoned":{"post":{"description":"A cart was left without an order; `recovery_url` brings the shopper back to it. Sent to the webhooks subscribed to `carts.abandoned`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartsAbandonedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"carts.abandoned","tags":["Webhooks"]}},"carts.created":{"post":{"description":"A cart was created. Sent to the webhooks subscribed to `carts.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartsCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"carts.created","tags":["Webhooks"]}},"carts.recovered":{"post":{"description":"An abandoned cart became an order. Sent to the webhooks subscribed to `carts.recovered`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartsRecoveredEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"carts.recovered","tags":["Webhooks"]}},"conversations.handed_back":{"post":{"description":"A conversation was handed back to the assistant. Sent to the webhooks subscribed to `conversations.handed_back`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsHandedBackEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"conversations.handed_back","tags":["Webhooks"]}},"conversations.handed_over":{"post":{"description":"A conversation was handed to the team. Sent to the webhooks subscribed to `conversations.handed_over`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsHandedOverEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"conversations.handed_over","tags":["Webhooks"]}},"conversations.message_received":{"post":{"description":"A customer sent a message. Sent to the webhooks subscribed to `conversations.message_received`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsMessageReceivedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"conversations.message_received","tags":["Webhooks"]}},"conversations.resolved":{"post":{"description":"A conversation was resolved. Sent to the webhooks subscribed to `conversations.resolved`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsResolvedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"conversations.resolved","tags":["Webhooks"]}},"conversations.started":{"post":{"description":"A conversation started. Sent to the webhooks subscribed to `conversations.started`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationsStartedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"conversations.started","tags":["Webhooks"]}},"customers.birthday":{"post":{"description":"It is a customer's birthday. Sent to the webhooks subscribed to `customers.birthday`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersBirthdayEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.birthday","tags":["Webhooks"]}},"customers.created":{"post":{"description":"A customer was created. Sent to the webhooks subscribed to `customers.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.created","tags":["Webhooks"]}},"customers.deleted":{"post":{"description":"A customer was deleted. Sent to the webhooks subscribed to `customers.deleted`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersDeletedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.deleted","tags":["Webhooks"]}},"customers.erased":{"post":{"description":"A customer's personal data was erased at their request. Sent to the webhooks subscribed to `customers.erased`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersErasedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.erased","tags":["Webhooks"]}},"customers.lifecycle_changed":{"post":{"description":"A customer moved to another lifecycle stage. Sent to the webhooks subscribed to `customers.lifecycle_changed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersLifecycleChangedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.lifecycle_changed","tags":["Webhooks"]}},"customers.marketing_opt_in":{"post":{"description":"A customer agreed to receive marketing. Sent to the webhooks subscribed to `customers.marketing_opt_in`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersMarketingOptInEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.marketing_opt_in","tags":["Webhooks"]}},"customers.merged":{"post":{"description":"Another customer was merged into this one. Sent to the webhooks subscribed to `customers.merged`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersMergedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.merged","tags":["Webhooks"]}},"customers.nps_answered":{"post":{"description":"A customer answered the satisfaction survey (NPS). Sent to the webhooks subscribed to `customers.nps_answered`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersNpsAnsweredEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.nps_answered","tags":["Webhooks"]}},"customers.reorder_due":{"post":{"description":"A customer reached the time they usually buy again. Sent to the webhooks subscribed to `customers.reorder_due`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersReorderDueEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.reorder_due","tags":["Webhooks"]}},"customers.unsubscribed":{"post":{"description":"A customer stopped receiving marketing e-mail. Sent to the webhooks subscribed to `customers.unsubscribed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersUnsubscribedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.unsubscribed","tags":["Webhooks"]}},"customers.updated":{"post":{"description":"A customer changed. Sent to the webhooks subscribed to `customers.updated`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersUpdatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"customers.updated","tags":["Webhooks"]}},"deals.created":{"post":{"description":"A deal was created. Sent to the webhooks subscribed to `deals.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"deals.created","tags":["Webhooks"]}},"deals.lost":{"post":{"description":"A deal was lost. Sent to the webhooks subscribed to `deals.lost`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsLostEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"deals.lost","tags":["Webhooks"]}},"deals.stage_changed":{"post":{"description":"A deal moved to another stage: from `from_stage_id` to `to_stage_id`, when it happened. Sent to the webhooks subscribed to `deals.stage_changed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsStageChangedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"deals.stage_changed","tags":["Webhooks"]}},"deals.won":{"post":{"description":"A deal was won. Sent to the webhooks subscribed to `deals.won`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsWonEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"deals.won","tags":["Webhooks"]}},"emails.clicked":{"post":{"description":"A customer clicked a link in a marketing e-mail. Sent to the webhooks subscribed to `emails.clicked`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailsClickedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"emails.clicked","tags":["Webhooks"]}},"emails.opened":{"post":{"description":"A customer opened a marketing e-mail. Sent to the webhooks subscribed to `emails.opened`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailsOpenedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"emails.opened","tags":["Webhooks"]}},"forms.submitted":{"post":{"description":"Someone submitted a sign-up form; the object is the customer it made or found. Sent to the webhooks subscribed to `forms.submitted`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormsSubmittedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"forms.submitted","tags":["Webhooks"]}},"inventory.back_in_stock":{"post":{"description":"A product a customer asked to hear about is back in stock; the object is that customer. Sent to the webhooks subscribed to `inventory.back_in_stock`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBackInStockEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"inventory.back_in_stock","tags":["Webhooks"]}},"inventory.low_stock":{"post":{"description":"A variant's stock at a location fell to 5 or fewer. Sent to the webhooks subscribed to `inventory.low_stock`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLowStockEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"inventory.low_stock","tags":["Webhooks"]}},"inventory.updated":{"post":{"description":"A variant's stock at a location changed. Sent to the webhooks subscribed to `inventory.updated`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUpdatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"inventory.updated","tags":["Webhooks"]}},"orders.cancelled":{"post":{"description":"An order was cancelled. Sent to the webhooks subscribed to `orders.cancelled`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersCancelledEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.cancelled","tags":["Webhooks"]}},"orders.created":{"post":{"description":"An order was placed. Sent to the webhooks subscribed to `orders.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.created","tags":["Webhooks"]}},"orders.delivered":{"post":{"description":"An order was delivered. Sent to the webhooks subscribed to `orders.delivered`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersDeliveredEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.delivered","tags":["Webhooks"]}},"orders.fulfilled":{"post":{"description":"Every item of an order was fulfilled. Sent to the webhooks subscribed to `orders.fulfilled`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersFulfilledEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.fulfilled","tags":["Webhooks"]}},"orders.paid":{"post":{"description":"An order was paid in full. Sent to the webhooks subscribed to `orders.paid`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersPaidEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.paid","tags":["Webhooks"]}},"orders.refunded":{"post":{"description":"Money was refunded on an order; `refund_cents` is this refund. Sent to the webhooks subscribed to `orders.refunded`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersRefundedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.refunded","tags":["Webhooks"]}},"orders.shipped":{"post":{"description":"An order left with a carrier. Sent to the webhooks subscribed to `orders.shipped`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersShippedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.shipped","tags":["Webhooks"]}},"orders.updated":{"post":{"description":"An order changed. Sent to the webhooks subscribed to `orders.updated`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersUpdatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"orders.updated","tags":["Webhooks"]}},"payments.failed":{"post":{"description":"A payment of an order was refused or failed. Sent to the webhooks subscribed to `payments.failed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsFailedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"payments.failed","tags":["Webhooks"]}},"payments.pending":{"post":{"description":"A payment of an order is waiting for the customer (a Pix code was issued). Sent to the webhooks subscribed to `payments.pending`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsPendingEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"payments.pending","tags":["Webhooks"]}},"products.created":{"post":{"description":"A product was created. Sent to the webhooks subscribed to `products.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"products.created","tags":["Webhooks"]}},"products.deleted":{"post":{"description":"A product was deleted. Sent to the webhooks subscribed to `products.deleted`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsDeletedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"products.deleted","tags":["Webhooks"]}},"products.price_dropped":{"post":{"description":"A product a customer asked to hear about got cheaper; the object is that customer. Sent to the webhooks subscribed to `products.price_dropped`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsPriceDroppedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"products.price_dropped","tags":["Webhooks"]}},"products.updated":{"post":{"description":"A product changed. Sent to the webhooks subscribed to `products.updated`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsUpdatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"products.updated","tags":["Webhooks"]}},"returns.approved":{"post":{"description":"A return was approved. Sent to the webhooks subscribed to `returns.approved`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsApprovedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.approved","tags":["Webhooks"]}},"returns.exchanged":{"post":{"description":"A return's exchange order was sent. Sent to the webhooks subscribed to `returns.exchanged`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsExchangedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.exchanged","tags":["Webhooks"]}},"returns.received":{"post":{"description":"A return's items arrived. Sent to the webhooks subscribed to `returns.received`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsReceivedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.received","tags":["Webhooks"]}},"returns.refunded":{"post":{"description":"A return was refunded. Sent to the webhooks subscribed to `returns.refunded`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsRefundedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.refunded","tags":["Webhooks"]}},"returns.rejected":{"post":{"description":"A return was rejected. Sent to the webhooks subscribed to `returns.rejected`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsRejectedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.rejected","tags":["Webhooks"]}},"returns.requested":{"post":{"description":"A return was requested. Sent to the webhooks subscribed to `returns.requested`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnsRequestedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"returns.requested","tags":["Webhooks"]}},"reviews.approved":{"post":{"description":"A product review was approved. Sent to the webhooks subscribed to `reviews.approved`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewsApprovedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"reviews.approved","tags":["Webhooks"]}},"reviews.submitted":{"post":{"description":"A product review was submitted. Sent to the webhooks subscribed to `reviews.submitted`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewsSubmittedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"reviews.submitted","tags":["Webhooks"]}},"shipments.updated":{"post":{"description":"A shipment changed. Sent to the webhooks subscribed to `shipments.updated`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentsUpdatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"shipments.updated","tags":["Webhooks"]}},"storefronts.product_viewed":{"post":{"description":"A known customer viewed a product on the storefront. Sent to the webhooks subscribed to `storefronts.product_viewed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontsProductViewedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"storefronts.product_viewed","tags":["Webhooks"]}},"subscriptions.cancelled":{"post":{"description":"A subscription was cancelled. Sent to the webhooks subscribed to `subscriptions.cancelled`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsCancelledEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.cancelled","tags":["Webhooks"]}},"subscriptions.created":{"post":{"description":"A subscription was created. Sent to the webhooks subscribed to `subscriptions.created`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsCreatedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.created","tags":["Webhooks"]}},"subscriptions.cycle_failed":{"post":{"description":"A subscription could not place its order for a cycle. Sent to the webhooks subscribed to `subscriptions.cycle_failed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsCycleFailedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.cycle_failed","tags":["Webhooks"]}},"subscriptions.order_placed":{"post":{"description":"A subscription placed its order for a cycle. Sent to the webhooks subscribed to `subscriptions.order_placed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsOrderPlacedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.order_placed","tags":["Webhooks"]}},"subscriptions.paused":{"post":{"description":"A subscription was paused. Sent to the webhooks subscribed to `subscriptions.paused`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsPausedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.paused","tags":["Webhooks"]}},"subscriptions.resumed":{"post":{"description":"A subscription was resumed. Sent to the webhooks subscribed to `subscriptions.resumed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsResumedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"subscriptions.resumed","tags":["Webhooks"]}},"workflows.run_failed":{"post":{"description":"An automation run failed. Sent to the webhooks subscribed to `workflows.run_failed`, signed in the `Mobiari-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" under the webhook's secret>`).","parameters":[{"example":"t=1763337600,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","in":"header","name":"Mobiari-Signature","required":true,"schema":{"type":"string"}},{"in":"header","name":"Mobiari-Event-Id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"header","name":"Mobiari-Event-Type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsRunFailedEvent"}}},"required":true},"responses":{"2XX":{"description":"Received. Any other answer, or none within 30 seconds, is retried with backoff."}},"summary":"workflows.run_failed","tags":["Webhooks"]}}}}