{"components":{"schemas":{"AcceptCall":{"properties":{"sdp_answer":{"description":"The browser's WebRTC answer (SDP) to the customer's offer.","type":"string"}},"required":["sdp_answer"],"type":"object"},"AcceptInviteRequest":{"properties":{"accept_terms":{"description":"For a new account: the person accepted the terms of use and privacy\npolicy. Required then; ignored for an existing account.","type":"boolean"},"device_name":{"description":"See `LoginRequest.device_name`.","type":["string","null"]},"full_name":{"description":"Name for a new account. Ignored when the e-mail already has one.","type":"string"},"password":{"description":"For a new account, its password (at least 8 characters). When the\ninvited e-mail already has an account, that account's password\n(people signed in should use `POST /me/invites/accept`).","type":"string"},"token":{"description":"The invite's `token`, from the acceptance link.","type":"string"}},"required":["token","full_name","password"],"type":"object"},"AcceptInviteResponse":{"properties":{"email":{"type":"string"},"session":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Session","description":"The signed-in session. Absent when the account has two-factor\nsign-in enabled: the permission sets are attached, finish with\n`POST /auth/login`."}]},"store_id":{"description":"The store joined.","format":"uuid","type":"string"},"tenant_id":{"description":"Its organization.","format":"uuid","type":"string"},"token":{"description":"Access token of `session`, for clients that predate sessions.\nAbsent when `session` is.","type":["string","null"]},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","email","store_id","tenant_id"],"type":"object"},"AcceptMyInviteRequest":{"properties":{"token":{"description":"The invite's `token`, from the acceptance link.","type":"string"}},"required":["token"],"type":"object"},"AcceptMyInviteResponse":{"properties":{"store_id":{"description":"The store joined.","format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"}},"required":["store_id","tenant_id"],"type":"object"},"AcceptMyNetworkInviteRequest":{"properties":{"store_id":{"description":"Join with this store, of an organization you own.","format":"uuid","type":["string","null"]},"store_name":{"description":"Or open a new organization with one store of this name.","type":["string","null"]},"token":{"description":"The invite's `token`, from the link.","type":"string"}},"required":["token"],"type":"object"},"AcceptNetworkInviteRequest":{"properties":{"accept_terms":{"description":"A new account accepts the terms of use and privacy policy.","type":"boolean"},"device_name":{"description":"See `LoginRequest.device_name`.","type":["string","null"]},"full_name":{"description":"Name for a new account. Ignored when the e-mail has one.","type":"string"},"password":{"description":"A new account's password (at least 8 characters), or the existing\naccount's.","type":"string"},"store_id":{"description":"For an existing account: join with this store instead.","format":"uuid","type":["string","null"]},"store_name":{"description":"The new store's name (a new organization is opened for it).","type":["string","null"]},"token":{"description":"The invite's `token`, from the link.","type":"string"}},"required":["token","full_name","password"],"type":"object"},"AcceptNetworkInviteResponse":{"properties":{"member_id":{"format":"uuid","type":"string"},"session":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Session","description":"Only from `POST /network-invites/accept`, unless the account has a\nsecond factor (then sign in as usual)."}]},"store_id":{"description":"The store that joined.","format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"token":{"description":"Only from `POST /network-invites/accept`: access token of `session`.","type":["string","null"]},"user_id":{"format":"uuid","type":"string"}},"required":["member_id","store_id","tenant_id","user_id"],"type":"object"},"AccessAuditEntry":{"description":"A change to groups, policies, attachments or membership.","properties":{"action":{"description":"`group.*`, `policy.*`, `attachment.*`, `invite.created`,\n`invite.accepted`, `member.removed`, `owner.transferred`,\n`tenant.owner_transferred`, `service_account.*`. More may be added.","type":"string"},"actor_id":{"format":"uuid","type":["string","null"]},"actor_name":{"type":["string","null"]},"after":{"type":["object","null"]},"before":{"type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"policy_id":{"description":"The policy the change was about, when there is one.","format":"uuid","type":["string","null"]},"subject_name":{"type":["string","null"]},"subject_user":{"format":"uuid","type":["string","null"]}},"required":["id","action","created_at"],"type":"object"},"AccessBadge":{"description":"A permission set or a group, as a badge.","properties":{"color":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"AccessExplanation":{"properties":{"action":{"type":"string"},"allowed":{"type":"boolean"},"reasons":{"description":"Empty for a deny: nothing granted the action.","items":{"$ref":"#/components/schemas/ExplainReason"},"type":"array"},"recent":{"description":"The member's latest logged decisions in the store (denies in full,\nallows sampled), newest first.","items":{"$ref":"#/components/schemas/LoggedDecision"},"type":"array"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","action","allowed","reasons","recent"],"type":"object"},"AccessGrant":{"description":"More access for a limited time, asked by the brand and decided by the\nmember.","properties":{"codes":{"items":{"type":"string"},"type":"array"},"decided_at":{"format":"date-time","type":["string","null"]},"duration_hours":{"format":"int32","type":"integer"},"expires_at":{"description":"Approved: when it ends.","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"in_force":{"description":"Approved and not yet expired: in force now.","type":"boolean"},"member_id":{"format":"uuid","type":"string"},"reason":{"type":"string"},"requested_at":{"format":"date-time","type":"string"},"requested_by_name":{"type":["string","null"]},"status":{"description":"`requested`, `approved`, `declined` or `revoked`.","type":"string"}},"required":["id","member_id","codes","reason","duration_hours","status","requested_at","in_force"],"type":"object"},"AccountInsights":{"description":"An account's audience.","properties":{"account_id":{"format":"uuid","type":"string"},"followers":{"format":"int64","type":["integer","null"]},"followers_change":{"description":"Followers gained (or lost) in the window, from the first day on record.","format":"int64","type":["integer","null"]},"name":{"type":"string"},"network":{"$ref":"#/components/schemas/Network"}},"required":["account_id","network","name"],"type":"object"},"AccountRef":{"description":"An account to publish on.","properties":{"id":{"description":"`SocialAccount.id`.","format":"uuid","type":"string"},"network":{"$ref":"#/components/schemas/Network"}},"required":["network","id"],"type":"object"},"AccountSummary":{"properties":{"authorization_expires_at":{"description":"When the seller's authorization lapses, when the marketplace says.","format":"date-time","type":["string","null"]},"connected_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"last_error":{"type":["string","null"]},"needs_reauth":{"type":"boolean"},"nickname":{"type":["string","null"]},"site_id":{"type":"string"}},"required":["id","site_id","needs_reauth","connected_at"],"type":"object"},"AccountView":{"description":"A connected seller account.","properties":{"authorization_expires_at":{"description":"When the seller's authorization lapses, when the marketplace says\n(TikTok Shop, Shopee): connect again before then.","format":"date-time","type":["string","null"]},"connected_at":{"format":"date-time","type":"string"},"events_pending":{"description":"Notifications waiting to be worked off.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"import_state":{"description":"The listing import: `{state, started_at, finished_at, total, linked, error}`.","type":["object","null"]},"last_error":{"type":["string","null"]},"listings":{"$ref":"#/components/schemas/ListingCounts"},"needs_reauth":{"description":"The seller has to authorize again (the grant was revoked or expired).","type":"boolean"},"nickname":{"description":"The seller's name on the marketplace.","type":["string","null"]},"orders_imported":{"description":"Orders brought in from the marketplace.","format":"int64","type":"integer"},"price_pause_reason":{"description":"What the marketplace said.","type":["string","null"]},"price_paused_until":{"description":"Prices are not being written until this time: the marketplace answered\nthat it does not take price changes through the API (yet).","format":"date-time","type":["string","null"]},"settings":{"$ref":"#/components/schemas/Settings"},"site_id":{"type":"string"},"warehouse_managed":{"description":"The seller manages stock per warehouse on the marketplace; stock is\nnot pushed for such accounts yet.","type":"boolean"}},"required":["id","site_id","needs_reauth","warehouse_managed","settings","connected_at","listings","orders_imported","events_pending"],"type":"object"},"AccountsResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdAccountView"},"type":"array"},"providers":{"items":{"$ref":"#/components/schemas/ProviderAvailability"},"type":"array"}},"required":["accounts","providers"],"type":"object"},"ActionParam":{"description":"Something the bot must gather from the customer before calling.","properties":{"description":{"description":"What it is, for the AI (\"o número da fatura, como INV-123\").","type":"string"},"key":{"description":"Letters, digits and `_`, starting with a letter.","type":"string"},"kind":{"$ref":"#/components/schemas/ActionParamKind"},"required":{"type":"boolean"}},"required":["key","description","kind"],"type":"object"},"ActionParamKind":{"enum":["string","number","boolean"],"type":"string"},"ActorKind":{"description":"Who performed an audited action.","enum":["user","assistant","system"],"type":"string"},"AdAccount":{"description":"A connected Meta ad account.","properties":{"ad_account_id":{"description":"Meta's id, without `act_`.","type":"string"},"business_name":{"description":"The Business Manager it belongs to. Meta only allows customer lists (CRM audiences) and pixel\naudiences on an account that has one, so the builder prefers such an account. Unknown until read.","type":["string","null"]},"currency":{"type":"string"},"customer_list_terms":{"description":"The Custom Audience terms were accepted (needed for customer lists). Unknown until read.","type":["boolean","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"token_expires_at":{"description":"When the login that connected it expires; connect again before.","format":"date-time","type":["string","null"]},"token_valid":{"description":"What Meta last said of that login (the daily check): `false` once it stopped working. Unknown until checked.","type":["boolean","null"]}},"required":["id","ad_account_id","name","currency"],"type":"object"},"AdAccountView":{"properties":{"business_name":{"type":["string","null"]},"capabilities":{"$ref":"#/components/schemas/Capabilities"},"currency":{"type":"string"},"external_id":{"type":"string"},"id":{"format":"uuid","type":"string"},"last_sync_error":{"type":["string","null"]},"last_synced_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"provider":{"type":"string"},"status":{"description":"connected | needs_reconnect | disabled | error","type":"string"},"timezone":{"type":["string","null"]},"token_expires_at":{"format":"date-time","type":["string","null"]}},"required":["id","provider","external_id","name","currency","status","capabilities"],"type":"object"},"AdAccounts":{"description":"The store's ad accounts.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdAccount"},"type":"array"},"available":{"description":"The server has a Meta app to log in with.","type":"boolean"}},"required":["accounts","available"],"type":"object"},"AdAlert":{"properties":{"account_id":{"format":"uuid","type":["string","null"]},"campaign_id":{"format":"uuid","type":["string","null"]},"kind":{"description":"spending_without_sales | token_expiring | sync_stale | provider_error","type":"string"},"message":{"type":"string"},"provider":{"type":["string","null"]},"severity":{"description":"warning | critical","type":"string"}},"required":["kind","severity","message"],"type":"object"},"AdAudience":{"description":"A segment mirrored to a Meta Custom Audience.","properties":{"account_id":{"description":"The ad account it lives in (`AdAccount.id`); the connected account with a Business when unset.","format":"uuid","type":["string","null"]},"account_name":{"type":["string","null"]},"auto_sync":{"description":"Re-synced about daily.","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"external_id":{"description":"The audience id on Meta, once created there.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"invalid_rows":{"description":"How many of `last_count` Meta could not read (bad e-mail or phone).","format":"int32","type":"integer"},"last_count":{"description":"Contacts sent in the last sync.","format":"int32","type":"integer"},"last_error":{"description":"Why the last sync failed, in English (Meta's own words for `meta_refused`).","type":["string","null"]},"last_error_code":{"description":"What failed, for the UI to say in its language: `meta_not_connected`, `account_unavailable`,\n`audience_account_disabled`, `audience_needs_business`, `audience_needs_terms`,\n`segment_missing`, `audience_empty`, `meta_refused`, `meta_unavailable` or `internal`.","type":["string","null"]},"last_error_details":{"description":"What the message needs: `account` (the ad account's name), `terms_url` (where to accept\nMeta's Custom Audience terms).","type":["object","null"]},"last_synced_at":{"format":"date-time","type":["string","null"]},"meta_status":{"description":"Meta's own words about the audience, e.g. while it is being replaced.","type":["string","null"]},"name":{"type":"string"},"provider":{"description":"`meta`.","type":"string"},"segment_id":{"format":"uuid","type":"string"},"segment_name":{"type":["string","null"]},"size_lower":{"description":"People Meta matched, as a range (it hides small counts). Meta delivers ads to an audience of at least 100.","format":"int64","type":["integer","null"]},"size_upper":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/AdAudienceStatus"}},"required":["id","segment_id","name","provider","status","auto_sync","last_count","invalid_rows","created_at"],"type":"object"},"AdAudienceStatus":{"description":"Sync state of an ad audience.","enum":["pending","syncing","ready","error"],"type":"string"},"AdCampaign":{"description":"A campaign with its numbers for the window. Money in cents of the ad\naccount's currency.","properties":{"attributed_orders":{"description":"Paid orders our attribution credits to the campaign (last touch).","format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"conversations":{"description":"Conversations our inbox received from its ads (click-to-chat), in the\nwindow: the leads it brought, by our count.","format":"int64","type":"integer"},"cost_per_conversation_cents":{"description":"Spend over `conversations`.","format":"int64","type":["integer","null"]},"cpc_cents":{"format":"int64","type":["integer","null"]},"created_at":{"description":"When Meta says it was created (ISO 8601), to tell new campaigns from old ones.","type":["string","null"]},"ctr":{"description":"Clicks per impression (0 to 1).","format":"double","type":["number","null"]},"daily_budget_cents":{"description":"The daily budget Mobiari can change: the campaign's, or its only ad\nset's. Null when it is spread over several ad sets or lifetime.","format":"int64","type":["integer","null"]},"ends_at":{"description":"When it is set to stop, if it has an end date.","type":["string","null"]},"flag":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CampaignFlag"}]},"from_mobiari":{"description":"A boost made in Mobiari.","type":"boolean"},"id":{"type":"string"},"impressions":{"format":"int64","type":"integer"},"meta_conversations":{"description":"Conversations (WhatsApp, Messenger, Instagram) people started from\nits ads, as Meta counts them.","format":"int64","type":"integer"},"meta_purchase_value_cents":{"format":"int64","type":"integer"},"meta_purchases":{"description":"Purchases and their value as Meta's pixel counts them.","format":"int64","type":"integer"},"name":{"type":"string"},"objective":{"type":["string","null"]},"reach":{"format":"int64","type":"integer"},"roas":{"description":"Attributed revenue over spend.","format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"},"status":{"description":"`active`, `paused`, or Meta's own state in lowercase (`in_process`,\n`with_issues`...). The set may grow.","type":"string"},"visits":{"description":"Storefront visits tagged with the campaign (its id or its name in\n`utm_campaign`), in the window.","format":"int64","type":"integer"}},"required":["id","name","status","spend_cents","impressions","reach","clicks","meta_purchases","meta_purchase_value_cents","meta_conversations","conversations","visits","attributed_orders","attributed_revenue_cents","from_mobiari"],"type":"object"},"AdCampaignDetail":{"properties":{"ads":{"items":{"$ref":"#/components/schemas/AdView"},"type":"array"},"campaign":{"$ref":"#/components/schemas/CampaignView"},"daily":{"items":{"$ref":"#/components/schemas/AdDayPoint"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupView"},"type":"array"}},"required":["campaign","groups","ads","daily"],"type":"object"},"AdCampaignUpdateRequest":{"properties":{"daily_budget_cents":{"description":"New daily budget, in cents of the account's currency.","format":"int64","type":["integer","null"]},"status":{"description":"`active`, `paused` or `archived`.","type":["string","null"]}},"type":"object"},"AdCampaignUpdated":{"properties":{"daily_budget_cents":{"format":"int64","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"provider":{"type":"string"},"status":{"type":"string"}},"required":["id","provider","status"],"type":"object"},"AdCreatedResponse":{"description":"A campaign draft that was created on its provider.","properties":{"campaign_id":{"description":"The campaign in Mobiari's mirror (`CampaignView.id`).","format":"uuid","type":"string"},"provider":{"type":"string"},"provider_campaign_id":{"description":"The provider's own campaign id.","type":"string"},"status":{"type":"string"}},"required":["campaign_id","provider_campaign_id","provider","status"],"type":"object"},"AdDayPoint":{"properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"day":{"format":"date","type":"string"},"impressions":{"format":"int64","type":"integer"},"spend_cents":{"format":"int64","type":"integer"}},"required":["day","spend_cents","impressions","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"AdDraftAudience":{"description":"Who sees the ad. Providers take what they support and ignore the rest.","properties":{"age_max":{"format":"int32","minimum":0,"type":["integer","null"]},"age_min":{"format":"int32","minimum":0,"type":["integer","null"]},"countries":{"default":[],"description":"ISO country codes; Brazil when empty.","items":{"type":"string"},"type":"array"},"custom_audience_ids":{"default":[],"items":{"type":"string"},"type":"array"},"excluded_custom_audience_ids":{"default":[],"items":{"type":"string"},"type":"array"},"genders":{"default":[],"description":"`male` and/or `female`; everyone when empty.","items":{"type":"string"},"type":"array"},"interests":{"default":[],"items":{"$ref":"#/components/schemas/AdDraftInterest"},"type":"array"}},"type":"object"},"AdDraftCreative":{"description":"What the ad shows. The common fields are enough for a simple link ad; the\narrays carry what a provider needs beyond them (Google's asset mix).","properties":{"business_name":{"description":"The brand name Google shows; the store's when absent.","type":["string","null"]},"call_to_action":{"description":"`SHOP_NOW`, `LEARN_MORE`, `ORDER_NOW`, `SIGN_UP` or `NO_BUTTON`.","type":["string","null"]},"description":{"type":["string","null"]},"descriptions":{"default":[],"description":"Google's descriptions (2 to 5).","items":{"type":"string"},"type":"array"},"headline":{"default":"","description":"The headline (Meta's, Google's first headline).","type":"string"},"headlines":{"default":[],"description":"Google's extra headlines (3 to 15 including `headline`).","items":{"type":"string"},"type":"array"},"image_file_id":{"format":"uuid","type":["string","null"]},"image_file_ids":{"default":[],"description":"More library photos (Google needs at least one; Meta carousels use them).","items":{"format":"uuid","type":"string"},"type":"array"},"image_url":{"description":"A public https image, or a library photo.","type":["string","null"]},"link_url":{"description":"https; where the ad leads.","type":["string","null"]},"logo_file_id":{"format":"uuid","type":["string","null"]},"long_headlines":{"default":[],"description":"Google's long headlines (1 to 5).","items":{"type":"string"},"type":"array"},"primary_text":{"default":"","description":"The main text (Meta primary text, Google's first long headline).","type":"string"},"product_ids":{"default":[],"description":"Meta catalog products for a catalog campaign.","items":{"format":"uuid","type":"string"},"type":"array"},"youtube_urls":{"default":[],"items":{"type":"string"},"type":"array"}},"type":"object"},"AdDraftInterest":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"AdGroupUpdated":{"properties":{"daily_budget_cents":{"format":"int64","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"provider":{"type":"string"},"status":{"type":"string"}},"required":["id","provider","status"],"type":"object"},"AdInsights":{"description":"The stored ad history for a window.","properties":{"currency":{"description":"The rows' currency; null when they mix currencies (the totals then add\ndifferent money).","type":["string","null"]},"from":{"format":"date","type":"string"},"group_by":{"$ref":"#/components/schemas/AdInsightsGroupBy"},"last_synced_at":{"description":"When an account was last synced; null before the first nightly sync.","format":"date-time","type":["string","null"]},"rows":{"items":{"$ref":"#/components/schemas/AdInsightsRow"},"type":"array"},"suggestions":{"description":"Over `from`/`to`, independent of `campaign_id`.","items":{"$ref":"#/components/schemas/AdSuggestion"},"type":"array"},"timezone":{"description":"The store's time zone, the one orders are put on their day in.","type":"string"},"to":{"format":"date","type":"string"},"totals":{"$ref":"#/components/schemas/AdInsightsTotals"},"touch":{"$ref":"#/components/schemas/AttributionTouch"}},"required":["from","to","group_by","touch","timezone","rows","totals","suggestions"],"type":"object"},"AdInsightsGroupBy":{"description":"How the history report groups its rows.","enum":["day","campaign","ad"],"type":"string"},"AdInsightsRow":{"description":"One group of the history report. The grouping's own fields are set (the\nday, or the campaign and its ad); the others are null. Money in cents of\n`currency`.","properties":{"account_id":{"type":["string","null"]},"ad_group_id":{"description":"Meta ad set / Google ad group.","type":["string","null"]},"ad_group_name":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"ad_name":{"type":["string","null"]},"campaign_id":{"type":["string","null"]},"campaign_name":{"type":["string","null"]},"clicks":{"format":"int64","type":"integer"},"currency":{"type":"string"},"day":{"format":"date","type":["string","null"]},"impressions":{"format":"int64","type":"integer"},"mobiari_orders":{"description":"Paid orders the marketing dashboard credits to the group's campaign\n(the same sales as its Meta and Google rows), with their totals in the\nstore's currency. Null when they cannot be joined (the ad grouping).","format":"int64","type":["integer","null"]},"mobiari_revenue_cents":{"format":"int64","type":["integer","null"]},"platform":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdPlatform"}]},"platform_conversion_value_cents":{"format":"int64","type":"integer"},"platform_conversions":{"description":"Conversions as the platform counts them (Meta: purchases; Google: the\nconversion actions the account optimises for). May be fractional.","format":"double","type":"number"},"roas_mobiari":{"description":"Mobiari revenue over spend; null without spend or Mobiari numbers.","format":"double","type":["number","null"]},"roas_platform":{"description":"Platform conversion value over spend; null without spend.","format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["currency","spend_cents","impressions","clicks","platform_conversions","platform_conversion_value_cents"],"type":"object"},"AdInsightsTotals":{"description":"The report's totals (meaningful as money only when `currency` is set).","properties":{"clicks":{"format":"int64","type":"integer"},"impressions":{"format":"int64","type":"integer"},"mobiari_orders":{"format":"int64","type":"integer"},"mobiari_revenue_cents":{"format":"int64","type":"integer"},"platform_conversion_value_cents":{"format":"int64","type":"integer"},"platform_conversions":{"format":"double","type":"number"},"roas_mobiari":{"format":"double","type":["number","null"]},"roas_platform":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["spend_cents","impressions","clicks","platform_conversions","platform_conversion_value_cents","mobiari_orders","mobiari_revenue_cents"],"type":"object"},"AdObjective":{"description":"What an ad campaign aims for, across providers.","enum":["sales","traffic","messages","engagement","awareness","leads","catalog","app"],"type":"string"},"AdPlatform":{"description":"The ad platform a row came from.","enum":["meta","google"],"type":"string"},"AdPreview":{"description":"How an ad looks in one placement.","properties":{"format":{"description":"Meta's placement name (`MOBILE_FEED_STANDARD`, `INSTAGRAM_STANDARD`...).","type":"string"},"src":{"description":"A Meta page showing the ad, for an iframe.","type":"string"}},"required":["format","src"],"type":"object"},"AdPreviews":{"description":"Previews of a campaign form.","properties":{"previews":{"items":{"$ref":"#/components/schemas/AdPreview"},"type":"array"}},"required":["previews"],"type":"object"},"AdReport":{"description":"The one report the whole ads area reads: spend, the provider's own\nconversions and the revenue Mobiari's attribution credits to it, grouped\nby campaign, ad group, ad or provider.","properties":{"by_provider":{"items":{"$ref":"#/components/schemas/ProviderTotals"},"type":"array"},"currency":{"description":"The single currency of the rows; null when they differ.","type":["string","null"]},"daily":{"items":{"$ref":"#/components/schemas/AdDayPoint"},"type":"array"},"days":{"format":"int64","type":"integer"},"from":{"format":"date","type":"string"},"group_by":{"$ref":"#/components/schemas/ReportGroupBy"},"rows":{"items":{"$ref":"#/components/schemas/AdReportRow"},"type":"array"},"to":{"format":"date","type":"string"},"totals":{"$ref":"#/components/schemas/ReportTotals"},"unattributed_orders":{"description":"Paid orders from an ad click that no campaign in the mirror claims.","format":"int64","type":"integer"},"unattributed_revenue_cents":{"format":"int64","type":"integer"}},"required":["from","to","days","group_by","totals","by_provider","rows","daily","unattributed_orders","unattributed_revenue_cents"],"type":"object"},"AdReportRow":{"description":"One line of the unified report.","properties":{"account_id":{"format":"uuid","type":["string","null"]},"ad_id":{"format":"uuid","type":["string","null"]},"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"campaign_id":{"format":"uuid","type":["string","null"]},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"cpc_cents":{"format":"int64","type":["integer","null"]},"ctr":{"format":"double","type":["number","null"]},"currency":{"type":"string"},"external_id":{"type":["string","null"]},"group_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":["string","null"]},"impressions":{"format":"int64","type":"integer"},"level":{"description":"campaign | ad_group | ad | provider","type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"roas":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"},"status":{"type":"string"}},"required":["provider","level","name","status","currency","spend_cents","impressions","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"AdRow":{"description":"One ad.","properties":{"attributed_orders":{"description":"Paid orders credited to the ad: its visits and its conversations.","format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"conversations":{"description":"Conversations in Mobiari that started from this ad.","format":"int64","type":"integer"},"id":{"type":"string"},"metrics":{"$ref":"#/components/schemas/Metrics"},"name":{"type":"string"},"status":{"type":"string"},"thumbnail_url":{"type":["string","null"]}},"required":["id","name","status","metrics","conversations","attributed_orders","attributed_revenue_cents"],"type":"object"},"AdSetAudience":{"description":"Who an ad set shows to, in Mobiari's terms.","properties":{"age_max":{"format":"int64","type":["integer","null"]},"age_min":{"format":"int64","type":["integer","null"]},"cities":{"items":{"$ref":"#/components/schemas/CityRef"},"type":"array"},"countries":{"items":{"type":"string"},"type":"array"},"custom_audience_ids":{"items":{"type":"string"},"type":"array"},"excluded_custom_audience_ids":{"items":{"type":"string"},"type":"array"},"genders":{"description":"`male` and/or `female`; everyone when empty.","items":{"type":"string"},"type":"array"},"interests":{"items":{"$ref":"#/components/schemas/InterestRef"},"type":"array"},"platforms":{"description":"Where it shows (`facebook`, `instagram`...), empty for automatic.","items":{"type":"string"},"type":"array"},"regions":{"items":{"$ref":"#/components/schemas/PlaceRef"},"type":"array"},"zips":{"items":{"$ref":"#/components/schemas/PlaceRef"},"type":"array"}},"required":["countries","regions","cities","zips","genders","interests","custom_audience_ids","excluded_custom_audience_ids","platforms"],"type":"object"},"AdSetRow":{"description":"One ad set.","properties":{"ads":{"items":{"$ref":"#/components/schemas/AdRow"},"type":"array"},"audience":{"$ref":"#/components/schemas/AdSetAudience"},"daily_budget_cents":{"format":"int64","type":["integer","null"]},"ends_at":{"type":["string","null"]},"id":{"type":"string"},"lifetime_budget_cents":{"format":"int64","type":["integer","null"]},"metrics":{"$ref":"#/components/schemas/Metrics"},"name":{"type":"string"},"optimization_goal":{"type":["string","null"]},"starts_at":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","status","audience","metrics","ads"],"type":"object"},"AdSuggestion":{"description":"A campaign worth a look. Data only: nothing is changed on the platform.","properties":{"campaign_id":{"type":"string"},"campaign_name":{"type":"string"},"currency":{"type":"string"},"kind":{"$ref":"#/components/schemas/AdSuggestionKind"},"mobiari_orders":{"format":"int64","type":"integer"},"mobiari_revenue_cents":{"format":"int64","type":"integer"},"platform":{"$ref":"#/components/schemas/AdPlatform"},"platform_conversions":{"format":"double","type":"number"},"roas_mobiari":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["kind","platform","campaign_id","campaign_name","currency","spend_cents","platform_conversions","mobiari_orders","mobiari_revenue_cents"],"type":"object"},"AdSuggestionKind":{"description":"What a suggestion says. Campaigns spending without results are flagged\nby the live campaign reports, not here.","enum":["best_performer"],"type":"string"},"AdView":{"properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"campaign_id":{"format":"uuid","type":"string"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"creative":{"type":"object"},"effective_status":{"type":["string","null"]},"external_id":{"type":"string"},"group_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"impressions":{"format":"int64","type":"integer"},"name":{"type":"string"},"provider":{"type":"string"},"spend_cents":{"format":"int64","type":"integer"},"status":{"type":"string"}},"required":["id","campaign_id","group_id","provider","external_id","name","status","creative","spend_cents","impressions","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"AddDomainRequest":{"properties":{"hostname":{"example":"loja.example.com.br","type":"string"}},"required":["hostname"],"type":"object"},"AddEmailDomainRequest":{"properties":{"domain":{"description":"e.g. `minhaloja.com.br` (scheme, `www.` and trailing slash are dropped).","type":"string"}},"required":["domain"],"type":"object"},"AddEmailSuppressionRequest":{"properties":{"email":{"type":"string"}},"required":["email"],"type":"object"},"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"},"AddWebhookEventsRequest":{"properties":{"events":{"description":"Event names to subscribe to. Already subscribed ones are ignored.","items":{"type":"string"},"type":"array"}},"required":["events"],"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"},"AdjustedVariant":{"description":"An existing variant the generation changed.","properties":{"action":{"description":"`completed`: it had no value of an option added later and got the\nfirst free one; `converted_default`: the variant of a simple product\nbecame the first combination (its id, stock and orders kept);\n`deactivated`: every combination it could take is another\nvariant's, so it was deactivated.","type":"string"},"option_value_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"sku":{"type":"string"},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","sku","title","action","option_value_ids"],"type":"object"},"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"},"AdsAuthorizeUrl":{"description":"Where to send the browser to log in.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"AdsConnection":{"description":"Whether the store's ad accounts are connected.","properties":{"meta_configured":{"description":"An ad account is connected with Facebook Login (Social → Ads), so\naudiences can sync.","type":"boolean"}},"required":["meta_configured"],"type":"object"},"AdsHealth":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdAccountView"},"type":"array"},"last_runs":{"items":{"$ref":"#/components/schemas/SyncRunView"},"type":"array"}},"required":["accounts","last_runs"],"type":"object"},"AdsOverview":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdAccountView"},"type":"array"},"alerts":{"items":{"$ref":"#/components/schemas/AdAlert"},"type":"array"},"by_provider":{"items":{"$ref":"#/components/schemas/ProviderTotals"},"type":"array"},"currency":{"type":["string","null"]},"daily":{"items":{"$ref":"#/components/schemas/AdDayPoint"},"type":"array"},"days":{"format":"int64","type":"integer"},"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"},"top_campaigns":{"items":{"$ref":"#/components/schemas/CampaignView"},"type":"array"},"totals":{"$ref":"#/components/schemas/ReportTotals"}},"required":["from","to","days","totals","by_provider","daily","top_campaigns","alerts","accounts"],"type":"object"},"AdsPerformance":{"description":"Meta ad spend next to the revenue our attribution gives Meta.","properties":{"all_orders":{"$ref":"#/components/schemas/OrdersTotal","description":"Every order in the window, for scale."},"attributed":{"$ref":"#/components/schemas/MetaAttributedOrders"},"days":{"format":"int64","type":"integer"},"meta":{"$ref":"#/components/schemas/MetaAdsInsights"},"roas":{"description":"Attributed revenue over spend; null without spend.","format":"double","type":["number","null"]}},"required":["days","meta","attributed","all_orders"],"type":"object"},"AdsReport":{"description":"An ad account's campaigns and how they did.","properties":{"campaigns":{"items":{"$ref":"#/components/schemas/AdCampaign"},"type":"array"},"currency":{"type":"string"},"days":{"format":"int64","type":"integer"},"previous":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdsTotals","description":"The same totals for the window just before this one (same length), to show the change.\nAbsent when Meta or our own numbers could not be read for it."}]},"totals":{"$ref":"#/components/schemas/AdsTotals"}},"required":["days","currency","totals","campaigns"],"type":"object"},"AdsTotals":{"description":"The window's totals. Spend, impressions and clicks are the ad account's own when Meta gives\nthem (archived and deleted campaigns included), so they can exceed the campaigns' sum.","properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"conversations":{"format":"int64","type":"integer"},"impressions":{"format":"int64","type":"integer"},"meta_conversations":{"description":"See `AdCampaign`: Meta's count, ours, and storefront visits. Zero in\n`previous`, which only compares spend and sales.","format":"int64","type":"integer"},"meta_purchase_value_cents":{"format":"int64","type":"integer"},"meta_purchases":{"format":"int64","type":"integer"},"roas":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"},"visits":{"format":"int64","type":"integer"}},"required":["spend_cents","impressions","clicks","meta_purchases","meta_purchase_value_cents","meta_conversations","conversations","visits","attributed_orders","attributed_revenue_cents"],"type":"object"},"AiAction":{"description":"An action in the company's system the AI can take.","properties":{"confirm":{"description":"The AI confirms with the customer before calling it.","type":"boolean"},"description":{"description":"When the AI should use it and what it does, up to 500 characters.","type":"string"},"enabled":{"type":"boolean"},"label":{"description":"What the team reads (\"Reenviar boleto\").","type":"string"},"name":{"description":"Lower-case letters, digits and `_`, starting with a letter; unique in\nthe workspace.","type":"string"},"parameters":{"items":{"$ref":"#/components/schemas/ActionParam"},"type":"array"},"requires_identity":{"description":"Offered only in chats with a signed identity. Defaults to true.","type":"boolean"},"url":{"description":"The https endpoint that runs it.","type":"string"}},"required":["name","label","description","url"],"type":"object"},"AiActionResult":{"description":"What an action's endpoint answered. `answer` is what the AI reads: the\nJSON it returned, or its text, clipped to 4000 characters.","properties":{"answer":{"type":["object","null"]},"error":{"type":["string","null"]},"ok":{"type":"boolean"},"status":{"description":"The HTTP status, when it answered.","format":"int32","minimum":0,"type":["integer","null"]}},"required":["ok"],"type":"object"},"ApiTokenSummary":{"description":"A service account's key, without its secret.","properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`api_key` (issued in the app) or `oauth` (an AI app connected with\nOAuth; its access token renews itself, `expires_at` is the current one).","type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"mcp_approval":{"$ref":"#/components/schemas/McpApproval","description":"Which writes over MCP wait for a person's approval."},"name":{"type":"string"},"scopes":{"description":"Permission codes the token may use; `[\"*\"]` = everything the user has.","items":{"type":"string"},"type":"array"},"store_id":{"format":"uuid","type":"string"},"token_last4":{"type":"string"},"token_prefix":{"description":"First characters of the key (`mobi_sa_AbCd`), to recognize it.","type":"string"},"user_id":{"description":"The user the token acts as.","format":"uuid","type":"string"}},"required":["id","name","token_prefix","token_last4","user_id","store_id","scopes","created_at","kind","mcp_approval"],"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"},"ApplyStarterResult":{"description":"What applying a starter did.","properties":{"documents":{"description":"Documents written to the draft.","items":{"type":"string"},"type":"array"}},"required":["documents"],"type":"object"},"Arrangement":{"description":"The standing terms with one client.","properties":{"amount_cents":{"description":"BRL cents; required for `fixed`.","format":"int64","type":["integer","null"]},"basis":{"description":"`fixed` (the same amount each month) or `payment_received` (billed\nwhen a payment arrives).","type":"string"},"client_document":{"description":"CPF or CNPJ, digits only.","type":["string","null"]},"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"company_id":{"description":"The business it bills: its name, CNPJ, e-mail and invoice data are what\nthe invoices use.","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"description":"What the invoice says.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"issue_when":{"description":"`approved` or `received`: when the service invoice may be issued.","type":"string"},"name":{"type":"string"},"status":{"description":"`active`, `paused` or `ended`.","type":"string"}},"required":["id","client_name","name","basis","issue_when","status","created_at"],"type":"object"},"ArrangementInput":{"properties":{"amount_cents":{"format":"int64","type":["integer","null"]},"basis":{"type":"string"},"client_document":{"type":["string","null"]},"client_email":{"type":["string","null"]},"client_name":{"description":"Required without `company_id`.","type":["string","null"]},"company_id":{"description":"The business to bill. Its name, CNPJ and e-mail replace the client fields below.","format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"issue_when":{"type":["string","null"]},"name":{"type":"string"},"status":{"type":["string","null"]}},"required":["name","basis"],"type":"object"},"AssistantAction":{"description":"A write the assistant applied after approval.","properties":{"after_state":{"type":["object","null"]},"approved_at":{"format":"date-time","type":"string"},"before_state":{"description":"Snapshot taken before the write (what undo restores).","type":["object","null"]},"id":{"format":"uuid","type":"string"},"status":{"$ref":"#/components/schemas/AssistantActionStatus"},"tool_input":{"type":"object"},"tool_name":{"type":"string"},"undone_at":{"format":"date-time","type":["string","null"]}},"required":["id","tool_name","tool_input","status","approved_at"],"type":"object"},"AssistantActionStatus":{"description":"State of an applied action.","enum":["approved","undone"],"type":"string"},"AssistantChannel":{"description":"Where a conversation happened.","enum":["web","whatsapp"],"type":"string"},"AssistantChatRequest":{"description":"A message to the assistant.","properties":{"context":{"description":"What the admin is looking at (page, selected order or product...),\ngiven to the model as context.","type":["object","null"]},"conversation_id":{"description":"Continue this conversation (yours, in this store); omit or send an\nunknown id to start a new one.","format":"uuid","type":["string","null"]},"message":{"description":"Not blank.","type":"string"}},"required":["message"],"type":"object"},"AssistantConversation":{"description":"One of your assistant conversations.","properties":{"channel":{"$ref":"#/components/schemas/AssistantChannel"},"id":{"format":"uuid","type":"string"},"message_count":{"format":"int64","type":"integer"},"pending_proposals":{"description":"Proposals waiting for a decision.","format":"int64","type":"integer"},"title":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","channel","updated_at","message_count","pending_proposals"],"type":"object"},"AssistantConversationMessages":{"description":"A conversation with its whole transcript.","properties":{"channel":{"$ref":"#/components/schemas/AssistantChannel"},"id":{"format":"uuid","type":"string"},"messages":{"description":"Every message, oldest first.","items":{"$ref":"#/components/schemas/AssistantMessage"},"type":"array"},"pending_proposals":{"description":"Proposals still awaiting a decision, so a reload can render the cards.","items":{"$ref":"#/components/schemas/AssistantProposal"},"type":"array"},"title":{"type":["string","null"]}},"required":["id","channel","messages","pending_proposals"],"type":"object"},"AssistantLinkedPhone":{"description":"A phone linked (or being linked) to you for the assistant.","properties":{"phone_e164":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"verified_at":{"description":"Null while the code has not been confirmed.","format":"date-time","type":["string","null"]}},"required":["phone_e164","store_id"],"type":"object"},"AssistantMessage":{"description":"A stored message, content as the model API has it.","properties":{"content":{"description":"Content blocks: `{type: \"text\", text}`, `{type: \"tool_use\", id, name,\ninput}`, `{type: \"tool_result\", tool_use_id, content, is_error}`...","items":{"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"role":{"$ref":"#/components/schemas/AssistantMessageRole"}},"required":["id","role","content","created_at"],"type":"object"},"AssistantMessageRole":{"description":"Who wrote a message.","enum":["user","assistant"],"type":"string"},"AssistantPhoneVerification":{"description":"A verification code was sent.","properties":{"expires_in_seconds":{"description":"The code expires after this long.","format":"int64","type":"integer"},"phone_e164":{"description":"The number as stored: digits only, with country code.","type":"string"}},"required":["phone_e164","expires_in_seconds"],"type":"object"},"AssistantPreferences":{"description":"Store-wide assistant settings.","properties":{"store_id":{"format":"uuid","type":"string"},"system_prompt_extra":{"description":"Extra instructions added to every conversation of the store (tone,\npolicies, what to avoid).","type":["string","null"]}},"required":["store_id"],"type":"object"},"AssistantProposal":{"description":"A write waiting for the admin's decision.","properties":{"expires_at":{"format":"date-time","type":"string"},"preview":{"description":"What would change (tool-specific: before/after, the rows...).","type":"object"},"proposal_id":{"format":"uuid","type":"string"},"tool_name":{"type":"string"},"tool_use_id":{"type":"string"}},"required":["proposal_id","tool_use_id","tool_name","preview","expires_at"],"type":"object"},"AssistantUsage":{"description":"The store's assistant use this month.","properties":{"cap":{"description":"Messages allowed per month, set by the organization's plan.","format":"int32","type":"integer"},"input_tokens":{"format":"int64","type":"integer"},"messages":{"format":"int32","type":"integer"},"output_tokens":{"format":"int64","type":"integer"},"year_month":{"description":"`YYYY-MM`, UTC.","type":"string"}},"required":["year_month","input_tokens","output_tokens","messages","cap"],"type":"object"},"AssociateFileRequest":{"description":"Turn a file of the tenant's library into a product image.","properties":{"alt_text":{"type":["string","null"]},"file_id":{"description":"A file of the store's tenant. Must be an image.","format":"uuid","type":"string"},"image_kind":{"description":"`gallery` (default) or `measurement`.","type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"product_variant_id":{"format":"uuid","type":["string","null"]}},"required":["file_id"],"type":"object"},"AttachNfeRequest":{"description":"A nota fiscal for the order: the XML, a DANFE link, or both.","properties":{"danfe_url":{"type":["string","null"]},"xml":{"description":"Raw NFe XML. Omit to attach only a DANFE link.","type":["string","null"]}},"type":"object"},"AttachShipmentNfeRequest":{"description":"A nota fiscal that travels with one shipment.","properties":{"xml":{"description":"Raw NFe XML (the `nfeProc`, as the issuing system exports it).","type":"string"}},"required":["xml"],"type":"object"},"AttachVideoRequest":{"description":"Attach an external or library-hosted video to a product gallery by\nURL. The storefront renders it next to images. `provider` is\nauto-detected from the URL when omitted.","properties":{"alt_text":{"type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"poster_url":{"type":["string","null"]},"product_variant_id":{"format":"uuid","type":["string","null"]},"provider":{"description":"`upload`, `youtube`, `vimeo` or `external`.","type":["string","null"]},"url":{"description":"An `http(s)` URL: YouTube, Vimeo, or a video file.","type":"string"}},"required":["url"],"type":"object"},"Attachment":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"policy_color":{"type":["string","null"]},"policy_id":{"format":"uuid","type":"string"},"policy_kind":{"description":"`permission_set`, `rule` or `cedar`.","type":"string"},"policy_name":{"type":"string"},"principal_id":{"format":"uuid","type":"string"},"principal_kind":{"description":"`user` or `group`.","type":"string"},"principal_name":{"description":"The person's or group's name.","type":["string","null"]},"reason":{"type":["string","null"]},"scope_kind":{"description":"`tenant` (every store, including ones made later), `store`, or\n`network` (a network role over the member stores of the\norganization's franchise network; managed at\n`/stores/{store_id}/network/roles`).","type":"string"},"store_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["id","policy_id","policy_name","policy_kind","principal_kind","principal_id","scope_kind","store_ids","created_at"],"type":"object"},"AttributedOrdersDay":{"properties":{"day":{"format":"date","type":"string"},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"}},"required":["day","orders","revenue_cents"],"type":"object"},"AttributionRow":{"description":"Paid orders and revenue from one source / medium / campaign.","properties":{"campaign":{"type":["string","null"]},"capi_meta_sent":{"description":"Of `orders`, how many reached Meta through the Conversions API.","format":"int64","type":"integer"},"channel":{"description":"Grouping of source + medium: `paid_search`, `paid_social`,\n`paid_other`, `organic_search`, `organic_social`, `email`,\n`messaging`, `ai`, `referral`, `affiliate`, `other` or `direct`.\nNull on orders without a tracked visit.","type":["string","null"]},"chat_orders":{"description":"Of `orders`, how many were sold in a conversation (an inbox cart).","format":"int64","type":"integer"},"google_ads_sent":{"description":"Of `orders`, how many were uploaded to Google Ads.","format":"int64","type":"integer"},"medium":{"type":["string","null"]},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"source":{"description":"`utm_source`, else the network of an ad click id, else the\nreferrer's site (aliases folded: `ig` is `instagram`); null when\ndirect.","type":["string","null"]}},"required":["orders","revenue_cents","chat_orders","capi_meta_sent","google_ads_sent"],"type":"object"},"AttributionTouch":{"description":"Which touch of the visitor's journey an order is credited to.","enum":["first_touch","last_touch"],"type":"string"},"Audience":{"description":"An audience of the ad account.","properties":{"id":{"type":"string"},"kind":{"description":"`website` (pixel), `lookalike`, `customer_list`, `engagement` or what Meta calls it.","type":"string"},"name":{"type":"string"},"size_lower":{"description":"Rough size, when Meta says (it hides small audiences).","format":"int64","type":["integer","null"]},"size_upper":{"format":"int64","type":["integer","null"]},"status":{"description":"`ready` (can be used in an ad), `filling` (Meta is still collecting or replacing people), `small`\n(too small for Meta to deliver to yet) or `problem`.","type":"string"}},"required":["id","name","kind","status"],"type":"object"},"AudienceCreated":{"description":"An audience made from Mobiari.","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"AudienceEdit":{"description":"Audience facets to replace. Whatever is `None` stays as it is.","properties":{"age_max":{"format":"int32","minimum":0,"type":["integer","null"]},"age_min":{"format":"int32","minimum":0,"type":["integer","null"]},"cities":{"description":"Cities to show to; empty for none.","items":{"$ref":"#/components/schemas/CityRef"},"type":["array","null"]},"countries":{"description":"Empty only when places (regions, cities, ZIP codes) remain. A\nplace's country is left out: Meta refuses overlapping locations.","items":{"type":"string"},"type":["array","null"]},"custom_audience_ids":{"items":{"type":"string"},"type":["array","null"]},"excluded_custom_audience_ids":{"items":{"type":"string"},"type":["array","null"]},"genders":{"description":"`male` and/or `female`; empty for everyone.","items":{"type":"string"},"type":["array","null"]},"interests":{"items":{"$ref":"#/components/schemas/InterestRef"},"type":["array","null"]},"regions":{"description":"Regions to show to, from `searchSocialAdLocations`; empty for none.","items":{"$ref":"#/components/schemas/PlaceRef"},"type":["array","null"]},"zips":{"description":"ZIP codes to show to; empty for none.","items":{"$ref":"#/components/schemas/PlaceRef"},"type":["array","null"]}},"type":"object"},"AudiencePreset":{"description":"Which audience to build from the pixel.","enum":["viewed_not_bought","cart_not_bought","buyers"],"type":"string"},"Audiences":{"description":"The ad account's audiences.","properties":{"audiences":{"items":{"$ref":"#/components/schemas/Audience"},"type":"array"}},"required":["audiences"],"type":"object"},"AuditEvent":{"description":"One audited change.","properties":{"action":{"description":"Dotted action, e.g. `customers.merged`, `settings.updated`.","type":"string"},"actor_kind":{"$ref":"#/components/schemas/ActorKind"},"actor_name":{"description":"The actor's name, or e-mail when they have no name.","type":["string","null"]},"actor_user_id":{"format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"ip":{"description":"The caller's address, when the request came through the API.","type":["string","null"]},"meta":{"description":"Action-specific details.","type":"object"},"subject_id":{"type":["string","null"]},"subject_type":{"description":"Kind of record acted on, e.g. `customer`.","type":["string","null"]},"summary":{"description":"Human summary, in Portuguese.","type":"string"}},"required":["id","actor_kind","action","summary","meta","created_at"],"type":"object"},"AuthorizeGoogle":{"properties":{"browser_nonce":{"description":"A random value (32 bytes, base64url) the tab keeps in its\nsessionStorage and presents again to complete: only the tab that\nstarted the sign-in can finish it.","type":"string"}},"required":["browser_nonce"],"type":"object"},"AuthorizeRequest":{"properties":{"return_to":{"description":"Where the admin app should land after connecting; a path on the app.","type":["string","null"]}},"type":"object"},"AuthorizeUrl":{"properties":{"authorize_url":{"description":"Send the seller here. They sign in at the marketplace with the account\nthat owns the listings (not a collaborator) and allow Mobiari.","type":"string"}},"required":["authorize_url"],"type":"object"},"AutomaticDiscount":{"allOf":[{"$ref":"#/components/schemas/PromotionConfig","description":"The `buy_x_get_y` or `tiered` settings of a promotion."},{"properties":{"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"]},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"value_int":{"description":"Whole percent for `percent_off`, cents for `fixed_off`.","format":"int32","type":"integer"}},"required":["id","store_id","name","kind","value_int","is_active","priority","created_at","updated_at","combines_with_codes","combines_with_promotions"],"type":"object"}],"description":"A store-wide discount rule the cart applies on its own, without a code.\n\nPayment-method rules (`percent_off`, `fixed_off`): at most one applies\nper payment method, among the active rules whose window, minimum subtotal\nand payment method match: the highest `priority` wins, then the larger\ndiscount. Promotions (`buy_x_get_y`, `tiered`): every combinable one\nthat applies stacks, a non-combinable one applies alone, and the set\nwith the highest priority, then the larger discount, wins\n(`commerce::promotions`). A customer's price list is a base price, not a\ndiscount: the rule applies on top of the list price unless\n`skip_price_list_groups` says otherwise."},"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"},"BackupContact":{"description":"A contact of the Business app, with the labels it carries.","properties":{"name":{"description":"The name the store saved for the number.","type":["string","null"]},"phone":{"description":"The number, with country code (digits, `+` and spaces are fine).","type":"string"},"tags":{"description":"The app's labels on this chat, by name.","items":{"type":"string"},"type":"array"}},"required":["phone"],"type":"object"},"BackupMessage":{"description":"One message of a chat.","properties":{"at":{"format":"date-time","type":"string"},"filename":{"description":"A media message's file name.","type":["string","null"]},"from_me":{"description":"Sent by the store (from the phone), not by the contact.","type":"boolean"},"id":{"description":"The backup's id for the message; the import is keyed on it.","type":"string"},"kind":{"description":"`text`, `image`, `video`, `audio`, `document`, `sticker`, `location`,\n`contact` or `system`; anything else imports as a note.","type":"string"},"text":{"description":"The text, or a media message's caption.","type":["string","null"]}},"required":["id","at","from_me","kind"],"type":"object"},"BackupThread":{"description":"A chat with one number.","properties":{"messages":{"items":{"$ref":"#/components/schemas/BackupMessage"},"type":"array"},"phone":{"type":"string"}},"required":["phone","messages"],"type":"object"},"BankConnectInput":{"description":"The credentials of a statement-only Inter integration.","properties":{"certificate":{"description":"The integration's certificate (PEM).","type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"conta_corrente":{"description":"Only when the integration reaches more than one account.","type":["string","null"]},"private_key":{"description":"Its private key (PEM).","type":"string"},"sandbox":{"type":"boolean"}},"required":["client_id","client_secret","certificate","private_key"],"type":"object"},"BankConnection":{"description":"The store's bank connection. Never carries a secret.","properties":{"client_id":{"type":"string"},"conta_corrente":{"type":["string","null"]},"last_error":{"type":["string","null"]},"last_synced_at":{"format":"date-time","type":["string","null"]},"provider":{"description":"`inter`.","type":"string"},"sandbox":{"type":"boolean"},"status":{"description":"`active`, or `failing` when the last read failed (`last_error` says why).","type":"string"}},"required":["provider","client_id","sandbox","status"],"type":"object"},"BankCredit":{"description":"A credit that arrived in the bank account.","properties":{"amount_cents":{"description":"BRL cents.","format":"int64","type":"integer"},"charge_id":{"format":"uuid","type":["string","null"]},"company_id":{"description":"The business it was matched to.","format":"uuid","type":["string","null"]},"company_name":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"external_id":{"description":"The bank's id for it (Pix: the endToEndId).","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`PIX`, `TED`...","type":"string"},"occurred_on":{"format":"date","type":"string"},"payer_document":{"description":"CPF or CNPJ of who paid, digits only.","type":["string","null"]},"payer_name":{"type":["string","null"]},"status":{"description":"`new` (waiting), `charged` (a charge exists) or `ignored`.","type":"string"}},"required":["id","external_id","kind","amount_cents","occurred_on","status","created_at"],"type":"object"},"BankLine":{"description":"A statement line and what it could be matched to.","properties":{"account":{"type":"string"},"amount_cents":{"description":"Signed: money in is positive, money out negative.","format":"int64","type":"integer"},"candidates":{"description":"For an open debit: up to 3 open payables of the same amount due near\nthe day, the closest first. Empty for credits.","items":{"$ref":"#/components/schemas/Candidate"},"type":"array"},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"payable_id":{"format":"uuid","type":["string","null"]},"payment_id":{"description":"The payment a credit confirmed.","format":"uuid","type":["string","null"]},"posted_on":{"format":"date","type":"string"},"receivable_candidates":{"description":"For an open credit: up to 3 payments it could be (the net of the\nestimated fee within R$ 1,00 or 2%, whichever is less, or the whole payment), expected near the day.","items":{"$ref":"#/components/schemas/ReceivableCandidate"},"type":"array"},"status":{"description":"`open`, `matched` or `ignored`.","type":"string"}},"required":["id","account","posted_on","amount_cents","description","status","candidates","receivable_candidates"],"type":"object"},"BilledTo":{"description":"Who Mobiari bills.","properties":{"document":{"description":"CPF or CNPJ, without punctuation.","type":"string"},"name":{"type":"string"},"source":{"$ref":"#/components/schemas/BilledToSource"}},"required":["name","document","source"],"type":"object"},"BilledToSource":{"enum":["organization","company"],"type":"string"},"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"},"BillingCycle":{"description":"Monthly or annual billing.","enum":["monthly","annual"],"type":"string"},"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"},"Board":{"description":"A board with its columns in order and every card, by position.","properties":{"archived":{"type":"boolean"},"cards":{"items":{"$ref":"#/components/schemas/Card"},"type":"array"},"columns":{"items":{"$ref":"#/components/schemas/Column"},"type":"array"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","archived","columns","cards"],"type":"object"},"BoardCreateRequest":{"properties":{"columns":{"description":"Column names in order; the last one is the done column. Defaults to\nA fazer, Em andamento and Concluído.","items":{"type":"string"},"type":["array","null"]},"description":{"type":["string","null"]},"name":{"description":"1 to 120 characters.","type":"string"}},"required":["name"],"type":"object"},"BoardSummary":{"properties":{"archived":{"type":"boolean"},"card_count":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"done_count":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","archived","card_count","done_count","created_at"],"type":"object"},"BoardUpdateRequest":{"properties":{"archived":{"description":"`true` archives the board, `false` brings it back.","type":["boolean","null"]},"description":{"type":["string","null"]},"name":{"type":["string","null"]}},"type":"object"},"BomLine":{"description":"One line of a bill of materials, with the part's stock.","properties":{"available":{"format":"int32","type":"integer"},"component_variant_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"on_hand":{"format":"int32","type":"integer"},"product_name":{"type":"string"},"quantity_required":{"description":"Units of the part per kit.","format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"}},"required":["component_variant_id","sku","name","product_name","quantity_required","on_hand","reserved","available"],"type":"object"},"BomLineRequest":{"properties":{"component_variant_id":{"description":"The part: a variant of the same store.","format":"uuid","type":"string"},"quantity_required":{"format":"int32","minimum":1,"type":"integer"}},"required":["component_variant_id","quantity_required"],"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 booking.","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"]},"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"code":{"description":"\"A-0007\".","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_id":{"format":"uuid","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","service_id","service_name","provider_id","provider_name","client_name","starts_at","ends_at","status","price_cents","source","cancel_cutoff_hours","created_at","deposit_cents","paid_cents","deposit_credited_cents","has_intake"],"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"},"BookingHoursInput":{"properties":{"windows":{"description":"The whole week: windows replace what was there. Windows of one day\nmay not overlap.","items":{"$ref":"#/components/schemas/BookingHours"},"type":"array"}},"required":["windows"],"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"},"BookingInvite":{"description":"A link sent to a customer.","properties":{"assignee_name":{"type":["string","null"]},"assignee_user_id":{"description":"Who the meeting goes to.","format":"uuid","type":["string","null"]},"booking_id":{"description":"The latest booking made with it.","format":"uuid","type":["string","null"]},"booking_starts_at":{"format":"date-time","type":["string","null"]},"booking_status":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":"string"},"deal_id":{"format":"uuid","type":["string","null"]},"deal_title":{"type":["string","null"]},"emailed_at":{"format":"date-time","type":["string","null"]},"expires_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"service_id":{"description":"The service the link opens on.","format":"uuid","type":["string","null"]},"service_name":{"type":["string","null"]},"status":{"description":"`pending`, `booked` or `expired`.","type":"string"}},"required":["id","customer_id","status","expires_at","created_at"],"type":"object"},"BookingInviteCreated":{"description":"The link made, with its address (shown once: only a digest is kept).","properties":{"emailed":{"description":"The e-mail went out (when asked).","type":"boolean"},"invite":{"$ref":"#/components/schemas/BookingInvite"},"url":{"type":"string"}},"required":["invite","url","emailed"],"type":"object"},"BookingInviteRequest":{"description":"A link to make.","properties":{"assignee_user_id":{"description":"Who gets the meeting: defaults to the deal's owner, else the caller.","format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":"string"},"deal_id":{"description":"The deal the meeting is about.","format":"uuid","type":["string","null"]},"expires_in_days":{"description":"How long the link works: 1 to 90 days, 30 by default.","format":"int64","type":["integer","null"]},"send_email":{"description":"E-mail the link to the customer (default false: copy it yourself).","type":"boolean"},"service_id":{"description":"Open the page on this service; the customer picks otherwise.","format":"uuid","type":["string","null"]}},"required":["customer_id"],"type":"object"},"BookingNote":{"description":"A note about a session.","properties":{"author_id":{"format":"uuid","type":["string","null"]},"author_name":{"type":["string","null"]},"body":{"type":"string"},"booking_id":{"format":"uuid","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","booking_id","body","created_at","updated_at","editable"],"type":"object"},"BookingNoteInput":{"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"},"BookingPackage":{"description":"One client's package.","properties":{"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","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","service_id","service_name","client_name","name","sessions","used","price_cents","status","created_at"],"type":"object"},"BookingPackagePlan":{"description":"What the store sells: so many sessions of a service.","properties":{"active":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"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","active"],"type":"object"},"BookingPackagePlanInput":{"properties":{"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":"Someone (or something) that delivers services.","properties":{"active":{"type":"boolean"},"email":{"type":["string","null"]},"google_calendar":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CalendarLink","description":"The Google calendar bookings are written to, when connected."}]},"hours":{"description":"The weekly hours, by weekday then start.","items":{"$ref":"#/components/schemas/BookingHours"},"type":"array"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"service_ids":{"description":"The services this provider delivers.","items":{"format":"uuid","type":"string"},"type":"array"},"time_zone":{"description":"IANA zone of the weekly hours, such as `America/Sao_Paulo`.","type":"string"},"user_id":{"description":"The team member who is this provider: with \"Minha agenda\"\n(`bookings.own`) they see and manage this calendar only.","format":"uuid","type":["string","null"]},"video_url":{"description":"A fixed video room for online services (Meet, Zoom, Teams).","type":["string","null"]}},"required":["id","name","time_zone","active","position","service_ids","hours"],"type":"object"},"BookingProviderInput":{"properties":{"active":{"type":["boolean","null"]},"email":{"type":["string","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"]},"time_zone":{"type":["string","null"]},"user_id":{"description":"A member of the store's team; `null` unlinks.","format":"uuid","type":["string","null"]},"video_url":{"description":"`https://` link; empty removes it.","type":["string","null"]}},"type":"object"},"BookingService":{"description":"A service clients book.","properties":{"active":{"type":"boolean"},"buffer_min":{"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_min":{"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"},"max_advance_days":{"format":"int32","type":"integer"},"min_notice_min":{"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_min":{"description":"Offered start times are multiples of this many minutes.","format":"int32","type":"integer"}},"required":["id","name","duration_min","buffer_min","price_cents","min_notice_min","max_advance_days","cancel_cutoff_hours","slot_step_min","active","position","deposit_cents","deposit_on_cancel","capacity","online","intake_questions","sensitive","provider_ids"],"type":"object"},"BookingServiceInput":{"properties":{"active":{"type":["boolean","null"]},"buffer_min":{"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_min":{"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"]},"max_advance_days":{"format":"int32","type":["integer","null"]},"min_notice_min":{"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_min":{"format":"int32","type":["integer","null"]}},"type":"object"},"BookingSettings":{"description":"The store's booking settings.","properties":{"contact_email":{"description":"Where a client's replies to booking e-mails go.","type":["string","null"]},"enabled":{"description":"Clients can book online (the booking page and the storefront API).","type":"boolean"},"reminder_hours":{"description":"BookingHours before the start at which the client is reminded by e-mail.","items":{"format":"int32","type":"integer"},"type":"array"},"waitlist_enabled":{"description":"Clients can join a waitlist when a day has no time left.","type":"boolean"}},"required":["enabled","reminder_hours","waitlist_enabled"],"type":"object"},"BookingSettingsInput":{"properties":{"contact_email":{"type":["string","null"]},"enabled":{"type":["boolean","null"]},"reminder_hours":{"description":"0 to 4 values, each 1 to 336 (two weeks).","items":{"format":"int32","type":"integer"},"type":["array","null"]},"waitlist_enabled":{"type":["boolean","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"},"BookingsBreakdown":{"description":"One provider's or one service's numbers.","properties":{"cancelled":{"format":"int64","type":"integer"},"completed":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"no_show":{"format":"int64","type":"integer"},"no_show_rate_bps":{"format":"int64","type":["integer","null"]},"revenue_cents":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["id","name","total","completed","no_show","cancelled","revenue_cents"],"type":"object"},"BookingsReport":{"properties":{"no_show_clients":{"description":"Who missed most in the period (up to 20).","items":{"$ref":"#/components/schemas/NoShowClient"},"type":"array"},"previous":{"$ref":"#/components/schemas/BookingsSummary","description":"The same totals for the period just before."},"providers":{"items":{"$ref":"#/components/schemas/BookingsBreakdown"},"type":"array"},"range":{"$ref":"#/components/schemas/ReportRange"},"services":{"items":{"$ref":"#/components/schemas/BookingsBreakdown"},"type":"array"},"summary":{"$ref":"#/components/schemas/BookingsSummary"}},"required":["range","summary","previous","providers","services","no_show_clients"],"type":"object"},"BookingsSummary":{"description":"Totals of a period.","properties":{"cancel_rate_bps":{"description":"Cancelled over all, in basis points.","format":"int64","type":["integer","null"]},"cancelled":{"format":"int64","type":"integer"},"cancelled_by_client":{"format":"int64","type":"integer"},"cancelled_by_team":{"format":"int64","type":"integer"},"completed":{"format":"int64","type":"integer"},"deposits_cents":{"description":"Deposits paid online.","format":"int64","type":"integer"},"no_show":{"format":"int64","type":"integer"},"no_show_rate_bps":{"description":"No-shows over attended plus no-shows, in basis points.","format":"int64","type":["integer","null"]},"online":{"description":"Booked by the client online (the rest by the team).","format":"int64","type":"integer"},"open":{"description":"Still ahead or not closed yet: confirmed or waiting for payment.","format":"int64","type":"integer"},"package_sessions":{"description":"Paid with a package session.","format":"int64","type":"integer"},"released_unpaid":{"description":"Released because the deposit was not paid in time.","format":"int64","type":"integer"},"revenue_cents":{"description":"The price of attended sessions.","format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["total","completed","no_show","cancelled","cancelled_by_client","cancelled_by_team","released_unpaid","open","online","package_sessions","revenue_cents","deposits_cents"],"type":"object"},"Boost":{"description":"A boost made from Mobiari.","properties":{"campaign_id":{"type":["string","null"]},"daily_budget_cents":{"format":"int64","type":"integer"},"ends_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"starts_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"total_budget_cents":{"description":"The most it can spend.","format":"int64","type":"integer"}},"required":["id","status","daily_budget_cents","starts_at","ends_at","total_budget_cents"],"type":"object"},"BoostAudience":{"description":"Who sees a boost.","properties":{"age_max":{"format":"int32","minimum":0,"type":["integer","null"]},"age_min":{"format":"int32","minimum":0,"type":["integer","null"]},"cities":{"description":"Cities to show to, each with an optional radius around it.","items":{"$ref":"#/components/schemas/CityRef"},"type":"array"},"countries":{"description":"ISO country codes. Defaults to Brazil.","items":{"type":"string"},"type":"array"},"custom_audience_ids":{"description":"Campaigns only: saved audiences to show the ad to (Meta's ids, from\n`listSocialAdAudiences`). Boosts ignore them.","items":{"type":"string"},"type":"array"},"excluded_custom_audience_ids":{"description":"Campaigns only: saved audiences to leave out (buyers, for prospecting).","items":{"type":"string"},"type":"array"},"genders":{"description":"`male` and/or `female`; everyone when empty.","items":{"type":"string"},"type":"array"},"regions":{"description":"States (or other regions) to show to, from `searchSocialAdLocations`.","items":{"$ref":"#/components/schemas/PlaceRef"},"type":"array"},"zips":{"description":"ZIP codes (CEPs) to show to.","items":{"$ref":"#/components/schemas/PlaceRef"},"type":"array"}},"type":"object"},"BoostObjective":{"description":"What a boost aims for.","enum":["engagement","traffic"],"type":"string"},"BoxMeasuresRequest":{"description":"A box's corrected weight and sides.","properties":{"gross_weight_g":{"description":"With packaging; the packaging's weight (gross - net) is kept.","format":"int32","type":"integer"},"height_mm":{"format":"int32","type":"integer"},"length_mm":{"format":"int32","type":"integer"},"width_mm":{"format":"int32","type":"integer"}},"required":["length_mm","width_mm","height_mm","gross_weight_g"],"type":"object"},"BoxOrigin":{"description":"Where a planned box came from.","enum":["profile","part","variant","alone","carton","placeholder"],"type":"string"},"BoxProblem":{"description":"Something wrong with a shipment's boxes.","properties":{"box_seq":{"description":"The box it is about (its volume number), when it is about one.","format":"int32","type":["integer","null"]},"code":{"description":"`box_empty`, `boxes_items_unplaced`, `boxes_items_mismatch` (errors)\nor `box_weight_below_contents` (warning).","type":"string"},"expected":{"description":"Units the shipment ships (or grams the contents weigh, for the\nweight warning).","format":"double","type":["number","null"]},"message":{"description":"In words, for the store.","type":"string"},"name":{"description":"What the item is called.","type":["string","null"]},"order_item_id":{"description":"The order line it is about, when it is about one.","format":"uuid","type":["string","null"]},"part_variant_id":{"description":"The part (or sold variant) it is about.","format":"uuid","type":["string","null"]},"placed":{"description":"Units placed in boxes (or grams the box weighs).","format":"double","type":["number","null"]},"severity":{"$ref":"#/components/schemas/BoxProblemSeverity"}},"required":["code","severity","message"],"type":"object"},"BoxProblemSeverity":{"description":"How much a problem stops.","enum":["error","warning"],"type":"string"},"BoxSource":{"description":"Where a box's size came from.","enum":["pack","unit","unknown"],"type":"string"},"BoxesState":{"description":"What a shipment's boxes are doing.\n\n`computed`: they follow the contents (changing the lines recomputes\nthem). `edited`: a person changed them; they no longer follow the lines.\n`packed`: confirmed. `frozen`: a carrier order was booked with them, or\nthe shipment left; changing them needs cancelling first.","enum":["computed","edited","packed","frozen"],"type":"string"},"BrandAliases":{"properties":{"action_primary":{"default":"","type":"string"},"action_primary_hover":{"default":"","type":"string"},"action_primary_text":{"default":"","type":"string"},"action_secondary":{"default":"","type":"string"},"action_secondary_text":{"default":"","type":"string"},"border":{"default":"","type":"string"},"border_strong":{"default":"","type":"string"},"error":{"default":"","type":"string"},"link":{"default":"","type":"string"},"sale":{"default":"","type":"string"},"success":{"default":"","type":"string"},"surface_card":{"default":"","type":"string"},"surface_inverse":{"default":"","type":"string"},"surface_muted":{"default":"","type":"string"},"surface_page":{"default":"","type":"string"},"text_body":{"default":"","type":"string"},"text_caption":{"default":"","type":"string"},"text_inverse":{"default":"","type":"string"},"text_muted":{"default":"","type":"string"},"text_strong":{"default":"","type":"string"}},"type":"object"},"BrandAsset":{"properties":{"kind":{"default":"","type":"string"},"note":{"default":"","type":"string"},"url":{"default":"","type":"string"}},"type":"object"},"BrandAssetKind":{"description":"What an uploaded brand asset is.","enum":["image","font"],"type":"string"},"BrandAssetUploadForm":{"description":"A brand asset upload.","properties":{"file":{"description":"The file: an image (PNG, JPEG, WebP, GIF, SVG, AVIF) or a font\n(WOFF2, WOFF, OTF, TTF), up to 12 MB. The first part with a file\nname is used, whatever its field name.","format":"binary","type":"string"}},"required":["file"],"type":"object"},"BrandAssets":{"properties":{"favicon_url":{"type":["string","null"]},"images":{"default":[],"items":{"$ref":"#/components/schemas/BrandAsset"},"type":"array"},"logo_dark_url":{"type":["string","null"]},"logo_url":{"type":["string","null"]},"logo_width":{"default":0,"format":"int32","minimum":0,"type":"integer"}},"type":"object"},"BrandAttachment":{"description":"A text file handed to the generator.","properties":{"content":{"type":"string"},"name":{"type":"string"}},"required":["name","content"],"type":"object"},"BrandChange":{"properties":{"at":{"default":"","type":"string"},"prompt":{"default":"","type":"string"},"summary":{"default":"","type":"string"},"version":{"default":0,"format":"int32","minimum":0,"type":"integer"}},"type":"object"},"BrandColorScale":{"properties":{"name":{"default":"","type":"string"},"steps":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"}},"type":"object"},"BrandColors":{"properties":{"accents":{"default":[],"items":{"$ref":"#/components/schemas/BrandSwatch"},"type":"array"},"aliases":{"default":{"action_primary":"","action_primary_hover":"","action_primary_text":"","action_secondary":"","action_secondary_text":"","border":"","border_strong":"","error":"","link":"","sale":"","success":"","surface_card":"","surface_inverse":"","surface_muted":"","surface_page":"","text_body":"","text_caption":"","text_inverse":"","text_muted":"","text_strong":""},"oneOf":[{"$ref":"#/components/schemas/BrandAliases"}]},"brand":{"default":[],"items":{"$ref":"#/components/schemas/BrandSwatch"},"type":"array"},"rules":{"default":[],"items":{"type":"string"},"type":"array"},"scales":{"default":[],"items":{"$ref":"#/components/schemas/BrandColorScale"},"type":"array"},"semantic":{"default":[],"items":{"$ref":"#/components/schemas/BrandSwatch"},"type":"array"}},"type":"object"},"BrandComponentSpec":{"properties":{"description":{"default":"","type":"string"},"name":{"default":"","type":"string"},"rules":{"default":[],"items":{"type":"string"},"type":"array"},"tokens":{"additionalProperties":{"type":"string"},"default":{},"propertyNames":{"type":"string"},"type":"object"}},"type":"object"},"BrandEffects":{"properties":{"borders":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"durations":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"easing":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"rings":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"rules":{"default":[],"items":{"type":"string"},"type":"array"},"shadows":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"}},"type":"object"},"BrandEmailPrefs":{"properties":{"button_shape":{"default":"rounded","description":"`rounded` (uses radii md), `pill`, `square`.","type":"string"},"width":{"default":600,"format":"int32","minimum":0,"type":"integer"}},"type":"object"},"BrandFamily":{"properties":{"google_family":{"type":["string","null"]},"name":{"default":"","type":"string"},"role":{"default":"","description":"`display`, `body`, `logo`, `mono`.","type":"string"},"stack":{"default":"","description":"CSS stack with fallbacks, e-mail safe.","type":"string"},"substitute_for":{"description":"The licensed face this one stands in for, when the real one is not available.","type":["string","null"]},"usage":{"default":"","type":"string"},"weights":{"default":[],"items":{"format":"int32","minimum":0,"type":"integer"},"type":"array"}},"type":"object"},"BrandFontSource":{"description":"Where a web font comes from. `google` (family name), `adobe` (Typekit kit id or kit CSS\nURL), `url` (a stylesheet URL), `file` (a hosted font file URL, needs `family`).","properties":{"family":{"default":"","type":"string"},"kind":{"default":"","type":"string"},"note":{"default":"","type":"string"},"value":{"default":"","type":"string"}},"type":"object"},"BrandFooter":{"properties":{"address":{"default":"","type":"string"},"company":{"default":"","type":"string"},"extra":{"default":"","type":"string"},"social":{"default":[],"items":{"$ref":"#/components/schemas/BrandSocialLink"},"type":"array"}},"type":"object"},"BrandIconography":{"properties":{"glyphs":{"default":[],"items":{"type":"string"},"type":"array"},"notes":{"default":"","type":"string"},"set":{"default":"","type":"string"},"stroke":{"default":"","type":"string"}},"type":"object"},"BrandIdentity":{"properties":{"audience":{"default":"","type":"string"},"name":{"default":"","type":"string"},"origin":{"default":"","type":"string"},"since":{"default":"","type":"string"},"story":{"default":"","type":"string"},"tagline":{"default":"","type":"string"},"values":{"default":[],"items":{"type":"string"},"type":"array"},"wordmark":{"default":"","type":"string"},"wordmark_rules":{"default":"","type":"string"}},"type":"object"},"BrandImagery":{"properties":{"avoid":{"default":[],"items":{"type":"string"},"type":"array"},"frame_radius":{"default":"","type":"string"},"style":{"default":"","type":"string"},"subjects":{"default":[],"items":{"type":"string"},"type":"array"},"treatment":{"default":[],"items":{"type":"string"},"type":"array"}},"type":"object"},"BrandImportForm":{"description":"A design-system package upload.","properties":{"file":{"description":"The `.zip` package (up to 40 MB): tokens, CSS, guides, images and\nfonts, in any layout.","format":"binary","type":"string"}},"required":["file"],"type":"object"},"BrandJob":{"description":"A background brand job (generation, revision or import). Jobs live in\nmemory for an hour after they start; a server restart loses them (the\nsaved versions are the durable record).","properties":{"error":{"description":"When `failed`: what went wrong.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/BrandJobKind"},"result":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BrandSystemSaved","description":"When `done`: the saved system, as `BrandSystemSaved`, plus\nkind-specific extras (`evidence` for generate, `imported_files` and\n`skipped` for import, `summary` for revise)."}]},"stage":{"description":"Human-readable progress (Portuguese), e.g. \"salvando a nova versão\".","type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/BrandJobStatus"},"store_id":{"format":"uuid","type":"string"}},"required":["id","store_id","kind","status","stage","started_at"],"type":"object"},"BrandJobKind":{"description":"What a brand job does.","enum":["generate","revise","import"],"type":"string"},"BrandJobStarted":{"description":"A background job was started (or one was already running).","properties":{"already_running":{"description":"The store already had a job running; this is its id and nothing new\nwas started.","type":"boolean"},"job_id":{"description":"Poll `getBrandJob` with it.","format":"uuid","type":"string"}},"required":["job_id"],"type":"object"},"BrandJobStatus":{"enum":["running","done","failed"],"type":"string"},"BrandPackageFile":{"description":"A `.zip` design-system package.","format":"binary","type":"string"},"BrandRule":{"properties":{"example":{"default":"","type":"string"},"name":{"default":"","type":"string"},"rule":{"default":"","type":"string"}},"type":"object"},"BrandSocialLink":{"properties":{"kind":{"default":"","type":"string"},"url":{"default":"","type":"string"}},"type":"object"},"BrandSpacing":{"properties":{"base_px":{"default":0,"format":"int32","minimum":0,"type":"integer"},"container_max":{"default":"","type":"string"},"gutters":{"default":"","type":"string"},"rules":{"default":[],"items":{"type":"string"},"type":"array"},"scale":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"}},"type":"object"},"BrandSwatch":{"properties":{"hex":{"default":"","type":"string"},"name":{"default":"","type":"string"},"role":{"default":"","type":"string"},"usage":{"default":"","type":"string"}},"type":"object"},"BrandSystem":{"description":"The store's design system. Responses carry every field; in requests\nevery field is optional (missing ones take their defaults) and values\nare read leniently (`\"16px\"` for a number, a string for a list).","properties":{"assets":{"default":{"favicon_url":null,"images":[],"logo_dark_url":null,"logo_url":null,"logo_width":0},"oneOf":[{"$ref":"#/components/schemas/BrandAssets"}]},"changelog":{"default":[],"items":{"$ref":"#/components/schemas/BrandChange"},"type":"array"},"colors":{"default":{"accents":[],"aliases":{"action_primary":"","action_primary_hover":"","action_primary_text":"","action_secondary":"","action_secondary_text":"","border":"","border_strong":"","error":"","link":"","sale":"","success":"","surface_card":"","surface_inverse":"","surface_muted":"","surface_page":"","text_body":"","text_caption":"","text_inverse":"","text_muted":"","text_strong":""},"brand":[],"rules":[],"scales":[],"semantic":[]},"oneOf":[{"$ref":"#/components/schemas/BrandColors"}]},"components":{"default":[],"items":{"$ref":"#/components/schemas/BrandComponentSpec"},"type":"array"},"effects":{"default":{"borders":[],"durations":[],"easing":[],"rings":[],"rules":[],"shadows":[]},"oneOf":[{"$ref":"#/components/schemas/BrandEffects"}]},"email":{"default":{"button_shape":"rounded","width":600},"oneOf":[{"$ref":"#/components/schemas/BrandEmailPrefs"}]},"footer":{"default":{"address":"","company":"","extra":"","social":[]},"oneOf":[{"$ref":"#/components/schemas/BrandFooter"}]},"guide_md":{"default":"","description":"The narrative guide (markdown): what a designer or an agent reads first.","type":"string"},"iconography":{"default":{"glyphs":[],"notes":"","set":"","stroke":""},"oneOf":[{"$ref":"#/components/schemas/BrandIconography"}]},"identity":{"default":{"audience":"","name":"","origin":"","since":"","story":"","tagline":"","values":[],"wordmark":"","wordmark_rules":""},"oneOf":[{"$ref":"#/components/schemas/BrandIdentity"}]},"imagery":{"default":{"avoid":[],"frame_radius":"","style":"","subjects":[],"treatment":[]},"oneOf":[{"$ref":"#/components/schemas/BrandImagery"}]},"open_questions":{"default":[],"items":{"type":"string"},"type":"array"},"radii":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"schema_version":{"default":0,"format":"int32","minimum":0,"type":"integer"},"sources":{"default":[],"items":{"type":"string"},"type":"array"},"spacing":{"default":{"base_px":0,"container_max":"","gutters":"","rules":[],"scale":[]},"oneOf":[{"$ref":"#/components/schemas/BrandSpacing"}]},"typography":{"default":{"base_size_px":0,"families":[],"font_sources":[],"heading_transform":"","heading_weight":0,"leading":[],"rules":[],"scale":[],"tracking":[],"weights":[]},"oneOf":[{"$ref":"#/components/schemas/BrandTypography"}]},"updated_at":{"default":"","type":"string"},"voice":{"default":{"casing":[],"conventions":[],"do":[],"dont":[],"emoji":false,"language":"","person":"","sample_copy":[],"signoff":"","tone":[]},"oneOf":[{"$ref":"#/components/schemas/BrandVoice"}]}},"type":"object"},"BrandSystemSaved":{"description":"A saved brand system version.","properties":{"system":{"$ref":"#/components/schemas/BrandSystem"},"version":{"description":"The version just saved.","format":"int32","minimum":0,"type":"integer"},"versions":{"description":"The 60 most recent versions, newest first.","items":{"$ref":"#/components/schemas/BrandSystemVersion"},"type":"array"}},"required":["system","version","versions"],"type":"object"},"BrandSystemState":{"description":"The store's brand system and its history.","properties":{"active_job":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BrandJob","description":"A generation, revision or import still running for the store."}]},"assistant_available":{"description":"Whether AI generation and revision are available on this server.","type":"boolean"},"system":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BrandSystem","description":"Null until the system is first generated or saved."}]},"versions":{"description":"The 60 most recent versions, newest first.","items":{"$ref":"#/components/schemas/BrandSystemVersion"},"type":"array"}},"required":["versions","assistant_available"],"type":"object"},"BrandSystemVersion":{"description":"One saved version of the brand system.","properties":{"created_at":{"format":"date-time","type":"string"},"prompt":{"description":"The instruction the change was made from, for AI edits.","type":["string","null"]},"summary":{"description":"What changed.","type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["version","created_at"],"type":"object"},"BrandSystemVersionDetail":{"description":"A past version of the brand system.","properties":{"system":{"$ref":"#/components/schemas/BrandSystem"},"version":{"format":"int32","type":"integer"}},"required":["system","version"],"type":"object"},"BrandToken":{"properties":{"key":{"default":"","type":"string"},"note":{"default":"","type":"string"},"value":{"default":"","type":"string"}},"type":"object"},"BrandTypography":{"properties":{"base_size_px":{"default":0,"format":"int32","minimum":0,"type":"integer"},"families":{"default":[],"items":{"$ref":"#/components/schemas/BrandFamily"},"type":"array"},"font_sources":{"default":[],"items":{"$ref":"#/components/schemas/BrandFontSource"},"type":"array"},"heading_transform":{"default":"","description":"`none` or `uppercase`.","type":"string"},"heading_weight":{"default":0,"format":"int32","minimum":0,"type":"integer"},"leading":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"rules":{"default":[],"items":{"type":"string"},"type":"array"},"scale":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"tracking":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"},"weights":{"default":[],"items":{"$ref":"#/components/schemas/BrandToken"},"type":"array"}},"type":"object"},"BrandVoice":{"properties":{"casing":{"default":[],"items":{"$ref":"#/components/schemas/BrandRule"},"type":"array"},"conventions":{"default":[],"items":{"$ref":"#/components/schemas/BrandRule"},"type":"array"},"do":{"default":[],"items":{"type":"string"},"type":"array"},"dont":{"default":[],"items":{"type":"string"},"type":"array"},"emoji":{"default":false,"type":"boolean"},"language":{"default":"","type":"string"},"person":{"default":"","type":"string"},"sample_copy":{"default":[],"items":{"type":"string"},"type":"array"},"signoff":{"default":"","type":"string"},"tone":{"default":[],"items":{"type":"string"},"type":"array"}},"type":"object"},"BrazilianState":{"description":"Brazilian states with their IBGE codes (`cUF`, `cOrgao`).","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],"type":"string"},"Breakdown":{"description":"The full breakdown of a variant or an item.","properties":{"available":{"description":"Finished units plus what the parts could put together now.","format":"double","type":"number"},"components_price_cents":{"description":"Sum of the prices of the sold variants in the first level, times\ntheir quantities: what the parts would cost bought separately.","format":"int64","type":["integer","null"]},"cost_cents":{"description":"Material cost of one unit, summed down the tree.","format":"int64","type":["integer","null"]},"item_id":{"format":"uuid","type":["string","null"]},"limiting_item_id":{"description":"The node that caps `available`, when the recipe does.","format":"uuid","type":["string","null"]},"lines":{"items":{"$ref":"#/components/schemas/BreakdownNode"},"type":"array"},"makeable":{"description":"Like `available`, with what production could make as well.","format":"double","type":"number"},"name":{"type":"string"},"on_hand":{"description":"Finished units on the shelf.","format":"double","type":"number"},"price_cents":{"description":"The root's own price, when it is a variant.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":["string","null"]},"reserved":{"format":"double","type":"number"},"sku":{"type":["string","null"]},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["name","on_hand","reserved","available","makeable","lines"],"type":"object"},"BreakdownNode":{"description":"One node of a breakdown: an item, how much of it one unit of the root\nneeds, its stock, and what it is made of.","properties":{"available":{"description":"Finished units plus what its parts could put together now (a made\nitem counts only its finished units).","format":"double","type":"number"},"base_unit":{"type":"string"},"children":{"items":{"$ref":"#/components/schemas/BreakdownNode"},"type":"array"},"cost_cents":{"description":"The item's own unit cost, or the sum of its components' when unset.","format":"int64","type":["integer","null"]},"cost_total_cents":{"description":"Cost of this node per unit of the root.","format":"int64","type":["integer","null"]},"item_id":{"format":"uuid","type":"string"},"kind":{"description":"`purchased` or `made`.","type":"string"},"makeable":{"description":"Like `available`, with what a production run could make as well.","format":"double","type":"number"},"name":{"type":"string"},"on_hand":{"format":"double","type":"number"},"price_cents":{"description":"The price of the mirrored variant, when the item is itself sold\n(a combo part).","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":["string","null"]},"quantity":{"description":"Base units per unit of the parent.","format":"double","type":"number"},"quantity_total":{"description":"Base units per unit of the root (quantities multiplied down the tree).","format":"double","type":"number"},"reserved":{"format":"double","type":"number"},"sku":{"type":"string"},"source":{"description":"Where the line comes from: `variant`, `base` (product base recipe)\nor `item` (the item's own recipe).","type":"string"},"supports_units":{"description":"Units of the root this node alone could supply now.","format":"int64","type":"integer"},"truncated":{"description":"True when the node was cut short by depth or a cycle.","type":"boolean"},"variant_id":{"description":"The variant this item mirrors, when it does.","format":"uuid","type":["string","null"]}},"required":["item_id","sku","name","base_unit","kind","quantity","quantity_total","source","on_hand","reserved","available","makeable","supports_units","truncated","children"],"type":"object"},"BuildJob":{"description":"A production job for an order line.","properties":{"cancelled_at":{"format":"date-time","type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"components":{"description":"Live bill-of-materials readiness: what each line needs, what this job\nholds, what is still on the shelf, and what is short. Empty for a\nvariant with no bill of materials.","items":{"$ref":"#/components/schemas/BuildJobComponent"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"lead_time_days":{"description":"The variant's configured lead time, to prefill a start. The batch's\nown promise is `target_ready_at`.","format":"int32","type":["integer","null"]},"line_shipped":{"description":"Every unit of the job's order line has left in a shipment, or the\norder is fulfilled. A `ready` job with this set is history, not a\nfinished good waiting to go out.","type":"boolean"},"metadata_json":{"type":["object","null"]},"notes":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_item_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":["string","null"]},"quantity":{"format":"int32","type":"integer"},"requested_at":{"format":"date-time","type":"string"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/BuildJobStatus"},"store_id":{"format":"uuid","type":"string"},"target_ready_at":{"description":"When the batch is promised ready.","format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"variant_id":{"format":"uuid","type":"string"},"variant_sku":{"type":["string","null"]},"variant_title":{"type":["string","null"]}},"required":["id","store_id","order_id","order_item_id","product_id","variant_id","quantity","status","requested_at","created_at","updated_at","components","line_shipped"],"type":"object"},"BuildJobComponent":{"description":"One bill-of-materials line of a job: what the job needs of a part.","properties":{"available":{"description":"Units still free on the shelf (every reservation excluded).","format":"int32","type":"integer"},"component_variant_id":{"format":"uuid","type":"string"},"missing":{"description":"`required - reserved - available`, floored at zero.","format":"int32","type":"integer"},"name":{"type":["string","null"]},"required":{"description":"Units the whole job needs.","format":"int32","type":"integer"},"reserved":{"description":"Units reserved for this job.","format":"int32","type":"integer"},"sku":{"type":["string","null"]}},"required":["component_variant_id","required","reserved","available","missing"],"type":"object"},"BuildJobStartRequest":{"properties":{"lead_time_days":{"description":"Days from now the batch is expected ready; sets `target_ready_at`.\nOmitted keeps the job's target.","format":"int32","type":["integer","null"]},"quantity":{"description":"Units moving to the bench, 1 to the job quantity. Less than the job\nquantity splits it: the remainder stays queued.","format":"int32","minimum":1,"type":"integer"}},"required":["quantity"],"type":"object"},"BuildJobStatus":{"enum":["queued","in_progress","ready","cancelled"],"type":"string"},"BuildJobUpdateRequest":{"properties":{"notes":{"type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuildJobStatus","description":"Moving to `in_progress`, `ready` or `cancelled` stamps the matching\ntime; back to `queued` clears them."}]},"target_ready_at":{"format":"date-time","type":["string","null"]}},"type":"object"},"BulkReorderRequest":{"properties":{"reorder_point":{"description":"Null clears.","format":"int32","minimum":0,"type":["integer","null"]},"reorder_quantity":{"description":"Null clears.","format":"int32","minimum":1,"type":["integer","null"]},"variant_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["variant_ids"],"type":"object"},"BulkReorderResult":{"properties":{"updated":{"description":"Variants of this store that were updated; ids of other stores are\nskipped.","format":"int64","minimum":0,"type":"integer"}},"required":["updated"],"type":"object"},"BulkResult":{"properties":{"done":{"description":"How many runs it applied to.","minimum":0,"type":"integer"}},"required":["done"],"type":"object"},"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"},"BulkStockAdjustRequest":{"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"],"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"},"BundleDiscount":{"description":"The discount on a compre junto set.","properties":{"min_products":{"description":"How many of the products (the main one included) the cart must hold\nfor it, 2 up to all of them; all of them when null.","format":"int32","type":["integer","null"]},"value":{"format":"int32","type":"integer"},"value_type":{"$ref":"#/components/schemas/TierValue","description":"`percent` (a whole percent of the set) or `fixed` (cents off per set)."}},"required":["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"},"CalendarAuthorize":{"properties":{"authorize_url":{"description":"Send the provider here to sign in with Google and allow Mobiari.","type":"string"}},"required":["authorize_url"],"type":"object"},"CalendarComplete":{"properties":{"code":{"type":"string"},"state":{"type":"string"}},"required":["code","state"],"type":"object"},"CalendarFeed":{"description":"A provider's feed link.","properties":{"path":{"description":"Where it is served, on the API's host: `/booking-feeds/{token}.ics`.","type":"string"},"token":{"description":"The secret in the link.","type":"string"}},"required":["token","path"],"type":"object"},"CalendarLink":{"description":"A provider's connected Google calendar.","properties":{"google_email":{"type":["string","null"]},"last_error":{"type":["string","null"]},"last_synced_at":{"format":"date-time","type":["string","null"]},"needs_reauth":{"description":"Google refused the grant: connect again.","type":"boolean"}},"required":["needs_reauth"],"type":"object"},"Call":{"description":"A call, with the names the list shows.","properties":{"agent_name":{"type":["string","null"]},"agent_user_id":{"description":"Who answered it, or who placed it.","format":"uuid","type":["string","null"]},"answered_at":{"format":"date-time","type":["string","null"]},"attribution":{"description":"Where the caller came from (`source`, `campaign`, `ad_id`, ...), when known.","type":["object","null"]},"callback_task_id":{"description":"A missed call's callback task.","format":"uuid","type":["string","null"]},"called_back_at":{"description":"When a later call with the same customer was talked through.","format":"date-time","type":["string","null"]},"contact_name":{"description":"The customer's name, else the name the conversation knows.","type":["string","null"]},"contact_phone":{"description":"The customer's number, digits only.","type":"string"},"conversation_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"deal_id":{"format":"uuid","type":["string","null"]},"deal_title":{"type":["string","null"]},"direction":{"description":"`inbound` (the customer called) or `outbound`.","type":"string"},"duration_secs":{"description":"Seconds of talk.","format":"int32","type":["integer","null"]},"ended_at":{"format":"date-time","type":["string","null"]},"first_call":{"description":"The customer's first call with the store.","type":"boolean"},"id":{"format":"uuid","type":"string"},"logged_at":{"format":"date-time","type":["string","null"]},"notes":{"type":["string","null"]},"outcome":{"description":"What the agent said it came to (see `logCall`).","type":["string","null"]},"provider":{"description":"`whatsapp`, `twilio` or `sip`.","type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"description":"`ringing`, `answered`, `completed`, `missed`, `rejected` or `failed`.","type":"string"},"wait_secs":{"description":"Seconds it rang before someone answered.","format":"int32","type":["integer","null"]}},"required":["id","provider","direction","status","contact_phone","started_at","first_call"],"type":"object"},"CallAgentStats":{"description":"One member's calls in the period.","properties":{"avg_agent_score":{"description":"Average coaching score (0 to 100) of the member's analysed calls.","format":"int32","type":["integer","null"]},"avg_duration_secs":{"format":"int32","type":["integer","null"]},"calls":{"format":"int64","type":"integer"},"inbound_answered":{"format":"int64","type":"integer"},"logged":{"description":"Talked-through calls with an outcome.","format":"int64","type":"integer"},"name":{"type":["string","null"]},"outbound":{"format":"int64","type":"integer"},"sales":{"format":"int64","type":"integer"},"talk_secs":{"format":"int64","type":"integer"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","calls","inbound_answered","outbound","talk_secs","logged","sales"],"type":"object"},"CallAnalysis":{"description":"What the AI read in a call.","properties":{"agent_score":{"description":"0 to 100, from the scorecard.","format":"int32","type":["integer","null"]},"alerts":{"description":"The store's alert words heard in the call.","items":{"type":"string"},"type":"array"},"analyzed_at":{"format":"date-time","type":["string","null"]},"details":{"description":"`intent`, `temperature` (`quente`, `morno`, `frio`), `objections`,\n`competitors`, `keywords`, `next_steps`, `follow_up` (`in_days`,\n`title`), `customer_details` (what the caller said about themselves:\ne-mail, document, address, budget, products) and `scorecard`\n(`criteria`: name, score 0 to 2, note; `tips`).","type":"object"},"error":{"type":["string","null"]},"lead_score":{"description":"0 to 100: how likely the caller is to buy soon.","format":"int32","type":["integer","null"]},"sentiment":{"description":"`positivo`, `neutro` or `negativo`.","type":["string","null"]},"status":{"description":"`pending`, `done`, `failed` or `skipped` (nothing said, or no AI).","type":"string"},"suggested_outcome":{"description":"One of the call outcomes, as the conversation read.","type":["string","null"]},"summary":{"type":["string","null"]},"updated_at":{"description":"When anything last changed it (a result, a failure, a skip): a client\nthat asked for a new analysis waits for this to move.","format":"date-time","type":"string"}},"required":["status","details","alerts","updated_at"],"type":"object"},"CallDay":{"properties":{"day":{"format":"date","type":"string"},"inbound":{"format":"int64","type":"integer"},"missed":{"format":"int64","type":"integer"},"outbound":{"format":"int64","type":"integer"}},"required":["day","inbound","outbound","missed"],"type":"object"},"CallDetail":{"allOf":[{"$ref":"#/components/schemas/Call"},{"properties":{"context":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CallerContext","description":"The customer behind the call, when there is one."}]},"record":{"description":"The store records calls: the card records this one (and reminds the\nagent to tell the caller).","type":"boolean"}},"required":["record"],"type":"object"}],"description":"A call with who is on the other end."},"CallFollowUp":{"description":"A follow-up the agent schedules while logging a call.","properties":{"due_at":{"format":"date-time","type":"string"},"kind":{"description":"`call` (default), `todo`, `meeting`, `visit` or `email`.","type":["string","null"]},"title":{"description":"Defaults to \"Ligar para <name>\".","type":["string","null"]}},"required":["due_at"],"type":"object"},"CallHourCell":{"description":"Calls in one hour of one weekday (the store's time), for the heatmap.","properties":{"calls":{"format":"int64","type":"integer"},"dow":{"description":"0 = Sunday.","format":"int32","type":"integer"},"hour":{"format":"int32","type":"integer"},"missed":{"format":"int64","type":"integer"}},"required":["dow","hour","calls","missed"],"type":"object"},"CallLogRequest":{"description":"What the agent writes after a call; a missing field stays, `null` clears.","properties":{"deal_id":{"description":"A deal of the same customer (or of nobody yet) this call was about.","format":"uuid","type":["string","null"]},"follow_up":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CallFollowUp","description":"Opens a task for the caller, assigned to whoever logs."}]},"notes":{"description":"Up to 5,000 characters.","type":["string","null"]},"outcome":{"type":["string","null"]}},"type":"object"},"CallOptions":{"description":"The ways the store can call a customer right now.","properties":{"phone":{"description":"The customer's phone, as stored.","type":["string","null"]},"whatsapp":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WhatsappCallTarget","description":"Their latest WhatsApp conversation; WhatsApp still asks for the\ncustomer's permission before the first call."}]}},"type":"object"},"CallOutcomeCount":{"properties":{"calls":{"format":"int64","type":"integer"},"outcome":{"type":"string"}},"required":["outcome","calls"],"type":"object"},"CallPermission":{"description":"Whether the customer lets the store call them.","properties":{"can_call":{"description":"The store may call now (permission given and under Meta's call limits).","type":"boolean"},"can_request":{"description":"The store may send a permission request now (Meta limits them: about 1 a day, 2 a week).","type":"boolean"},"expires_at":{"description":"When a temporary permission ends (Unix seconds).","format":"int64","type":["integer","null"]},"status":{"description":"`no_permission`, `temporary` (7 days from the customer's yes) or `permanent`.","type":"string"}},"required":["status","can_request","can_call"],"type":"object"},"CallPermissionRequest":{"properties":{"text":{"description":"Why the store wants to call, shown with the request (up to 1024 characters).","type":["string","null"]}},"type":"object"},"CallRecording":{"description":"A call's recording, transcript and analysis.","properties":{"analysis":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CallAnalysis"}]},"enabled":{"description":"The store records calls now.","type":"boolean"},"receiving":{"description":"Segments may still arrive from the media relay: a recorded call that\nruns, or ended less than 30 minutes ago (the relay uploads its last\nwindows after the end, and retries). Clients keep looking meanwhile.","type":"boolean"},"retention_days":{"description":"Days the audio is kept.","format":"int32","type":"integer"},"segments":{"items":{"$ref":"#/components/schemas/RecordingSegment"},"type":"array"},"transcript":{"description":"The segments' transcripts in order, one paragraph each.","type":["string","null"]}},"required":["enabled","retention_days","segments","receiving"],"type":"object"},"CallStats":{"properties":{"by_agent":{"items":{"$ref":"#/components/schemas/CallAgentStats"},"type":"array"},"by_day":{"items":{"$ref":"#/components/schemas/CallDay"},"type":"array"},"by_hour":{"items":{"$ref":"#/components/schemas/CallHourCell"},"type":"array"},"by_outcome":{"items":{"$ref":"#/components/schemas/CallOutcomeCount"},"type":"array"},"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"},"totals":{"$ref":"#/components/schemas/CallTotals"}},"required":["from","to","totals","by_outcome","by_agent","by_hour","by_day"],"type":"object"},"CallTotals":{"properties":{"avg_duration_secs":{"format":"int32","type":["integer","null"]},"avg_wait_secs":{"format":"int32","type":["integer","null"]},"called_back":{"description":"Missed calls called back, and the median minutes it took.","format":"int64","type":"integer"},"first_calls":{"description":"Calls that were the customer's first with the store.","format":"int64","type":"integer"},"inbound":{"format":"int64","type":"integer"},"inbound_answered":{"description":"Inbound calls someone answered.","format":"int64","type":"integer"},"median_callback_minutes":{"format":"int32","type":["integer","null"]},"missed":{"description":"Inbound calls nobody answered (missed or declined).","format":"int64","type":"integer"},"outbound":{"format":"int64","type":"integer"},"outbound_connected":{"description":"Outbound calls the customer picked up.","format":"int64","type":"integer"},"talk_secs":{"format":"int64","type":"integer"},"to_call_back":{"description":"Missed calls nobody has called back yet (today, not only the period).","format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"},"unlogged":{"description":"Talked-through calls with no outcome logged.","format":"int64","type":"integer"}},"required":["total","inbound","outbound","inbound_answered","missed","to_call_back","outbound_connected","talk_secs","first_calls","unlogged","called_back"],"type":"object"},"CallerContext":{"description":"What the team should know while a customer's call rings or runs.","properties":{"customer_id":{"format":"uuid","type":"string"},"email":{"type":["string","null"]},"last_contact_at":{"description":"The team's last reply, call or logged contact.","format":"date-time","type":["string","null"]},"last_order":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ContextOrder"}]},"lead_score":{"format":"int32","type":["integer","null"]},"lifecycle_stage":{"description":"`lead`, `customer`, ... (the CRM's lifecycle stage).","type":["string","null"]},"name":{"type":["string","null"]},"open_conversations":{"description":"Conversations still open.","format":"int64","type":"integer"},"open_deals":{"items":{"$ref":"#/components/schemas/ContextDeal"},"type":"array"},"open_tasks":{"description":"Open tasks about them.","format":"int64","type":"integer"},"owner_name":{"type":["string","null"]},"owner_user_id":{"format":"uuid","type":["string","null"]},"phone":{"type":["string","null"]},"previous_calls":{"description":"Calls before this one.","format":"int64","type":"integer"},"tags":{"items":{"type":"string"},"type":"array"},"total_orders":{"format":"int32","type":"integer"},"total_spent_cents":{"description":"Lifetime spend, in cents.","format":"int64","type":"integer"}},"required":["customer_id","total_orders","total_spent_cents","open_deals","open_tasks","open_conversations","previous_calls","tags"],"type":"object"},"CallingSettings":{"properties":{"call_button":{"description":"Whether the call button shows in the customer's chat.","type":"boolean"},"enabled":{"description":"Calls are on for this number.","type":"boolean"}},"required":["enabled","call_button"],"type":"object"},"CampaignCopied":{"description":"The copy.","properties":{"campaign_id":{"description":"The new campaign's id, **paused**.","type":"string"}},"required":["campaign_id"],"type":"object"},"CampaignCreated":{"description":"A campaign made from Mobiari.","properties":{"campaign_id":{"description":"Meta's campaign id.","type":"string"},"daily_budget_cents":{"format":"int64","type":"integer"},"ends_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"starts_at":{"format":"date-time","type":"string"},"status":{"description":"`paused` or `active` (a campaign asked to start active stays `paused` when Meta refused to switch it on),\nor `unconfirmed` when Meta never confirmed either state: check Ads Manager before retrying.","type":"string"}},"required":["id","campaign_id","status","starts_at","daily_budget_cents"],"type":"object"},"CampaignCreative":{"description":"The ad itself. One of three ways to say what it shows:\n- `product_ids`: products of the store's catalog (their page, photo, name\n  and price are filled in); one makes a single product ad, 2 to 10 a\n  carousel;\n- `cards`: a carousel of 2 to 10 cards written by hand;\n- neither: a single ad from `link_url`, an image and `headline`.","properties":{"call_to_action":{"description":"Meta's button: `SHOP_NOW`, `LEARN_MORE`, `ORDER_NOW`, `SIGN_UP` or `NO_BUTTON`.","type":"string"},"cards":{"description":"A hand-made carousel.","items":{"$ref":"#/components/schemas/CreativeCard"},"type":"array"},"description":{"description":"The line under the headline (a single ad only).","type":["string","null"]},"headline":{"description":"The bold line under the image, up to 40 characters. Optional for\nproducts and cards, which bring their own names.","type":"string"},"image_file_id":{"description":"A photo of the media library.","format":"uuid","type":["string","null"]},"image_url":{"description":"The image, a public https address. Or `image_file_id`.","type":["string","null"]},"link_url":{"description":"Where people land (the store, a product, a collection). https only.\nNot used by `messages` campaigns, which open a chat.","type":["string","null"]},"primary_text":{"description":"The text above the image.","type":"string"},"product_ids":{"description":"Products of the catalog to advertise.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["primary_text"],"type":"object"},"CampaignDetail":{"description":"A campaign with its ad sets and ads.","properties":{"adsets":{"items":{"$ref":"#/components/schemas/AdSetRow"},"type":"array"},"currency":{"type":"string"},"daily":{"description":"One point per day of the window (days Meta has no numbers for are missing), oldest first.","items":{"$ref":"#/components/schemas/DayPoint"},"type":"array"},"days":{"format":"int64","type":"integer"},"id":{"type":"string"},"name":{"type":"string"},"objective":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","status","days","currency","daily","adsets"],"type":"object"},"CampaignFlag":{"description":"Why a campaign deserves a look.","enum":["spending_without_sales"],"type":"string"},"CampaignHit":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"}},"required":["id","name","subject","status"],"type":"object"},"CampaignHold":{"description":"A hold on the store's campaigns.","properties":{"details":{"description":"For `reputation`: what was measured (`sent`, `bounced`, `complained`).","type":["object","null"]},"reason":{"description":"`owner_email_unverified` (lifts itself once the owner confirms the\ne-mail) or `reputation` (bounces or spam complaints; Mobiari support\nlifts it).","type":"string"},"since":{"format":"date-time","type":["string","null"]}},"required":["reason"],"type":"object"},"CampaignList":{"properties":{"campaigns":{"items":{"$ref":"#/components/schemas/CampaignView"},"type":"array"},"currency":{"description":"The single currency of the listed campaigns; null when they differ.","type":["string","null"]},"days":{"format":"int64","type":"integer"},"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"},"totals":{"$ref":"#/components/schemas/ReportTotals"}},"required":["from","to","days","totals","campaigns"],"type":"object"},"CampaignObjective":{"description":"What a campaign aims for.","enum":["traffic","sales","catalog","messages"],"type":"string"},"CampaignPreflight":{"description":"The checklist.","properties":{"blocked":{"description":"A check failed: the campaign would be refused.","type":"boolean"},"checks":{"items":{"$ref":"#/components/schemas/PreflightCheck"},"type":"array"}},"required":["checks","blocked"],"type":"object"},"CampaignUpdated":{"description":"What changed.","properties":{"daily_budget_cents":{"format":"int64","type":["integer","null"]},"id":{"type":"string"},"status":{"type":["string","null"]}},"required":["id"],"type":"object"},"CampaignView":{"properties":{"account_id":{"format":"uuid","type":"string"},"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"can_write":{"description":"The provider's adapter can change this campaign (status and budget).","type":"boolean"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"cpc_cents":{"format":"int64","type":["integer","null"]},"ctr":{"format":"double","type":["number","null"]},"currency":{"type":"string"},"daily_budget_cents":{"format":"int64","type":["integer","null"]},"effective_status":{"type":["string","null"]},"ends_at":{"format":"date-time","type":["string","null"]},"external_id":{"type":"string"},"id":{"format":"uuid","type":"string"},"impressions":{"format":"int64","type":"integer"},"last_synced_at":{"format":"date-time","type":["string","null"]},"lifetime_budget_cents":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"objective":{"type":"string"},"provider":{"type":"string"},"reach":{"format":"int64","type":"integer"},"roas":{"format":"double","type":["number","null"]},"source":{"description":"mobiari | external","type":"string"},"spend_cents":{"format":"int64","type":"integer"},"starts_at":{"format":"date-time","type":["string","null"]},"status":{"type":"string"}},"required":["id","account_id","provider","external_id","name","objective","status","source","can_write","currency","spend_cents","impressions","reach","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"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"},"CancelKioskSales":{"description":"Which of the kiosk's unpaid sales to cancel.","properties":{"order_id":{"description":"The sale to end. Without it every unpaid sale of the kiosk ends. A kiosk\nnames the sale it is abandoning, so that a request arriving late cannot\ncancel the purchase that replaced it.","format":"uuid","type":["string","null"]}},"type":"object"},"CancelOrderInvoiceRequest":{"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"},"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"},"Candidate":{"description":"A payable a debit could have paid.","properties":{"amount_cents":{"format":"int64","type":"integer"},"description":{"type":["string","null"]},"due_on":{"format":"date","type":"string"},"payable_id":{"format":"uuid","type":"string"},"supplier_name":{"type":["string","null"]}},"required":["payable_id","due_on","amount_cents"],"type":"object"},"CannedReply":{"description":"A saved answer the composer inserts with `/shortcut`.","properties":{"body":{"description":"The text. `{first_name}`, `{name}`, `{store}`, `{agent}` and\n`{order}` are filled in by the client.","type":"string"},"id":{"format":"uuid","type":"string"},"shortcut":{"description":"Lowercase, letters, digits, `_` and `-`, without the slash.","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","shortcut","title","body","updated_at"],"type":"object"},"CannedReplyInput":{"properties":{"body":{"type":"string"},"shortcut":{"description":"Leading `/` and other characters are dropped; lowercased.","type":"string"},"title":{"type":"string"}},"required":["shortcut","body"],"type":"object"},"Capabilities":{"description":"What an adapter can actually do. The UI reads this instead of assuming\nevery provider is Meta; a provider with `campaign_write: false` shows the\ncontrols disabled rather than failing after the click.","properties":{"ad_group_write":{"default":false,"type":"boolean"},"ad_previews":{"default":false,"type":"boolean"},"ad_write":{"default":false,"type":"boolean"},"audiences":{"default":false,"type":"boolean"},"campaign_create":{"default":false,"description":"The adapter can create a campaign (and its ad group and ad) from the\nstandard draft.","type":"boolean"},"campaign_write":{"default":false,"type":"boolean"},"catalogs":{"default":false,"type":"boolean"},"conversions":{"default":false,"type":"boolean"},"insights":{"default":true,"type":"boolean"},"lead_forms":{"default":false,"type":"boolean"},"video":{"default":false,"type":"boolean"}},"type":"object"},"Capability":{"properties":{"description":{"type":"string"},"key":{"type":"string"},"modules":{"items":{"$ref":"#/components/schemas/CapabilityModule"},"type":"array"},"name":{"type":"string"},"onboarding":{"description":"Shown in the first-run wizard (vs settings-hub-only capabilities).","type":"boolean"},"question":{"description":"The onboarding question, e.g. \"Como você quer gerenciar seu estoque?\".","type":"string"},"selection":{"$ref":"#/components/schemas/SelectionMode"}},"required":["key","name","question","description","selection","onboarding","modules"],"type":"object"},"CapabilityModule":{"properties":{"accent":{"description":"Accent colour token (`stone`, `emerald`, `sky`, `orange`, `indigo`,\n`teal`, `violet`, `amber`).","type":"string"},"available":{"description":"True once the module's backend is wired; false = \"em breve\".","type":"boolean"},"code":{"type":"string"},"connect":{"$ref":"#/components/schemas/ConnectSpec","description":"How this module is connected and where its config lives. This is what\nlets the admin render any integration without knowing what it is."},"description":{"type":"string"},"icon":{"description":"Icon name from a fixed vocabulary the admin knows how to draw\n(`warehouse`, `boxes`, `credit-card`, `landmark`, `truck`, `store`,\n`map-pin`, `plug`). A new module picks an existing name rather than\nshipping an asset, so it looks right without a frontend change.","type":"string"},"kind":{"$ref":"#/components/schemas/ModuleKind"},"name":{"type":"string"},"needs_setup":{"description":"Whether picking this module needs a follow-up configuration step\n(an integration to connect). Native modules are usually self-contained.","type":"boolean"}},"required":["code","name","description","kind","available","needs_setup","connect","icon","accent"],"type":"object"},"CapabilitySelections":{"description":"What the store runs today, per capability.","properties":{"freight":{"description":"Active freight modules: carrier provider codes, plus `pickup` and\n`local_delivery` when those are set up.","items":{"type":"string"},"type":"array"},"inventory":{"description":"The active inventory module code (`mobi` or `tiny`).","type":"string"},"payments":{"description":"Codes of the active payment providers.","items":{"type":"string"},"type":"array"}},"required":["inventory","payments","freight"],"type":"object"},"CaptionRequest":{"description":"What the caption is about.","properties":{"brief":{"description":"The idea, in a sentence or two (\"lançamento da mesa Oca, foco no\nacabamento em freijó\").","type":"string"},"draft":{"description":"A draft to improve instead of starting over.","type":["string","null"]},"format":{"$ref":"#/components/schemas/Format"},"networks":{"description":"Where it goes; Instagram gets hashtags and a first comment.","items":{"$ref":"#/components/schemas/Network"},"type":"array"},"product_ids":{"description":"Products the post shows.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["format"],"type":"object"},"CaptionSuggestion":{"description":"A caption written by the AI.","properties":{"caption":{"type":"string"},"first_comment":{"description":"Hashtags to post as the first comment (Instagram).","type":["string","null"]},"hashtags":{"description":"Without the `#`; already at the end of `caption` when there is no\nfirst comment.","items":{"type":"string"},"type":"array"}},"required":["caption","hashtags"],"type":"object"},"Card":{"properties":{"assignee_name":{"type":["string","null"]},"assignee_user_id":{"format":"uuid","type":["string","null"]},"column_id":{"format":"uuid","type":"string"},"comment_count":{"description":"How many comments the card has.","format":"int64","type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"description":{"type":["string","null"]},"due_on":{"format":"date","type":["string","null"]},"id":{"format":"uuid","type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"position":{"format":"int32","type":"integer"},"title":{"type":"string"}},"required":["id","column_id","title","position","comment_count","created_at"],"type":"object"},"CardComment":{"description":"A comment on a card.","properties":{"author_name":{"description":"The author's name, else e-mail; empty when the account is gone.","type":["string","null"]},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"user_id":{"format":"uuid","type":["string","null"]}},"required":["id","body","created_at"],"type":"object"},"CardCreateRequest":{"properties":{"assignee_user_id":{"format":"uuid","type":["string","null"]},"column_id":{"description":"The column to add it to; the board's first by default.","format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_on":{"format":"date","type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"title":{"description":"1 to 300 characters.","type":"string"}},"required":["title"],"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"},"CardMoveRequest":{"properties":{"column_id":{"format":"uuid","type":"string"},"position":{"description":"The 0-based place in that column; the end by default.","format":"int32","type":["integer","null"]}},"required":["column_id"],"type":"object"},"CardUpdateRequest":{"description":"Changes to a card; a missing field stays, `null` clears it.","properties":{"assignee_user_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_on":{"format":"date","type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"title":{"type":["string","null"]}},"type":"object"},"CartCustomerType":{"description":"Whether the cart's shopper matched a customer on file (`existing`) or\nnot yet (`new`).","enum":["existing","new"],"type":"string"},"CartDetail":{"allOf":[{"$ref":"#/components/schemas/CartSummary"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/CartItem"},"type":"array"}},"required":["items"],"type":"object"}],"description":"A cart with its lines."},"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"},"CartOffer":{"description":"A product the cart and the cart drawer offer (\"adicione e ganhe\").","properties":{"created_at":{"format":"date-time","type":"string"},"discount_percent":{"description":"Whole percent off the product while the cart holds another product;\nnull for none.","format":"int32","type":["integer","null"]},"headline":{"description":"A line over the product in the cart; null for the theme's own.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"position":{"description":"Lower shows first.","format":"int32","type":"integer"},"product":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpsellProduct","description":"The product's title, slug and picture, for the list."}]},"product_id":{"format":"uuid","type":"string"},"promotion_id":{"description":"The `buy_x_get_y` automatic discount that applies it.","format":"uuid","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","product_id","position","is_active","created_at","updated_at"],"type":"object"},"CartOfferCreate":{"description":"A new cart offer.","properties":{"discount_percent":{"description":"1 to 100; null for no discount.","format":"int32","type":["integer","null"]},"headline":{"type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"position":{"description":"Defaults to after the last one.","format":"int32","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"}},"required":["product_id"],"type":"object"},"CartOfferUpdate":{"description":"Fields to change; omitted ones keep their value, an explicit `null`\nclears `headline` or `discount_percent`.","properties":{"discount_percent":{"format":"int32","type":["integer","null"]},"headline":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]}},"type":"object"},"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 the admin sees it: totals, and who the shopper is, from the\ncustomer on file or the contact details typed at checkout (`lead_*`).","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"},"store_id":{"format":"uuid","type":"string"},"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","store_id","customer_type","status","kind","item_count","subtotal_cents","tax_cents","shipping_cents","discount_cents","total_cents","currency","created_at","updated_at","last_activity_at"],"type":"object"},"CashFlow":{"properties":{"days":{"items":{"$ref":"#/components/schemas/CashFlowDay"},"type":"array"},"from":{"format":"date","type":"string"},"inflow_cents":{"format":"int64","type":"integer"},"net_cents":{"format":"int64","type":"integer"},"outflow_cents":{"format":"int64","type":"integer"},"overdue_payables_cents":{"description":"Open payables already past due, counted on today's line.","format":"int64","type":"integer"},"to":{"format":"date","type":"string"},"today":{"format":"date","type":"string"}},"required":["from","to","today","days","inflow_cents","outflow_cents","net_cents","overdue_payables_cents"],"type":"object"},"CashFlowDay":{"description":"One day of the cash flow.","properties":{"balance_cents":{"description":"Running sum of `net_cents` from the first day of the window. It does\nnot include the bank balance, which Mobiari does not know.","format":"int64","type":"integer"},"day":{"format":"date","type":"string"},"inflow_cents":{"description":"Receivables expected that day, net of fees.","format":"int64","type":"integer"},"net_cents":{"format":"int64","type":"integer"},"outflow_cents":{"description":"Payables paid that day, or still open and due (overdue ones count today).","format":"int64","type":"integer"},"projected":{"description":"True for days after today (a projection, not a record).","type":"boolean"}},"required":["day","inflow_cents","outflow_cents","net_cents","balance_cents","projected"],"type":"object"},"CashMovementKind":{"enum":["supply","withdrawal"],"type":"string"},"CashMovementRequest":{"description":"Cash moved in or out of the drawer outside a sale.","properties":{"amount_cents":{"description":"Cents, above zero.","format":"int64","type":"integer"},"kind":{"$ref":"#/components/schemas/CashMovementKind","description":"`supply` puts cash in, `withdrawal` takes it out."},"reason":{"type":["string","null"]}},"required":["kind","amount_cents"],"type":"object"},"CashShift":{"description":"A shift of cash at one POS.","properties":{"cash_sales_cents":{"description":"Cash payments of the shift's orders that still stand.","format":"int64","type":"integer"},"channel_id":{"format":"uuid","type":"string"},"closed_at":{"format":"date-time","type":["string","null"]},"closed_by":{"format":"uuid","type":["string","null"]},"counted_cents":{"description":"What the cashier counted at closing.","format":"int64","type":["integer","null"]},"difference_cents":{"description":"`counted - expected`: negative is cash missing.","format":"int64","type":["integer","null"]},"expected_cents":{"description":"What the drawer should hold: live while open, as of closing after.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"opened_at":{"format":"date-time","type":"string"},"opened_by":{"format":"uuid","type":["string","null"]},"opening_float_cents":{"format":"int64","type":"integer"},"supply_cents":{"description":"Cash put into the drawer.","format":"int64","type":"integer"},"withdrawal_cents":{"description":"Cash taken out of the drawer.","format":"int64","type":"integer"}},"required":["id","channel_id","opened_at","opening_float_cents","cash_sales_cents","supply_cents","withdrawal_cents","expected_cents"],"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"},"Catalog":{"description":"A Meta product catalog.","properties":{"business":{"description":"The Business that owns it.","type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"product_count":{"format":"int64","type":["integer","null"]}},"required":["id","name"],"type":"object"},"CatalogEntry":{"description":"An event the platform emits.","properties":{"description":{"description":"What happened, in one English sentence.","type":"string"},"details":{"description":"The names of the event's `data.details`.","items":{"type":"string"},"type":"array"},"entity":{"description":"Resource the event is about (`order`, `customer`, ...).","type":"string"},"group":{"description":"Group for pickers.","type":"string"},"label":{"description":"Human label, pt-BR.","type":"string"},"name":{"description":"The wire name, e.g. `orders.paid`.","type":"string"},"object":{"description":"The schema of the event's `data.object` (`Order`, `Customer`...);\nabsent when the object is the event's own facts.","type":["string","null"]},"payload_keys":{"description":"Keys the payload carries (`trigger.<key>` in workflows).","items":{"type":"string"},"type":"array"},"subscribers":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Subscribers","description":"Present when `store_id` was given."}]}},"required":["name","label","entity","group","payload_keys","description","details"],"type":"object"},"CatalogResponse":{"properties":{"events":{"description":"Every event, in catalog order. A fixed list that grows with\nreleases; tolerate unknown names.","items":{"$ref":"#/components/schemas/CatalogEntry"},"type":"array"}},"required":["events"],"type":"object"},"Catalogs":{"description":"The catalogs the ad account's login can use, and the one in use.","properties":{"catalogs":{"items":{"$ref":"#/components/schemas/Catalog"},"type":"array"},"feed_url":{"description":"The address of the store's Meta feed, to add as the catalog's data\nsource (Commerce Manager, Catalog, Data sources) when it is not there yet.","type":["string","null"]},"selected":{"description":"The catalog this store's dynamic ads use.","type":["string","null"]}},"required":["catalogs"],"type":"object"},"Category":{"description":"A product category. Categories form a tree through `parent_id`.","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"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","slug","is_active","created_at","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"},"CategoryUnread":{"description":"Unread notifications in one category.","properties":{"category":{"type":"string"},"unread":{"format":"int64","type":"integer"}},"required":["category","unread"],"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"},"CeilingCode":{"description":"A permission code with its label, for showing a ceiling in plain words.","properties":{"code":{"type":"string"},"group":{"description":"Its permission group.","type":"string"},"label":{"description":"pt-BR label from the permission catalog.","type":"string"}},"required":["code","label","group"],"type":"object"},"Change":{"description":"One decision the draft would change.","properties":{"action":{"type":"string"},"at":{"format":"date-time","type":"string"},"now_allowed":{"description":"What they decide with the draft added.","type":"boolean"},"resource_id":{"type":["string","null"]},"resource_type":{"type":"string"},"user_id":{"format":"uuid","type":"string"},"was_allowed":{"description":"What today's policies decide for it.","type":"boolean"}},"required":["user_id","action","resource_type","was_allowed","now_allowed","at"],"type":"object"},"ChangeEmailRequest":{"properties":{"current_password":{"description":"The account's current password.","type":"string"},"new_email":{"example":"ana@example.com","type":"string"}},"required":["current_password","new_email"],"type":"object"},"ChangeEmailResponse":{"properties":{"applied":{"description":"True when the account already uses the new address: the old one was\nnever confirmed, so there was nothing to protect (a confirmation link\nwent to the new one). False when the change waits for the link sent\nto the new address (valid 24 hours); the account keeps the old one\nuntil then.","type":"boolean"},"email":{"description":"The new address.","type":"string"}},"required":["applied","email"],"type":"object"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string"},"new_password":{"description":"At least 8 characters.","type":"string"}},"required":["current_password","new_password"],"type":"object"},"ChangePlanRequest":{"properties":{"billing_cycle":{"$ref":"#/components/schemas/BillingCycle"},"plan_code":{"description":"A plan from `GET /billing/plans`.","example":"profissional","type":"string"}},"required":["plan_code","billing_cycle"],"type":"object"},"Changed":{"description":"What changed.","properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"Channel":{"enum":["email","whatsapp","sms"],"type":"string"},"ChannelPerformance":{"description":"What one channel and platform brought in.","properties":{"channel":{"description":"`paid_social`, `paid_search`, `organic_search`, `organic_social`,\n`email`, `messaging`, `ai`, `referral`, `affiliate`, `paid_other`,\n`other` or `direct` (also every touch we know nothing about).","type":"string"},"converted_leads":{"format":"int64","type":"integer"},"leads":{"format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"source":{"description":"The platform: `meta` for every Meta surface of paid social, else the\nsource (`google`, `instagram`, `chatgpt`); null when direct.","type":["string","null"]},"visitors":{"format":"int64","type":"integer"}},"required":["channel","visitors","leads","converted_leads","orders","revenue_cents"],"type":"object"},"ChannelReach":{"description":"Who the store may reach on one channel.","properties":{"channel":{"description":"`email` or `whatsapp`.","type":"string"},"opted_in":{"description":"Opted in to marketing (and not opted out since).","format":"int64","type":"integer"},"opted_out":{"description":"Opted out (unsubscribed, PARAR, Meta's opt-out).","format":"int64","type":"integer"},"unreachable":{"description":"Bounced or marked as spam (e-mail), or blocked outright.","format":"int64","type":"integer"},"with_address":{"description":"Customers with an address on this channel.","format":"int64","type":"integer"}},"required":["channel","with_address","opted_in","opted_out","unreachable"],"type":"object"},"Channels":{"properties":{"email":{"$ref":"#/components/schemas/EmailChannel"},"storefront":{"$ref":"#/components/schemas/StorefrontChannel"},"whatsapp":{"$ref":"#/components/schemas/WhatsappChannel"}},"required":["email","whatsapp","storefront"],"type":"object"},"Charge":{"description":"One amount owed by a client.","properties":{"amount_cents":{"description":"BRL cents.","format":"int64","type":"integer"},"approved_at":{"format":"date-time","type":["string","null"]},"arrangement_id":{"format":"uuid","type":["string","null"]},"arrangement_name":{"type":["string","null"]},"client_document":{"type":["string","null"]},"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"company_id":{"description":"The business it bills; its invoice data is what \"issue invoice\" uses.","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"description":"What the invoice says.","type":"string"},"due_on":{"format":"date","type":"string"},"external_invoice_number":{"description":"The number of an NFS-e issued outside Mobiari (the accountant's platform or the city's\nportal), recorded by the team.","type":["string","null"]},"external_invoice_on":{"format":"date","type":["string","null"]},"external_invoice_source":{"description":"`contabilizei`, `portal` or `other`.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"invoice_id":{"description":"The live NFS-e of this charge in the environment the store issues in.","format":"uuid","type":["string","null"]},"invoice_number":{"description":"Its NFS-e number, once the system has numbered it.","type":["string","null"]},"invoice_status":{"description":"Its status (`pending`, `unknown` or `authorized`).","type":["string","null"]},"issue_when":{"description":"`approved` or `received`: when the service invoice may be issued.","type":"string"},"method":{"description":"`pix`, `transfer`, `boleto`, `card`, `cash` or `other`.","type":["string","null"]},"notes":{"type":["string","null"]},"received_at":{"format":"date-time","type":["string","null"]},"received_on":{"description":"The day the money arrived.","format":"date","type":["string","null"]},"stage":{"description":"What is left: `to_approve`, `to_receive`, `to_issue`, `done` or `void`.","type":"string"},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","client_name","description","amount_cents","due_on","issue_when","created_at","stage"],"type":"object"},"ChargeCreate":{"properties":{"amount_cents":{"format":"int64","type":["integer","null"]},"arrangement_id":{"description":"Bill under this arrangement: the client, description and (for a fixed\none) amount come from it unless given here.","format":"uuid","type":["string","null"]},"client_document":{"type":["string","null"]},"client_email":{"type":["string","null"]},"client_name":{"type":["string","null"]},"company_id":{"description":"The business to bill (an arrangement's business when under one). Its\nname, CNPJ and e-mail are the client's unless given here.","format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"due_on":{"description":"Defaults to today.","format":"date","type":["string","null"]},"method":{"description":"How it was received; `pix` when `received_on` is given.","type":["string","null"]},"notes":{"type":["string","null"]},"received_on":{"description":"Record it as already received, on this day (a payment that arrived\nbefore the charge was made).","format":"date","type":["string","null"]}},"type":"object"},"CheckId":{"description":"What is checked.","enum":["ad_account","token","instagram_link","whatsapp_link","pixel","catalog"],"type":"string"},"CheckStatus":{"enum":["pass","warn","fail"],"type":"string"},"ChooseGoogleAdsAccount":{"properties":{"customer_id":{"description":"One of the accounts listed (10 digits, dashes allowed).","type":"string"},"login_customer_id":{"description":"The manager it is reached through, as listed.","type":["string","null"]}},"required":["customer_id"],"type":"object"},"CityRef":{"description":"A city to target, as `searchSocialAdLocations` returns it.","properties":{"country":{"description":"The city's two-letter country code (see `PlaceRef.country`).","type":["string","null"]},"key":{"description":"Meta's key for the city.","type":"string"},"name":{"type":"string"},"radius_km":{"description":"Also reach people up to this far around the city, 17 to 80 km;\nMeta's default when absent.","format":"int32","minimum":0,"type":["integer","null"]}},"required":["key","name"],"type":"object"},"ClaimImportSource":{"properties":{"claim_token":{"description":"Single-use secret delivered to this browser in the OAuth redirect fragment.","type":"string"}},"required":["claim_token"],"type":"object"},"CloseCashShift":{"description":"The drawer's count at closing.","properties":{"counted_cents":{"description":"Cash counted in the drawer, in cents.","format":"int64","type":"integer"},"note":{"type":["string","null"]}},"required":["counted_cents"],"type":"object"},"CmsCollection":{"description":"A kind of content, with the schema its documents follow.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_archived":{"type":"boolean"},"name":{"type":"string"},"schema_json":{"description":"Field definitions for the documents' `data`.","type":"object"},"slug":{"description":"Key themes use: `cms.<slug>`.","type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","slug","name","schema_json","is_archived","created_at","updated_at"],"type":"object"},"CmsDocument":{"description":"One entry of a collection.","properties":{"collection_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"data":{"description":"The document's fields, shaped by the collection's `schema_json`.","type":"object"},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Inactive documents are hidden from the storefront.","type":"boolean"},"position":{"description":"Order within the collection; lower first.","format":"int32","type":"integer"},"publish_at":{"description":"The moment it goes live. Before it, the document is `scheduled`.","format":"date-time","type":["string","null"]},"slug":{"type":["string","null"]},"status":{"description":"`draft` (inactive), `scheduled`, `live` or `expired`.","type":"string"},"store_id":{"format":"uuid","type":"string"},"unpublish_at":{"description":"The moment it stops being shown. After it, the document is `expired`.","format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","collection_id","store_id","data","position","is_active","status","created_at","updated_at"],"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"},"CnpjAddress":{"properties":{"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"district":{"type":["string","null"]},"number":{"type":["string","null"]},"state":{"description":"UF.","type":["string","null"]},"street":{"description":"Type and name, e.g. `RUA AUGUSTA`.","type":["string","null"]},"zip":{"description":"CEP, 8 digits.","type":["string","null"]}},"type":"object"},"CnpjData":{"description":"What the registry says about a company.","properties":{"active":{"description":"The status is `ATIVA`.","type":"boolean"},"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CnpjAddress"}]},"cnae_code":{"description":"Main activity (CNAE), 7 digits.","type":["string","null"]},"cnae_description":{"type":["string","null"]},"cnpj":{"description":"14 digits.","type":"string"},"email":{"type":["string","null"]},"legal_nature":{"description":"Natureza jurídica, e.g. `Sociedade Empresária Limitada`.","type":["string","null"]},"mei":{"description":"A MEI, when known.","type":["boolean","null"]},"name":{"description":"Razão social.","type":"string"},"opened_on":{"format":"date","type":["string","null"]},"phone":{"description":"The first phone on record, in E.164 when it is a valid Brazilian number.","type":["string","null"]},"simples":{"description":"Opted into Simples Nacional, when known.","type":["boolean","null"]},"size":{"description":"Porte: `MICRO EMPRESA`, `EMPRESA DE PEQUENO PORTE` or `DEMAIS`.","type":["string","null"]},"status":{"description":"Situação cadastral as the registry words it: `ATIVA`, `BAIXADA`, `INAPTA`, `SUSPENSA`, `NULA`.","type":["string","null"]},"status_since":{"description":"Since when it has that status.","format":"date","type":["string","null"]},"trade_name":{"description":"Nome fantasia.","type":["string","null"]}},"required":["cnpj","name","active"],"type":"object"},"CnpjLookup":{"properties":{"active":{"type":"boolean"},"cep":{"type":["string","null"]},"city_code":{"description":"IBGE municipality code.","type":["string","null"]},"city_name":{"type":["string","null"]},"cnae":{"description":"Main CNAE, 7 digits.","type":["string","null"]},"cnpj":{"type":"string"},"complement":{"type":["string","null"]},"crt":{"description":"`simples_nacional` or `mei` when the open data says the company\nopted in; null when it does not say (it reports only opt-ins).","type":["string","null"]},"district":{"type":["string","null"]},"legal_name":{"type":"string"},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"status":{"description":"Receita's registration status, e.g. \"ATIVA\".","type":["string","null"]},"street":{"type":["string","null"]},"trade_name":{"type":["string","null"]},"uf":{"type":["string","null"]}},"required":["cnpj","legal_name","active"],"type":"object"},"Cohort":{"description":"The customers who first bought in one month.","properties":{"customers":{"description":"Customers whose first paid order was in this month.","format":"int64","type":"integer"},"ltv_cents":{"description":"Net revenue per customer, accumulated up to each of those months.","items":{"format":"int64","type":"integer"},"type":"array"},"month":{"description":"First day of the month.","format":"date","type":"string"},"retained":{"description":"Customers who ordered in the month `index` months after (index 0 is the\nfirst month, so it equals `customers`). Runs to the current month.","items":{"format":"int64","type":"integer"},"type":"array"},"revenue_cents":{"description":"Net revenue of the cohort in each of those months.","items":{"format":"int64","type":"integer"},"type":"array"}},"required":["month","customers","retained","revenue_cents","ltv_cents"],"type":"object"},"Collection":{"description":"A curated list 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"},"slug":{"description":"Derived from the name.","type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_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"},"CollectionProductRequest":{"description":"A product and a collection of the same store.","properties":{"collection_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"}},"required":["product_id","collection_id"],"type":"object"},"CollectionRef":{"description":"Lightweight collection reference for the picker. We don't ship the\nfull `Collection` shape (image, sales channels, …) since the spec\neditor only needs a label + handle.","properties":{"handle":{"type":"string"},"id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["id","title","handle"],"type":"object"},"CollectionUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; an explicit `null`\nclears `description`.","properties":{"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]}},"type":"object"},"Column":{"properties":{"id":{"format":"uuid","type":"string"},"is_done":{"description":"Cards that land here count as finished.","type":"boolean"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"}},"required":["id","name","position","is_done"],"type":"object"},"ColumnCreateRequest":{"properties":{"is_done":{"type":["boolean","null"]},"name":{"description":"1 to 60 characters.","type":"string"}},"required":["name"],"type":"object"},"ColumnUpdateRequest":{"properties":{"is_done":{"type":["boolean","null"]},"name":{"type":["string","null"]},"position":{"description":"The 0-based place among the board's columns.","format":"int32","type":["integer","null"]}},"type":"object"},"CombineCandidate":{"description":"A shipment that could join this one.","properties":{"lines_cents":{"description":"What its lines are worth, in cents.","format":"int64","type":["integer","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"shipment_id":{"format":"uuid","type":"string"},"units":{"description":"Units the candidate carries.","format":"int64","type":"integer"}},"required":["shipment_id","order_id","units"],"type":"object"},"CombineShipmentsRequest":{"description":"The shipment to take in.","properties":{"reset_boxes":{"description":"Either shipment's boxes were edited or packed: recompute them from the\ncombined lines. Without it such a combine is refused (`boxes_packed`).","type":"boolean"},"shipment_id":{"description":"The shipment that joins this one; it disappears into it.","format":"uuid","type":"string"}},"required":["shipment_id"],"type":"object"},"CommentCounts":{"description":"How many comments wait for an answer.","properties":{"open":{"format":"int64","type":"integer"}},"required":["open"],"type":"object"},"CommentCreateRequest":{"properties":{"body":{"description":"1 to 2000 characters.","type":"string"}},"required":["body"],"type":"object"},"CommentPost":{"description":"The post a comment was made on, as Meta shows it now.","properties":{"caption":{"type":["string","null"]},"image_url":{"description":"The picture (or a video's cover). Meta's links expire, so it is read when the thread opens.","type":["string","null"]},"media_type":{"description":"`IMAGE`, `VIDEO`, `CAROUSEL_ALBUM`, or what Facebook calls the attachment.","type":["string","null"]},"permalink":{"type":["string","null"]},"posted_at":{"format":"date-time","type":["string","null"]}},"type":"object"},"CommentReply":{"description":"A reply in a comment's thread.","properties":{"author_name":{"type":["string","null"]},"author_username":{"type":["string","null"]},"commented_at":{"format":"date-time","type":"string"},"from_us":{"description":"Written by the store's own account.","type":"boolean"},"hidden":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"text":{"type":"string"}},"required":["id","text","from_us","hidden","commented_at"],"type":"object"},"CommentReplyRequest":{"description":"A reply to post.","properties":{"text":{"type":"string"}},"required":["text"],"type":"object"},"CommentStatus":{"description":"Whether a comment still needs the team.","enum":["open","done"],"type":"string"},"Company":{"description":"A company and what its contacts add up to.","properties":{"contacts":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"document":{"description":"CNPJ (or CPF), without punctuation.","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"},"invoice_description":{"description":"What its invoices say, with `{periodo}` (the month before the payment, e.g.\n\"01/10/2026 a 31/10/2026\") and `{mes}` filled in. Money that arrives for it is\ncharged and worded from this.","type":["string","null"]},"invoice_profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceProfile","description":"How to invoice it: where it is and how its address goes on a service\ninvoice. Charges to this company are invoiced from it."}]},"last_order_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"owner_user_id":{"format":"uuid","type":["string","null"]},"phone":{"type":["string","null"]},"registry":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CnpjData","description":"What the public registry said about its CNPJ, when looked up."}]},"registry_checked_at":{"format":"date-time","type":["string","null"]},"total_orders":{"description":"Paid orders of its contacts.","format":"int64","type":"integer"},"total_spent":{"description":"What its contacts spent, in cents.","format":"int64","type":"integer"},"trade_name":{"description":"Nome fantasia.","type":["string","null"]}},"required":["id","name","contacts","total_orders","total_spent","created_at"],"type":"object"},"CompanyRequest":{"description":"A new company, or changes to one (omitted fields stay; `\"\"` clears).","properties":{"document":{"type":["string","null"]},"domain":{"type":["string","null"]},"email":{"type":["string","null"]},"invoice_description":{"description":"The wording of its invoices (see `Company.invoice_description`). `\"\"` clears it.","type":["string","null"]},"invoice_profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceProfile","description":"How to invoice it. Omitted leaves it; `null` clears it."}]},"name":{"description":"1 to 200 characters; required to create.","type":["string","null"]},"notes":{"type":["string","null"]},"owner_user_id":{"format":"uuid","type":["string","null"]},"phone":{"type":["string","null"]},"registry":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CnpjData","description":"The registry data a CNPJ lookup returned, kept on the company; its\n`cnpj` must be the company's document."}]},"trade_name":{"type":["string","null"]}},"type":"object"},"CompleteAssistantPhoneVerificationRequest":{"properties":{"code":{"description":"The 6-digit code received on WhatsApp.","type":"string"},"phone_e164":{"type":"string"}},"required":["phone_e164","code"],"type":"object"},"CompleteMercadoPagoConnect":{"properties":{"attempt":{"description":"The `attempt` Mercado Pago's redirect brought back.","format":"uuid","type":"string"}},"required":["attempt"],"type":"object"},"CompleteRequest":{"properties":{"code":{"description":"The code the admin app received after the marketplace's redirect\n(Mercado Livre: `ml_code`).","type":["string","null"]},"params":{"additionalProperties":{"type":"string"},"description":"The other parameters the marketplace sent back, without their prefix\n(Shopee's `shop_id`, for instance).","propertyNames":{"type":"string"},"type":"object"},"state":{"description":"The state that came with it (Mercado Livre: `ml_state`).","type":"string"}},"required":["state"],"type":"object"},"Component":{"description":"A part some kit is built from, with its stock and open build demand.","properties":{"allow_backorder":{"description":"Whether kits may sell with this part missing (it can be purchased).","type":"boolean"},"available":{"format":"int32","type":"integer"},"cost_cents":{"format":"int64","type":["integer","null"]},"height_cm":{"format":"double","type":["number","null"]},"is_active":{"type":"boolean"},"length_cm":{"format":"double","type":["number","null"]},"name":{"type":"string"},"on_hand":{"format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_name":{"type":"string"},"product_status":{"description":"The product's status; parts created here start as `draft`.","type":"string"},"reorder_point":{"format":"int32","type":["integer","null"]},"required_open":{"description":"Units the queued builds of paid orders still need of this part\nbeyond what they already hold.","format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"shortfall":{"description":"`required_open - available`, floored at zero.","format":"int32","type":"integer"},"sku":{"type":"string"},"used_in_kits":{"description":"Distinct kit variants that list this part.","format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["variant_id","product_id","sku","name","product_name","product_status","is_active","allow_backorder","on_hand","reserved","available","used_in_kits","required_open","shortfall"],"type":"object"},"ComponentCandidate":{"description":"A variant that can be picked as a part.","properties":{"available":{"format":"int32","type":"integer"},"is_component":{"description":"Already a part of at least one kit.","type":"boolean"},"name":{"type":"string"},"product_name":{"type":"string"},"sku":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","sku","name","product_name","available","is_component"],"type":"object"},"ComponentCreateRequest":{"properties":{"allow_backorder":{"description":"Defaults to true.","type":["boolean","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"height_cm":{"format":"double","type":["number","null"]},"initial_on_hand":{"description":"Opening stock, so a part can be created and counted in one go.","format":"int32","minimum":0,"type":["integer","null"]},"length_cm":{"format":"double","type":["number","null"]},"location_id":{"description":"Location for `initial_on_hand`.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"sku":{"description":"Unique in the store across every variant.","type":"string"},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["name","sku"],"type":"object"},"ComponentUpdateRequest":{"description":"Fields to change; omitted ones stay. The measurements, cost and reorder\nfields accept null to clear.","properties":{"allow_backorder":{"type":["boolean","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"height_cm":{"format":"double","type":["number","null"]},"length_cm":{"format":"double","type":["number","null"]},"name":{"type":["string","null"]},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"sku":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"type":"object"},"ComponentUsage":{"description":"A kit that lists the part.","properties":{"kit_name":{"type":"string"},"kit_product_id":{"format":"uuid","type":"string"},"kit_product_name":{"type":"string"},"kit_sku":{"type":"string"},"kit_variant_id":{"format":"uuid","type":"string"},"quantity_required":{"format":"int32","type":"integer"},"required_open":{"description":"Units of this part owed to that kit's open build jobs.","format":"int32","type":"integer"}},"required":["kit_variant_id","kit_product_id","kit_name","kit_product_name","kit_sku","quantity_required","required_open"],"type":"object"},"ConfirmWhatsappSetupRequest":{"properties":{"code":{"example":"123456","type":"string"},"phone":{"description":"The same phone passed to `start-setup`.","type":"string"}},"required":["phone","code"],"type":"object"},"ConnectKeysRequest":{"properties":{"keys":{"additionalProperties":{"type":"string"},"description":"The form's fields by `name` (`key_fields` of the marketplace).","propertyNames":{"type":"string"},"type":"object"}},"required":["keys"],"type":"object"},"ConnectKind":{"enum":["managed","form","oauth"],"type":"string"},"ConnectModeCode":{"description":"How a seller connects a marketplace.","enum":["oauth","keys"],"type":"string"},"ConnectSpec":{"description":"How a module is connected, plus where its configuration is stored.","properties":{"docs_url":{"description":"Vendor documentation for obtaining the credentials above.","type":["string","null"]},"fields":{"items":{"$ref":"#/components/schemas/ModuleField"},"type":"array"},"kind":{"$ref":"#/components/schemas/ConnectKind"},"provider_api":{"description":"The REST collection holding this module's provider rows, relative to\n`/stores/{store_id}` — e.g. `payment-providers`. The admin uses this to\nsave any module's config without knowing what the module is. `None` for\nnative modules that own their own storage.","type":["string","null"]},"provider_code":{"description":"The value stored in the provider row's `code` column, when it differs\nfrom the module code (the inventory module `tiny` is stored as\n`tiny_erp`). Resolve with [`ConnectSpec::provider_code_or`].","type":["string","null"]},"webhook_path":{"description":"Callback URL the merchant registers with the provider, as a template\nover `{store_slug}` and `{provider_code}`. Declared here so a new\ngateway documents its own callback instead of the admin hardcoding a\npath per provider.","type":["string","null"]}},"required":["kind"],"type":"object"},"Connected":{"properties":{"connected":{"type":"boolean"}},"required":["connected"],"type":"object"},"ConnectedProduct":{"description":"A product whose gallery uses a file.","properties":{"image_kind":{"description":"`gallery` or `measurement`.","type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"product_slug":{"type":"string"},"product_title":{"type":"string"},"product_variant_id":{"description":"Set when the image belongs to one variant.","format":"uuid","type":["string","null"]},"variant_title":{"type":["string","null"]}},"required":["product_id","product_title","product_slug"],"type":"object"},"ConsentChannel":{"enum":["email","whatsapp"],"type":"string"},"ConsentEntry":{"description":"One entry of the append-only consent ledger.","properties":{"at":{"format":"date-time","type":"string"},"channel":{"description":"`email` or `whatsapp`.","type":"string"},"evidence":{"type":["object","null"]},"source":{"type":["string","null"]},"status":{"description":"`granted` or `revoked`.","type":"string"}},"required":["channel","status","at"],"type":"object"},"ConsentOverview":{"description":"The consent center's summary.","properties":{"channels":{"items":{"$ref":"#/components/schemas/ChannelReach"},"type":"array"},"held":{"description":"Held back in the last 30 days, most frequent first.","items":{"$ref":"#/components/schemas/HeldCount"},"type":"array"},"privacy_open":{"description":"Open LGPD requests, and how many are past their 15 days.","format":"int64","type":"integer"},"privacy_overdue":{"format":"int64","type":"integer"},"recent":{"description":"The latest changes.","items":{"$ref":"#/components/schemas/LedgerEntry"},"type":"array"},"sources":{"description":"The last 30 days.","items":{"$ref":"#/components/schemas/SourceCount"},"type":"array"}},"required":["channels","sources","held","privacy_open","privacy_overdue","recent"],"type":"object"},"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"},"ContextDeal":{"description":"An open deal, as the screen pop shows it.","properties":{"id":{"format":"uuid","type":"string"},"stage_name":{"type":"string"},"title":{"type":"string"},"value_cents":{"format":"int64","type":"integer"}},"required":["id","title","value_cents","stage_name"],"type":"object"},"ContextField":{"description":"One line of context: a label, its value and, optionally, a link.","properties":{"label":{"type":"string"},"url":{"description":"An https link the value opens.","type":["string","null"]},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"ContextOrder":{"description":"The customer's last order.","properties":{"id":{"format":"uuid","type":"string"},"number":{"type":["string","null"]},"placed_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["id","total_cents","status","placed_at"],"type":"object"},"Conversation":{"description":"A conversation with a contact on one channel.","properties":{"assignee_user_id":{"format":"uuid","type":["string","null"]},"attributes":{"description":"Free-form context: the page the widget was opened on, user agent,\ne-mail subject, the AI summary (`summary`), the assisted-sale cart\n(`cart_id`).","type":"object"},"bot_active":{"description":"The AI agent answers while true; a team reply or a hand-over turns it off.","type":"boolean"},"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"]},"external_id":{"description":"WhatsApp: the contact's number (`wa_id`, digits only). E-mail: their address.","type":["string","null"]},"handed_over_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"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)."}]},"lead_stage_at":{"format":"date-time","type":["string","null"]},"marketing_visitor_id":{"description":"Web chat on the store: the storefront tracker's visitor of the\nbrowser it started in (picks the origin only).","format":"uuid","type":["string","null"]},"origin_ad_id":{"description":"The ad the contact clicked (click-to-WhatsApp / click-to-Instagram).","type":["string","null"]},"origin_at":{"description":"When the origin was learned (an ad clicked again in an open\nconversation); null: at the conversation's start.","format":"date-time","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_click_id":{"description":"WhatsApp's ad click id (`ctwa_clid`), sent back to Meta with a sale.","type":["string","null"]},"origin_content":{"type":["string","null"]},"origin_details":{"description":"What the origin was read from: the visit (`session_id`,\n`landing_url`, `visited_at`), the choice made in the inbox\n(`origin`), the ad (`platform`, `headline`, `body`, `image_url`...)\nor the link (`link_id`, `code`, `name`).","type":["object","null"]},"origin_medium":{"type":["string","null"]},"origin_set_by":{"description":"Who set the origin: `visit` (the person's storefront visits had a\nsource), `agent` (picked in the inbox), `ad` (a click-to-WhatsApp or\nclick-to-Instagram ad), `post` (a post's WhatsApp button) or `link`\n(a tracked link).","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"},"quoted_at":{"description":"When the lead was first quoted (a cart link or a PIX went out, or\nthe stage was set to quoted or won); kept if it is later lost.","format":"date-time","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"snoozed_until":{"description":"Set while `status` is `snoozed`: when it wakes up again.","format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/ConversationStatus"},"store_id":{"format":"uuid","type":"string"},"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_for_agents":{"description":"Contact messages the team has not read yet. `POST .../read` clears it.","format":"int32","type":"integer"},"unread_for_visitor":{"description":"Team and bot messages the contact has not read yet.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"},"visitor_id":{"description":"Web widget: the browser's stable visitor id.","type":["string","null"]}},"required":["id","store_id","channel_kind","status","priority","bot_active","unread_for_agents","unread_for_visitor","tags","attributes","created_at","updated_at"],"type":"object"},"ConversationAgentMetrics":{"properties":{"avg_latency_ms":{"format":"double","type":"number"},"carts":{"format":"int64","type":"integer"},"conversations":{"format":"int64","type":"integer"},"errors":{"format":"int64","type":"integer"},"handovers":{"format":"int64","type":"integer"},"input_tokens":{"format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"output_tokens":{"format":"int64","type":"integer"},"paid_orders":{"format":"int64","type":"integer"},"paid_revenue_cents":{"format":"int64","type":"integer"},"replies":{"format":"int64","type":"integer"},"runs":{"format":"int64","type":"integer"}},"required":["runs","replies","handovers","errors","input_tokens","output_tokens","avg_latency_ms","conversations","carts","orders","paid_orders","paid_revenue_cents"],"type":"object"},"ConversationAgentStats":{"properties":{"csat_avg":{"format":"double","type":["number","null"]},"name":{"type":["string","null"]},"open":{"format":"int64","type":"integer"},"resolution_avg_s":{"format":"double","type":["number","null"]},"resolved":{"format":"int64","type":"integer"},"user_id":{"format":"uuid","type":["string","null"]}},"required":["resolved","open"],"type":"object"},"ConversationAskWhatsappRequest":{"properties":{"text":{"description":"Replaces the standard ask.","type":["string","null"]}},"type":"object"},"ConversationAttachmentFile":{"description":"The bytes of a message attachment.","format":"binary","type":"string"},"ConversationAttribution":{"properties":{"orders":{"description":"Orders placed within `window_days` of a conversation with the same customer.","format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"window_days":{"format":"int32","type":"integer"}},"required":["orders","revenue_cents","window_days"],"type":"object"},"ConversationBotSettings":{"description":"How the store's customer-facing AI agent behaves.","properties":{"agent_metrics":{"$ref":"#/components/schemas/ConversationAgentMetrics","description":"Run outcomes and directly associated assisted sales over 30 days."},"ai_auto_return_minutes":{"description":"Minutes a customer may wait on a handed-over conversation before\nthe assistant considers taking it back (5 to 1440); null: never.","format":"int32","type":["integer","null"]},"audio_configured":{"type":"boolean"},"bot_name":{"type":"string"},"business_hours":{"type":"object"},"business_hours_only":{"type":"boolean"},"collect_contact":{"description":"Ask for name and e-mail on the widget.","type":"boolean"},"embeddings_configured":{"description":"The server can embed the knowledge base (better retrieval).","type":"boolean"},"enabled":{"description":"The bot answers new conversations.","type":"boolean"},"greeting":{"description":"First message of a widget conversation.","type":"string"},"handover_keywords":{"description":"Phrases that make the bot hand over to the team.","items":{"type":"string"},"type":"array"},"handover_when_unsure":{"description":"Hand over when the knowledge base has no answer.","type":"boolean"},"memory":{"$ref":"#/components/schemas/ConversationMemorySettings","description":"How customer facts are read from the chats."},"model_configured":{"description":"The server has an AI model configured (without it the bot stays quiet).","type":"boolean"},"persona":{"description":"Tone and extra policies, in the store's words.","type":"string"},"sales_blueprint":{"$ref":"#/components/schemas/ConversationSalesBlueprint"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["store_id","enabled","bot_name","greeting","persona","handover_keywords","handover_when_unsure","business_hours_only","business_hours","collect_contact","sales_blueprint","agent_metrics","audio_configured","updated_at","model_configured","embeddings_configured","memory"],"type":"object"},"ConversationBotSettingsUpdate":{"properties":{"ai_auto_return_minutes":{"description":"Minutes (5 to 1440) a customer may wait on a handed-over\nconversation before the assistant considers taking it back; null\nturns it off.","format":"int32","type":["integer","null"]},"bot_name":{"type":["string","null"]},"business_hours":{"type":["object","null"]},"business_hours_only":{"type":["boolean","null"]},"collect_contact":{"type":["boolean","null"]},"enabled":{"type":["boolean","null"]},"greeting":{"type":["string","null"]},"handover_keywords":{"items":{"type":"string"},"type":["array","null"]},"handover_when_unsure":{"type":["boolean","null"]},"memory":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMemorySettings","description":"Replaces the fact extractor's settings."}]},"persona":{"type":["string","null"]},"sales_blueprint":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSalesBlueprint"}]}},"type":"object"},"ConversationBulkAction":{"enum":["assign","unassign","resolve","reopen","snooze","priority","add_tag","remove_tag","read"],"type":"string"},"ConversationBulkRequest":{"properties":{"action":{"$ref":"#/components/schemas/ConversationBulkAction"},"ids":{"description":"1 to 200 conversation ids. Ids of other stores are ignored.","items":{"format":"uuid","type":"string"},"type":"array"},"value":{"description":"The action's argument (see `action`).","type":["string","null"]}},"required":["ids","action"],"type":"object"},"ConversationBulkResult":{"properties":{"updated":{"description":"Conversations the action applied to.","minimum":0,"type":"integer"}},"required":["updated"],"type":"object"},"ConversationCampaignCard":{"description":"What a campaign card shows.","properties":{"ends_at":{"description":"When the campaign ends (discounts with an end date).","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"type":["string","null"]},"kind":{"description":"`discount` (an automatic discount) or `collection`.","type":"string"},"subtitle":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["kind","id","title","subtitle","url"],"type":"object"},"ConversationCampaignCardRequest":{"description":"Pick one of `discount_id` and `collection_id`.","properties":{"collection_id":{"description":"A collection of the store.","format":"uuid","type":["string","null"]},"discount_id":{"description":"An automatic discount active now.","format":"uuid","type":["string","null"]},"text":{"description":"Replaces the standard text (title, subtitle and link).","type":["string","null"]}},"type":"object"},"ConversationCampaignOptions":{"description":"What the agent can pick for a campaign card.","properties":{"collections":{"description":"The store's collections with active products.","items":{"$ref":"#/components/schemas/ConversationCampaignCard"},"type":"array"},"discounts":{"description":"Automatic discounts active now.","items":{"$ref":"#/components/schemas/ConversationCampaignCard"},"type":"array"}},"required":["discounts","collections"],"type":"object"},"ConversationCart":{"description":"The assisted-sale cart of a conversation: what the team, the bot and the\ncontact all see, paid through `url`.","properties":{"cart_id":{"format":"uuid","type":"string"},"currency":{"type":"string"},"discount_cents":{"format":"int64","type":"integer"},"discount_code":{"description":"The discount code on the cart, when the discount came from one.","type":["string","null"]},"discount_expires_at":{"description":"An expiring offer: after this instant the cart drops its discount\nand the link charges full price. Stays set once passed (the\ndiscount is then 0), so clients can say the offer expired.","format":"date-time","type":["string","null"]},"expires_at":{"description":"When the link stops working.","format":"date-time","type":["string","null"]},"freight_change":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCartFreightChange","description":"Only in the answer to a change of the items, when a freight had been\nchosen: whether it was chosen again or left the cart."}]},"item_count":{"format":"int32","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/ConversationCartItem"},"type":"array"},"offer_deadline":{"description":"The deadline as the customer reads it, in the store's time zone\n(\"20/10 às 18:00\"); null without one or once passed.","type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"paid":{"description":"The order is paid.","type":"boolean"},"pending_discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationDiscountApproval","description":"A discount above the store's cap waiting for approval: until it is\ndecided the cart cannot be sent or charged."}]},"pricing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PricedCart","description":"What each payment method costs (PIX with its discount, card with its\ninstallments), from the same pricing the charge uses."}]},"shipping_cents":{"format":"int64","type":"integer"},"status":{"description":"`open`, `converted` (an order was created), `abandoned` or `expired`.","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"},"url":{"description":"The payment link to send the contact.","type":["string","null"]}},"required":["cart_id","status","currency","item_count","subtotal_cents","discount_cents","shipping_cents","total_cents","paid","items"],"type":"object"},"ConversationCartCodeRequest":{"description":"Apply a code to the conversation's cart: an existing one (`code`) or a\nnew single-use one (`create`).","properties":{"code":{"type":["string","null"]},"create":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationNewChatCode"}]},"expires_at":{"description":"The offer ends then (a created code also stops working then).","format":"date-time","type":["string","null"]},"note":{"type":["string","null"]}},"type":"object"},"ConversationCartContact":{"properties":{"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"document":{"description":"CPF digits.","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"},"ConversationCartCustomer":{"description":"The cart's contact draft, and what is still missing for a PIX checkout.","properties":{"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCartContact"}]},"freight_selected":{"type":"boolean"},"has_cart":{"description":"The conversation has a usable cart.","type":"boolean"},"missing":{"description":"Fields still needed: `cart`, `name`, `email`, `document`,\n`zip_code`, `street`, `number`, `city`, `state`, `freight`.","items":{"type":"string"},"type":"array"},"ready":{"description":"Nothing is missing: `POST .../cart/pix` will work.","type":"boolean"},"requires_shipping":{"description":"Something in the cart ships (and pickup was not chosen).","type":"boolean"}},"required":["has_cart","requires_shipping","freight_selected","missing","ready"],"type":"object"},"ConversationCartCustomerInput":{"description":"Contact and address details for the order. Fields left out are kept.","properties":{"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"document":{"description":"CPF, 11 digits (punctuation is ignored). Validated.","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"},"ConversationCartDiscountRequest":{"description":"A discount on the conversation's cart. Send one of `discount_cents` or\n`discount_pct_bp`; neither (or zero) removes the discount.","properties":{"discount_cents":{"description":"A fixed amount off the goods, in cents (at most the subtotal).","format":"int64","type":["integer","null"]},"discount_pct_bp":{"description":"A share of the goods in basis points (1000 = 10%), under 100%. Wins\nover `discount_cents` when both are sent.","format":"int32","type":["integer","null"]},"expires_at":{"description":"The offer ends then: after it the payment link charges full price.","format":"date-time","type":["string","null"]},"note":{"description":"Why, for whoever approves it.","type":["string","null"]}},"type":"object"},"ConversationCartFreightChange":{"description":"What happened to the cart's freight when its items changed.","properties":{"carrier":{"type":["string","null"]},"cep":{"description":"The CEP quoted (digits).","type":"string"},"from_cents":{"description":"What the freight cost before the change.","format":"int64","type":"integer"},"service":{"type":"string"},"status":{"description":"`kept`: the cart was quoted again at its CEP and the same service\nchosen (its price may have changed: `from_cents` and `to_cents`).\n`cleared`: it could not be chosen again (no longer offered, or the\ncarriers did not answer); the cart has no freight until one is chosen.","type":"string"},"to_cents":{"description":"What it costs now; null when cleared.","format":"int64","type":["integer","null"]}},"required":["status","cep","service","from_cents"],"type":"object"},"ConversationCartItem":{"properties":{"image":{"type":["string","null"]},"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":["variant_id","product_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"ConversationCartItemRequest":{"properties":{"quantity":{"description":"Defaults to 1.","format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"ConversationCartLinkRequest":{"properties":{"text":{"description":"The message; defaults to a standard text with the item count, total\nand link.","type":["string","null"]}},"type":"object"},"ConversationCartQuantityRequest":{"properties":{"quantity":{"description":"New quantity; 0 removes the item.","format":"int32","type":"integer"}},"required":["quantity"],"type":"object"},"ConversationChannel":{"description":"A channel the inbox receives conversations on.","properties":{"config":{"description":"Channel settings. Secrets never come back: `access_token` and\n`app_secret` show as `has_access_token` / `has_app_secret`. Web:\n`title`, `subtitle`, `color`, `position`, `greeting`,\n`allowed_origins`, `bot_enabled`... WhatsApp: `phone_number_id`,\n`waba_id`, `display_phone`, `verify_token`, `api_version`.","type":"object"},"created_at":{"format":"date-time","type":"string"},"enabled":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ConversationChannelKind"},"name":{"type":"string"},"public_key":{"description":"Web: the widget key (`data-key` of the embed script).","type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"webhook_path":{"description":"WhatsApp and Instagram: the webhook path to register with Meta (on\nthe API host).","type":["string","null"]}},"required":["id","store_id","kind","name","public_key","config","enabled","created_at","updated_at"],"type":"object"},"ConversationChannelCreateRequest":{"properties":{"config":{"description":"Channel settings. Secrets (`access_token`, `app_secret`) are stored\nencrypted.","type":["object","null"]},"enabled":{"type":["boolean","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationChannelKind","description":"Defaults to `web`."}]},"name":{"description":"Defaults to \"Chat do site\", \"WhatsApp\" or \"E-mail\".","type":["string","null"]}},"type":"object"},"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"},"ConversationChannelUpdateRequest":{"properties":{"config":{"description":"Replaces the settings. Leave a secret empty or out to keep the stored one.","type":["object","null"]},"enabled":{"type":["boolean","null"]},"name":{"type":["string","null"]}},"type":"object"},"ConversationChatToOrder":{"description":"Chats that became orders, for one agent or channel.","properties":{"channel":{"description":"Set in `by_channel`.","type":["string","null"]},"conversations":{"format":"int64","type":"integer"},"name":{"type":["string","null"]},"rate":{"description":"`won / conversations`, 0 to 1.","format":"double","type":"number"},"user_id":{"description":"The assignee (null: nobody, the AI alone). Set in `by_agent`.","format":"uuid","type":["string","null"]},"won":{"description":"Of those, leads that reached `won`.","format":"int64","type":"integer"}},"required":["conversations","won","rate"],"type":"object"},"ConversationConversionEvent":{"description":"An event sent to Meta for a conversation that started from an ad.","properties":{"channel_kind":{"description":"`whatsapp` or `instagram`.","type":"string"},"contact":{"description":"The contact's name (or number / username).","type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"description":"Meta's error, or why it was skipped.","type":["string","null"]},"event_name":{"description":"`LeadSubmitted`, `QualifiedLead` or `Purchase`.","type":"string"},"id":{"format":"uuid","type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"status":{"description":"`sending`, `sent`, `failed` or `skipped`.","type":"string"}},"required":["id","conversation_id","channel_kind","event_name","status","created_at"],"type":"object"},"ConversationCounts":{"description":"Inbox counts, for the views rail and an app badge.","properties":{"mine":{"description":"Open or pending conversations assigned to the caller.","format":"int64","type":"integer"},"mine_unread":{"description":"Of `mine`, those with unread messages.","format":"int64","type":"integer"},"open":{"description":"Conversations in each status; `open` includes `pending`, as the\n`status=open` list does.","format":"int64","type":"integer"},"pending":{"format":"int64","type":"integer"},"resolved":{"format":"int64","type":"integer"},"sla_breached":{"description":"Open or pending conversations whose customer has waited longer than\nthe first-response target (SLA).","format":"int64","type":"integer"},"snoozed":{"format":"int64","type":"integer"},"unassigned":{"description":"Open or pending conversations nobody is assigned to.","format":"int64","type":"integer"},"unassigned_unread":{"description":"Of `unassigned`, those with unread messages.","format":"int64","type":"integer"},"unread":{"description":"Open or pending conversations with unread contact messages.","format":"int64","type":"integer"},"unread_messages":{"description":"Unread contact messages across open and pending conversations: the\nnumber for an app icon badge.","format":"int64","type":"integer"}},"required":["open","pending","snoozed","resolved","unassigned","mine","unread","unread_messages","mine_unread","unassigned_unread","sla_breached"],"type":"object"},"ConversationCustomer":{"description":"The matched customer, with order totals.","properties":{"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_order_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"orders_count":{"format":"int64","type":"integer"},"phone":{"type":["string","null"]},"total_spent_cents":{"description":"Paid orders, in cents.","format":"int64","type":"integer"}},"required":["id","name","orders_count","total_spent_cents"],"type":"object"},"ConversationDetail":{"description":"A conversation with what the thread's side panel shows.","properties":{"assignee_name":{"description":"Full name of the assignee, else their e-mail.","type":["string","null"]},"conversation":{"$ref":"#/components/schemas/Conversation"},"customer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCustomer"}]},"display_name":{"description":"Who to show (same rule as the list's `display_name`).","type":"string"},"notes":{"description":"Internal notes, oldest first.","items":{"$ref":"#/components/schemas/ConversationNote"},"type":"array"},"recent_orders":{"description":"The customer's five latest orders.","items":{"$ref":"#/components/schemas/ConversationRecentOrder"},"type":"array"},"reply_window_expires_at":{"description":"WhatsApp and Instagram: until when a free-form reply is allowed (24\nhours after the contact's last message; 7 days on Instagram with the\nHuman Agent permission). Null on other channels, or when the contact\nnever wrote. Past it, sending answers 422 `whatsapp_window_closed`\n(WhatsApp) or `reply_window_closed` (Instagram).","format":"date-time","type":["string","null"]}},"required":["conversation","display_name","notes","recent_orders"],"type":"object"},"ConversationDiscountApproval":{"description":"A discount above the cap, waiting for (or after) a decision.","properties":{"cap_pct":{"description":"The store's cap then, whole percent.","format":"int32","type":"integer"},"cart_id":{"format":"uuid","type":"string"},"code":{"description":"An existing code; null for a single-use code created on approval\n(or a plain cart discount).","type":["string","null"]},"contact_name":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by":{"format":"uuid","type":["string","null"]},"decided_via":{"description":"`app` or `link`.","type":["string","null"]},"discount_cents":{"description":"The amount asked for (fixed discounts).","format":"int64","type":["integer","null"]},"discount_code_id":{"description":"The existing code's id.","format":"uuid","type":["string","null"]},"discount_pct_bp":{"description":"The share asked for, in basis points (percentage discounts).","format":"int32","type":["integer","null"]},"effective_pct_bp":{"description":"Share of the goods it takes off, basis points, when requested.","format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`cart_discount` or `code`.","type":"string"},"note":{"type":["string","null"]},"offer_expires_at":{"description":"When the offer ends once applied.","format":"date-time","type":["string","null"]},"requested_by":{"format":"uuid","type":"string"},"requested_by_name":{"type":["string","null"]},"status":{"description":"`pending`, `approved`, `rejected` or `cancelled` (replaced by\nanother request, or the discount was cleared).","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"}},"required":["id","conversation_id","cart_id","requested_by","kind","effective_pct_bp","cap_pct","subtotal_cents","status","created_at"],"type":"object"},"ConversationFollowupDue":{"description":"A lead waiting for a follow-up.","properties":{"assignee_user_id":{"format":"uuid","type":["string","null"]},"channel_kind":{"type":"string"},"contact_name":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"lead_stage":{"type":["string","null"]},"next_due_at":{"format":"date-time","type":["string","null"]},"next_kind":{"description":"The next step and when.","type":["string","null"]},"priority":{"type":["string","null"]},"reminded_at":{"description":"The latest reminder that went out, and its priority.","format":"date-time","type":["string","null"]},"started_at":{"description":"T: our last message.","format":"date-time","type":"string"},"task_id":{"format":"uuid","type":["string","null"]}},"required":["conversation_id","channel_kind","started_at"],"type":"object"},"ConversationFollowupRecovery":{"description":"Sales the follow-ups brought back.","properties":{"conversations":{"description":"Conversations with at least one step done.","format":"int64","type":"integer"},"nudges":{"format":"int64","type":"integer"},"orders":{"description":"Paid orders of those conversations, paid after that reply.","format":"int64","type":"integer"},"reminders":{"format":"int64","type":"integer"},"replies":{"description":"Of those conversations, the ones where the customer wrote within 7\ndays of a step.","format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"}},"required":["conversations","reminders","nudges","replies","orders","revenue_cents"],"type":"object"},"ConversationFreightOption":{"description":"A shipping option for the cart.","properties":{"carrier":{"type":["string","null"]},"delivery_days":{"format":"int64","type":["integer","null"]},"name":{"type":["string","null"]},"option_id":{"description":"Pass back as `option_id` to select it.","type":["string","null"]},"price":{"description":"Formatted (\"R$ 29,90\").","type":"string"},"price_cents":{"format":"int64","type":"integer"}},"required":["price_cents","price"],"type":"object"},"ConversationFreightPrefill":{"description":"Where the CEP to quote comes from.","properties":{"cep":{"description":"Digits; null when nothing is known.","type":["string","null"]},"source":{"description":"`cart` (typed in this cart), `customer` (the customer's address) or\n`thread` (the last CEP the customer wrote in this conversation).","type":["string","null"]}},"type":"object"},"ConversationFreightRequest":{"description":"Quote or pick freight: send `cep` to quote, `option_id` to select.","properties":{"cep":{"description":"Destination CEP: quote the options.","type":["string","null"]},"manual":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationManualFreight","description":"Freight priced by hand (a carrier booked outside Mobiari, or a CEP\nthe carriers do not quote): select it. No carrier order is created\nfor the order; its shipment is the team's to book."}]},"option_id":{"description":"An `option_id` from a quote: select it.","type":["string","null"]}},"type":"object"},"ConversationFreightResult":{"description":"Quote results (`cep`) or the cart with the chosen option (`option_id`).","properties":{"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"After selecting: the cart with the shipping cost."}]},"destination":{"description":"The CEP quoted (digits).","type":["string","null"]},"options":{"items":{"$ref":"#/components/schemas/ConversationFreightOption"},"type":["array","null"]}},"type":"object"},"ConversationFreightSendRequest":{"properties":{"cep":{"description":"The CEP to quote; defaults to the prefill (`.../cart/freight/prefill`).","type":["string","null"]},"option_ids":{"description":"Only these options, in this order, from the cart's current quote at\n`cep` (`POST .../cart/freight`), which is offered as it is, without\nquoting again. Default: quote again and offer all, cheapest first.","items":{"type":"string"},"type":["array","null"]},"text":{"description":"Replaces the standard text listing the options.","type":["string","null"]}},"type":"object"},"ConversationFreightSent":{"description":"The quote message and the options it offered.","properties":{"cep":{"description":"The CEP quoted (digits).","type":"string"},"conversation":{"$ref":"#/components/schemas/Conversation"},"message":{"$ref":"#/components/schemas/ConversationMessage"},"options":{"items":{"$ref":"#/components/schemas/ConversationFreightOption"},"type":"array"}},"required":["message","conversation","cep","options"],"type":"object"},"ConversationHit":{"properties":{"channel":{"type":"string"},"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"preview":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","channel","status"],"type":"object"},"ConversationHourPoint":{"properties":{"count":{"description":"Contact messages received in that hour.","format":"int64","type":"integer"},"hour":{"description":"Hour of day, São Paulo time.","format":"int32","type":"integer"}},"required":["hour","count"],"type":"object"},"ConversationInboxSettings":{"description":"The inbox's opening hours, away message, first-response target,\nvoice-message transcription and when unanswered conversations close.","properties":{"auto_resolve_hours":{"description":"Resolve an open conversation on its own once the team (an agent or\nthe bot) spoke last and the customer has not replied for this many\nhours (12 to 2160). Null: never. Default 72. The customer is not\ntold, and the `conversations.resolved` event is not sent for it.","format":"int32","type":["integer","null"]},"away_enabled":{"description":"Answer customers who write while closed with `away_message` (once\nper closed period).","type":"boolean"},"away_message":{"type":"string"},"business_hours":{"description":"`{\"mon\": [[\"09:00\", \"18:00\"]], ..., \"sun\": []}` (days `mon`…`sun`,\n`HH:MM` ranges in `timezone`). Empty: always open.","type":"object"},"context_secret":{"description":"The new signing secret, only in the answer that created it.","type":["string","null"]},"context_secret_set":{"description":"A signing secret exists for the context URL.","type":"boolean"},"context_url":{"description":"The company's endpoint asked about a conversation's customer (see\nthe customer context guide).","type":["string","null"]},"sla_minutes":{"description":"Target for the first team reply to a waiting customer, in minutes.","format":"int32","type":"integer"},"tickets":{"$ref":"#/components/schemas/TicketSettings","description":"When the workspace opens tickets and how soon replies are due."},"timezone":{"description":"IANA time zone, e.g. `America/Sao_Paulo`.","type":"string"},"transcribe_audio":{"description":"Transcribe customers' voice messages on arrival, so the team reads\nthem and the AI hears them.","type":"boolean"},"transcription_available":{"description":"This server has a transcription service (without it audio is not\ntranscribed whatever `transcribe_audio` says).","type":"boolean"}},"required":["timezone","business_hours","away_enabled","away_message","sla_minutes","transcribe_audio","transcription_available","tickets","context_secret_set"],"type":"object"},"ConversationInboxSettingsUpdate":{"properties":{"auto_resolve_hours":{"description":"Hours without a reply from the customer before a conversation the\nteam answered last is resolved (12 to 2160); null or 0 turns it off.","format":"int32","type":["integer","null"]},"away_enabled":{"type":["boolean","null"]},"away_message":{"type":["string","null"]},"business_hours":{"type":["object","null"]},"context_url":{"description":"An https URL; `\"\"` removes it.","type":["string","null"]},"rotate_context_secret":{"description":"Make a new signing secret for the context URL; the answer carries it\nonce in `context_secret`.","type":["boolean","null"]},"sla_minutes":{"format":"int32","type":["integer","null"]},"tickets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketSettings","description":"Replaces the ticket settings as a whole."}]},"timezone":{"type":["string","null"]},"transcribe_audio":{"type":["boolean","null"]}},"type":"object"},"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"},"ConversationLeadFollowup":{"description":"One step of a conversation's follow-up.","properties":{"channels":{"description":"Where it went: `task`, `push`, `whatsapp`, `whatsapp_template`,\n`instagram`, `email`.","items":{"type":"string"},"type":"array"},"conversation_id":{"format":"uuid","type":"string"},"due_at":{"format":"date-time","type":"string"},"executed_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`reminder` (to the team) or `nudge` (to the customer).","type":"string"},"message_id":{"description":"The nudge as recorded in the conversation.","format":"uuid","type":["string","null"]},"priority":{"description":"Reminders: `urgent`, `high` or `low`.","type":["string","null"]},"reason":{"description":"Why it was skipped or cancelled: `customer_replied`, `won`, `lost`,\n`opted_out`, `agent`, `disabled`, `not_a_lead`, `no_channel`,\n`delivery_failed`, `ai_nudges_off`, `started_late`.","type":["string","null"]},"started_at":{"description":"T: the message from our side the sequence counts from.","format":"date-time","type":"string"},"status":{"description":"`pending`, `running`, `done`, `skipped` or `cancelled`.","type":"string"},"step":{"description":"1 to 8.","format":"int32","type":"integer"},"task_id":{"format":"uuid","type":["string","null"]}},"required":["id","conversation_id","started_at","step","kind","due_at","status","channels"],"type":"object"},"ConversationListItem":{"allOf":[{"$ref":"#/components/schemas/Conversation"},{"properties":{"assignee_name":{"description":"Full name of the assignee, else their e-mail.","type":["string","null"]},"customer_name":{"description":"Name of the matched customer.","type":["string","null"]},"display_name":{"description":"Who to show: the contact's name, else the matched customer's name,\ne-mail, phone or WhatsApp number, else \"Visitante\".","type":"string"},"waiting_since":{"description":"Since when the contact has been waiting for a reply (null when the\nlast word is the team's or the conversation is not open or pending).","format":"date-time","type":["string","null"]}},"required":["display_name"],"type":"object"}],"description":"An inbox row: the conversation plus what a list needs to render it."},"ConversationManualFreight":{"description":"Freight the seller prices by hand.","properties":{"carrier":{"description":"Who carries it (\"Transportadora X\", \"Motoboy\"), 1 to 80 characters.","type":"string"},"cep":{"description":"Destination CEP (8 digits, formatting ignored).","type":"string"},"delivery_days":{"description":"Delivery time in days (0 to 365), when known.","format":"int32","type":["integer","null"]},"price_cents":{"description":"What the customer pays for it, in cents (0 to 10000000).","format":"int64","type":"integer"}},"required":["cep","carrier","price_cents"],"type":"object"},"ConversationMemorySettings":{"description":"How the fact extractor reads this store's chats.","properties":{"enabled":{"default":false,"description":"Read customer messages for facts to remember.","type":"boolean"},"examples":{"default":"","description":"Example messages and the facts they give, one per line.","type":"string"},"goal":{"default":"","description":"What the memory is for.","type":"string"},"ignore":{"default":"","description":"What to leave out (on top of what is never kept).","type":"string"},"important":{"default":"","description":"What is worth remembering.","type":"string"},"store_context":{"default":"","description":"What the store sells and to whom.","type":"string"}},"type":"object"},"ConversationMessage":{"description":"One message of a conversation.","properties":{"agent_user_id":{"description":"The team member who wrote it (`sender` = `agent`).","format":"uuid","type":["string","null"]},"attachments":{"description":"Files that came with the message, each with a download URL.","items":{"$ref":"#/components/schemas/ConversationMessageAttachment"},"type":"array"},"conversation_id":{"format":"uuid","type":"string"},"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"},"external_id":{"description":"The provider's id (WhatsApp message id, `email:<Message-ID>`).","type":["string","null"]},"id":{"format":"uuid","type":"string"},"payload":{"$ref":"#/components/schemas/ConversationMessagePayload","description":"Structured extras: product cards, quick replies, the assisted-sale\ncart, a PIX charge, e-mail headers, system event details."},"read_at":{"description":"When the other side read it.","format":"date-time","type":["string","null"]},"sender":{"$ref":"#/components/schemas/ConversationMessageSender"},"store_id":{"format":"uuid","type":"string"},"text":{"description":"Plain text. May be empty when the message is only an attachment or a card.","type":"string"}},"required":["id","conversation_id","store_id","sender","text","payload","delivery_status","created_at","attachments"],"type":"object"},"ConversationMessageAttachment":{"description":"A file attached to a message. `url` is an Admin API endpoint: download it\nwith the same `Authorization` header as any other call (the server\nfetches the file from WhatsApp or the mailbox on demand).","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"]},"path":{"description":"The download path relative to the API origin (starting with\n`/app/`), when the file is served by this API; null for direct\nlinks. Resolve it against the base URL your client already uses.","type":["string","null"]},"size":{"description":"Size in bytes, when known.","format":"int64","type":["integer","null"]},"transcribable":{"description":"Audio this API keeps a copy of, which `POST\n.../attachments/{index}/transcript` can transcribe.","type":"boolean"},"transcript":{"description":"Audio: what was said, once transcribed (empty when nothing was).","type":["string","null"]},"transcript_status":{"description":"Audio: `pending` (being transcribed), `done`, `failed` (ask again\nwith `POST .../attachments/{index}/transcript`) or `unsupported`;\nnull when never asked.","type":["string","null"]},"url":{"description":"Where to download the file: a direct link, or `GET\n.../attachments/{index}` on this API (send the usual\n`Authorization` header). In REST responses the API link uses the\nscheme and host the request came in on; in WebSocket events, the\nAPI's configured public address.","type":"string"}},"required":["index","kind","url","transcribable"],"type":"object"},"ConversationMessagePayload":{"description":"The documented keys of a message `payload`. All optional; others may appear.","properties":{"assignee_user_id":{"description":"System `assignment` messages: the new assignee (null when unassigned).","format":"uuid","type":["string","null"]},"attachments":{"description":"Attachment metadata as the channel sent it. Use the message's\n`attachments` for download URLs.","items":{"type":"object"},"type":["array","null"]},"campaign":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCampaignCard","description":"A campaign card: render it with its link."}]},"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"Assisted-sale cart snapshot: render a cart card with its payment link."}]},"contacts":{"description":"Contact cards the customer shared: `name`, `phones`, `emails`.","items":{"type":"object"},"type":["array","null"]},"echo":{"description":"Sent by the team from the WhatsApp Business app on the same number.","type":["boolean","null"]},"email":{"description":"E-mail messages: subject, sender, sanitized HTML body, attachments.","type":["object","null"]},"freight_cep":{"description":"The CEP those options were quoted for (digits).","type":["string","null"]},"freight_options":{"description":"Shipping options the team offered (`POST .../cart/freight/send`).","items":{"$ref":"#/components/schemas/ConversationFreightOption"},"type":["array","null"]},"interactive":{"description":"The contact tapped a button instead of typing.","type":["boolean","null"]},"kind":{"description":"System messages: `assignment`, `handover`, `resolved` or `payment`.","type":["string","null"]},"location":{"description":"WhatsApp location messages: `latitude`, `longitude`, `name`, `address`.","type":["object","null"]},"order":{"description":"A WhatsApp catalog order: `catalog_id` and `items` (`variant_id`,\n`title`, `quantity`, `item_price`, `currency`). Its items also go to\nthe conversation's cart.","type":["object","null"]},"paid_order_id":{"description":"The bot's payment confirmation: the paid order.","type":["string","null"]},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationPixCharge","description":"A PIX charge created from the cart: render the QR code."}]},"pix_code":{"description":"True on the follow-up message that carries only the PIX copy-and-paste code.","type":["boolean","null"]},"product_format":{"description":"How `products` were sent (`POST .../products`): `whatsapp_catalog`,\n`whatsapp_card`, `instagram_carousel`, `email_list` or `card`.","type":["string","null"]},"products":{"description":"Product cards the bot suggested or a teammate sent.","items":{"$ref":"#/components/schemas/ConversationProductCard"},"type":["array","null"]},"quick_replies":{"description":"Up to three suggested answers, shown as buttons.","items":{"type":"string"},"type":["array","null"]},"quick_reply_ids":{"description":"Ids of the `quick_replies` buttons, when they are not `qr_<n>`\n(`freight:<option_id>` selects that freight when tapped).","items":{"type":"string"},"type":["array","null"]},"reactions":{"description":"Reactions: `by` is `visitor`, `business_app` or a team member's id.","items":{"type":"object"},"type":["array","null"]},"reason":{"description":"System `handover` messages: why the bot handed over.","type":["string","null"]},"referral":{"description":"The ad or post the contact tapped to send this message, as the\nchannel sent it. WhatsApp: `source_type` (`ad` or `post`),\n`source_url`, `headline`, `body`, `image_url`, `thumbnail_url`.\nInstagram: `ad_id` and `ads_context_data` (`ad_title`, `photo_url`).","type":["object","null"]},"reply_to":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMessageReplyRef","description":"The message this one answers."}]},"story":{"description":"Instagram: the story a reply answers (`url`, `id`).","type":["object","null"]},"template":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationMessageTemplate","description":"A WhatsApp template the team sent; the message `text` is its body\nwith the variables filled in."}]},"unsent":{"description":"Unsent on Instagram: its text and files were removed, and `text` says\nso in Portuguese. The only key left.","type":["boolean","null"]}},"type":"object"},"ConversationMessageReplyRef":{"description":"The message a reply answers, as shown above it.","properties":{"external_id":{"description":"Its WhatsApp id, when it has one.","type":["string","null"]},"image_index":{"description":"The index of its first image attachment, when it has one: the quote\nshows `.../messages/{message_id}/attachments/{image_index}`.","format":"int32","type":["integer","null"]},"media_index":{"description":"Its first photo or video (`media_kind` `image`, `sticker` or\n`video`), at `.../messages/{message_id}/attachments/{media_index}`.","format":"int32","type":["integer","null"]},"media_kind":{"type":["string","null"]},"message_id":{"format":"uuid","type":"string"},"sender":{"type":"string"},"text":{"description":"Preview of its text.","type":"string"}},"required":["message_id","sender","text"],"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 stored message and the conversation after it.","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"},"message":{"$ref":"#/components/schemas/ConversationMessage"}},"required":["message","conversation"],"type":"object"},"ConversationMessageTemplate":{"description":"The WhatsApp template behind a message.","properties":{"buttons":{"description":"Button labels.","items":{"type":"string"},"type":"array"},"footer":{"type":["string","null"]},"header":{"description":"Text header with its variable filled in.","type":["string","null"]},"header_media":{"description":"Media header: `kind` (`image`, `video`, `document`) and `url`.","type":["object","null"]},"id":{"format":"uuid","type":"string"},"language":{"type":"string"},"name":{"type":"string"}},"required":["id","name","language","buttons"],"type":"object"},"ConversationNewChatCode":{"description":"A single-use code to create for this conversation.","properties":{"discount_type":{"$ref":"#/components/schemas/DiscountType"},"value":{"description":"Whole percent (1 to 99) for `percentage`, cents for `fixed_amount`.","format":"int32","type":"integer"}},"required":["discount_type","value"],"type":"object"},"ConversationNote":{"description":"An internal note: visible to the team only, never sent to the contact.","properties":{"author_name":{"type":["string","null"]},"author_user_id":{"format":"uuid","type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"text":{"type":"string"}},"required":["id","conversation_id","text","created_at"],"type":"object"},"ConversationNoteRequest":{"properties":{"text":{"type":"string"}},"required":["text"],"type":"object"},"ConversationOfferResult":{"description":"The cart after an offer, and the approval when one is needed.","properties":{"approval":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationDiscountApproval","description":"Set when `status` is `pending_approval`."}]},"cart":{"$ref":"#/components/schemas/ConversationCart"},"code":{"description":"The code on the cart (an existing one, or the single-use code just\ncreated). Null for a plain discount, or while pending.","type":["string","null"]},"status":{"$ref":"#/components/schemas/ConversationOfferStatus"}},"required":["status","cart"],"type":"object"},"ConversationOfferStatus":{"description":"What happened to an offer.","enum":["applied","pending_approval","cleared"],"type":"string"},"ConversationOrigin":{"description":"How a contact found the store, as someone on the team tells it.","enum":["meta_ads","google_ads","instagram","facebook","google_search","word_of_mouth","walk_in","returning_customer","other"],"type":"string"},"ConversationPixCharge":{"description":"A PIX charge for the order created from the cart.","properties":{"amount":{"description":"Formatted (\"R$ 129,90\").","type":"string"},"amount_cents":{"format":"int64","type":"integer"},"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"The cart the order came from. Absent in the bot's PIX messages."}]},"copy_paste":{"description":"The PIX copy-and-paste code.","type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":"string"},"qr_code_base64":{"description":"PNG of the QR code, base64.","type":["string","null"]}},"required":["order_id","order_number","amount_cents","amount"],"type":"object"},"ConversationPixSent":{"description":"The PIX message, the conversation and the charge.","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"},"message":{"$ref":"#/components/schemas/ConversationMessage","description":"The message with the QR code card (`payload.pix`)."},"pix":{"$ref":"#/components/schemas/ConversationPixCharge"}},"required":["message","conversation","pix"],"type":"object"},"ConversationPriority":{"enum":["low","normal","high","urgent"],"type":"string"},"ConversationProductCard":{"description":"A product card inside a bot message.","properties":{"compare_at":{"description":"Formatted original price when on promotion.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image":{"type":["string","null"]},"price":{"description":"Formatted price (\"R$ 129,90\"); empty while the assistant is not\nshowing prices yet (early in a conversation).","type":"string"},"title":{"type":"string"},"url":{"description":"Product page on the storefront.","type":"string"},"variant_id":{"description":"The variant the price is for (the Meta catalog item id).","format":"uuid","type":["string","null"]}},"required":["id","title","price","url"],"type":"object"},"ConversationProductFormat":{"description":"How products reach the customer.","enum":["whatsapp_catalog","whatsapp_card","instagram_carousel","email_list","card"],"type":"string"},"ConversationProductsSent":{"description":"The products message and the format it went in.","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"},"format":{"$ref":"#/components/schemas/ConversationProductFormat"},"message":{"$ref":"#/components/schemas/ConversationMessage"}},"required":["message","conversation","format"],"type":"object"},"ConversationReactionRequest":{"description":"A reaction to a message.","properties":{"emoji":{"description":"One emoji; empty removes your reaction.","type":"string"}},"required":["emoji"],"type":"object"},"ConversationRecentOrder":{"properties":{"created_at":{"format":"date-time","type":"string"},"fulfillment_status":{"$ref":"#/components/schemas/OrderFulfillmentStatus"},"id":{"format":"uuid","type":"string"},"number":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/OrderStatus"},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["id","status","fulfillment_status","created_at"],"type":"object"},"ConversationReplyRequest":{"description":"A reply to the contact.","properties":{"payload":{"description":"Structured extras, e.g. `{\"quick_replies\": [\"Sim\", \"Não\"]}` (up to\nthree buttons on WhatsApp), or `{\"product_ids\": [\"…\"]}` (up to five\nactive products) to send product cards: the server fills in title,\nprice, image and storefront link, and WhatsApp and e-mail receive\nthem as links. `{\"upload_ids\": [\"…\"]}` attaches files uploaded to\nthe conversation (one per message on WhatsApp, up to ten elsewhere).\n`{\"reply_to_id\": \"…\"}` answers a specific message of the\nconversation (quoted on WhatsApp).","type":["object","null"]},"text":{"description":"The message text, up to 4096 characters.","type":"string"}},"type":"object"},"ConversationReport":{"description":"The attendance report.","properties":{"agents":{"description":"The 20 busiest assignees.","items":{"$ref":"#/components/schemas/ConversationAgentStats"},"type":"array"},"attributed":{"$ref":"#/components/schemas/ConversationAttribution"},"by_hour":{"items":{"$ref":"#/components/schemas/ConversationHourPoint"},"type":"array"},"days":{"format":"int64","type":"integer"},"sales":{"$ref":"#/components/schemas/ConversationSalesReport","description":"Chat-to-order rates (per agent and channel) and what stale-lead\nfollow-ups recovered."},"tags":{"description":"The 12 most used labels.","items":{"$ref":"#/components/schemas/ConversationTagCount"},"type":"array"},"times":{"$ref":"#/components/schemas/ConversationReportTimes"},"totals":{"$ref":"#/components/schemas/ConversationReportTotals"},"volume":{"description":"Conversations per day and channel.","items":{"$ref":"#/components/schemas/ConversationVolumePoint"},"type":"array"}},"required":["days","totals","times","volume","by_hour","agents","attributed","tags","sales"],"type":"object"},"ConversationReportTimes":{"properties":{"first_response_avg_s":{"description":"Seconds from opening to the first team or bot reply.","format":"double","type":["number","null"]},"first_response_median_s":{"format":"double","type":["number","null"]},"resolution_avg_s":{"description":"Seconds from opening to resolution.","format":"double","type":["number","null"]},"resolution_median_s":{"format":"double","type":["number","null"]}},"type":"object"},"ConversationReportTotals":{"properties":{"bot_resolved":{"description":"Resolved by the bot without a hand-over.","format":"int64","type":"integer"},"conversations":{"description":"Conversations opened in the window.","format":"int64","type":"integer"},"csat_avg":{"format":"double","type":["number","null"]},"csat_count":{"format":"int64","type":"integer"},"customers":{"description":"Distinct customers.","format":"int64","type":"integer"},"open":{"format":"int64","type":"integer"},"previous_conversations":{"description":"Conversations in the window before this one, for comparison.","format":"int64","type":"integer"},"resolved":{"format":"int64","type":"integer"}},"required":["conversations","resolved","open","bot_resolved","csat_count","customers","previous_conversations"],"type":"object"},"ConversationSale":{"description":"The sale of a conversation, as the team sees it.","properties":{"actions":{"items":{"$ref":"#/components/schemas/SaleAction"},"type":"array"},"cart":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCart","description":"Null while the conversation has no cart."}]},"customer":{"$ref":"#/components/schemas/ConversationCartCustomer"},"details":{"$ref":"#/components/schemas/ConversationSaleDetails","description":"What the chat holds for the order's details, to prefill them."},"freight":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSaleFreight"}]},"freight_cleared":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSaleClearedFreight","description":"The freight that left the cart when its items changed (it could not\nbe chosen again), until another is chosen: quote it again at `cep`."}]},"lock":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSaleLock","description":"Set when items, delivery, details and discount can no longer change."}]},"offer":{"$ref":"#/components/schemas/ConversationSaleOffer"},"options":{"description":"The carts this conversation made or sent, oldest first (\"Opção 1\",\n\"Opção 2\"): each with its link, total, state and when it was sent.\nThe one being edited is `current`; a change to it shows on its link.","items":{"$ref":"#/components/schemas/ConversationSaleOption"},"type":"array"},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSalePix"}]},"record":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationCartContact","description":"What the store's record of this customer would add to the order (the\nname, e-mail and CPF it lacks; the saved delivery address when the\norder has none of its own), for the seller to use with one tap\n(`use_record`). Never put in the order by itself: a conversation does\nnot prove who is writing, and the cart's link shows what is in it.\nNull without anything to add, once the order is placed, or for a\nmember who may not read this customer."}]},"stage":{"$ref":"#/components/schemas/ConversationSaleStage"},"suggestions":{"description":"At most two, empty while the bot holds the conversation or it is resolved.","items":{"$ref":"#/components/schemas/ConversationSaleSuggestion"},"type":"array"}},"required":["stage","customer","offer","actions","details","suggestions","options"],"type":"object"},"ConversationSaleCard":{"description":"A product card already sent in the chat.","properties":{"product_id":{"type":"string"},"title":{"type":"string"}},"required":["product_id","title"],"type":"object"},"ConversationSaleClearedFreight":{"description":"The freight that left the cart when its items changed, until another is\nchosen.","properties":{"carrier":{"type":["string","null"]},"cep":{"description":"The CEP to quote again (digits).","type":"string"},"service":{"type":"string"},"shipping_cents":{"description":"What it cost before the change.","format":"int64","type":"integer"}},"required":["cep","service","shipping_cents"],"type":"object"},"ConversationSaleDetails":{"description":"What the customer wrote in the chat that the order lacks or has\ndifferent (the newest mention wins).","properties":{"document":{"description":"CPF, digits, with valid check digits.","type":["string","null"]},"email":{"type":["string","null"]},"number":{"description":"House number (\"número 164\", \"nº 52B\").","type":["string","null"]},"zip_code":{"description":"CEP, digits.","type":["string","null"]}},"type":"object"},"ConversationSaleFreight":{"description":"The cart's freight quote, while it still prices the cart as it is.","properties":{"cep":{"description":"The CEP quoted (digits).","type":"string"},"options":{"items":{"$ref":"#/components/schemas/ConversationFreightOption"},"type":"array"},"selected_option_id":{"type":["string","null"]}},"required":["cep","options"],"type":"object"},"ConversationSaleLock":{"description":"Why the order can no longer change.","enum":["converted","paid"],"type":"string"},"ConversationSaleOffer":{"description":"The discount on the order.","properties":{"cap_pct":{"format":"int32","type":["integer","null"]},"code":{"type":["string","null"]},"discount_cents":{"format":"int64","type":"integer"},"expires_at":{"format":"date-time","type":["string","null"]},"pending_pct_bp":{"description":"While pending: the discount asked for, in basis points, and the cap.","format":"int32","type":["integer","null"]},"state":{"description":"`none`, `applied`, `pending` (waiting for the owner: nothing can be\ncharged until they decide) or `expired` (the price is full again).","type":"string"}},"required":["state","discount_cents"],"type":"object"},"ConversationSaleOption":{"description":"A cart this conversation made or sent, numbered in the order they were\nmade (\"Opção 1\", \"Opção 2\").","properties":{"cart_id":{"format":"uuid","type":"string"},"current":{"description":"The cart the sale is editing now.","type":"boolean"},"item_count":{"format":"int32","type":"integer"},"number":{"description":"1 for the conversation's first cart.","format":"int32","type":"integer"},"order_number":{"type":["string","null"]},"sent_at":{"description":"When its link was last sent in the conversation; null if never.","format":"date-time","type":["string","null"]},"status":{"description":"`open`, `converted` (an order, not paid yet), `paid` or `expired`.","type":"string"},"total_cents":{"format":"int64","type":"integer"},"url":{"description":"Its payment link.","type":["string","null"]}},"required":["number","cart_id","current","item_count","total_cents","status"],"type":"object"},"ConversationSalePix":{"description":"The Pix charge waiting to be paid for the order.","properties":{"amount_cents":{"format":"int64","type":"integer"},"expires_at":{"format":"date-time","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":"string"}},"required":["order_id","order_number","amount_cents"],"type":"object"},"ConversationSaleStage":{"description":"Where the sale stands.","enum":["empty","building","ready","awaiting_payment","paid"],"type":"string"},"ConversationSaleSuggestion":{"description":"The next step offered to the team, most useful first.","properties":{"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSaleCard"}]},"cep":{"type":["string","null"]},"details":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationSaleDetails"}]},"kind":{"description":"`conclude` (paid), `wait` (payment or approval pending; `reason`),\n`send_pix` (ready), `product` (the customer names it: send the card\nor put it in the order), `add_sent` (a card was sent and the order\nis empty), `fill` (`details` to save), `use_record` (save the sale's\n`record`), `quote_freight` (`cep`), `pick` (empty order).","type":"string"},"product":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationVariantHit"}]},"reason":{"type":["string","null"]}},"required":["kind"],"type":"object"},"ConversationSalesBlueprint":{"additionalProperties":false,"properties":{"answer_price_requests":{"default":true,"description":"Always answer a direct price request even during discovery.","type":"boolean"},"brand_value_points":{"default":[],"description":"Merchant-approved factual benefits, never generated claims.","items":{"type":"string"},"type":"array"},"discovery_questions":{"default":[],"items":{"type":"string"},"type":"array"},"enabled":{"default":false,"description":"Enable discovery → brand value → recommendation before showing prices.","type":"boolean"},"followup_after_minutes":{"default":30,"description":"Defaults to 30; accepted range 5–1440 minutes.","format":"int32","minimum":0,"type":"integer"},"followup_enabled":{"default":false,"description":"One cart/payment follow-up, within the channel reply window.","type":"boolean"},"handover_guidance":{"default":"","type":"string"},"opening_question":{"default":"","type":"string"},"recommendation_guidance":{"default":"","type":"string"}},"type":"object"},"ConversationSalesReport":{"description":"Conversation sales in the report.","properties":{"by_agent":{"description":"The 20 assignees with the most conversations, plus the unassigned.","items":{"$ref":"#/components/schemas/ConversationChatToOrder"},"type":"array"},"by_channel":{"items":{"$ref":"#/components/schemas/ConversationChatToOrder"},"type":"array"},"chat_to_order_rate":{"description":"`won / conversations`, 0 to 1.","format":"double","type":"number"},"conversations":{"format":"int64","type":"integer"},"followups":{"$ref":"#/components/schemas/ConversationFollowupRecovery"},"won":{"format":"int64","type":"integer"}},"required":["conversations","won","chat_to_order_rate","by_agent","by_channel","followups"],"type":"object"},"ConversationSalesSettings":{"description":"The inbox's sales settings.","properties":{"max_agent_discount_pct":{"description":"The largest discount, as a whole percent of the cart's goods, a\nteam member may give in a conversation (cart discount or code)\nwithout approval. Null: no cap.","format":"int32","type":["integer","null"]}},"type":"object"},"ConversationSalesSettingsUpdate":{"properties":{"max_agent_discount_pct":{"description":"0 to 100; null removes the cap.","format":"int32","type":["integer","null"]}},"type":"object"},"ConversationSendProductsRequest":{"properties":{"product_ids":{"description":"1 to 5 active products of the store, in the order to show them.","items":{"format":"uuid","type":"string"},"type":"array"},"text":{"description":"Text to go with them.","type":["string","null"]}},"required":["product_ids"],"type":"object"},"ConversationSocketTicket":{"description":"A one-time ticket for the agent WebSocket.","properties":{"expires_in":{"description":"Seconds the ticket stays valid (60).","format":"int64","type":"integer"},"ticket":{"description":"Pass as `?ticket=` to `/ws/conversations`. Single use.","type":"string"}},"required":["ticket","expires_in"],"type":"object"},"ConversationStats":{"description":"Inbox health for the last days.","properties":{"agents_online":{"description":"Team members connected to the inbox right now.","items":{"format":"uuid","type":"string"},"type":"array"},"bot_resolved_7d":{"description":"Resolved by the bot alone, last 7 days.","format":"int64","type":"integer"},"csat_avg_30d":{"description":"Average satisfaction (1 to 5) over the last 30 days.","format":"double","type":["number","null"]},"first_response_seconds_7d":{"description":"Average seconds from hand-over to the first team reply, last 7 days.","format":"double","type":["number","null"]},"new_7d":{"description":"Conversations opened in the last 7 days.","format":"int64","type":"integer"},"open_now":{"description":"Open or pending now.","format":"int64","type":"integer"},"resolved_7d":{"description":"Resolved in the last 7 days.","format":"int64","type":"integer"}},"required":["new_7d","open_now","resolved_7d","bot_resolved_7d","agents_online"],"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"},"ConversationSuggestRequest":{"properties":{"draft":{"description":"The composer's current text, for `complete`, `rewrite` and `translate`.","type":["string","null"]},"mode":{"description":"`reply` (default): draft an answer to the contact's last message;\n`inline`: the same, as a one-line suggestion for the composer's Tab\nautocomplete (fast model, about 200 characters);\n`complete`: continue `draft` where the agent stopped typing (the\nresult starts with `draft`); `rewrite`: polish `draft` in the brand's\nvoice; `translate:<language>`: translate `draft`. On chat channels\n(everything but email) the result is a short, plain message.","type":["string","null"]}},"type":"object"},"ConversationSuggestion":{"properties":{"text":{"description":"Ready to send; nothing was sent.","type":"string"}},"required":["text"],"type":"object"},"ConversationSummary":{"description":"The AI summary of a thread.","properties":{"at":{"format":"date-time","type":"string"},"done":{"description":"What was already done.","items":{"type":"string"},"type":"array"},"intent":{"description":"What the contact wants, in one sentence.","type":["string","null"]},"message_count":{"description":"Messages the summary covers; a new message makes it stale.","format":"int64","type":"integer"},"pending":{"description":"What is still open.","items":{"type":"string"},"type":"array"},"sentiment":{"description":"`positivo`, `neutro` or `negativo`.","type":["string","null"]},"suggested_tags":{"description":"Up to three labels the model suggests.","items":{"type":"string"},"type":"array"}},"required":["done","pending","suggested_tags","message_count","at"],"type":"object"},"ConversationSummaryResult":{"properties":{"cached":{"description":"The stored summary was still current (no new message since).","type":"boolean"},"summary":{"$ref":"#/components/schemas/ConversationSummary"}},"required":["summary","cached"],"type":"object"},"ConversationTagCount":{"properties":{"count":{"format":"int64","type":"integer"},"tag":{"type":"string"}},"required":["tag","count"],"type":"object"},"ConversationTeam":{"description":"A team of the inbox.","properties":{"assignment":{"description":"`manual` (conversations wait in the team's queue) or `round_robin`\n(each new one goes to the member assigned longest ago).","type":"string"},"id":{"format":"uuid","type":"string"},"members":{"items":{"$ref":"#/components/schemas/ConversationTeamMember"},"type":"array"},"name":{"type":"string"},"open_count":{"description":"Open and pending conversations of the team.","format":"int64","type":"integer"}},"required":["id","name","assignment","members","open_count"],"type":"object"},"ConversationTeamMember":{"properties":{"name":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","name"],"type":"object"},"ConversationTeamRequest":{"properties":{"assignment":{"description":"`manual` or `round_robin`.","type":["string","null"]},"member_ids":{"description":"The members (users who can reply in this store); replaces the list.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"name":{"type":["string","null"]}},"type":"object"},"ConversationTemplateSendRequest":{"description":"Values for a template's variables.","properties":{"body":{"description":"One value per body variable, in `inputs.body_vars` order.","items":{"type":"string"},"type":"array"},"buttons":{"description":"One link suffix per dynamic URL button, in `inputs.url_button_indexes`\norder.","items":{"type":"string"},"type":"array"},"header":{"description":"A text header's variable, or the https link of a media header.","type":["string","null"]},"template_id":{"format":"uuid","type":"string"}},"required":["template_id"],"type":"object"},"ConversationTypingRequest":{"properties":{"typing":{"description":"True while typing; send false when the draft is cleared or sent.","type":"boolean"}},"required":["typing"],"type":"object"},"ConversationUpload":{"description":"A stored file.","properties":{"conversation_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"mime_type":{"type":"string"},"name":{"description":"Original file name.","type":"string"},"size":{"description":"Bytes.","format":"int64","type":"integer"}},"required":["id","conversation_id","name","mime_type","size","created_at"],"type":"object"},"ConversationUploadForm":{"description":"The multipart form of a conversation upload.","properties":{"file":{"description":"The file, up to 16 MB: images, PDF and office documents, text, CSV,\nZIP, MP4 video, common audio.","format":"binary","type":"string"}},"required":["file"],"type":"object"},"ConversationVariantHit":{"description":"A variant the team can add to the cart.","properties":{"available":{"description":"Can be added now: in stock, or made to order. Null when the store\nmanages stock elsewhere.","type":["boolean","null"]},"image":{"type":["string","null"]},"price":{"description":"Formatted (\"R$ 129,90\").","type":"string"},"price_cents":{"format":"int64","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"sku":{"type":["string","null"]},"title":{"description":"Product and variant title together.","type":"string"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"description":"Null for single-variant products.","type":["string","null"]},"variants_of_product":{"description":"How many active variants the product has.","format":"int64","type":"integer"}},"required":["variant_id","product_id","product_title","title","price_cents","price","variants_of_product"],"type":"object"},"ConversationVolumePoint":{"properties":{"channel":{"$ref":"#/components/schemas/ConversationChannelKind"},"count":{"format":"int64","type":"integer"},"day":{"format":"date","type":"string"}},"required":["day","channel","count"],"type":"object"},"ConversationWhatsappNumberRequest":{"properties":{"phone":{"description":"A Brazilian number with DDD, in any punctuation.","type":"string"}},"required":["phone"],"type":"object"},"ConversionDelivery":{"description":"An order and how its conversion reached Meta and Google Ads.","properties":{"capi_meta_error":{"description":"Meta's error message for the last failed attempt.","type":["string","null"]},"capi_meta_sent_at":{"format":"date-time","type":["string","null"]},"capi_meta_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversionDeliveryStatus","description":"Meta Conversions API; null when never attempted."}]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":["string","null"]},"google_ads_sent_at":{"format":"date-time","type":["string","null"]},"google_ads_skip_reason":{"description":"Why the Google Ads upload was skipped (`no_gclid`,\n`config_incomplete`...).","type":["string","null"]},"google_ads_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversionDeliveryStatus","description":"Google Ads click conversion; null when never attempted."}]},"last_campaign":{"type":["string","null"]},"last_medium":{"type":["string","null"]},"last_source":{"type":["string","null"]},"number":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"outcomes":{"description":"Where the order's purchase stands with each platform: retries in\nprogress and unreported sales.","items":{"$ref":"#/components/schemas/PurchaseOutcome"},"type":"array"},"payment_status":{"description":"Payment status; only `captured` orders send conversions.","type":["string","null"]},"platforms":{"description":"TikTok and GA4 purchases, and the refunds and corrections sent for\nthis order to any platform.","items":{"$ref":"#/components/schemas/PlatformDelivery"},"type":"array"},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["order_id","created_at","platforms","outcomes"],"type":"object"},"ConversionDeliveryStatus":{"description":"Where an order's conversion upload to an ad platform stands.","enum":["sending","sent","failed","skipped"],"type":"string"},"ConversionHealthRow":{"description":"How many server-side events of one kind went to one platform.","properties":{"failed":{"format":"int64","type":"integer"},"kind":{"description":"`view_content`, `add_to_cart`, `initiate_checkout`, `lead`,\n`purchase`, `refund` or `adjustment`.","type":"string"},"pending":{"description":"Still waiting, or being retried.","format":"int64","type":"integer"},"platform":{"description":"`tiktok`, `ga4`, `meta` or `google`.","type":"string"},"rejected":{"description":"Purchases the platform rejected at least once (retried, spaced out).","format":"int64","type":"integer"},"sent":{"format":"int64","type":"integer"},"skipped":{"format":"int64","type":"integer"},"timed_out":{"description":"Purchases whose last failure was no answer in time.","format":"int64","type":"integer"},"unreported":{"description":"Purchases that never reached the platform: every retry spent, or a\ndefect. Also in `failed`.","format":"int64","type":"integer"}},"required":["platform","kind","sent","failed","skipped","pending","rejected","timed_out","unreported"],"type":"object"},"CopyCampaignRequest":{"description":"A campaign copy to make.","properties":{"account_id":{"format":"uuid","type":"string"},"name_suffix":{"description":"Added to the copy's names, in the admin's language (e.g. \"(cópia)\"). Defaults to \"(copy)\".","type":["string","null"]}},"required":["account_id"],"type":"object"},"CorreiosAccessKey":{"description":"A Correios access key of the store. The key itself never leaves the\nserver: `key_hint` is its last four characters.","properties":{"check_error":{"description":"What went wrong in the last check, if anything.","type":["string","null"]},"checked_at":{"format":"date-time","type":["string","null"]},"contract_number":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"days_left":{"description":"Days until `expires_on` (negative once past), in Brasília.","format":"int64","type":"integer"},"dr":{"description":"The contract's regional office (Diretoria Regional), e.g. 72.","format":"int32","type":["integer","null"]},"expires_on":{"description":"The last day the key works, as the CWS portal shows it.","format":"date","type":"string"},"expiry":{"description":"`ok`, `soon` (30 days or less), `urgent` (7 or less) or `expired`.","type":"string"},"id":{"format":"uuid","type":"string"},"key_hint":{"type":"string"},"kind":{"description":"`id_correios`, `contract` or `posting_card`.","type":"string"},"label":{"type":["string","null"]},"posting_card":{"type":["string","null"]},"provider_id":{"format":"uuid","type":"string"},"scopes":{"description":"The APIs the last check reached: `preco`, `prazo`, `rastro`,\n`prepostagem`, `webhook`, `cep`. Empty until checked.","items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","provider_id","kind","key_hint","expires_on","scopes","days_left","expiry","created_at","updated_at"],"type":"object"},"CorreiosReverseRequest":{"description":"How the goods of a return go back through Correios.","properties":{"days":{"description":"Days the customer has to post it, 1 to 90 (Correios' limit). 30\nwhen left out.","format":"int64","type":["integer","null"]},"height_cm":{"format":"int64","type":["integer","null"]},"instructions":{"description":"What to do, in the store's words, for the customer. Kept as it is\nwhen left out (on approval, the store's default instructions).","type":["string","null"]},"length_cm":{"format":"int64","type":["integer","null"]},"service_code":{"description":"A service of the store's reverse list; the first one when left out\n(PAC reverso, 03301, by default).","type":["string","null"]},"weight_g":{"description":"The package, when the returned items' own sizes do not say it (they\nwould make more than one box). All four or none.","format":"int64","type":["integer","null"]},"width_cm":{"format":"int64","type":["integer","null"]}},"type":"object"},"CorreiosWebhookRegistration":{"description":"The webhook subscription made.","properties":{"subscription":{"type":"object"},"url":{"description":"Where Correios posts the events.","type":"string"}},"required":["url","subscription"],"type":"object"},"Cpf":{"example":"52998224725","type":"string"},"CreateAdAudienceRequest":{"properties":{"account_id":{"description":"The ad account to put it in (`AdAccount.id`). Defaults to the connected account that belongs\nto a Business, which Meta requires for customer lists.","format":"uuid","type":["string","null"]},"auto_sync":{"description":"Defaults to true.","type":["boolean","null"]},"name":{"description":"Defaults to \"Mobiari · <segment name>\".","type":["string","null"]},"segment_id":{"format":"uuid","type":"string"}},"required":["segment_id"],"type":"object"},"CreateAdRequest":{"description":"A campaign to create, independent of the provider.","properties":{"account_id":{"description":"The ad account to pay with (`AdAccountView.id`).","format":"uuid","type":"string"},"audience":{"$ref":"#/components/schemas/AdDraftAudience"},"creative":{"$ref":"#/components/schemas/AdDraftCreative"},"daily_budget_cents":{"description":"Per day, in cents of the account's currency.","format":"int64","type":"integer"},"ends_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"objective":{"$ref":"#/components/schemas/AdObjective"},"provider_options":{"description":"What only one provider understands (Meta page/placements, Google\nlocation/language/ROAS). Read by that provider's adapter.","type":"object"},"start_active":{"description":"Go live right away; created paused by default.","type":"boolean"},"starts_at":{"format":"date-time","type":["string","null"]}},"required":["account_id","name","objective","daily_budget_cents","creative"],"type":"object"},"CreateApiTokenResponse":{"allOf":[{"$ref":"#/components/schemas/ApiTokenSummary"},{"properties":{"token":{"description":"The raw key, prefixed with `mobi_sa_`. Shown only in this response.","type":"string"}},"required":["token"],"type":"object"}]},"CreateAttachmentRequest":{"allOf":[{"$ref":"#/components/schemas/ScopeSpec"},{"properties":{"expires_at":{"description":"When the access ends. Omit for no end.","format":"date-time","type":["string","null"]},"policy_id":{"format":"uuid","type":"string"},"principal_id":{"format":"uuid","type":"string"},"principal_kind":{"description":"`user` or `group`.","type":"string"},"reason":{"description":"Why, shown in the audit trail (a support access, a contractor).","type":["string","null"]}},"required":["policy_id","principal_kind","principal_id"],"type":"object"}]},"CreateAudienceRequest":{"description":"An audience to build. Give `preset` for a pixel audience, or\n`source_audience_id` for a lookalike of an existing one.","properties":{"account_id":{"format":"uuid","type":"string"},"country":{"description":"Defaults to Brazil.","type":["string","null"]},"days":{"description":"Days of pixel history, 1 to 180. Defaults to 30 (180 for buyers).","format":"int64","type":["integer","null"]},"lookalike_percent":{"description":"Lookalike size, 1 to 10 percent of the country's people. Defaults to 1.","format":"int32","minimum":0,"type":["integer","null"]},"name":{"description":"Defaults to a name made from the choice.","type":["string","null"]},"preset":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AudiencePreset"}]},"source_audience_id":{"description":"A lookalike of this audience (Meta's id).","type":["string","null"]}},"required":["account_id"],"type":"object"},"CreateBooking":{"properties":{"client_email":{"description":"An e-mail or a phone is required.","type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"consent":{"description":"The client agreed to the use of sensitive answers.","type":"boolean"},"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","client_name"],"type":"object"},"CreateBookingSeries":{"allOf":[{"$ref":"#/components/schemas/CreateBooking"},{"properties":{"count":{"description":"2 to 52 sessions, the first included.","format":"int32","type":"integer"},"every_weeks":{"description":"Every 1 to 8 weeks.","format":"int32","type":"integer"}},"required":["every_weeks","count"],"type":"object"}]},"CreateBoostRequest":{"description":"A post to boost, and how.","properties":{"account_id":{"description":"The ad account to pay with (`AdAccount.id`).","format":"uuid","type":"string"},"audience":{"$ref":"#/components/schemas/BoostAudience"},"daily_budget_cents":{"description":"Per day, in cents of the account's currency.","format":"int64","type":"integer"},"days":{"description":"1 to 30.","format":"int64","type":"integer"},"link_url":{"description":"Where `traffic` boosts send people (the store, a product).","type":["string","null"]},"media_external_id":{"description":"The published post: Instagram media id or Facebook post id.","type":"string"},"network":{"$ref":"#/components/schemas/Network"},"objective":{"$ref":"#/components/schemas/BoostObjective"}},"required":["account_id","network","media_external_id","objective","daily_budget_cents","days","audience"],"type":"object"},"CreateCampaignRequest":{"description":"A campaign to build.","properties":{"account_id":{"description":"The ad account to pay with (`AdAccount.id`).","format":"uuid","type":"string"},"audience":{"$ref":"#/components/schemas/BoostAudience"},"creative":{"$ref":"#/components/schemas/CampaignCreative"},"daily_budget_cents":{"description":"Per day, in cents of the account's currency.","format":"int64","type":"integer"},"ends_at":{"description":"Runs until stopped when absent. At most one year after the start.","format":"date-time","type":["string","null"]},"interests":{"description":"Interests narrowing the audience.","items":{"$ref":"#/components/schemas/InterestRef"},"type":"array"},"message_app":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MessageApp","description":"For `messages`: where the chat opens."}]},"name":{"description":"Shown in Mobiari and Ads Manager.","type":"string"},"networks":{"description":"Where it shows; both when empty.","items":{"$ref":"#/components/schemas/Network"},"type":"array"},"objective":{"$ref":"#/components/schemas/CampaignObjective"},"page_id":{"description":"The Facebook Page the ad runs as (`SocialAccount.id` of a Page). An\nInstagram placement uses the Instagram account linked to it.","format":"uuid","type":"string"},"product_set_id":{"description":"For `catalog`: the product set to advertise (Meta's id); the catalog's\n\"All products\" when absent.","type":["string","null"]},"start_active":{"description":"Go live right away. By default the campaign waits, paused, for a look.","type":"boolean"},"starts_at":{"description":"Defaults to five minutes from now.","format":"date-time","type":["string","null"]}},"required":["account_id","name","objective","page_id","daily_budget_cents","audience","creative"],"type":"object"},"CreateCollectionRequest":{"description":"Create a content collection\n\nDefines a content model the assistant, the theme editor and the CMS\nscreens fill with documents.","properties":{"name":{"type":"string"},"schema_json":{"description":"Field definitions; validated, may be empty for a schemaless bucket.","type":"object"},"slug":{"type":"string"}},"required":["slug","name","schema_json"],"type":"object"},"CreateCorreiosKeyRequest":{"description":"A new access key.","properties":{"api_key":{"description":"The key from the CWS portal (`cws-ch…`).","type":"string"},"contract_number":{"type":["string","null"]},"dr":{"format":"int32","type":["integer","null"]},"expires_on":{"description":"The expiry date the portal shows (Correios has no call that says it).","format":"date","type":"string"},"kind":{"description":"`id_correios`, `contract` or `posting_card`.","type":"string"},"label":{"type":["string","null"]},"posting_card":{"type":["string","null"]}},"required":["kind","api_key","expires_on"],"type":"object"},"CreateDocumentRequest":{"properties":{"data":{"description":"Defaults to `{}`.","type":["object","null"]},"is_active":{"description":"Defaults to `true`.","type":["boolean","null"]},"position":{"description":"Defaults to the end of the collection.","format":"int32","type":["integer","null"]},"publish_at":{"description":"Show it only from this moment.","format":"date-time","type":["string","null"]},"slug":{"type":["string","null"]},"unpublish_at":{"description":"Stop showing it at this moment; after `publish_at`.","format":"date-time","type":["string","null"]}},"type":"object"},"CreateEmailBroadcastRequest":{"description":"A new campaign. Subject and body come from the template unless\noverridden; one of them must give both.","properties":{"ab_test":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmailAbTest"}]},"audience":{"$ref":"#/components/schemas/EmailAudienceFilter"},"html_override":{"type":["string","null"]},"name":{"type":"string"},"optimize_send_time":{"description":"Send each recipient at the hour they usually open.","type":"boolean"},"reply_to":{"type":["string","null"]},"scheduled_at":{"description":"If null, broadcast is created in 'draft' status. The /send endpoint\nkicks it off; otherwise scheduled_at sets status='scheduled' and\nthe worker picks it up when the time arrives.","format":"date-time","type":["string","null"]},"subject_override":{"description":"Optional overrides — when present, take priority over the\ntemplate fields. Useful for one-off subject A/Bs without forking\nthe template.","type":["string","null"]},"template_id":{"format":"uuid","type":["string","null"]},"text_override":{"type":["string","null"]}},"required":["name"],"type":"object"},"CreateEmailTemplateRequest":{"description":"A new template: a block `design` (compiled to `html`) or raw `html`.","properties":{"design":{"type":["object","null"]},"html":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":"string"},"preview_text":{"type":["string","null"]},"reply_to":{"type":["string","null"]},"subject":{"type":"string"},"text_body":{"type":["string","null"]}},"required":["name","subject"],"type":"object"},"CreateGroupRequest":{"properties":{"color":{"description":"Hex color for badges.","type":["string","null"]},"description":{"type":["string","null"]},"member_ids":{"description":"People to put in it right away; each must already be in the\norganization.","items":{"format":"uuid","type":"string"},"type":"array"},"name":{"type":"string"}},"required":["name"],"type":"object"},"CreateImportConnection":{"properties":{"credentials":{"additionalProperties":{"type":"string"},"description":"The source's `credential_fields`, e.g. `{\"site_url\": \"…\",\n\"consumer_key\": \"…\", \"consumer_secret\": \"…\"}` for WooCommerce.\nStored encrypted.","propertyNames":{"type":"string"},"type":"object"},"source":{"description":"A source key from `GET /stores/{store_id}/import-sources`.","type":"string"}},"required":["source"],"type":"object"},"CreateImportRun":{"properties":{"connection_id":{"description":"The platform connection; not for spreadsheets.","format":"uuid","type":["string","null"]},"dry_run":{"description":"Count and sample without writing anything.","type":"boolean"},"entities":{"description":"What to bring; run products, then customers, then orders.","items":{"$ref":"#/components/schemas/ImportEntity"},"type":"array"},"sheets":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ImportSheets","description":"For `csv`, `excel` and `google_sheets`: the uploaded sheet and\nmapping of each entity."}]},"source":{"description":"A source key from `GET /stores/{store_id}/import-sources`.","type":"string"}},"required":["source","entities"],"type":"object"},"CreateInviteRequest":{"properties":{"email":{"example":"joao@example.com","type":"string"},"group_ids":{"description":"Groups of the organization the invitee joins on acceptance. What\neach group holds must be within the inviter's own permissions in\nevery store the group reaches.","items":{"format":"uuid","type":"string"},"type":"array"},"policy_ids":{"description":"Permission sets to attach on acceptance, over this store: each the\norganization's or the platform's, within the inviter's own\npermissions. At least one of `policy_ids` and `group_ids`.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["email"],"type":"object"},"CreateKbArticleRequest":{"properties":{"body_md":{"type":["string","null"]},"collection_id":{"format":"uuid","type":["string","null"]},"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"},"CreateLinkRequest":{"properties":{"campaign":{"type":["string","null"]},"content":{"type":["string","null"]},"destination":{"$ref":"#/components/schemas/LinkDestination"},"medium":{"description":"How, e.g. `bio`, `story`, `qr`.","type":["string","null"]},"message":{"description":"WhatsApp only: the message the person starts with.","type":["string","null"]},"name":{"type":"string"},"source":{"description":"Where the people come from, e.g. `instagram`.","type":"string"},"target":{"description":"WhatsApp: the number with country code; Instagram: the username\n(with or without @); url: an https page.","type":"string"}},"required":["name","destination","target","source"],"type":"object"},"CreateNetworkInviteRequest":{"properties":{"access_ceiling":{"description":"What the brand will hold in the member's store. Defaults to the\nnetwork's `default_ceiling`.","items":{"type":"string"},"type":["array","null"]},"cnpj":{"description":"The franchise's CNPJ, when known (for the brand's own records).","type":["string","null"]},"email":{"description":"Who receives the link: the franchise's owner, with an account on\nMobiari or not.","example":"franquia@example.com","type":"string"}},"required":["email"],"type":"object"},"CreateNetworkRequest":{"properties":{"billed_to":{"$ref":"#/components/schemas/NetworkBilledTo","description":"Who pays Mobiari for the member stores."},"default_ceiling":{"description":"What invites propose by default. Defaults to sales, orders, stock\nand catalog, to read.","items":{"type":"string"},"type":["array","null"]},"name":{"description":"1 to 120 characters, e.g. \"Rede Marca\".","type":"string"}},"required":["name","billed_to"],"type":"object"},"CreateNetworkRoleRequest":{"properties":{"expires_at":{"description":"When it ends. Omit for no end.","format":"date-time","type":["string","null"]},"policy_id":{"description":"A permission set of the brand's organization or of the platform.","format":"uuid","type":"string"},"principal_id":{"format":"uuid","type":"string"},"principal_kind":{"description":"`user` or `group`, of the brand's organization.","type":"string"}},"required":["policy_id","principal_kind","principal_id"],"type":"object"},"CreateNotificationChannelRequest":{"properties":{"channel_type":{"$ref":"#/components/schemas/NotificationChannelType"},"config_json":{"type":["object","null"]},"enabled_events":{"items":{"type":"string"},"type":["array","null"]},"is_enabled":{"description":"Defaults to true.","type":["boolean","null"]},"locale":{"description":"Defaults to `pt-BR`.","type":["string","null"]},"name":{"description":"1 to 255 characters.","type":"string"}},"required":["name","channel_type"],"type":"object"},"CreateOrderInvoiceCorrectionRequest":{"properties":{"correction":{"description":"`xCorrecao`, 15 to 1000 characters. It replaces earlier cartas, so it\nmust repeat every correction still wanted.","type":"string"},"document_id":{"description":"Another authorized note of the order (a return note): correct that one.","format":"uuid","type":["string","null"]},"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"},"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"},"CreateOrderItemAdjustmentRequest":{"properties":{"adjustment_type":{"description":"1 to 50 characters, e.g. `discount` or `surcharge`.","type":"string"},"amount_cents":{"description":"Signed amount in cents.","format":"int64","type":"integer"},"description":{"description":"Up to 255 characters.","type":["string","null"]},"order_item_id":{"description":"A line of this order.","format":"uuid","type":"string"}},"required":["order_item_id","adjustment_type","amount_cents"],"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"},"CreatePaymentProviderRequest":{"description":"A gateway to connect.","properties":{"code":{"description":"Gateway code from the catalog, e.g. `mercado_pago`.","type":"string"},"config_json":{"description":"Settings, keyed as the catalog's `fields` say.","type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"type":["boolean","null"]},"name":{"type":"string"}},"required":["name","code"],"type":"object"},"CreatePolicyRequest":{"allOf":[{"$ref":"#/components/schemas/PolicyBody"},{"properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"explanation":{"description":"Plain-language rendering. Required to attach a rule or Cedar.","type":["string","null"]},"name":{"type":"string"}},"required":["name"],"type":"object"}]},"CreatePosDevice":{"properties":{"channel_id":{"description":"The POS (a sales channel of type `pos`) the terminal sells on.","format":"uuid","type":"string"},"mode":{"description":"`counter` (default): an operator signs in with a PIN. `kiosk`: a\nself-checkout the customer uses alone; it acts as a service account of\nits own and can only ring up PIX sales.","type":["string","null"]},"name":{"description":"Shown in the device list, e.g. \"Caixa 1\" or \"Totem da entrada\".","type":"string"}},"required":["channel_id","name"],"type":"object"},"CreatePostRequest":{"description":"A new post (always a draft).","properties":{"accounts":{"items":{"$ref":"#/components/schemas/AccountRef"},"type":"array"},"caption":{"type":"string"},"first_comment":{"type":["string","null"]},"format":{"$ref":"#/components/schemas/Format"},"media":{"items":{"$ref":"#/components/schemas/MediaRef"},"type":"array"},"scheduled_at":{"description":"When it should go out; kept on the draft until it is scheduled.","format":"date-time","type":["string","null"]}},"required":["format"],"type":"object"},"CreateProductSetRequest":{"description":"A product set to make. Give `product_ids`, a `collection_id`, or both.","properties":{"account_id":{"format":"uuid","type":"string"},"collection_id":{"format":"uuid","type":["string","null"]},"name":{"type":"string"},"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["account_id","name"],"type":"object"},"CreateRecurringOrder":{"description":"A new subscription.","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"},"CreateReturnRequest":{"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"]},"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"],"type":"object"},"CreateSchedule":{"properties":{"frequency":{"$ref":"#/components/schemas/Frequency"},"lang":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Lang","description":"`pt` (default) or `en`."}]},"recipients":{"description":"1 to 10 e-mail addresses.","items":{"type":"string"},"type":"array"},"report":{"$ref":"#/components/schemas/ReportKind"}},"required":["report","frequency","recipients"],"type":"object"},"CreateServiceAccountRequest":{"properties":{"description":{"type":["string","null"]},"name":{"description":"What the account is for, e.g. \"ERP sync\" or \"Agency reporting\".","type":"string"},"policy_ids":{"description":"Permission sets attached to the account over this store. Each the\norganization's or the platform's, within the caller's own\npermissions.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["name","policy_ids"],"type":"object"},"CreateServiceKeyRequest":{"properties":{"expires_at":{"description":"When the key stops working. Omit for no expiry.","format":"date-time","type":["string","null"]},"mcp_approval":{"$ref":"#/components/schemas/McpApproval","description":"Which writes an MCP client using the key may make without a person\napproving them. Defaults to `risky`: only destructive, money and\nexternal writes wait."},"name":{"description":"Where the key lives, e.g. \"ERP server\" or \"Zapier\".","type":"string"}},"required":["name"],"type":"object"},"CreateShipmentRequest":{"description":"A new shipment.","properties":{"carrier_name":{"type":["string","null"]},"freight_external_order_code":{"description":"Link an order already created at the carrier.","type":["string","null"]},"freight_provider_code":{"description":"`central_do_frete`, `local_delivery`, `other_carrier` or `pickup`.","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"},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentStatus","description":"Defaults to `draft`."}]},"tracking_code":{"type":["string","null"]}},"required":["order_id"],"type":"object"},"CreateStoreRequest":{"properties":{"kind":{"$ref":"#/components/schemas/StoreKind","description":"`store` (the default) or `service`, for a workspace that only\nserves its customers. Ignored when `segment` is given."},"name":{"example":"Loja Centro","type":"string"},"segment":{"description":"The segment to start from: `store`, `appointments` or `support`. It\nsets the workspace's features (and so its `kind`); change them later\nwith `PUT /stores/{store_id}/features`. Without it, the segment that\nmatches `kind`.","type":["string","null"]},"tenant_id":{"format":"uuid","type":"string"}},"required":["tenant_id","name"],"type":"object"},"CreateStorefrontPageRequest":{"properties":{"content":{"type":["string","null"]},"published":{"description":"Defaults to `false`.","type":["boolean","null"]},"slug":{"description":"1 to 255 characters, unique in the store.","type":"string"},"template":{"description":"Up to 100 characters.","type":["string","null"]},"title":{"description":"1 to 255 characters.","type":"string"}},"required":["title","slug"],"type":"object"},"CreateSyncConnection":{"properties":{"credentials":{"description":"Postgres: `{ \"url\": \"postgres://user:password@host:5432/db\" }`.\nBigQuery: `{}`.","type":"object"},"kind":{"description":"`postgres` or `bigquery` (Google Sheets connects through\n`google/authorize`).","type":"string"},"name":{"type":"string"},"settings":{"description":"Postgres: `{ \"schema\": \"public\" }`. BigQuery: `{ \"project_id\": \"...\",\n\"dataset_id\": \"...\" }` (no credentials: Mobiari's account).","type":["object","null"]}},"required":["kind","name"],"type":"object"},"CreateTenantRequest":{"properties":{"name":{"example":"Loja da Ana","type":"string"},"plan_code":{"description":"The plan to try, from `GET /billing/plans` (the plan picked on the\npricing page). Defaults to `profissional`.","example":"profissional","type":["string","null"]}},"required":["name"],"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"},"CreateWorkflowRequest":{"properties":{"description":{"type":["string","null"]},"graph":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowGraph","description":"Defaults to an empty graph."}]},"kind":{"$ref":"#/components/schemas/WorkflowKind"},"name":{"type":"string"},"trigger":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowTrigger","description":"Defaults to a manual trigger."}]}},"required":["kind","name"],"type":"object"},"CreativeCard":{"description":"One card of a carousel, made by hand.","properties":{"description":{"type":["string","null"]},"headline":{"description":"Up to 40 characters.","type":"string"},"image_file_id":{"description":"A photo of the media library.","format":"uuid","type":["string","null"]},"image_url":{"description":"A public https address. Or `image_file_id`.","type":["string","null"]},"link_url":{"description":"Where the card leads. https only. Not used by `messages` campaigns,\nwhose cards open the chat.","type":"string"}},"required":["headline"],"type":"object"},"CreditAccount":{"description":"A credit account.","properties":{"balance_cents":{"description":"What can be spent now (zero when disabled or expired).","format":"int64","type":"integer"},"code":{"description":"Gift cards only, \"••••-••••-••••-PQRS\": the code is a bearer secret, so\nonly `issueGiftCard` returns it whole and `revealGiftCardCode` (which\nneeds `credit.write`) shows it later.","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","currency","created_at","balance_cents"],"type":"object"},"CreditAccountDetail":{"description":"An account with its history.","properties":{"account":{"$ref":"#/components/schemas/CreditAccount"},"entries":{"items":{"$ref":"#/components/schemas/CreditEntry"},"type":"array"}},"required":["account","entries"],"type":"object"},"CreditChargeInput":{"properties":{"company_id":{"description":"The business the money is for.","format":"uuid","type":"string"},"description":{"description":"What the invoice says; the business's wording when empty.","type":["string","null"]}},"required":["company_id"],"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"},"CreditSummary":{"description":"What a store owes its customers in credit: the open balance of every\naccount that can still be spent.","properties":{"gift_card_cents":{"format":"int64","type":"integer"},"gift_cards_active":{"format":"int64","type":"integer"},"wallet_cents":{"format":"int64","type":"integer"},"wallets_with_balance":{"format":"int64","type":"integer"}},"required":["wallet_cents","gift_card_cents","gift_cards_active","wallets_with_balance"],"type":"object"},"CrmSettings":{"description":"A store's CRM settings.","properties":{"call_alert_keywords":{"description":"Words that raise an alert when heard in a call (a competitor, \"Procon\",\n\"cancelar\"): the call's agent and the customer's owner are told.","items":{"type":"string"},"type":"array"},"call_recording":{"description":"Calls are recorded, transcribed and analysed. The team tells the\ncaller; the call card reminds them.","type":"boolean"},"call_recording_retention_days":{"description":"Days a recording's audio is kept (1 to 1825); the transcript and the\nanalysis stay with the call.","format":"int32","type":"integer"},"missed_call_reply":{"description":"Sent on WhatsApp to a caller nobody answered; `null` sends nothing.","type":["string","null"]},"missed_call_task":{"description":"A missed call opens a callback task for the caller's owner.","type":"boolean"},"routing_mode":{"description":"`off` or `round_robin`.","type":"string"},"routing_user_ids":{"description":"The members new leads rotate between.","items":{"format":"uuid","type":"string"},"type":"array"},"score_weights":{"description":"Every score weight, defaults filled in.","type":"object"},"sla_deal_idle_hours":{"description":"Hours an open deal may sit untouched; `null` for no alert.","format":"int32","type":["integer","null"]},"sla_first_contact_hours":{"description":"Hours a routed lead may wait for a first contact; `null` for no alert.","format":"int32","type":["integer","null"]},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["routing_mode","routing_user_ids","score_weights","missed_call_task","call_recording","call_recording_retention_days","call_alert_keywords"],"type":"object"},"CrmSettingsRequest":{"description":"Changes to the settings; a missing field stays, `null` clears an alert.","properties":{"call_alert_keywords":{"description":"Up to 50 words or short phrases, 2 to 60 characters each.","items":{"type":"string"},"type":["array","null"]},"call_recording":{"type":["boolean","null"]},"call_recording_retention_days":{"description":"1 to 1825.","format":"int32","type":["integer","null"]},"missed_call_reply":{"description":"Up to 1,000 characters; `null` or blank turns the reply off.","type":["string","null"]},"missed_call_task":{"type":["boolean","null"]},"routing_mode":{"type":["string","null"]},"routing_user_ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"score_weights":{"description":"Weights by key (see the response); a missing key keeps its value.","type":["object","null"]},"sla_deal_idle_hours":{"format":"int32","type":["integer","null"]},"sla_first_contact_hours":{"format":"int32","type":["integer","null"]}},"type":"object"},"CustomField":{"description":"A field a store keeps on its records.","properties":{"created_at":{"format":"date-time","type":"string"},"entity":{"type":"string"},"group":{"description":"Fields with the same group are shown together.","type":["string","null"]},"help":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"key":{"description":"Where the value lives in the record's `custom_fields`; made from the\nlabel, fixed.","type":"string"},"kind":{"description":"See [`Kind`].","type":"string"},"label":{"type":"string"},"label_translations":{"description":"The label by language tag (`{\"en-US\": \"Wood\"}`); `label` is the fallback.","type":"object"},"managed_by":{"description":"Set when the platform writes this field's values from another source\n(`specifications`): the API refuses to edit its values or definition;\nchange the source instead.","type":["string","null"]},"max":{"description":"Highest value of a `number` or `integer`.","format":"double","type":["number","null"]},"min":{"description":"Lowest value of a `number` or `integer`.","format":"double","type":["number","null"]},"option_links":{"description":"The page each option of a `select` or `multiselect` links to, by option\n(`{\"Quarto\": \"/ambientes/quarto\"}`, or `collection:<handle>`). Empty\nwhen the options are plain text.","type":"object"},"options":{"description":"The choices of a `select` or `multiselect`.","items":{"type":"string"},"type":"array"},"position":{"format":"int32","type":"integer"},"required":{"description":"Products and variants cannot be saved without it through the field\nendpoints; customers are never blocked (they also arrive from\ncheckout, imports and chat).","type":"boolean"},"searchable":{"description":"Offered as a filter and findable in search.","type":"boolean"},"show_in_portal":{"description":"Shown to a signed-in customer in their account. Customers only.","type":"boolean"},"show_on_storefront":{"description":"Sent to the storefront with the product (`product.fields` in Liquid,\n`custom_fields` in the storefront API). Products and variants only.","type":"boolean"},"unit":{"description":"Shown after the value (`cm`, `kg`).","type":["string","null"]}},"required":["id","entity","key","label","label_translations","kind","options","required","position","searchable","show_on_storefront","show_in_portal","option_links","created_at"],"type":"object"},"CustomFieldCreateRequest":{"description":"A new field.","properties":{"entity":{"$ref":"#/components/schemas/Entity"},"group":{"type":["string","null"]},"help":{"type":["string","null"]},"key":{"description":"Where the value lives; made from the label when left out\n(`\"Tipo de madeira\"` becomes `tipo_de_madeira`). Lowercase letters,\ndigits and `_`, starting with a letter, up to 40 characters.","type":["string","null"]},"kind":{"$ref":"#/components/schemas/Kind"},"label":{"description":"1 to 80 characters.","type":"string"},"label_translations":{"type":["object","null"]},"max":{"format":"double","type":["number","null"]},"min":{"format":"double","type":["number","null"]},"options":{"description":"Required for `select` and `multiselect`.","items":{"type":"string"},"type":["array","null"]},"required":{"type":["boolean","null"]},"searchable":{"type":["boolean","null"]},"show_in_portal":{"type":["boolean","null"]},"show_on_storefront":{"type":["boolean","null"]},"unit":{"type":["string","null"]}},"required":["entity","label","kind"],"type":"object"},"CustomFieldUpdateRequest":{"description":"Changes to a field; its key, kind and record kind stay. Send `\"\"` to\nclear `help`, `unit` or `group`.","properties":{"group":{"type":["string","null"]},"help":{"type":["string","null"]},"label":{"type":["string","null"]},"label_translations":{"type":["object","null"]},"max":{"description":"`null` removes the highest value.","format":"double","type":["number","null"]},"min":{"description":"`null` removes the lowest value.","format":"double","type":["number","null"]},"options":{"items":{"type":"string"},"type":["array","null"]},"position":{"format":"int32","type":["integer","null"]},"required":{"type":["boolean","null"]},"searchable":{"type":["boolean","null"]},"show_in_portal":{"type":["boolean","null"]},"show_on_storefront":{"type":["boolean","null"]},"unit":{"type":["string","null"]}},"type":"object"},"CustomFieldValues":{"description":"Values to set on a record, by field key; `null` clears one.","properties":{"values":{"type":"object"}},"required":["values"],"type":"object"},"Customer":{"description":"A customer of the store.","properties":{"acquisition":{"description":"First-touch attribution of their first order (UTM parameters, click\nids, referrer, landing page). Only on the customer record, null in\nlists.","type":["object","null"]},"company":{"type":["string","null"]},"company_id":{"description":"The company (B2B account) the customer belongs to.","format":"uuid","type":["string","null"]},"company_name":{"description":"Its name.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"description":"Values of the store's customer fields, by key\n(`GET .../customer-fields`). Always sent; optional in the schema so\nclients built before it keep decoding customers.","type":"object"},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"CPF/CNPJ, digits only. Captured at checkout the first time they buy.","type":["string","null"]},"email":{"type":["string","null"]},"email_verified":{"type":"boolean"},"first_name":{"type":["string","null"]},"gender":{"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_login_at":{"description":"Last storefront sign-in; null for guests who never signed in.","format":"date-time","type":["string","null"]},"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"]},"owner_name":{"description":"Their name (else e-mail).","type":["string","null"]},"owner_user_id":{"description":"The team member who looks after this customer.","format":"uuid","type":["string","null"]},"phone":{"type":["string","null"]},"phone_verified":{"type":"boolean"},"state_registration":{"description":"State registration (inscrição estadual), digits only.","type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"tags":{"items":{"type":"string"},"type":["array","null"]},"total_orders":{"description":"Paid orders.","format":"int32","type":"integer"},"total_spent":{"description":"Paid order totals, in cents.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","marketing_opt_in","email_verified","phone_verified","total_orders","total_spent","created_at","updated_at","lifecycle"],"type":"object"},"CustomerAddress":{"description":"A saved address.","properties":{"address_line_1":{"description":"Street and number, e.g. `Rua das Flores, 88`.","type":"string"},"address_line_2":{"description":"Neighborhood and complement.","type":["string","null"]},"address_type":{"description":"`shipping`, `billing`, `home`, `work` or `other`; clients should\ntolerate other values.","type":"string"},"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"},"customer_id":{"format":"uuid","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). Read back from `address_line_2` when it was not\nstored apart (`Centro - Apto 12`).","type":["string","null"]},"number":{"description":"The number on the street (`88`, `s/n`).","type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"description":"The street, apart from its number. Read back from `address_line_1`\nwhen it was not stored apart (`Rua das Flores, 88`).","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","customer_id","address_type","is_default","address_line_1","city","country","created_at","updated_at"],"type":"object"},"CustomerAddressCreateRequest":{"description":"A new address.","properties":{"address_line_1":{"description":"Street and number in one line. Made from `street` and `number` when\nleft out; one of them is required.","type":["string","null"]},"address_line_2":{"description":"Neighborhood and complement in one line. Made from `neighborhood` and\n`complement` when left out.","type":["string","null"]},"address_type":{"description":"`shipping`, `billing`, `home`, `work` or `other`.","type":"string"},"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":{"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":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP (8 digits, punctuation dropped) when `country` is `BR`.","type":["string","null"]},"state":{"description":"Two-letter state (UF) when `country` is `BR`.","type":["string","null"]},"street":{"type":["string","null"]}},"required":["address_type","city","country"],"type":"object"},"CustomerAddressUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"address_line_1":{"description":"Rewriting a line without its parts drops the parts it held.","type":["string","null"]},"address_line_2":{"type":["string","null"]},"address_type":{"type":["string","null"]},"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":{"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":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"state":{"type":["string","null"]},"street":{"description":"Changing a part rewrites its line (`street` and `number` make\n`address_line_1`; `neighborhood` and `complement`, `address_line_2`).","type":["string","null"]}},"type":"object"},"CustomerBulkRequest":{"description":"What to do to many customers at once.","properties":{"action":{"description":"`add_tag`, `remove_tag` or `set_owner`.","type":"string"},"customer_ids":{"description":"Up to 1,000 customers of the store.","items":{"format":"uuid","type":"string"},"type":"array"},"owner_user_id":{"description":"The new owner for `set_owner`; null clears it.","format":"uuid","type":["string","null"]},"tag":{"description":"The tag, for `add_tag` / `remove_tag`.","type":["string","null"]}},"required":["customer_ids","action"],"type":"object"},"CustomerContext":{"description":"Who the customer is, from every source the workspace has.","properties":{"external":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExternalContext","description":"The company's system's answer, when a context URL is set."}]},"identity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdentityContext","description":"The signed identity the conversation opened with (chat widget or\nportal), when there is one."}]},"ticket_fields":{"description":"The ticket's fields and their values, when the conversation is a\nticket and the workspace has fields.","items":{"$ref":"#/components/schemas/TicketField"},"type":"array"},"ticket_values":{"type":"object"}},"required":["ticket_fields","ticket_values"],"type":"object"},"CustomerCreateRequest":{"description":"A new customer.","properties":{"company":{"type":["string","null"]},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"CPF/CNPJ, validated (check digits; repeated digits such as\n999.999.999-99 are refused). Stored as digits, or upper-case\ncharacters for an alphanumeric CNPJ.","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 and its history.","properties":{"entries":{"items":{"$ref":"#/components/schemas/CreditEntry"},"type":"array"},"wallet":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CreditAccount","description":"Empty until the customer has had credit."}]}},"required":["entries"],"type":"object"},"CustomerDetail":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"addresses":{"description":"Default first, then newest.","items":{"$ref":"#/components/schemas/CustomerAddress"},"type":"array"},"orders":{"description":"The 50 most recent orders, newest first. `GET /stores/{store_id}/orders?customer_id=`\nlists them all.","items":{"$ref":"#/components/schemas/CustomerOrder"},"type":"array"},"recent_interactions":{"description":"The 50 most recent timeline entries, newest first. Page through\n`GET .../interactions` for the rest.","items":{"$ref":"#/components/schemas/CustomerInteraction"},"type":"array"}},"required":["addresses","recent_interactions","orders"],"type":"object"}],"description":"The customer record: the customer plus their addresses, recent\nactivity and recent orders."},"CustomerEmailActivity":{"description":"A customer's e-mail consent and recent e-mail activity.","properties":{"events":{"description":"The 200 most recent events, newest first.","items":{"$ref":"#/components/schemas/EmailActivityEvent"},"type":"array"},"summary":{"$ref":"#/components/schemas/EmailConsentSummary"}},"required":["summary","events"],"type":"object"},"CustomerFact":{"description":"Something the store knows about a customer from their conversations.","properties":{"author":{"description":"`extractor` (read from the chat by the AI) or `agent` (added or\nedited by someone on the team).","type":"string"},"author_name":{"type":["string","null"]},"author_user_id":{"format":"uuid","type":["string","null"]},"category":{"description":"`household`, `preference`, `size`, `budget`, `occasion`,\n`neighborhood`, `dwelling`, `interest` or `other`; the set may grow.","type":"string"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"description":"Null while the fact belongs to a contact not yet linked to a\ncustomer.","format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"source_conversation_id":{"description":"The conversation it was learned in.","format":"uuid","type":["string","null"]},"source_message_id":{"description":"The customer message it came from.","format":"uuid","type":["string","null"]},"source_message_text":{"description":"That message's text, shortened to 200 characters.","type":["string","null"]},"text":{"description":"One short sentence, in the customer's terms.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","category","text","author","created_at","updated_at"],"type":"object"},"CustomerFactCreate":{"description":"A fact the team adds.","properties":{"category":{"description":"One of the fact categories (`household`, `preference`, `size`,\n`budget`, `occasion`, `neighborhood`, `dwelling`, `interest`,\n`other`).","type":"string"},"source_message_id":{"description":"A message of the conversation it came from.","format":"uuid","type":["string","null"]},"text":{"description":"Up to 300 characters. No documents, payment data, codes, contact\ndetails, street address or sensitive data.","type":"string"}},"required":["category","text"],"type":"object"},"CustomerFactUpdate":{"description":"Fields to change; leave out what stays.","properties":{"category":{"type":["string","null"]},"text":{"type":["string","null"]}},"type":"object"},"CustomerField":{"description":"A field the store keeps on its customers.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"key":{"description":"Where the value lives in `custom_fields`; made from the label, fixed.","type":"string"},"kind":{"description":"`text`, `number`, `date` (YYYY-MM-DD), `boolean` or `select`.","type":"string"},"label":{"type":"string"},"options":{"description":"The choices of a `select`.","items":{"type":"string"},"type":"array"},"position":{"format":"int32","type":"integer"}},"required":["id","key","label","kind","options","position","created_at"],"type":"object"},"CustomerFieldCreateRequest":{"description":"A new field.","properties":{"kind":{"description":"`text`, `number`, `date`, `boolean` or `select`.","type":"string"},"label":{"description":"1 to 80 characters.","type":"string"},"options":{"description":"Required for `select`.","items":{"type":"string"},"type":["array","null"]}},"required":["label","kind"],"type":"object"},"CustomerFieldUpdateRequest":{"description":"Changes to a field; its key and kind stay.","properties":{"label":{"type":["string","null"]},"options":{"items":{"type":"string"},"type":["array","null"]},"position":{"format":"int32","type":["integer","null"]}},"type":"object"},"CustomerFieldValuesRequest":{"description":"Values to set on a customer, by field key; `null` clears one.","properties":{"values":{"type":"object"}},"required":["values"],"type":"object"},"CustomerGraph":{"description":"Everything known about how to reach a customer.","properties":{"channels":{"$ref":"#/components/schemas/Channels"},"consent":{"description":"The 50 most recent consent changes, newest first.","items":{"$ref":"#/components/schemas/ConsentEntry"},"type":"array"},"customer":{"$ref":"#/components/schemas/GraphCustomer"},"duplicates":{"description":"Other customers that look like the same person.","items":{"$ref":"#/components/schemas/DuplicateCandidate"},"type":"array"},"identities":{"items":{"$ref":"#/components/schemas/Identity"},"type":"array"},"lead_score":{"format":"int32","type":"integer"}},"required":["customer","identities","channels","lead_score","consent","duplicates"],"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"},"CustomerGroupOf":{"properties":{"customer_id":{"format":"uuid","type":"string"},"group_id":{"format":"uuid","type":["string","null"]},"group_name":{"type":["string","null"]},"price_list_id":{"description":"The price list the customer pays through their group; null for retail prices.","format":"uuid","type":["string","null"]},"price_list_name":{"type":["string","null"]}},"required":["customer_id"],"type":"object"},"CustomerHit":{"properties":{"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"phone":{"type":["string","null"]},"total_orders":{"format":"int32","type":"integer"},"total_spent":{"description":"Lifetime spend in cents.","format":"int32","type":"integer"}},"required":["id","name","total_orders","total_spent"],"type":"object"},"CustomerImportAiMapping":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/CustomerImportSuggestion"},"type":"array"}},"required":["suggestions"],"type":"object"},"CustomerImportColumn":{"properties":{"header":{"type":"string"},"index":{"minimum":0,"type":"integer"},"samples":{"description":"Up to three distinct values.","items":{"type":"string"},"type":"array"}},"required":["index","header","samples"],"type":"object"},"CustomerImportConfidence":{"enum":["high","medium","low"],"type":"string"},"CustomerImportFailure":{"properties":{"message":{"type":"string"},"row":{"minimum":0,"type":"integer"}},"required":["row","message"],"type":"object"},"CustomerImportField":{"description":"The customer field a column fills.","enum":["ignore","full_name","first_name","last_name","email","phone","document","company","birth_date","tags","notes","marketing_opt_in","street","number","complement","district","city","state","postal_code"],"type":"string"},"CustomerImportIssue":{"properties":{"column":{"type":["string","null"]},"message":{"type":"string"},"row":{"description":"The spreadsheet row (the header is row 1).","minimum":0,"type":"integer"},"severity":{"$ref":"#/components/schemas/CustomerImportSeverity"}},"required":["row","severity","message"],"type":"object"},"CustomerImportMapping":{"description":"One field per column, in order.","properties":{"columns":{"items":{"$ref":"#/components/schemas/CustomerImportField"},"type":"array"}},"required":["columns"],"type":"object"},"CustomerImportPreview":{"properties":{"issues":{"description":"The first issues, by row.","items":{"$ref":"#/components/schemas/CustomerImportIssue"},"type":"array"},"issues_total":{"minimum":0,"type":"integer"},"summary":{"$ref":"#/components/schemas/CustomerImportSummary"}},"required":["summary","issues","issues_total"],"type":"object"},"CustomerImportResult":{"properties":{"addresses_added":{"minimum":0,"type":"integer"},"created":{"minimum":0,"type":"integer"},"failures":{"description":"Rows that could not be written, with why.","items":{"$ref":"#/components/schemas/CustomerImportFailure"},"type":"array"},"skipped":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["created","updated","skipped","addresses_added","failures"],"type":"object"},"CustomerImportSeverity":{"enum":["error","warning"],"type":"string"},"CustomerImportSuggestion":{"properties":{"column":{"minimum":0,"type":"integer"},"confidence":{"$ref":"#/components/schemas/CustomerImportConfidence"},"field":{"$ref":"#/components/schemas/CustomerImportField"},"reason":{"description":"Why, when the model answered.","type":["string","null"]}},"required":["column","field","confidence"],"type":"object"},"CustomerImportSummary":{"properties":{"create":{"minimum":0,"type":"integer"},"errors":{"minimum":0,"type":"integer"},"skip":{"description":"Rows left out: no e-mail, phone or document, or repeated.","minimum":0,"type":"integer"},"update":{"minimum":0,"type":"integer"},"warnings":{"minimum":0,"type":"integer"}},"required":["create","update","skip","errors","warnings"],"type":"object"},"CustomerImportUpload":{"properties":{"ai_available":{"description":"The model can map the columns on this server.","type":"boolean"},"columns":{"items":{"$ref":"#/components/schemas/CustomerImportColumn"},"type":"array"},"filename":{"type":"string"},"id":{"format":"uuid","type":"string"},"layout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExportPlatform","description":"The platform whose export the sheet is, when its columns say so."}]},"row_count":{"minimum":0,"type":"integer"},"suggestions":{"items":{"$ref":"#/components/schemas/CustomerImportSuggestion"},"type":"array"}},"required":["id","filename","row_count","columns","suggestions","ai_available"],"type":"object"},"CustomerImportUploadForm":{"description":"The multipart form of a customer spreadsheet upload.","properties":{"file":{"description":"CSV, XLSX, XLS or ODS; up to 10 MB and 10,000 rows. The first row is\nthe header.","format":"binary","type":"string"},"tab":{"description":"The workbook tab to import, by name (as the tab listing gives it);\nthe first tab without it. Several `file`s, each followed by its\n`tab`, with the same columns, are imported as one sheet.","type":["string","null"]}},"required":["file"],"type":"object"},"CustomerInsights":{"description":"What a customer's purchases say about them.","properties":{"abandoned_carts_90d":{"format":"int64","type":"integer"},"average_days_between_orders":{"description":"Average gap between orders, from two orders on.","format":"double","type":["number","null"]},"average_order_cents":{"format":"int64","type":["integer","null"]},"channels":{"items":{"$ref":"#/components/schemas/InsightCount"},"type":"array"},"days_since_last_order":{"format":"int64","type":["integer","null"]},"emails_clicked_90d":{"format":"int64","type":"integer"},"emails_opened_90d":{"format":"int64","type":"integer"},"emails_received_90d":{"format":"int64","type":"integer"},"first_order_at":{"format":"date-time","type":["string","null"]},"last_order_at":{"format":"date-time","type":["string","null"]},"next_order_expected_at":{"description":"The last order plus the average gap: when they usually come back.","format":"date-time","type":["string","null"]},"open_conversations":{"format":"int64","type":"integer"},"orders":{"description":"Paid orders that stand (the customer's `total_orders`).","format":"int32","type":"integer"},"payment_methods":{"items":{"$ref":"#/components/schemas/InsightCount"},"type":"array"},"refunded_cents":{"format":"int64","type":"integer"},"rfm":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Rfm","description":"`null` until the first paid order, and while the store has fewer than\n20 paying customers to compare with."}]},"top_products":{"items":{"$ref":"#/components/schemas/InsightProduct"},"type":"array"},"total_spent_cents":{"description":"Net of refunds, in cents.","format":"int64","type":"integer"}},"required":["orders","total_spent_cents","refunded_cents","top_products","channels","payment_methods","open_conversations","abandoned_carts_90d","emails_received_90d","emails_opened_90d","emails_clicked_90d"],"type":"object"},"CustomerInteraction":{"description":"An entry on the customer's activity timeline: a note, call or e-mail\nlogged by the team, or an event the system recorded (`order_placed`,\n`order_fulfilled`, `order_cancelled`, `marketing_opt_in`, ...).","properties":{"author_name":{"description":"Their name (else e-mail).","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by":{"description":"Who logged it; null for system events.","format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"interaction_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"},"is_private":{"type":"boolean"},"metadata":{"description":"Free-form context, e.g. `{\"order_id\": ...}` on order events.","type":["object","null"]},"title":{"type":["string","null"]}},"required":["id","customer_id","interaction_type","is_private","created_at"],"type":"object"},"CustomerInteractionCreateRequest":{"description":"A timeline entry logged by the team.","properties":{"description":{"type":["string","null"]},"interaction_type":{"description":"`note`, `call`, `email`, `meeting`, `complaint` or `other`.","type":"string"},"is_private":{"description":"Defaults to false.","type":["boolean","null"]},"metadata":{"type":["object","null"]},"notify_user_ids":{"description":"Team members to notify about this entry (their bell links to it).","items":{"format":"uuid","type":"string"},"type":["array","null"]},"title":{"type":["string","null"]}},"required":["interaction_type"],"type":"object"},"CustomerInteractionUpdateRequest":{"description":"Changes to a team entry; omitted fields keep their value.","properties":{"description":{"type":["string","null"]},"is_private":{"type":["boolean","null"]},"title":{"type":["string","null"]}},"type":"object"},"CustomerJourney":{"description":"A customer's journey: storefront visits and conversations, and orders.","properties":{"customer_id":{"format":"uuid","type":"string"},"first_touch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/JourneyTouch","description":"The earliest touch on record."}]},"latest_sourced_touch":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/JourneyTouch","description":"The latest touch with a source (any channel but direct)."}]},"orders":{"description":"The 50 most recent orders, newest first.","items":{"$ref":"#/components/schemas/JourneyOrder"},"type":"array"},"touches":{"description":"The 200 most recent touches, newest first.","items":{"$ref":"#/components/schemas/JourneyTouch"},"type":"array"}},"required":["customer_id","touches","orders"],"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"},"CustomerOrder":{"description":"One of the customer's orders, with how it was paid and where it is.","properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"danfe_url":{"type":["string","null"]},"fulfillment_method":{"description":"`shipping`, `pickup` or `local_delivery`.","type":["string","null"]},"fulfillment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderFulfillmentStatus"}]},"id":{"format":"uuid","type":"string"},"nfe_number":{"description":"Nota fiscal number and DANFE link, once attached.","type":["string","null"]},"number":{"type":["string","null"]},"payer_document":{"description":"Payer CPF/CNPJ from the latest payment attempt, when the gateway\nreported one.","type":["string","null"]},"payment_method":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentIntentMethod","description":"Method of the latest payment attempt."}]},"payment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderPaymentStatus"}]},"shipments":{"description":"Oldest first.","items":{"$ref":"#/components/schemas/CustomerShipment"},"type":"array"},"status":{"$ref":"#/components/schemas/OrderStatus"},"total_cents":{"format":"int64","type":"integer"}},"required":["id","status","total_cents","currency","created_at","shipments"],"type":"object"},"CustomerSheet":{"properties":{"import_id":{"description":"From `POST /stores/{store_id}/customer-imports` (or `/from-url`).","format":"uuid","type":"string"},"mapping":{"$ref":"#/components/schemas/CustomerImportMapping"}},"required":["import_id","mapping"],"type":"object"},"CustomerShipment":{"description":"A shipment of one of the customer's orders.","properties":{"carrier_name":{"type":["string","null"]},"delivered_at":{"format":"date-time","type":["string","null"]},"freight_external_order_code":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"tracking_code":{"type":["string","null"]},"tracking_events":{"description":"Carrier tracking events, oldest first, when synced.","items":{"$ref":"#/components/schemas/TrackingEvent"},"type":"array"}},"required":["status","tracking_events"],"type":"object"},"CustomerSummary":{"description":"Everyone who ever bought, all time.","properties":{"avg_ltv_cents":{"description":"Net revenue per customer: the lifetime value so far.","format":"int64","type":"integer"},"avg_order_cents":{"description":"Net revenue per order.","format":"int64","type":"integer"},"customers":{"description":"Customers with at least one paid order.","format":"int64","type":"integer"},"guest_orders":{"description":"Paid orders with no customer attached, left out of everything above.","format":"int64","type":"integer"},"median_days_to_second_order":{"description":"Median days from the first order to the second, among those who came back.","format":"int64","type":["integer","null"]},"net_cents":{"description":"Net revenue of those orders (after refunds, shipping included).","format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"orders_per_customer_x100":{"description":"Orders per customer, times 100 (250 = 2.5 orders).","format":"int64","type":["integer","null"]},"repeat_customers":{"description":"Customers with two or more.","format":"int64","type":"integer"},"repeat_rate_bps":{"description":"Repeat customers as basis points of the customers.","format":"int64","type":["integer","null"]}},"required":["customers","repeat_customers","orders","net_cents","avg_ltv_cents","avg_order_cents","guest_orders"],"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"},"CustomerTagRenameRequest":{"description":"Rename or merge a tag; `to` empty removes it.","properties":{"from":{"type":"string"},"to":{"description":"The new name; a tag that exists already merges. Empty removes the tag\nfrom every customer.","type":"string"}},"required":["from","to"],"type":"object"},"CustomerUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"company":{"type":["string","null"]},"company_id":{"description":"The company the customer belongs to; `null` takes them out of it.","format":"uuid","type":["string","null"]},"date_of_birth":{"format":"date","type":["string","null"]},"document":{"description":"CPF/CNPJ, validated (check digits; repeated digits such as\n999.999.999-99 are refused); blank clears it. Orders not yet\ninvoiced use the corrected value for their NF-e.","type":["string","null"]},"email":{"type":["string","null"]},"email_verified":{"type":["boolean","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":{"type":["boolean","null"]},"municipal_registration":{"description":"Municipal registration (inscrição municipal); blank clears it.","type":["string","null"]},"notes":{"type":["string","null"]},"owner_user_id":{"description":"The team member who looks after the customer; `null` clears it.","format":"uuid","type":["string","null"]},"phone":{"type":["string","null"]},"phone_verified":{"type":["boolean","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"},"CustomersReport":{"properties":{"cohorts":{"description":"Oldest first.","items":{"$ref":"#/components/schemas/Cohort"},"type":"array"},"current_month":{"description":"First day of the current month, São Paulo time.","format":"date","type":"string"},"months":{"format":"int32","type":"integer"},"summary":{"$ref":"#/components/schemas/CustomerSummary"},"top_customers":{"description":"The ten customers with the most net revenue.","items":{"$ref":"#/components/schemas/TopCustomer"},"type":"array"}},"required":["current_month","months","summary","cohorts","top_customers"],"type":"object"},"DashboardActivityItem":{"properties":{"action":{"description":"What happened, in English, e.g. `Order #1042 created`. For display\nonly; translate from `kind` and `params` instead.","type":"string"},"activity_type":{"description":"`order`, `product` or `customer`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"description":"Set for `customer_registered`, and for `order_created` when the\norder has a customer record.","format":"uuid","type":["string","null"]},"kind":{"$ref":"#/components/schemas/DashboardActivityKind"},"order_id":{"description":"Set for `order_created`.","format":"uuid","type":["string","null"]},"params":{"$ref":"#/components/schemas/DashboardActivityParams","description":"Values for the `kind` message."},"product_id":{"description":"Set for `product_created`.","format":"uuid","type":["string","null"]}},"required":["action","activity_type","created_at","kind","params"],"type":"object"},"DashboardActivityKind":{"description":"What happened, for translation and deep links. More kinds may be\nadded; show `action` for kinds you don't know.","enum":["order_created","product_created","customer_registered"],"type":"string"},"DashboardActivityParams":{"description":"Values to fill a translated `kind` message with.","properties":{"customer_name":{"description":"`customer_registered`: the customer's full name, else their e-mail.","type":["string","null"]},"order_number":{"description":"`order_created`: the order number (or the id's first 8 characters\nwhen it has none).","type":["string","null"]},"product_title":{"description":"`product_created`: the product title.","type":["string","null"]}},"type":"object"},"DashboardAttention":{"description":"Counts of things waiting on someone.","properties":{"assistant_proposals_pending":{"format":"int64","type":"integer"},"carts_abandoned_24h":{"format":"int64","type":"integer"},"failed_runs_24h":{"format":"int64","type":"integer"},"low_stock_items":{"format":"int64","type":"integer"},"orders_awaiting_payment":{"format":"int64","type":"integer"},"orders_to_fulfill":{"format":"int64","type":"integer"},"out_of_stock_items":{"format":"int64","type":"integer"},"purchase_orders_overdue":{"format":"int64","type":"integer"},"reviews_pending":{"format":"int64","type":"integer"},"runs_awaiting_approval":{"format":"int64","type":"integer"}},"required":["orders_to_fulfill","orders_awaiting_payment","low_stock_items","out_of_stock_items","failed_runs_24h","runs_awaiting_approval","assistant_proposals_pending","purchase_orders_overdue","carts_abandoned_24h","reviews_pending"],"type":"object"},"DashboardDayPoint":{"description":"One day of a daily series.","properties":{"date":{"description":"The day, in the store's time zone.","format":"date","type":"string"},"value":{"format":"int64","type":"integer"}},"required":["date","value"],"type":"object"},"DashboardStats":{"description":"Headline numbers for the selected period, each with its change against\nthe period before.\n\n**Time zone.** Every day boundary is midnight in the store's time zone\n(`timezone`: the store's own setting, else its tenant's, else UTC).\n`range=month` starts at 00:00 local time on the 1st of the current\nlocal month; `7d`, `30d` and `90d` are today plus the 6, 29 or 89 local\ndays before it, starting at local midnight. The period ends now.\n`period_start` is the first instant counted, and every daily series\nhas one point per local date from `period_start` through `today`.\n\n**Revenue** is always paid revenue: the `total_cents` of orders with\nstatus `paid` or `fulfilled` (refunded, cancelled, pending and draft\norders are left out), by the local day the order was created. So\n`revenue_cents` is the sum of `revenue_series`, and\n`revenue_today_cents` is its last point.\n\n**Orders** in `orders_series` and `orders_today` are every order\ncreated that local day except drafts and cancelled ones, paid or not.","properties":{"active_customers":{"description":"Customers in the store now.","format":"int64","type":"integer"},"active_customers_change_pct":{"description":"Change in new customers against the previous period.","format":"double","type":"number"},"orders_series":{"description":"Orders per local day over the period (every status except draft\nand cancelled), oldest first, ending with today.","items":{"$ref":"#/components/schemas/DashboardDayPoint"},"type":"array"},"orders_today":{"description":"Orders created today (store-local day), every status except draft\nand cancelled.","format":"int64","type":"integer"},"pending_orders":{"description":"Orders waiting to be handled now (draft or pending).","format":"int64","type":"integer"},"pending_orders_change_pct":{"description":"Change in pending orders against those created before the period\nand still pending.","format":"double","type":"number"},"period_start":{"description":"First instant of the period (local midnight, as UTC).","format":"date-time","type":"string"},"recent_activity":{"description":"The 8 latest orders, products and customers, newest first.","items":{"$ref":"#/components/schemas/DashboardActivityItem"},"type":"array"},"revenue_cents":{"description":"Paid revenue over the selected period, in cents.","format":"int64","type":"integer"},"revenue_change_pct":{"description":"Change in paid revenue against the previous period: the previous\ncalendar month in full for `range=month`, the same number of local\ndays before `period_start` otherwise.","format":"double","type":"number"},"revenue_currency":{"description":"ISO 4217 currency of the revenue figures.","example":"BRL","type":"string"},"revenue_series":{"description":"Paid revenue per local day (cents) over the period, oldest first,\nending with today.","items":{"$ref":"#/components/schemas/DashboardDayPoint"},"type":"array"},"revenue_this_month_cents":{"deprecated":true,"description":"Same value as `revenue_cents`: paid revenue over the selected\n`range`, which is the calendar month only when `range=month`. Use\n`revenue_cents`.","format":"int64","type":"integer"},"revenue_this_month_change_pct":{"deprecated":true,"description":"Same value as `revenue_change_pct`. Use `revenue_change_pct`.","format":"double","type":"number"},"revenue_today_cents":{"description":"Paid revenue of orders created today (store-local day), in cents.","format":"int64","type":"integer"},"support_open_count":{"description":"Complaints and refund requests in the last 30 days (a rolling\n30 × 24 h window, not local days).","format":"int64","type":"integer"},"timezone":{"description":"IANA time zone the day boundaries are computed in.","example":"America/Sao_Paulo","type":"string"},"today":{"description":"Today's date in the store's time zone: the last point of every\ndaily series.","format":"date","type":"string"},"total_products":{"description":"Products in the store now.","format":"int64","type":"integer"},"total_products_change_pct":{"description":"Change in the product count since the period started.","format":"double","type":"number"},"visitors":{"description":"Storefront traffic per local day over the period.","items":{"$ref":"#/components/schemas/DashboardVisitorsPoint"},"type":"array"}},"required":["total_products","active_customers","pending_orders","revenue_this_month_cents","revenue_currency","total_products_change_pct","active_customers_change_pct","pending_orders_change_pct","revenue_this_month_change_pct","recent_activity","visitors","support_open_count","revenue_series","orders_series","revenue_cents","revenue_change_pct","revenue_today_cents","orders_today","timezone","today","period_start"],"type":"object"},"DashboardVisitorsPoint":{"properties":{"date":{"description":"The day, in the store's time zone.","format":"date","type":"string"},"sessions":{"description":"Sessions that day.","format":"int64","type":"integer"},"visitors":{"description":"Unique visitors that day (distinct visitor cookie).","format":"int64","type":"integer"}},"required":["date","visitors","sessions"],"type":"object"},"DayPoint":{"description":"One day of a campaign's numbers.","properties":{"clicks":{"format":"int64","type":"integer"},"day":{"description":"`YYYY-MM-DD`.","type":"string"},"impressions":{"format":"int64","type":"integer"},"meta_purchase_value_cents":{"format":"int64","type":"integer"},"meta_purchases":{"format":"int64","type":"integer"},"spend_cents":{"format":"int64","type":"integer"}},"required":["day","spend_cents","impressions","clicks","meta_purchases","meta_purchase_value_cents"],"type":"object"},"Deal":{"description":"A deal, with the names the board shows.","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_name":{"type":["string","null"]},"owner_user_id":{"format":"uuid","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`.","type":"string"},"title":{"type":"string"},"value_cents":{"format":"int64","type":"integer"}},"required":["id","title","pipeline_id","stage_id","stage_name","status","value_cents","probability","stage_changed_at","created_at"],"type":"object"},"DealCreateRequest":{"description":"A new deal.","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_user_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"},"DealForecast":{"description":"The weighted pipeline.","properties":{"by_owner":{"items":{"$ref":"#/components/schemas/DealForecastGroup"},"type":"array"},"by_pipeline":{"items":{"$ref":"#/components/schemas/DealForecastGroup"},"type":"array"},"current_month":{"description":"The store's month, `YYYY-MM`.","type":"string"},"deals":{"format":"int64","type":"integer"},"months":{"items":{"$ref":"#/components/schemas/DealForecastMonth"},"type":"array"},"open_value_cents":{"format":"int64","type":"integer"},"this_month_projection_cents":{"description":"Won so far this month plus the weighted value still expected in it\n(overdue deals included).","format":"int64","type":"integer"},"weighted_cents":{"format":"int64","type":"integer"},"won_this_month":{"format":"int64","type":"integer"},"won_this_month_cents":{"format":"int64","type":"integer"}},"required":["current_month","months","by_pipeline","by_owner","deals","open_value_cents","weighted_cents","won_this_month","won_this_month_cents","this_month_projection_cents"],"type":"object"},"DealForecastGroup":{"description":"The forecast of one pipeline or one owner.","properties":{"deals":{"format":"int64","type":"integer"},"id":{"description":"The pipeline or owner; null for deals nobody owns.","format":"uuid","type":["string","null"]},"name":{"type":["string","null"]},"open_value_cents":{"format":"int64","type":"integer"},"this_month_weighted_cents":{"description":"Weighted value of open deals expected this month or overdue.","format":"int64","type":"integer"},"weighted_cents":{"format":"int64","type":"integer"},"won_this_month":{"description":"Deals won so far this month, and their value.","format":"int64","type":"integer"},"won_this_month_cents":{"format":"int64","type":"integer"}},"required":["deals","open_value_cents","weighted_cents","this_month_weighted_cents","won_this_month","won_this_month_cents"],"type":"object"},"DealForecastMonth":{"description":"Open deals expected to close in one month (or overdue, or without a date).","properties":{"deals":{"format":"int64","type":"integer"},"kind":{"description":"`overdue` (expected before this month), `month` or `undated`.","type":"string"},"month":{"description":"`YYYY-MM` for a `month`.","type":["string","null"]},"open_value_cents":{"format":"int64","type":"integer"},"weighted_cents":{"description":"Each deal's value times its stage's probability.","format":"int64","type":"integer"}},"required":["kind","deals","open_value_cents","weighted_cents"],"type":"object"},"DealMoveRequest":{"description":"Move a deal to a 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"},"DealUpdateRequest":{"description":"Changes to a deal; a missing field stays, `null` clears it.","properties":{"company_id":{"format":"uuid","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"expected_close_on":{"format":"date","type":["string","null"]},"owner_user_id":{"format":"uuid","type":["string","null"]},"title":{"type":["string","null"]},"value_cents":{"format":"int64","type":["integer","null"]}},"type":"object"},"DecideGrantRequest":{"properties":{"status":{"description":"`approved` or `declined` for a request; `revoked` for an approved\ngrant (it ends at once).","type":"string"}},"required":["status"],"type":"object"},"DeclineNetworkInviteRequest":{"properties":{"reason":{"description":"Why, for the brand (up to 500 characters).","type":["string","null"]},"token":{"description":"The invite's `token`, from the link.","type":"string"}},"required":["token"],"type":"object"},"DedupeDraftsResult":{"description":"What a draft dedupe did (or would do, for a dry run).","properties":{"dry_run":{"type":"boolean"},"duplicates_of_active":{"description":"Drafts (counted in `products_deleted`) sharing their title with a\nproduct that is on sale, which is kept instead.","format":"int64","type":"integer"},"groups_examined":{"description":"Groups of drafts sharing a title.","format":"int64","type":"integer"},"products_deleted":{"format":"int64","type":"integer"},"products_kept":{"description":"One per group of drafts: the most recently updated draft.","format":"int64","type":"integer"},"skipped_due_to_orders":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["dry_run","groups_examined","products_deleted","products_kept","duplicates_of_active","skipped_due_to_orders"],"type":"object"},"DeliveryZone":{"description":"A CEP range the store delivers to itself, at a flat price.","properties":{"cep_from":{"description":"First CEP of the range, as a number (`1310100` for 01310-100).","format":"int64","type":"integer"},"cep_to":{"description":"Last CEP of the range, inclusive.","format":"int64","type":"integer"},"delivery_days":{"format":"int32","type":["integer","null"]},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"label":{"description":"What the shopper sees as the freight option's name.","type":"string"},"shipping_cents":{"format":"int64","type":"integer"},"sort_order":{"description":"Sort order, ascending.","format":"int32","type":"integer"}},"required":["id","label","cep_from","cep_to","shipping_cents","is_active","sort_order"],"type":"object"},"DeliveryZoneRequest":{"description":"A zone to create.","properties":{"cep_from":{"description":"0 to 99999999.","format":"int64","type":"integer"},"cep_to":{"description":"At least `cep_from`.","format":"int64","type":"integer"},"delivery_days":{"format":"int32","type":["integer","null"]},"description":{"type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"label":{"type":"string"},"shipping_cents":{"description":"0 or more.","format":"int64","type":"integer"},"sort_order":{"description":"Defaults to 0.","format":"int32","type":["integer","null"]}},"required":["label","cep_from","cep_to","shipping_cents"],"type":"object"},"DeliveryZoneUpdateRequest":{"description":"New values for a zone. `label`, the CEP range and the price are\nrequired; omitted optional fields keep their value, and `null` clears\n`description` or `delivery_days`.","properties":{"cep_from":{"description":"0 to 99999999.","format":"int64","type":"integer"},"cep_to":{"description":"At least `cep_from`.","format":"int64","type":"integer"},"delivery_days":{"format":"int32","type":["integer","null"]},"description":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"label":{"type":"string"},"shipping_cents":{"description":"0 or more.","format":"int64","type":"integer"},"sort_order":{"format":"int32","type":["integer","null"]}},"required":["label","cep_from","cep_to","shipping_cents"],"type":"object"},"DeploymentDiff":{"description":"What changed between two deployments.","properties":{"against_id":{"description":"The deployment compared against (\"before\"); empty means an empty theme.","format":"uuid","type":["string","null"]},"deployment_id":{"format":"uuid","type":"string"},"file":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeploymentFileDiff","description":"The line diff of `path`, when one was asked for."}]},"files":{"description":"Files that differ, by path.","items":{"$ref":"#/components/schemas/DeploymentDiffFile"},"type":"array"},"unchanged_files":{"description":"How many files are identical in both.","format":"int64","type":"integer"}},"required":["deployment_id","files","unchanged_files"],"type":"object"},"DeploymentDiffFile":{"description":"One file that differs.","properties":{"path":{"type":"string"},"size_after":{"description":"Bytes in the deployment; empty when removed.","format":"int64","type":["integer","null"]},"size_before":{"description":"Bytes in the deployment compared against; empty when added.","format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/DiffStatus"}},"required":["path","status"],"type":"object"},"DeploymentExportFile":{"description":"A `.zip` of one deployment's theme files, paths relative without the\nleading slash.","format":"binary","type":"string"},"DeploymentFileDiff":{"description":"The line-by-line difference of one text file.","properties":{"path":{"type":"string"},"truncated":{"description":"Whether the diff was cut short (64 KiB or 1500 lines).","type":"boolean"},"unified":{"description":"Unified diff (`a/` is the deployment compared against, `b/` the deployment); empty when the file is the same.","type":"string"}},"required":["path","unified","truncated"],"type":"object"},"DeploymentNote":{"description":"The optional JSON body of a draft or a ready call: why the deployment exists.","properties":{"message":{"description":"What this version changes, in a sentence (500 characters at most). Shown in the\ndeployments list; the assistant fills it in with the admin's request.","type":["string","null"]}},"type":"object"},"DeviceSession":{"description":"A device the user is signed in on.","properties":{"created_at":{"description":"When the user signed in.","format":"date-time","type":"string"},"current":{"description":"Whether this request was made with this session's access token.","type":"boolean"},"device_name":{"description":"Name the client gave at sign-in (`device_name`), e.g. \"iPhone de Ana\".","type":["string","null"]},"expires_at":{"description":"When the session ends unless it is refreshed.","format":"date-time","type":"string"},"id":{"description":"Session id; revoke with `DELETE /me/sessions/{session_id}`.","format":"uuid","type":"string"},"last_used_at":{"description":"When the session was last refreshed (its sign-in time if never).","format":"date-time","type":"string"},"user_agent":{"description":"`User-Agent` of the last sign-in or refresh.","type":["string","null"]}},"required":["id","created_at","last_used_at","expires_at","current"],"type":"object"},"DfeRunResult":{"description":"What one run did.","properties":{"documents":{"format":"int64","type":"integer"},"imported":{"format":"int64","type":"integer"},"last_status":{"format":"int32","type":["integer","null"]},"manifested":{"format":"int64","type":"integer"},"message":{"type":["string","null"]},"next_allowed_at":{"format":"date-time","type":["string","null"]}},"required":["documents","imported","manifested"],"type":"object"},"DfeSettings":{"properties":{"auto_receive":{"description":"Receive a note as it is imported (from SEFAZ or by hand) when it is\nauthorized, addressed to the store, from a known supplier, of a known\noperation, every line matched by a learned code or barcode in whole\nunits, and its installments add up. Off by default; kept when\nomitted.","type":["boolean","null"]},"enabled":{"description":"Fetch from SEFAZ every hour (and send ciência da operação for each\nnote addressed to the store, which its full XML needs). Kept when\nomitted.","type":["boolean","null"]}},"type":"object"},"DfeStatus":{"description":"Where a store stands with SEFAZ.","properties":{"auto_receive":{"description":"Notes are received as they are imported (from SEFAZ or by hand) when\nnothing about them needs a person.","type":"boolean"},"awaiting_xml":{"description":"Notes acknowledged whose full XML has not arrived yet.","format":"int64","type":"integer"},"configured":{"description":"The store has a fiscal profile with a certificate.","type":"boolean"},"enabled":{"description":"Fetched every hour.","type":"boolean"},"environment":{"type":["string","null"]},"imported":{"description":"Full notes imported as supplier invoices.","format":"int64","type":"integer"},"last_message":{"type":["string","null"]},"last_nsu":{"type":"string"},"last_run_at":{"format":"date-time","type":["string","null"]},"last_status":{"format":"int32","type":["integer","null"]},"max_nsu":{"type":"string"},"next_allowed_at":{"description":"SEFAZ allows the next query from then.","format":"date-time","type":["string","null"]},"problems":{"description":"Notes or manifestations that failed and need a look.","format":"int64","type":"integer"}},"required":["configured","enabled","auto_receive","last_nsu","max_nsu","awaiting_xml","imported","problems"],"type":"object"},"DiffStatus":{"description":"How a file differs between two deployments.","enum":["added","modified","removed"],"type":"string"},"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"},"Dimension":{"description":"A record attribute the platform knows how to filter lists by.","enum":["sales_channel","pickup_location","inventory_location","channel","ad_account","pipeline"],"type":"string"},"Disable2FARequest":{"description":"Proof that the signed-in user is present before a second factor is\nturned off: the current password, or a current code of that factor.","properties":{"code":{"description":"A current code of the factor being turned off.","example":"123456","type":["string","null"]},"current_password":{"type":["string","null"]},"totp_code":{"description":"A current authenticator code (`/me/2fa/totp/disable` only).","example":"123456","type":["string","null"]}},"type":"object"},"DiscountCode":{"description":"A discount code.","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"]},"store_id":{"format":"uuid","type":"string"},"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":["id","store_id","code","discount_type","value","used_count","is_active","created_at","scope","exclude_sale_items","first_purchase_only","customer_group_ids","free_shipping","free_shipping_services","combines_with_promotions"],"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."},"DiscountCodeRejection":{"description":"Why a code does not apply.","type":"string","x-extensible-enum":["not_found","not_started","expired","below_minimum","usage_limit_reached","no_eligible_items","below_minimum_quantity","first_purchase_only","already_used","not_eligible_customer","not_combinable"]},"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."},"DiscountCodeValidateItem":{"description":"An item of the order a code is checked against.","properties":{"quantity":{"format":"int32","type":"integer"},"unit_price_cents":{"description":"The unit price charged, in cents.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity","unit_price_cents"],"type":"object"},"DiscountCodeValidateRequest":{"description":"Check a discount code against an order.","properties":{"code":{"type":"string"},"customer_id":{"description":"The customer, for a code limited to a first purchase, some groups or\na number of uses per customer.","format":"uuid","type":["string","null"]},"items":{"description":"The order's items, for a code limited to some products or to a\nminimum quantity. Without them the order total counts as one item\nthat no product scope matches.","items":{"$ref":"#/components/schemas/DiscountCodeValidateItem"},"type":"array"},"order_total_cents":{"description":"The order total the code would apply to, in cents.","format":"int64","type":"integer"}},"required":["code","order_total_cents"],"type":"object"},"DiscountCodeValidation":{"description":"Whether a code applies, and what it gives.","properties":{"amount_cents":{"description":"What the code takes off `order_total_cents` (`amount_cents`, with\nthe store's price rounding); 0 when it does not apply.","format":"int64","type":"integer"},"discount_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountType","description":"Null when no such code exists."}]},"free_shipping":{"description":"The code also makes freight free (see the code's `free_shipping_*`).","type":"boolean"},"message":{"description":"Human-readable reason, set when `valid` is false.","type":["string","null"]},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiscountCodeRejection","description":"Set when `valid` is false."}]},"rounding_cents":{"description":"The store's price rounding step (0 is off): a percentage code leaves\na price on it, rounded down (commerce::pricing::Rounding::percent_off),\nfor clients that recompute the amount as the cart changes.","format":"int64","type":"integer"},"valid":{"type":"boolean"},"value":{"description":"Whole percent or cents, per `discount_type`; 0 when no such code exists.","format":"int32","type":"integer"}},"required":["valid","value","amount_cents","rounding_cents","free_shipping"],"type":"object"},"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"},"DocsAskMessage":{"description":"A message of the conversation, as the AI SDK `useChat` sends it.","properties":{"parts":{"description":"Message parts; `{ \"type\": \"text\", \"text\": \"...\" }` parts are read,\nothers ignored.","items":{"type":"object"},"type":"array"},"role":{"description":"`user` or `assistant`.","type":"string"}},"required":["role","parts"],"type":"object"},"DocsAskRequest":{"properties":{"locale":{"description":"Docs language the visitor is reading: `pt` (default) or `en`.\nAnswers follow the language of the question.","example":"pt","type":["string","null"]},"messages":{"description":"The conversation so far, ending with the user's question.","items":{"$ref":"#/components/schemas/DocsAskMessage"},"type":"array"}},"required":["messages"],"type":"object"},"DocumentDetail":{"description":"A document with its versions, links and recent history.","properties":{"current_version_id":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"document":{"$ref":"#/components/schemas/DocumentSummary"},"events":{"description":"The latest 100 entries, newest first.","items":{"$ref":"#/components/schemas/DocumentEvent"},"type":"array"},"links":{"items":{"$ref":"#/components/schemas/DocumentLink"},"type":"array"},"remind_days_before":{"description":"Days before `expires_on` the reminder goes out.","format":"int32","type":"integer"},"versions":{"description":"Newest first.","items":{"$ref":"#/components/schemas/DocumentVersion"},"type":"array"}},"required":["document","remind_days_before","versions","links","events"],"type":"object"},"DocumentEntity":{"description":"What a document can be linked to.","enum":["supplier","customer","order","purchase_order","member"],"type":"string"},"DocumentEvent":{"description":"An entry in a document's history.","properties":{"action":{"description":"`created`, `version_added`, `viewed`, `downloaded`, `updated`,\n`moved`, `linked`, `unlinked`, `archived`, `restored`, `reminded`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"type":"object"},"id":{"format":"uuid","type":"string"},"user_name":{"type":["string","null"]}},"required":["id","action","detail","created_at"],"type":"object"},"DocumentFolder":{"description":"A document folder.","properties":{"created_at":{"format":"date-time","type":"string"},"document_count":{"description":"Active documents directly in this folder.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"inherited_restriction":{"description":"Whether a folder above is restricted, so the flag cannot be lifted\nhere.","type":"boolean"},"name":{"type":"string"},"parent_id":{"format":"uuid","type":["string","null"]},"restricted":{"description":"Only members with `documents.restricted` see it (set here or on a\nfolder above).","type":"boolean"}},"required":["id","name","restricted","inherited_restriction","document_count","created_at"],"type":"object"},"DocumentFolderCreate":{"properties":{"name":{"type":"string"},"parent_id":{"format":"uuid","type":["string","null"]},"restricted":{"description":"Hide it from members without `documents.restricted`. A folder inside\na restricted one is always restricted.","type":"boolean"}},"required":["name"],"type":"object"},"DocumentFolderUpdate":{"properties":{"name":{"type":["string","null"]},"parent_id":{"description":"Move it under another folder (`null` for the top level).","format":"uuid","type":["string","null"]},"restricted":{"type":["boolean","null"]}},"type":"object"},"DocumentLink":{"description":"A document's link, with a label for what it points at.","properties":{"entity_id":{"format":"uuid","type":"string"},"entity_type":{"description":"`supplier`, `customer`, `order`, `purchase_order` or `member`.","type":"string"},"label":{"description":"The supplier's or customer's name, the order number, the member's\nname; absent when it no longer exists.","type":["string","null"]}},"required":["entity_type","entity_id"],"type":"object"},"DocumentLinkRef":{"description":"A link from a document to something it concerns.","properties":{"entity_id":{"format":"uuid","type":"string"},"entity_type":{"$ref":"#/components/schemas/DocumentEntity"}},"required":["entity_type","entity_id"],"type":"object"},"DocumentSummary":{"description":"A document in a list.","properties":{"content_type":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"expires_on":{"format":"date","type":["string","null"]},"file_name":{"type":["string","null"]},"folder_id":{"format":"uuid","type":["string","null"]},"folder_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"link_count":{"format":"int64","type":"integer"},"locked_at":{"description":"Signed: it takes no new versions.","format":"date-time","type":["string","null"]},"origin":{"description":"`upload`, `template`, `signature` or `platform`.","type":"string"},"restricted":{"description":"Seen only by members with `documents.restricted` (its folder is\nrestricted).","type":"boolean"},"size_bytes":{"format":"int64","type":["integer","null"]},"status":{"description":"`active` or `archived`.","type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version_count":{"format":"int64","type":"integer"}},"required":["id","title","tags","restricted","status","origin","version_count","link_count","created_at","updated_at"],"type":"object"},"DocumentTag":{"description":"A tag in use, with how many active documents carry it.","properties":{"count":{"format":"int64","type":"integer"},"tag":{"type":"string"}},"required":["tag","count"],"type":"object"},"DocumentTemplate":{"description":"A document template.","properties":{"body":{"description":"The rich text editor's JSON.","type":"object"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"document_count":{"description":"Documents made from it.","format":"int64","type":"integer"},"entity_type":{"description":"`supplier`, `customer`, `order`, `purchase_order`, `member`, or none.","type":["string","null"]},"folder_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"status":{"description":"`active` or `archived`.","type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","body","tags","status","created_at","updated_at","document_count"],"type":"object"},"DocumentTemplateInput":{"properties":{"body":{"type":["object","null"]},"description":{"description":"`null` or empty clears it.","type":["string","null"]},"entity_type":{"type":["string","null"]},"folder_id":{"description":"Where generated documents go (`null`: no folder).","format":"uuid","type":["string","null"]},"name":{"type":["string","null"]},"status":{"description":"`active` or `archived`.","type":["string","null"]},"tags":{"items":{"type":"string"},"type":["array","null"]}},"type":"object"},"DocumentUpdate":{"properties":{"description":{"type":["string","null"]},"expires_on":{"format":"date","type":["string","null"]},"folder_id":{"description":"Move it (`null` for no folder).","format":"uuid","type":["string","null"]},"remind_days_before":{"format":"int32","type":["integer","null"]},"status":{"description":"`active` or `archived`.","type":["string","null"]},"tags":{"description":"Replaces the tags.","items":{"type":"string"},"type":["array","null"]},"title":{"type":["string","null"]}},"type":"object"},"DocumentUploadForm":{"description":"The multipart form of a new document. Only `file` is required.","properties":{"description":{"type":["string","null"]},"expires_on":{"description":"`YYYY-MM-DD`.","type":["string","null"]},"file":{"description":"The file, up to 50 MB.","format":"binary","type":"string"},"folder_id":{"format":"uuid","type":["string","null"]},"links":{"description":"JSON array of `{\"entity_type\", \"entity_id\"}`.","type":["string","null"]},"note":{"description":"A note on the version (with the new-version endpoint).","type":["string","null"]},"remind_days_before":{"format":"int32","type":["integer","null"]},"tags":{"description":"Comma-separated.","type":["string","null"]},"title":{"description":"Defaults to the file name without its extension.","type":["string","null"]}},"required":["file"],"type":"object"},"DocumentVersion":{"description":"One uploaded version of a document.","properties":{"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_name":{"type":["string","null"]},"file_name":{"type":"string"},"id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"number":{"format":"int32","type":"integer"},"sha256":{"description":"Hex SHA-256 of the file: what a signature or an audit refers to.","type":"string"},"size_bytes":{"format":"int64","type":"integer"}},"required":["id","number","file_name","content_type","size_bytes","sha256","created_at"],"type":"object"},"DomainKind":{"description":"`platform` (`<slug>.<platform domain>`, managed by us) or `custom`.","enum":["platform","custom"],"type":"string"},"DomainOut":{"description":"A hostname the storefront answers on.","properties":{"cname_target":{"description":"Where the merchant points a CNAME for a custom domain: the Cloudflare for SaaS\nfallback origin when that is on, else the store's free address (DNS-only, it\nreaches the host directly). `None` for the free address itself.","type":["string","null"]},"dns_challenge":{"description":"The value to publish in a TXT record at `txt_record_name`.","type":["string","null"]},"hostname":{"example":"loja.example.com.br","type":"string"},"id":{"format":"uuid","type":"string"},"is_primary":{"description":"The store's canonical domain (feeds, sitemaps, absolute links).","type":"boolean"},"kind":{"$ref":"#/components/schemas/DomainKind"},"last_verification_attempt_at":{"format":"date-time","type":["string","null"]},"txt_record_name":{"description":"`_bp-verify.<hostname>`.","type":["string","null"]},"verification_failures":{"description":"Consecutive failed checks; the domain is unverified after 5.","format":"int32","type":"integer"},"verified_at":{"description":"When DNS ownership was proven; absent while unverified.","format":"date-time","type":["string","null"]}},"required":["id","hostname","kind","verification_failures","is_primary"],"type":"object"},"DraftAsset":{"description":"Uploaded binary asset record.","properties":{"content_hash":{"type":"string"},"path":{"type":"string"},"size_bytes":{"format":"int64","type":"integer"}},"required":["path","size_bytes","content_hash"],"type":"object"},"DraftAssetUploadForm":{"description":"The multipart form of a draft asset upload.","properties":{"file":{"description":"The file bytes (PNG, JPEG, GIF, WebP, AVIF, ICO, SVG or a font).","format":"binary","type":"string"},"path":{"description":"Theme path starting with `/assets/`.","type":["string","null"]}},"required":["file"],"type":"object"},"DraftEmailRequest":{"properties":{"design":{"description":"Current design to revise (omit to start fresh).","type":["object","null"]},"prompt":{"description":"What the e-mail should say, in the merchant's words.","type":"string"},"subject":{"type":["string","null"]}},"required":["prompt"],"type":"object"},"DraftFile":{"description":"One file of a draft deployment.","properties":{"content_hash":{"type":"string"},"path":{"type":"string"},"size_bytes":{"format":"int64","type":"integer"}},"required":["path","size_bytes","content_hash"],"type":"object"},"DraftFileContent":{"properties":{"content":{"type":"string"},"offset":{"description":"1-based first line of `content`.","format":"int64","type":"integer"},"path":{"type":"string"},"total_lines":{"description":"Total lines of the file.","format":"int64","type":"integer"},"truncated":{"description":"Whether lines follow this window.","type":"boolean"}},"required":["path","content","total_lines","offset","truncated"],"type":"object"},"DraftFileEdit":{"description":"One anchored replacement inside a draft file.","properties":{"new_string":{"description":"Its replacement.","type":"string"},"old_string":{"description":"Text to find; must occur exactly once in the current file.","type":"string"}},"required":["old_string","new_string"],"type":"object"},"DraftFileProblem":{"description":"A file that failed validation, with the reason.","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"required":["path","code","message"],"type":"object"},"DraftFileWrite":{"description":"One file to write into a draft deployment: either a full replacement\n(`content`) or anchored patches (`edits`), never both. Patches keep\nlarge files editable without resending them: each `old_string` must\noccur exactly once and is replaced in order, then the result is\nvalidated like a full write.","properties":{"content":{"description":"Full new content of the file.","type":["string","null"]},"edits":{"items":{"$ref":"#/components/schemas/DraftFileEdit"},"type":["array","null"]},"path":{"description":"Theme-relative path starting with `/`, e.g.\n`/templates/index.liquid` or `/config/settings_data.json`.","type":"string"}},"required":["path"],"type":"object"},"DraftFilesRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/DraftFileWrite"},"type":"array"}},"required":["files"],"type":"object"},"DraftPolicyRequest":{"properties":{"ask":{"description":"What the person wants, in their words: \"a Maria só vê os pedidos\nda loja do Itaim\", \"caixas reembolsam até R$ 200\".","type":"string"}},"required":["ask"],"type":"object"},"DraftValidation":{"description":"The validation outcome of a write or ready check.","properties":{"ok":{"type":"boolean"},"problems":{"items":{"$ref":"#/components/schemas/DraftFileProblem"},"type":"array"}},"required":["ok","problems"],"type":"object"},"DraftWorkflowRequest":{"description":"What the merchant wants the automation to do.","properties":{"prompt":{"description":"In the merchant's words, e.g. \"quando um pedido pago passar 48 horas\nsem envio, avise a equipe\". Up to 2000 characters.","type":"string"}},"required":["prompt"],"type":"object"},"Dre":{"properties":{"fees_configured":{"description":"False when no payment method has terms set: fees are then zero and\nthe DRE is overstated.","type":"boolean"},"period":{"$ref":"#/components/schemas/DrePeriod"},"previous":{"$ref":"#/components/schemas/DrePeriod","description":"The period of the same length right before, for comparison."}},"required":["period","previous","fees_configured"],"type":"object"},"DreExpense":{"description":"One operating expense line of the DRE.","properties":{"category":{"type":"string"},"cents":{"format":"int64","type":"integer"}},"required":["category","cents"],"type":"object"},"DrePeriod":{"description":"The DRE for one period.","properties":{"cogs_cents":{"description":"Quantity sold times each variant's current cost.","format":"int64","type":"integer"},"contribution_cents":{"description":"Gross profit less freight and fees.","format":"int64","type":"integer"},"discounts_cents":{"format":"int64","type":"integer"},"expenses":{"items":{"$ref":"#/components/schemas/DreExpense"},"type":"array"},"expenses_cents":{"format":"int64","type":"integer"},"freight_cost_cents":{"description":"Freight the store paid (CIF shipments).","format":"int64","type":"integer"},"from":{"format":"date","type":"string"},"gross_margin_bps":{"description":"Basis points of net revenue (1234 = 12.34%); null without revenue.","format":"int64","type":["integer","null"]},"gross_profit_cents":{"format":"int64","type":"integer"},"gross_sales_cents":{"description":"Items sold (subtotals), before discounts.","format":"int64","type":"integer"},"lines_without_cost":{"description":"Order lines sold whose variant has no cost, so COGS is understated.","format":"int64","type":"integer"},"net_revenue_cents":{"description":"Gross sales less discounts and refunds, plus freight charged.","format":"int64","type":"integer"},"operating_margin_bps":{"format":"int64","type":["integer","null"]},"operating_result_cents":{"format":"int64","type":"integer"},"orders":{"description":"Paid orders in the period.","format":"int64","type":"integer"},"payment_fees_cents":{"description":"Estimated processor fees, from the payment terms.","format":"int64","type":"integer"},"refunds_cents":{"description":"Refunds issued in the period, whenever the order was paid.","format":"int64","type":"integer"},"shipping_revenue_cents":{"description":"Freight charged to customers.","format":"int64","type":"integer"},"tax_collected_cents":{"description":"Tax charged on top of prices. Pass-through: not in any line above.","format":"int64","type":"integer"},"to":{"format":"date","type":"string"}},"required":["from","to","orders","gross_sales_cents","discounts_cents","refunds_cents","shipping_revenue_cents","net_revenue_cents","cogs_cents","gross_profit_cents","freight_cost_cents","payment_fees_cents","contribution_cents","expenses","expenses_cents","operating_result_cents","tax_collected_cents","lines_without_cost"],"type":"object"},"DriftCheck":{"description":"What a finding broke.\n\n- `reserved_below_order_holds`: at one location, `reserved` is less than\n  the active order holds placed there.\n- `reserved_total_mismatch`: across a variant's locations, `reserved` is\n  not the active order holds plus the cart holds.\n- `item_reserved_mismatch`: the same for an item that has no variant.\n- `quantity_null`, `quantity_negative`, `reserved_exceeds_on_hand`: a\n  stock row that cannot be right by itself.\n- `ledger_balance_mismatch`: the last movement's balance is not `on_hand`.\n- `stock_without_ledger`: units on hand that no movement accounts for.\n- `mirror_stock_mismatch`: the item tables disagree with the stock row\n  they mirror.\n- `mirror_check_failed`: a store total of the item mirror is off:\n  variants with no item, or recent movements with no mirrored movement\n  (`details.check_name` is `items` or `movements`).\n- `hold_on_closed_order`: an active hold on a cancelled, refunded or\n  fulfilled order.\n- `hold_on_erp_store`: a hold in a store whose stock an ERP owns.\n- `expired_cart_hold`: a cart hold still there long after it expired.\n- `recipe_part_inactive`, `recipe_part_other_store`: a recipe line whose\n  part is inactive or archived, or belongs to another store.\n- `recipe_mirror_missing`, `recipe_mirror_orphan`: the two recipe tables\n  disagree about a line.\n\nThe fiscal checks (`goods_reconciliation.sql`, the documents against the\nledger):\n\n- `goods_left_without_note`: a shipment left and took stock, and no\n  authorized note covers it.\n- `note_without_movement`: an authorized sale, remessa or bonificação note\n  whose goods never left stock; a devolução de compra that took nothing\n  out; a devolução de venda whose goods never came back.\n- `inbound_note_pending`: a supplier's note still not received.\n- `inbound_reversal_pending`: a received note the supplier cancelled, with\n  the reversal waiting for a decision.\n- `note_quantity_mismatch`: a note's units differ from what its receipt\n  booked or its shipment carried.\n- `third_party_overdue`: someone else's goods held past the store's limit.\n\nThe set may grow; tolerate unknown values.","type":"string","x-extensible-enum":["reserved_below_order_holds","reserved_total_mismatch","item_reserved_mismatch","quantity_null","quantity_negative","reserved_exceeds_on_hand","ledger_balance_mismatch","stock_without_ledger","mirror_stock_mismatch","mirror_check_failed","hold_on_closed_order","hold_on_erp_store","expired_cart_hold","recipe_part_inactive","recipe_part_other_store","recipe_mirror_missing","recipe_mirror_orphan","goods_left_without_note","note_without_movement","inbound_note_pending","inbound_reversal_pending","note_quantity_mismatch","third_party_overdue"]},"DriftClass":{"description":"How much a finding matters.\n\n- `drift`: a number in the stock book is wrong now, or a hold is where\n  none should be.\n- `informational`: old data or housekeeping that does not change what is\n  available today: stock from before the ledger, recipe lines that point\n  at retired parts or differ between the two recipe tables.","enum":["drift","informational"],"type":"string"},"DropshipOrder":{"properties":{"carrier_name":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"notified_at":{"format":"date-time","type":["string","null"]},"notify_error":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"shipment_id":{"format":"uuid","type":["string","null"]},"shipped_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`pending`, `shipped` or `cancelled`.","type":"string"},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":"string"},"tracking_code":{"type":["string","null"]},"units":{"description":"Units across its lines.","format":"int64","type":"integer"}},"required":["id","order_id","supplier_name","status","created_at","units"],"type":"object"},"DryRun":{"properties":{"changes":{"description":"The first [`LISTED`] changes, newest first.","items":{"$ref":"#/components/schemas/Change"},"type":"array"},"evaluated":{"description":"Decisions replayed (the store's last [`SAMPLE`], owners' left out).","minimum":0,"type":"integer"},"newly_allowed":{"minimum":0,"type":"integer"},"newly_denied":{"minimum":0,"type":"integer"},"skipped":{"description":"Decisions whose record no longer exists.","minimum":0,"type":"integer"}},"required":["evaluated","skipped","newly_denied","newly_allowed","changes"],"type":"object"},"DryRunRequest":{"allOf":[{"$ref":"#/components/schemas/PolicyBody"},{"properties":{"replaces_policy_id":{"description":"When editing: the saved policy this body replaces. It is left out\nof the replay, so the result shows what the edit changes.","format":"uuid","type":["string","null"]},"store_id":{"description":"The store whose decisions are replayed.","format":"uuid","type":"string"},"subject":{"$ref":"#/components/schemas/SubjectSpec","description":"Who the policy would be attached to."}},"required":["subject","store_id"],"type":"object"}]},"DuplicateCandidate":{"description":"A customer that shares an e-mail or phone with another.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"reason":{"description":"What the two customers share: `email`, `document` or `phone`. Absent inside a\nduplicate group, whose `reason` says it for every member.","type":["string","null"]},"total_orders":{"format":"int32","type":"integer"},"total_spent":{"description":"Lifetime spend in cents.","format":"int32","type":"integer"}},"required":["id","total_orders","total_spent","created_at"],"type":"object"},"DuplicateGroup":{"description":"Customers that look like the same person.","properties":{"key":{"description":"The shared value: a lowercased e-mail, the CPF/CNPJ, or the last 9\nphone digits.","type":"string"},"members":{"description":"Oldest first; merge into the first to keep the original record.","items":{"$ref":"#/components/schemas/DuplicateCandidate"},"type":"array"},"reason":{"description":"What the members share: `email`, `document` (CPF/CNPJ) or `phone`.","type":"string"}},"required":["reason","key","members"],"type":"object"},"EditorDocument":{"description":"A document as the editor shows it.","properties":{"content":{"description":"The draft, else the published version, else the theme's file.","type":"object"},"has_draft":{"description":"Unpublished changes.","type":"boolean"},"path":{"type":"string"},"published_at":{"description":"When it was last published from the editor; null if never.","format":"date-time","type":["string","null"]},"revision":{"description":"Edit revision: send it back as `base_revision` when saving, so a\nchange made meanwhile elsewhere is not overwritten.","format":"int64","type":"integer"}},"required":["path","content","has_draft","revision"],"type":"object"},"EditorFrameLink":{"description":"A link for the editor's preview frame.","properties":{"expires_at":{"format":"date-time","type":"string"},"path":{"description":"API path of the frame (prefix it with the API's origin); good for\n15 minutes, only for viewing this store's draft.","type":"string"}},"required":["path","expires_at"],"type":"object"},"EditorPage":{"description":"A page or a section group the editor can open.","properties":{"format":{"description":"`sections` (editable), `theme` (built by the theme's own Liquid:\nshown in the preview, editable once converted) or `missing` (the\ntheme has none; the platform's can be added).","type":"string"},"kind":{"description":"`template` (a page) or `group` (placed by the layout, on every page).","type":"string"},"name":{"description":"The template type (`index`, `product`...) or the group name.","type":"string"},"path":{"description":"`/templates/index.json`, `/sections/header-group.json`...","type":"string"},"platform_template":{"description":"For a page type that is not made of sections yet: the platform's\ncomposition for it, to start from.","type":["object","null"]}},"required":["path","kind","name","format"],"type":"object"},"EditorSamples":{"properties":{"collection":{"type":["string","null"]},"product":{"type":["string","null"]}},"type":"object"},"EditorSectionType":{"description":"A section type the editor can add: the platform's library and the\ntheme's own sections (a theme section replaces a platform one of the\nsame type).","properties":{"name":{"type":"string"},"schema":{"description":"The section's `{% schema %}`: settings, blocks, max_blocks, presets.","type":"object"},"source":{"description":"`platform` or `theme`.","type":"string"},"type":{"type":"string"}},"required":["type","name","source","schema"],"type":"object"},"EditorShareLink":{"description":"A link to share the draft.","properties":{"expires_at":{"format":"date-time","type":"string"},"path":{"description":"API path of the preview (prefix it with the API's origin); anyone\nwith it sees the draft site for 7 days.","type":"string"}},"required":["path","expires_at"],"type":"object"},"EditorStarter":{"description":"A starter site, as the editor's gallery shows it.","properties":{"colors":{"description":"Its colors (`background`, `text`, `accent`...) for the preview card.","type":"object"},"description":{"type":"string"},"fonts":{"description":"Heading and body font families.","type":"object"},"gallery":{"$ref":"#/components/schemas/ThemeGalleryMetadata"},"id":{"type":"string"},"name":{"type":"string"},"page_links":{"items":{"$ref":"#/components/schemas/ThemePageLink"},"type":"array"},"pages":{"description":"Titles of the pages it adds.","items":{"type":"string"},"type":"array"}},"required":["id","name","description","gallery","colors","fonts","pages","page_links"],"type":"object"},"EditorState":{"description":"Everything the editor needs to open a store.","properties":{"documents":{"items":{"$ref":"#/components/schemas/EditorDocument"},"type":"array"},"fonts":{"description":"Font families the style panel offers.","items":{"type":"string"},"type":"array"},"has_unpublished":{"description":"Any document with unpublished changes.","type":"boolean"},"library":{"items":{"$ref":"#/components/schemas/EditorSectionType"},"type":"array"},"pages":{"items":{"$ref":"#/components/schemas/EditorPage"},"type":"array"},"samples":{"$ref":"#/components/schemas/EditorSamples","description":"Something live to preview the product and category pages with:\nan active, web-visible product and collection (their handles)."},"scheduled_at":{"description":"A pending scheduled publish.","format":"date-time","type":["string","null"]},"settings_schema":{"description":"The theme settings' schema (the theme's, or the platform's): groups\nof fields the Theme panel edits into `/config/settings_data.json`.","type":"object"},"store_url":{"description":"Where the store is served, for links and the live site button.","type":["string","null"]}},"required":["pages","documents","library","has_unpublished","fonts","samples","settings_schema"],"type":"object"},"EditorVersion":{"description":"A published version of the site.","properties":{"id":{"format":"uuid","type":"string"},"kind":{"description":"`publish`, `scheduled` or `restore`.","type":"string"},"label":{"type":["string","null"]},"published_at":{"format":"date-time","type":"string"},"published_by":{"description":"Who published it (name or e-mail); null for a scheduled publish.","type":["string","null"]},"restorable":{"description":"The whole site is in it (older versions only hold what changed and\ncannot be restored).","type":"boolean"}},"required":["id","published_at","kind","restorable"],"type":"object"},"EmailAbResults":{"properties":{"variants":{"items":{"$ref":"#/components/schemas/EmailAbVariantResult"},"type":"array"}},"required":["variants"],"type":"object"},"EmailAbTest":{"description":"Subject test: a sample gets A or B, the rest waits for the winner.","properties":{"enabled":{"default":false,"type":"boolean"},"metric":{"default":"","description":"`opens` or `clicks`.","type":"string"},"sample_pct":{"default":0,"description":"Share of the audience used for the test (both variants together), 10..=50.","format":"int32","minimum":0,"type":"integer"},"subject_b":{"default":"","type":"string"},"wait_minutes":{"default":0,"description":"Minutes to wait before picking the winner.","format":"int32","minimum":0,"type":"integer"}},"type":"object"},"EmailAbVariantResult":{"description":"Results of one subject variant.","properties":{"clicked":{"format":"int64","type":"integer"},"opened":{"format":"int64","type":"integer"},"sent":{"format":"int64","type":"integer"},"variant":{"description":"`A`, `B`, or null for recipients sent after the test (the winner).","type":["string","null"]}},"required":["sent","opened","clicked"],"type":"object"},"EmailActivityEvent":{"description":"Something e-mail related that happened to a contact.","properties":{"at":{"format":"date-time","type":"string"},"broadcast_id":{"format":"uuid","type":["string","null"]},"detail":{"description":"Subject, link or bounce reason.","type":["string","null"]},"kind":{"description":"`sent`, `opened`, `clicked`, `unsubscribed`, or a provider event\n(`delivery`, `bounce`, `complaint`, `reject`, `delay`, `click`).","type":"string"},"title":{"description":"Campaign name, when it came from a campaign.","type":["string","null"]}},"required":["kind","at"],"type":"object"},"EmailAttribution90d":{"properties":{"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"}},"required":["orders","revenue_cents"],"type":"object"},"EmailAudienceFilter":{"description":"Audience filter. All conditions are AND-ed; arrays inside a field\n(lifecycle, tags_any, tags_all) are OR/ALL respectively.\n\nDefault `marketing_opt_in_only=true` keeps us out of GDPR/CASL\ntrouble: only customers who explicitly opted in receive blasts.","properties":{"conditions":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmailSegmentConditions","description":"Inline conditions (same language as segments)."}]},"customer_ids":{"description":"An explicit list (resend to non-openers, one-off sends).","items":{"format":"uuid","type":"string"},"type":["array","null"]},"label":{"description":"Human label shown in the campaign list.","type":["string","null"]},"lifecycle":{"description":"Lifecycle stages (`new`, `active`, `vip`, `at_risk`, `lost`, `lead`), any of.","items":{"type":"string"},"type":"array"},"marketing_opt_in_only":{"description":"Only customers who accepted marketing. Defaults to true.","type":"boolean"},"require_email":{"description":"Unused.","type":["boolean","null"]},"segment_id":{"description":"A saved segment; its conditions are resolved at send time.","format":"uuid","type":["string","null"]},"tags_all":{"description":"Customers with all of these tags.","items":{"type":"string"},"type":"array"},"tags_any":{"description":"Customers with any of these tags.","items":{"type":"string"},"type":"array"}},"type":"object"},"EmailAudiencePreview":{"description":"How many people an audience reaches, with a few of them.","properties":{"sample":{"description":"Up to 20 of them.","items":{"$ref":"#/components/schemas/EmailAudienceSample"},"type":"array"},"total":{"description":"Reachable contacts (opted in when required, valid e-mail, not suppressed).","format":"int64","type":"integer"}},"required":["total","sample"],"type":"object"},"EmailAudienceSample":{"properties":{"customer_id":{"format":"uuid","type":"string"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]}},"required":["customer_id","email"],"type":"object"},"EmailBrandKitResponse":{"description":"The brand kit e-mails are rendered with.","properties":{"font_presets":{"description":"Font stacks the editor offers.","items":{"type":"object"},"type":"array"},"kit":{"description":"Logo, colors, fonts, radius, width, footer, voice and the rest of the\nbrand profile.","type":"object"}},"required":["kit","font_presets"],"type":"object"},"EmailBrandKitRevision":{"description":"A brand kit revised by the assistant.","properties":{"kit":{"description":"The whole kit with the patch applied.","type":"object"},"notes":{"description":"What changed and why, in Portuguese.","type":"string"},"patch":{"description":"Only the fields that changed.","type":"object"}},"required":["kit","notes","patch"],"type":"object"},"EmailBroadcast":{"description":"A campaign: one e-mail sent to an audience.","properties":{"ab_decide_at":{"format":"date-time","type":["string","null"]},"ab_test":{"description":"The `EmailAbTest` settings, when the campaign tests a second subject.","type":["object","null"]},"ab_winner":{"description":"`A` or `B` once decided.","type":["string","null"]},"audience":{"description":"The `EmailAudienceFilter` it was created with.","type":"object"},"bounced_count":{"format":"int32","type":"integer"},"clicked_count":{"format":"int32","type":"integer"},"complained_count":{"format":"int32","type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"delivered_count":{"format":"int32","type":"integer"},"design":{"type":["object","null"]},"failed_count":{"format":"int32","type":"integer"},"finished_at":{"format":"date-time","type":["string","null"]},"html":{"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"opened_count":{"format":"int32","type":"integer"},"optimize_send_time":{"type":"boolean"},"parent_broadcast_id":{"format":"uuid","type":["string","null"]},"reply_to":{"type":["string","null"]},"scheduled_at":{"format":"date-time","type":["string","null"]},"sent_count":{"format":"int32","type":"integer"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/EmailBroadcastStatus"},"store_id":{"format":"uuid","type":"string"},"subject":{"type":"string"},"template_id":{"format":"uuid","type":["string","null"]},"text_body":{"type":["string","null"]},"total_recipients":{"format":"int32","type":"integer"},"unsubscribed_count":{"format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","subject","html","audience","status","total_recipients","sent_count","failed_count","opened_count","clicked_count","unsubscribed_count","created_at","updated_at","delivered_count","bounced_count","complained_count","optimize_send_time"],"type":"object"},"EmailBroadcastStatus":{"description":"Where a campaign is in its life. Documented set; tolerate new values.","enum":["draft","scheduled","sending","testing","sent","cancelled","failed"],"type":"string"},"EmailCampaignAttribution":{"description":"Orders by recipients who opened or clicked, placed within `window_days`\nof their send.","properties":{"buyers":{"format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"window_days":{"format":"int64","type":"integer"}},"required":["orders","revenue_cents","buyers","window_days"],"type":"object"},"EmailCampaignBounce":{"properties":{"count":{"format":"int64","type":"integer"},"type":{"description":"Bounce type as the provider reports it.","type":"string"}},"required":["type","count"],"type":"object"},"EmailCampaignFunnel":{"properties":{"bounced":{"format":"int64","type":"integer"},"clicked":{"format":"int64","type":"integer"},"complained":{"format":"int64","type":"integer"},"delivered":{"format":"int64","type":"integer"},"failed":{"format":"int64","type":"integer"},"opened":{"format":"int64","type":"integer"},"sent":{"format":"int64","type":"integer"},"total":{"description":"Recipients written.","format":"int64","type":"integer"},"unsubscribed":{"format":"int64","type":"integer"}},"required":["total","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed"],"type":"object"},"EmailCampaignHour":{"properties":{"clicks":{"format":"int64","type":"integer"},"hour":{"format":"date-time","type":"string"},"opens":{"format":"int64","type":"integer"}},"required":["hour","opens","clicks"],"type":"object"},"EmailCampaignLink":{"properties":{"clicks":{"format":"int64","type":"integer"},"unique":{"description":"Distinct recipients who clicked.","format":"int64","type":"integer"},"url":{"type":"string"}},"required":["url","clicks","unique"],"type":"object"},"EmailCampaignRates":{"description":"Rates over `sent` (click-to-open over `opened`), 0 to 1.","properties":{"bounce":{"format":"double","type":"number"},"click":{"format":"double","type":"number"},"complaint":{"format":"double","type":"number"},"ctor":{"description":"Clicks over opens.","format":"double","type":"number"},"delivery":{"format":"double","type":"number"},"open":{"format":"double","type":"number"},"unsubscribe":{"format":"double","type":"number"}},"required":["delivery","open","click","ctor","bounce","complaint","unsubscribe"],"type":"object"},"EmailCampaignReport":{"description":"One campaign in depth.","properties":{"attribution":{"$ref":"#/components/schemas/EmailCampaignAttribution"},"bounces":{"items":{"$ref":"#/components/schemas/EmailCampaignBounce"},"type":"array"},"funnel":{"$ref":"#/components/schemas/EmailCampaignFunnel"},"links":{"description":"The 20 most clicked links.","items":{"$ref":"#/components/schemas/EmailCampaignLink"},"type":"array"},"rates":{"$ref":"#/components/schemas/EmailCampaignRates"},"time_to_open":{"items":{"$ref":"#/components/schemas/EmailTimeToOpenBucket"},"type":"array"},"timeline":{"description":"Opens and clicks per hour over the first 7 days.","items":{"$ref":"#/components/schemas/EmailCampaignHour"},"type":"array"}},"required":["funnel","rates","timeline","links","bounces","attribution","time_to_open"],"type":"object"},"EmailChannel":{"properties":{"address":{"type":["string","null"]},"opt_in":{"type":"boolean"},"reachable":{"description":"Has a deliverable address and marketing consent.","type":"boolean"},"source":{"type":["string","null"]},"status":{"description":"`ok`, `bounced`, `complained` or `unsubscribed`.","type":"string"}},"required":["reachable","opt_in","status"],"type":"object"},"EmailConsentSummary":{"description":"Where a contact stands for marketing e-mail.","properties":{"email_status":{"description":"`ok`, `bounced`, `complained` or `unsubscribed`.","type":"string"},"lead_score":{"format":"int32","type":"integer"},"marketing_opt_in":{"type":"boolean"},"opted_in_at":{"format":"date-time","type":["string","null"]},"source":{"description":"Where the consent came from (`checkout`, `form:<slug>`, `importacao`...).","type":["string","null"]},"topics":{"items":{"type":"string"},"type":"array"}},"required":["marketing_opt_in","email_status","lead_score","topics"],"type":"object"},"EmailContactImportForm":{"description":"The multipart form of a contact import.","properties":{"file":{"description":"CSV with a header row, comma or semicolon separated. Columns are\nmatched by name in Portuguese or English (`email`/`e-mail`, `nome`/\n`first_name`, `sobrenome`, `nome_completo`, `telefone`, `tags`,\n`opt_in`/`consentimento`); the e-mail is the key. Up to 20,000 rows.","format":"binary","type":"string"},"opt_in":{"description":"Opt contacts in when the CSV has no consent column: send `true` only\nwhen everyone on the list agreed to receive marketing. Defaults to\nfalse.","type":["boolean","null"]},"source":{"description":"Consent source recorded for new opt-ins. Defaults to `importacao`.","type":["string","null"]},"tags":{"description":"Comma-separated tags added to every contact.","type":["string","null"]}},"required":["file"],"type":"object"},"EmailContactImportResult":{"description":"What an import did.","properties":{"created":{"format":"int64","type":"integer"},"errors":{"description":"Up to 10 row errors, and a note when the row limit was hit.","items":{"type":"string"},"type":"array"},"skipped":{"description":"Rows without a valid e-mail.","format":"int64","type":"integer"},"updated":{"format":"int64","type":"integer"}},"required":["created","updated","skipped","errors"],"type":"object"},"EmailDesignCatalog":{"description":"What the block editor can build with.","properties":{"blocks":{"description":"Block types with their fields.","items":{"type":"object"},"type":"array"},"starters":{"items":{"$ref":"#/components/schemas/EmailDesignStarter"},"type":"array"},"variables":{"items":{"$ref":"#/components/schemas/EmailDesignVariable"},"type":"array"}},"required":["blocks","starters","variables"],"type":"object"},"EmailDesignStarter":{"properties":{"design":{"type":"object"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label","design"],"type":"object"},"EmailDesignVariable":{"properties":{"sample":{"description":"What it renders to in previews.","type":"string"},"token":{"description":"What to type, e.g. `{{customer.first_name}}`.","type":"string"}},"required":["token","sample"],"type":"object"},"EmailDnsRecord":{"description":"A DNS record to publish for a sending domain.","properties":{"name":{"type":"string"},"optional":{"description":"Recommended, not required for verification.","type":["boolean","null"]},"purpose":{"description":"`DKIM`, `MAIL FROM`, `SPF`, `DMARC (recomendado)`.","type":"string"},"type":{"description":"`CNAME`, `MX` or `TXT`.","type":"string"},"value":{"type":"string"}},"required":["type","name","value","purpose"],"type":"object"},"EmailDomain":{"description":"A domain the store sends e-mail from (an SES identity).","properties":{"created_at":{"format":"date-time","type":"string"},"dkim_status":{"description":"As SES reports it: `PENDING`, `SUCCESS`, `FAILED`...","type":["string","null"]},"dkim_tokens":{"items":{"type":"string"},"type":"array"},"dns_records":{"description":"What to publish in the domain's DNS, including the store-ownership\n`TXT` record.","items":{"$ref":"#/components/schemas/EmailDnsRecord"},"type":"array"},"domain":{"type":"string"},"id":{"format":"uuid","type":"string"},"last_checked_at":{"format":"date-time","type":["string","null"]},"mail_from_domain":{"type":["string","null"]},"mail_from_status":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/EmailDomainStatus"},"txt_record_name":{"description":"Name of the ownership `TXT` record (`_bp-email-verify.<domain>`). The\ndomain is verified only once SES verifies it and this record carries\nthe store's challenge.","type":["string","null"]},"verified_at":{"format":"date-time","type":["string","null"]}},"required":["id","domain","status","dkim_tokens","created_at","dns_records"],"type":"object"},"EmailDomainStatus":{"description":"Verification state of a sending domain.","enum":["pending","verified","failed"],"type":"string"},"EmailDraft":{"description":"An e-mail drafted by the assistant.","properties":{"design":{"description":"Block design, only block types from the catalog.","type":"object"},"name":{"type":"string"},"preview_text":{"type":"string"},"subject":{"type":"string"}},"required":["name","subject","preview_text","design"],"type":"object"},"EmailForm":{"description":"A subscription form.","properties":{"created_at":{"format":"date-time","type":"string"},"double_opt_in":{"description":"Ask for confirmation by e-mail before opting in.","type":"boolean"},"embed":{"$ref":"#/components/schemas/EmailFormEmbed"},"fields":{"description":"Inputs: `{key, label, type, required}`. `email` is the key field.","items":{"type":"object"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"redirect_url":{"description":"Where a browser goes after a plain (non-JSON) submit.","type":["string","null"]},"slug":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"submissions":{"format":"int32","type":"integer"},"success_message":{"type":["string","null"]},"tags":{"description":"Tags added to the contact.","items":{"type":"string"},"type":"array"},"topics":{"description":"Preference-center topics the contact joins.","items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"welcome_template_id":{"description":"Template sent once the contact is confirmed.","format":"uuid","type":["string","null"]}},"required":["id","store_id","name","slug","fields","tags","topics","double_opt_in","submissions","is_active","created_at","updated_at","embed"],"type":"object"},"EmailFormEmbed":{"description":"Ready-made embed code for a form.","properties":{"action":{"description":"Where the form posts (JSON or form-encoded).","type":"string"},"html":{"description":"A plain HTML form.","type":"string"},"js":{"description":"A script that submits the form without leaving the page.","type":"string"}},"required":["action","html","js"],"type":"object"},"EmailFormRequest":{"description":"A subscription form's settings.","properties":{"double_opt_in":{"description":"Defaults to true.","type":"boolean"},"fields":{"description":"Inputs `{key, label, type, required}`. Defaults to e-mail and first name.","items":{"type":"object"},"type":["array","null"]},"is_active":{"description":"Defaults to true.","type":"boolean"},"name":{"type":"string"},"redirect_url":{"type":["string","null"]},"slug":{"description":"Defaults to the name, slugified.","type":["string","null"]},"success_message":{"type":["string","null"]},"tags":{"items":{"type":"string"},"type":"array"},"topics":{"items":{"type":"string"},"type":"array"},"welcome_template_id":{"format":"uuid","type":["string","null"]}},"required":["name"],"type":"object"},"EmailHealth":{"description":"Deliverability of the store's campaigns over `window_days`.","properties":{"account":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SesAccountQuota","description":"The platform's SES quota; null when SES is not reachable."}]},"bounce_rate":{"description":"Over `sent`, 0 to 1.","format":"double","type":"number"},"bounced":{"format":"int64","type":"integer"},"complained":{"format":"int64","type":"integer"},"complaint_rate":{"format":"double","type":"number"},"delivered":{"format":"int64","type":"integer"},"open_rate":{"format":"double","type":"number"},"opened":{"format":"int64","type":"integer"},"provider":{"$ref":"#/components/schemas/EmailProvider"},"sent":{"format":"int64","type":"integer"},"suppressed":{"description":"Addresses on the suppression list.","format":"int64","type":"integer"},"thresholds":{"$ref":"#/components/schemas/EmailHealthThresholds"},"unsubscribed":{"format":"int64","type":"integer"},"verified_domains":{"items":{"type":"string"},"type":"array"},"window_days":{"format":"int64","type":"integer"}},"required":["window_days","sent","delivered","bounced","complained","unsubscribed","opened","bounce_rate","complaint_rate","open_rate","thresholds","suppressed","provider","verified_domains"],"type":"object"},"EmailHealthThresholds":{"properties":{"bounce_warn":{"description":"Bounce rate above which to worry (SES reviews accounts at 5%).","format":"double","type":"number"},"complaint_warn":{"description":"Complaint rate above which to worry (0.1%).","format":"double","type":"number"}},"required":["bounce_warn","complaint_warn"],"type":"object"},"EmailInboxMode":{"description":"Where customers' replies go.","enum":["conversas","reply_to"],"type":"string"},"EmailListGrowthWeek":{"properties":{"contacts":{"format":"int64","type":"integer"},"opt_ins":{"format":"int64","type":"integer"},"week":{"format":"date-time","type":"string"}},"required":["week","contacts","opt_ins"],"type":"object"},"EmailListHealth":{"properties":{"contacts":{"description":"Customers with an e-mail.","format":"int64","type":"integer"},"new_opt_ins_30d":{"format":"int64","type":"integer"},"reachable":{"description":"Opted in with a healthy address.","format":"int64","type":"integer"},"unhealthy":{"description":"Addresses that bounced, complained or unsubscribed.","format":"int64","type":"integer"}},"required":["contacts","reachable","new_opt_ins_30d","unhealthy"],"type":"object"},"EmailMessage":{"description":"A message in the archive with its content.","properties":{"content_purged_at":{"description":"Set when the content was dropped at the end of the retention period.","format":"date-time","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"delivered_at":{"format":"date-time","type":["string","null"]},"error":{"type":["string","null"]},"event":{"type":["string","null"]},"html":{"description":"The HTML as sent, to show in a sandboxed frame; `null` when only the\nfact was kept.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"sent_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"to_email":{"type":"string"}},"required":["id","kind","to_email","subject","status","sent_at"],"type":"object"},"EmailMessageSummary":{"description":"A message in the archive, without its content.","properties":{"delivered_at":{"format":"date-time","type":["string","null"]},"error":{"description":"Why it failed or bounced.","type":["string","null"]},"event":{"description":"The event that sent it, e.g. `orders.paid`.","type":["string","null"]},"has_content":{"description":"Whether what it said was kept (not for codes and private links, nor\nafter the retention period).","type":"boolean"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`order`, `auth`, `document`…","type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"sent_at":{"format":"date-time","type":"string"},"status":{"description":"`sent`, `delivered`, `delayed`, `bounced`, `complained` or `failed`.","type":"string"},"subject":{"type":"string"},"to_email":{"type":"string"}},"required":["id","kind","to_email","subject","status","sent_at","has_content"],"type":"object"},"EmailOpensByHour":{"properties":{"hour":{"description":"0 to 23, store time.","format":"int32","type":"integer"},"opens":{"format":"int64","type":"integer"}},"required":["hour","opens"],"type":"object"},"EmailOpensByWeekday":{"properties":{"opens":{"format":"int64","type":"integer"},"weekday":{"description":"0 (Sunday) to 6, store time.","format":"int32","type":"integer"}},"required":["weekday","opens"],"type":"object"},"EmailOverview":{"description":"The store's e-mail marketing at a glance.","properties":{"attribution_90d":{"$ref":"#/components/schemas/EmailAttribution90d","description":"Orders by engaged recipients within 7 days of a send, last 90 days."},"best_hours":{"description":"Opens per hour of day over 90 days.","items":{"$ref":"#/components/schemas/EmailOpensByHour"},"type":"array"},"best_weekdays":{"items":{"$ref":"#/components/schemas/EmailOpensByWeekday"},"type":"array"},"campaigns":{"description":"The last 12 sent campaigns.","items":{"$ref":"#/components/schemas/EmailOverviewCampaign"},"type":"array"},"growth":{"description":"New contacts per week over 12 weeks.","items":{"$ref":"#/components/schemas/EmailListGrowthWeek"},"type":"array"},"list":{"$ref":"#/components/schemas/EmailListHealth"}},"required":["list","growth","campaigns","best_hours","best_weekdays","attribution_90d"],"type":"object"},"EmailOverviewCampaign":{"properties":{"bounced":{"format":"int32","type":"integer"},"click_rate":{"format":"double","type":"number"},"clicked":{"format":"int32","type":"integer"},"delivered":{"format":"int32","type":"integer"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"open_rate":{"format":"double","type":"number"},"opened":{"format":"int32","type":"integer"},"sent":{"format":"int32","type":"integer"},"unsubscribed":{"format":"int32","type":"integer"}},"required":["id","name","sent","delivered","opened","clicked","bounced","unsubscribed","open_rate","click_rate"],"type":"object"},"EmailProductCard":{"description":"A product as e-mail blocks show it.","properties":{"id":{"format":"uuid","type":"string"},"image_url":{"description":"Empty when the product has no photo.","type":"string"},"price":{"description":"Formatted price (`R$ 89,90`), empty when unknown.","type":"string"},"product_id":{"description":"Same as `id`.","format":"uuid","type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"url":{"description":"Product page on the storefront.","type":"string"}},"required":["id","product_id","title","slug","url","price","image_url"],"type":"object"},"EmailProvider":{"description":"Who sends the store's e-mail.","enum":["platform","ses","resend"],"type":"string"},"EmailRecipient":{"description":"One recipient of a campaign.","properties":{"broadcast_id":{"format":"uuid","type":"string"},"click_count":{"format":"int32","type":"integer"},"clicked_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"email":{"type":"string"},"error_message":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_clicked_at":{"format":"date-time","type":["string","null"]},"last_name":{"type":["string","null"]},"last_opened_at":{"format":"date-time","type":["string","null"]},"open_count":{"format":"int32","type":"integer"},"opened_at":{"format":"date-time","type":["string","null"]},"sent_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/EmailRecipientStatus"},"store_id":{"format":"uuid","type":"string"},"unsubscribed_at":{"format":"date-time","type":["string","null"]}},"required":["id","broadcast_id","store_id","email","status","open_count","click_count","created_at"],"type":"object"},"EmailRecipientStatus":{"description":"Delivery state of one recipient. Documented set; tolerate new values.","enum":["pending","sending","sent","delivered","failed","bounced","complained","suppressed"],"type":"string"},"EmailSegment":{"description":"A saved segment.","properties":{"builtin":{"description":"Set on segments Mobiari keeps for every store (`chat_leads_quoted`):\nthey cannot be edited or deleted.","type":["string","null"]},"conditions":{"$ref":"#/components/schemas/EmailSegmentConditions"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"member_count":{"description":"Matching customers with an e-mail, counted now.","format":"int64","type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","conditions","created_at","updated_at","member_count"],"type":"object"},"EmailSegmentConditions":{"description":"A segment's rules.","properties":{"match":{"default":"all","oneOf":[{"$ref":"#/components/schemas/EmailSegmentMatch","description":"`all` (AND, the default) or `any` (OR)."}]},"rules":{"default":[],"items":{"$ref":"#/components/schemas/EmailSegmentRule"},"type":"array"}},"type":"object"},"EmailSegmentField":{"description":"A field segments can filter on.","properties":{"field":{"type":"string"},"kind":{"description":"How to edit the value: `bool`, `number`, `money` (reais), `days`,\n`text`, `list`, `tags`, `products`, `categories` or `choice`.","type":"string"},"label":{"type":"string"},"ops":{"items":{"type":"string"},"type":"array"},"options":{"description":"Allowed values for `choice` fields.","items":{"type":"string"},"type":["array","null"]}},"required":["field","label","kind","ops"],"type":"object"},"EmailSegmentMatch":{"description":"How a segment's rules combine.","enum":["all","any"],"type":"string"},"EmailSegmentMember":{"description":"A customer matching a segment.","properties":{"customer_id":{"format":"uuid","type":"string"},"email":{"type":["string","null"]},"email_status":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"last_order_at":{"format":"date-time","type":["string","null"]},"marketing_opt_in":{"type":"boolean"},"tags":{"items":{"type":"string"},"type":["array","null"]},"total_orders":{"format":"int32","type":"integer"},"total_spent":{"format":"int32","type":"integer"}},"required":["customer_id","total_orders","total_spent","marketing_opt_in"],"type":"object"},"EmailSegmentPreview":{"description":"Who a set of rules matches right now.","properties":{"count":{"description":"Matching customers.","format":"int64","type":"integer"},"reachable":{"description":"Of those, opted in with a healthy address.","format":"int64","type":"integer"},"sample":{"description":"Up to 8 of them.","items":{"$ref":"#/components/schemas/EmailSegmentMember"},"type":"array"},"with_email":{"description":"Of those, with an e-mail.","format":"int64","type":"integer"}},"required":["count","with_email","reachable","sample"],"type":"object"},"EmailSegmentRequest":{"description":"A segment's name and rules.","properties":{"conditions":{"$ref":"#/components/schemas/EmailSegmentConditions"},"description":{"type":["string","null"]},"name":{"type":"string"}},"required":["name","conditions"],"type":"object"},"EmailSegmentRule":{"description":"One condition: a field, an operator and a value, from the field catalog\n(`GET .../email/segments/fields`).","properties":{"field":{"default":"","description":"e.g. `total_orders`, `last_order`, `tags`.","type":"string"},"op":{"default":"","description":"One of the field's `ops`, e.g. `gte`, `within_days`, `any`.","type":"string"},"value":{"oneOf":[{"$ref":"#/components/schemas/EmailSegmentRuleValue","description":"A number, a string, a boolean or a list of strings, per the field's `kind`."}]}},"type":"object"},"EmailSegmentRuleValue":{"description":"A rule's value; its type follows the field's `kind`.","oneOf":[{"type":"boolean"},{"format":"double","type":"number"},{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"EmailSendCap":{"description":"Today's send cap.","properties":{"exhausted":{"description":"Over the cap: more sends wait until tomorrow.","type":"boolean"},"hold":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CampaignHold","description":"Campaigns are held: queued e-mails wait until it is lifted."}]},"limit":{"description":"Marketing e-mails allowed today; null when unlimited.","format":"int64","type":["integer","null"]},"sent_today":{"format":"int64","type":"integer"},"source":{"description":"`manual` (pinned in the settings), `warmup` (new SES domain), `trial`\n(free trial on Mobiari's address) or `none`.","type":"string"},"warmup_day":{"description":"Day of the warm-up, from 1.","format":"int64","type":["integer","null"]}},"required":["sent_today","source","exhausted"],"type":"object"},"EmailSettings":{"description":"The store's e-mail sending settings. The Resend API key never leaves the\nserver: reads only say whether one is set.","properties":{"from_email":{"type":["string","null"]},"from_name":{"type":["string","null"]},"inbox_available":{"description":"Whether this deployment has the platform inbox at all.","type":"boolean"},"inbox_mode":{"$ref":"#/components/schemas/EmailInboxMode"},"provider":{"$ref":"#/components/schemas/EmailProvider"},"reply_address":{"description":"The platform reply address used when `inbox_mode` is `conversas`.","type":["string","null"]},"reply_to":{"type":["string","null"]},"resend_configured":{"description":"A Resend API key is stored.","type":"boolean"},"topics":{"description":"Topics offered in the subscriber preference center.","items":{"type":"string"},"type":"array"}},"required":["resend_configured","provider","topics","inbox_mode","inbox_available"],"type":"object"},"EmailSuppression":{"description":"An address the store never e-mails.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"reason":{"description":"`bounce`, `complaint`, `unsubscribe` or `manual`.","type":"string"},"source":{"description":"Who added it (`admin`, `ses`, `link`...).","type":["string","null"]}},"required":["id","email","reason","created_at"],"type":"object"},"EmailTemplate":{"description":"A marketing e-mail template.","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"design":{"description":"Block design the editor works on; `html` is compiled from it when present.","type":["object","null"]},"html":{"type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"preview_text":{"type":["string","null"]},"reply_to":{"type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"subject":{"type":"string"},"text_body":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","subject","html","is_active","created_at","updated_at"],"type":"object"},"EmailTimeToOpenBucket":{"properties":{"bucket":{"description":"`1h`, `6h`, `24h`, `3d` or `later`.","type":"string"},"count":{"format":"int64","type":"integer"}},"required":["bucket","count"],"type":"object"},"EnableTotpRequest":{"properties":{"totp_code":{"description":"A current code from the authenticator app, proving it was set up.","example":"123456","type":"string"}},"required":["totp_code"],"type":"object"},"Entity":{"description":"The kinds of record that can carry fields.","enum":["customer","product","variant"],"type":"string"},"EntityCounts":{"properties":{"created":{"format":"int64","minimum":0,"type":"integer"},"failed":{"description":"Could not be written; see the run's issues.","format":"int64","minimum":0,"type":"integer"},"seen":{"description":"Items read from the source.","format":"int64","minimum":0,"type":"integer"},"skipped":{"description":"Left out by the source (a sheet row with an error).","format":"int64","minimum":0,"type":"integer"},"updated":{"format":"int64","minimum":0,"type":"integer"}},"required":["seen","created","updated","skipped","failed"],"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"},"ErpHealthChecks":{"properties":{"can_fetch_account_info":{"description":"Tiny's `/info` answered with success.","type":"boolean"},"has_access_token":{"type":"boolean"},"provider_status":{"description":"Tiny's HTTP status for `/info`, when it was called.","format":"int32","minimum":0,"type":["integer","null"]}},"required":["has_access_token","can_fetch_account_info"],"type":"object"},"ErpImportStarted":{"description":"A background job accepted.","properties":{"job_id":{"description":"The sync log that tracks the job (`getErpSyncLog`).","format":"uuid","type":"string"},"message":{"type":"string"},"status":{"description":"Always `accepted`.","type":"string"}},"required":["status","job_id","message"],"type":"object"},"ErpProvider":{"description":"An ERP connection of the store. Secrets in `config_json` (OAuth app\nsecret, access and refresh tokens) come back masked.","properties":{"code":{"description":"The integration's code in the capability registry, e.g. `tiny_erp`.","type":"string"},"config_json":{"description":"Connection settings; the fields depend on `code`.","type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","code","config_json","is_active","is_default","created_at","updated_at"],"type":"object"},"ErpProviderCreateRequest":{"properties":{"code":{"description":"The integration's code, e.g. `tiny_erp`.","type":"string"},"config_json":{"type":["object","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"is_default":{"description":"Makes it the store's default ERP (unsetting the others). Defaults to\nfalse.","type":["boolean","null"]},"name":{"type":"string"}},"required":["name","code"],"type":"object"},"ErpProviderHealth":{"properties":{"checks":{"$ref":"#/components/schemas/ErpHealthChecks"},"healthy":{"type":"boolean"},"provider_body":{"description":"Tiny's error body when `/info` failed.","type":["string","null"]},"provider_code":{"type":"string"},"status":{"$ref":"#/components/schemas/ErpProviderStatus"}},"required":["provider_code","healthy","status","checks"],"type":"object"},"ErpProviderStatus":{"description":"Connection and sync state kept for an ERP provider.","properties":{"auto_sync_interval_minutes":{"description":"Minutes between scheduled syncs: the provider's setting, or the\ndefault (60) when it has none. `0` when the scheduled sync is off.","format":"int64","type":["integer","null"]},"connected":{"description":"Holds an access or refresh token.","type":"boolean"},"last_error":{"type":["string","null"]},"last_error_at":{"format":"date-time","type":["string","null"]},"last_sync_at":{"description":"When the last successful stock sync finished: a run that reached the\nend and applied Tiny's figures to (nearly) every item it set out to.\nRuns that failed or wrote little do not move it; `listErpSyncLogs`\nhas every attempt.","format":"date-time","type":["string","null"]},"last_sync_status":{"description":"`ok`, `partial` (some items failed) or `error` (the run failed).","type":["string","null"]},"needs_reauth":{"description":"The refresh token stopped working: authorize again.","type":"boolean"},"token_expires_at":{"type":["string","null"]},"token_refreshed_at":{"format":"date-time","type":["string","null"]},"webhook_configured":{"type":"boolean"},"webhook_url":{"description":"The stock webhook URL (with its secret) to paste into Tiny.","type":["string","null"]}},"required":["connected","needs_reauth","webhook_configured"],"type":"object"},"ErpProviderUpdateRequest":{"description":"Fields to change; omitted ones stay.","properties":{"config_json":{"description":"Merged into the stored settings. Masked placeholders sent back\nunchanged keep the stored secret.","type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"type":["boolean","null"]},"name":{"type":["string","null"]}},"type":"object"},"ErpSyncLog":{"description":"One run of an ERP sync or import.","properties":{"component_count":{"format":"int32","type":"integer"},"details":{"description":"Per-item outcomes and errors.","type":["object","null"]},"error_count":{"format":"int32","type":"integer"},"finished_at":{"description":"Null while running. A run that stops reporting for 30 minutes is\nclosed as failed (`details.stalled`); one still at work is not,\nhowever long it takes.","format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kit_count":{"format":"int32","type":"integer"},"running":{"type":"boolean"},"skipped_count":{"format":"int32","type":"integer"},"started_at":{"format":"date-time","type":"string"},"synced_count":{"format":"int32","type":"integer"},"total_fetched":{"format":"int32","type":"integer"},"trigger":{"description":"`manual`, `auto`, `webhook` or `import`.","type":"string"}},"required":["id","trigger","started_at","running","total_fetched","synced_count","kit_count","component_count","skipped_count","error_count"],"type":"object"},"ErpSyncPreview":{"description":"What a dry-run sync would change.","properties":{"component_count":{"format":"int64","type":"integer"},"dry_run":{"type":"boolean"},"error_count":{"minimum":0,"type":"integer"},"errors":{"description":"Per-item problems, as Tiny and the matcher reported them.","items":{"type":"object"},"type":"array"},"kit_count":{"format":"int64","type":"integer"},"location_id":{"format":"uuid","type":"string"},"skipped_count":{"format":"int64","type":"integer"},"synced_count":{"format":"int64","type":"integer"},"total_fetched":{"format":"int64","type":"integer"},"trigger":{"description":"`manual`.","type":"string"}},"required":["trigger","dry_run","location_id","total_fetched","synced_count","kit_count","component_count","skipped_count","error_count","errors"],"type":"object"},"ErpSyncStarted":{"description":"A background sync accepted.","properties":{"message":{"type":"string"},"started":{"type":"boolean"}},"required":["started","message"],"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"},"EventRow":{"allOf":[{"$ref":"#/components/schemas/StoredEvent"},{"properties":{"data":{"description":"What webhooks receive: `object`, the public object the event is about\nas it was when the event was dispatched (`null` until then), and\n`details`, the event's own facts. Both are left out (`object` null,\n`details` empty, `withheld` naming the permission) for a caller who\nmay not read that kind of object.","type":"object"},"status":{"$ref":"#/components/schemas/EventStatus"}},"required":["status","data"],"type":"object"}]},"EventStatus":{"description":"Where an event is in delivery.","enum":["dispatched","pending","failed"],"type":"string"},"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"},"ExplainReason":{"description":"What produced a decision.","properties":{"id":{"description":"`owner` (of the store or of its organization), `grant:<policy>@<attachment>`\n(a permission set), `policy:<policy>@<attachment>` (a rule),\n`cedar:<policy>@<attachment>`, `token_scope` or `engine_error`.","type":"string"},"kind":{"description":"`owner`, `grant`, `policy`, `cedar`, `token_scope`, `engine_error`.","type":"string"},"name":{"description":"The policy's name, with the group it came through when any.","type":["string","null"]}},"required":["id","kind"],"type":"object"},"ExportPlatform":{"description":"The platform whose export a spreadsheet is.","enum":["shopify","nuvemshop","woocommerce","bling","tiny","tray"],"type":"string"},"ExternalContext":{"description":"What the company's system answered about the customer.","properties":{"error":{"description":"Why the last call failed, when it did (the fields are the last good\nanswer, if any).","type":["string","null"]},"fetched_at":{"format":"date-time","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/ContextField"},"type":"array"},"links":{"description":"Shortcuts into the company's own tools (https links).","items":{"$ref":"#/components/schemas/ContextField"},"type":"array"},"title":{"type":["string","null"]}},"required":["fields","links","fetched_at"],"type":"object"},"ExternalInvoiceInput":{"properties":{"issued_on":{"description":"The day it was issued; today when omitted.","format":"date","type":["string","null"]},"number":{"description":"The NFS-e number the other system gave (up to 20 characters).","type":"string"},"source":{"description":"`contabilizei`, `portal` or `other`.","type":"string"}},"required":["number","source"],"type":"object"},"FeatureInfo":{"properties":{"id":{"type":"string"},"requires":{"description":"Features that must be on for this one.","items":{"type":"string"},"type":"array"}},"required":["id","requires"],"type":"object"},"FieldOption":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["value","label"],"type":"object"},"FieldType":{"enum":["text","password","boolean","select","multi_select","number","file"],"type":"string"},"FindingState":{"description":"Where a finding stands.","enum":["open","ignored","resolved"],"type":"string"},"FireWorkflowRequest":{"properties":{"customer_id":{"description":"Run for this customer (of the store); otherwise the run has no\ncustomer.","format":"uuid","type":["string","null"]},"dry_run":{"description":"Simulate: steps with side effects describe instead of act. Always on\nfor a workflow that was never published.","type":"boolean"},"payload":{"description":"Surfaces in the run as `trigger_payload`.","type":["object","null"]}},"type":"object"},"FiscalCertificate":{"properties":{"cnpj":{"description":"CNPJ from the ICP-Brasil SAN (OID 2.16.76.1.3.3) or the CN suffix.","type":["string","null"]},"fingerprint_sha256":{"type":"string"},"issuer":{"type":"string"},"not_after":{"format":"date-time","type":"string"},"not_before":{"format":"date-time","type":"string"},"serial":{"type":"string"},"subject":{"type":"string"}},"required":["subject","issuer","serial","not_before","not_after","fingerprint_sha256"],"type":"object"},"FiscalCertificateInput":{"properties":{"password":{"type":"string"},"pfx_base64":{"description":"The `.pfx`/`.p12` file, base64.","type":"string"}},"required":["pfx_base64","password"],"type":"object"},"FiscalComplementRequest":{"description":"What to add to the note, and why.","properties":{"items":{"items":{"$ref":"#/components/schemas/NfeComplementLine"},"type":"array"},"reason":{"description":"Printed after the reference to the note (`infCpl`).","type":["string","null"]}},"required":["items"],"type":"object"},"FiscalCorrection":{"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"},"issuer_id":{"description":"The issuer (CNPJ) the carta went out under: the note's emitter.","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"]},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","issuer_id","environment","access_key","sequence","correction","status","nfe","created_at","updated_at"],"type":"object"},"FiscalCorrectionNfe":{"description":"What the CC-e print shows about the corrected note, read from its XML.","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"]},"serie":{"type":["string","null"]}},"type":"object"},"FiscalDispatchPlaceInput":{"description":"Where the goods leave from, when it is not the emitter's address.","properties":{"place":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalPlaceInput","description":"The place, or null when goods leave from the emitter's address."}]}},"type":"object"},"FiscalDocument":{"properties":{"access_key":{"type":"string"},"attempts":{"format":"int32","type":"integer"},"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"},"gnre_cents":{"description":"The ICMS-ST (with FCP-ST) the note retains for another state where the\nissuer has no IE as substitute: paid by GNRE, per note, before the\ngoods leave (Conv 142/2018 cl. 18ª). Zero otherwise.","format":"int64","type":"integer"},"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"},"return_id":{"description":"The return request a return note belongs to.","format":"uuid","type":["string","null"]},"serie":{"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"]},"store_id":{"format":"uuid","type":"string"},"total_cents":{"format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","store_id","issuer_id","purpose","environment","model","offline","serie","number","access_key","status","issued_at","total_cents","attempts","created_at","updated_at"],"type":"object"},"FiscalDocumentDetail":{"properties":{"direction":{"$ref":"#/components/schemas/NfeDirection"},"document":{"$ref":"#/components/schemas/FiscalDocument"},"finality":{"$ref":"#/components/schemas/NfeFinality","description":"`finNFe`, and `tpNF`."},"items":{"description":"The note's items as issued, for a complement to name them by\n`index` (`POST .../complement`).","items":{"$ref":"#/components/schemas/FiscalDocumentItem"},"type":"array"},"references":{"description":"The notes this one references (a return's or a complement's).","items":{"type":"string"},"type":"array"},"transmissions":{"items":{"$ref":"#/components/schemas/SefazTransmission"},"type":"array"}},"required":["document","transmissions","finality","direction"],"type":"object"},"FiscalDocumentItem":{"description":"One item of a stored note.","properties":{"cfop":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"has_st":{"description":"The item retained ICMS-ST (it can take an ST complement).","type":"boolean"},"icms_by_cst":{"description":"The item carries ICMS by CST (it can take an ICMS complement).","type":"boolean"},"index":{"description":"From 0: what a complement line's `item` names.","minimum":0,"type":"integer"},"quantity_e4":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["index","code","description","cfop","quantity_e4","total_cents","icms_by_cst","has_st"],"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"},"FiscalEnvironment":{"description":"`tpAmb`: which SEFAZ database the document goes to. Homologação notas\nhave no fiscal value and use their own numbering.","enum":["producao","homologacao"],"type":"string"},"FiscalEnvironmentInput":{"properties":{"environment":{"description":"`homologacao` or `producao`.","type":"string"}},"required":["environment"],"type":"object"},"FiscalFutureDeliveryInput":{"description":"The store's venda para entrega futura codes.","properties":{"billing_csosn":{"description":"CSOSN of the simples faturamento (5922/6922).","type":"string"},"billing_nature":{"type":["string","null"]},"delivery_cfop":{"description":"Remessa CFOP family: `5117` (goods bought from third parties, with\n6117 out of state) or `5116` (goods the store produces, with 6116).","type":"string"},"delivery_csosn":{"description":"CSOSN of the remessas.","type":"string"},"delivery_nature":{"type":["string","null"]}},"required":["billing_csosn","delivery_csosn","delivery_cfop"],"type":"object"},"FiscalGiftInput":{"description":"The store's nota de bonificação codes.","properties":{"csosn":{"description":"CSOSN of the nota de bonificação (CFOP 5910/6910): 102 like the\nsales, or 400 when the accountant treats the gift as not taxed.","type":"string"},"nature":{"type":["string","null"]}},"required":["csosn"],"type":"object"},"FiscalIbptFill":{"properties":{"approx_tax_rate":{"format":"int32","type":["integer","null"]},"error":{"description":"Why this class was not filled.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"ok":{"type":"boolean"}},"required":["id","name","ok"],"type":"object"},"FiscalIssue":{"properties":{"code":{"description":"Stable machine code, e.g. `invalid_ncm`.","type":"string"},"message":{"description":"Portuguese message for the merchant.","type":"string"},"path":{"description":"Where: `emitter.ie`, `items[0].ncm`, `totals`.","type":"string"},"severity":{"$ref":"#/components/schemas/FiscalIssueSeverity"}},"required":["severity","path","code","message"],"type":"object"},"FiscalIssueSeverity":{"enum":["error","warning"],"type":"string"},"FiscalIssuer":{"description":"One of the store's issuers, as the list shows it.","properties":{"cert_not_after":{"format":"date-time","type":["string","null"]},"channel_count":{"description":"Sales channels that name this issuer.","format":"int64","type":"integer"},"city_name":{"type":"string"},"cnpj":{"type":"string"},"crt":{"description":"`simples_nacional`, `mei`, `simples_excesso_sublimite` or `regime_normal`.","type":"string"},"environment":{"description":"`homologacao` or `producao`.","type":"string"},"has_certificate":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"ie":{"type":"string"},"is_default":{"description":"The default issuer: the company profile's CNPJ. Edited in \"Dados da\nempresa\"; it cannot be deleted.","type":"boolean"},"label":{"description":"The name and CNPJ, as the admin shows it.","type":"string"},"legal_name":{"type":"string"},"location_count":{"description":"Store locations that name this issuer.","format":"int64","type":"integer"},"name":{"description":"What the team calls a branch; null for the default.","type":["string","null"]},"nfce_enabled":{"type":"boolean"},"nfce_serie":{"format":"int32","type":["integer","null"]},"problems":{"description":"What would block emission (the readiness checklist says the rest).","items":{"type":"string"},"type":"array"},"production_enabled_at":{"format":"date-time","type":["string","null"]},"serie":{"format":"int32","type":"integer"},"trade_name":{"type":["string","null"]},"uf":{"type":"string"}},"required":["id","is_default","label","cnpj","ie","legal_name","crt","uf","city_name","environment","has_certificate","nfce_enabled","serie","problems","channel_count","location_count"],"type":"object"},"FiscalIssuerInput":{"description":"A branch's identity: who the NF-e says issued it.","properties":{"cep":{"type":"string"},"city_code":{"description":"IBGE code; looked up from `city_name` and `uf` when omitted.","type":["string","null"]},"city_name":{"type":"string"},"cnae":{"description":"CNAE, 7 digits.","type":["string","null"]},"cnpj":{"type":"string"},"complement":{"type":["string","null"]},"crt":{"description":"`simples_nacional`, `mei`, `simples_excesso_sublimite` or `regime_normal`.","type":"string"},"district":{"type":"string"},"ie":{"description":"The state registration in the branch's state (digits). Required.","type":"string"},"ie_st":{"description":"IE as substitute taxpayer (IEST), when the branch has one.","type":["string","null"]},"im":{"description":"Municipal registration.","type":["string","null"]},"legal_name":{"description":"Razão social, 2 to 60 characters.","type":"string"},"name":{"description":"What the team calls it (\"Filial Rio\"), 1 to 60 characters.","type":"string"},"number":{"type":"string"},"phone":{"type":["string","null"]},"pis_cofins_regime":{"description":"Regime normal: `cumulative` (Lucro Presumido) or `non_cumulative`\n(Lucro Real) PIS/COFINS.","type":["string","null"]},"serie":{"description":"The NF-e series of a new branch (0 to 889, default 1). Changed later\nwith `PUT /fiscal/profile?issuer_id=`. Ignored on an update.","format":"int32","type":["integer","null"]},"street":{"type":"string"},"trade_name":{"type":["string","null"]},"uf":{"type":"string"}},"required":["name","cnpj","ie","legal_name","crt","street","number","district","city_name","uf","cep"],"type":"object"},"FiscalNfceSettingsInput":{"properties":{"csc_id":{"description":"The CSC the state's SEFAZ gave the store: its id and secret. Both or\nneither; the secret is stored encrypted and never returned. Needed by\nQR Code version 2 only.","format":"int64","type":["integer","null"]},"csc_token":{"type":["string","null"]},"enabled":{"description":"Whether the store issues NFC-e.","type":"boolean"},"serie":{"description":"The NFC-e series, 0 to 889 and different from the NF-e series.\nRequired to enable.","format":"int32","type":["integer","null"]}},"required":["enabled"],"type":"object"},"FiscalNumberingInput":{"properties":{"model":{"description":"`nfe` (default) or `nfce`: whose série the number is for.","type":["string","null"]},"next_number":{"description":"The next nNF in production for the profile's série: one after the\nlast NF-e the store issued in that série anywhere.","format":"int64","type":"integer"}},"required":["next_number"],"type":"object"},"FiscalPlaceInput":{"properties":{"cep":{"type":"string"},"city_code":{"description":"IBGE code; looked up from `city_name` + `uf` when omitted.","type":["string","null"]},"city_name":{"type":"string"},"complement":{"type":["string","null"]},"district":{"type":"string"},"holder_document":{"description":"CPF or CNPJ of whoever holds the place. The NF-e takes one document:\nfor a house shared by several people, one of their CPFs (and every\nname in `holder_name`).","type":"string"},"holder_name":{"type":["string","null"]},"number":{"type":"string"},"phone":{"type":["string","null"]},"street":{"type":"string"},"uf":{"type":"string"}},"required":["holder_document","street","number","district","city_name","uf","cep"],"type":"object"},"FiscalPreview":{"properties":{"draft":{"$ref":"#/components/schemas/NfeDraft","description":"The draft as it would be sent (number = the next one, not reserved)."},"report":{"$ref":"#/components/schemas/FiscalReport"},"totals":{"$ref":"#/components/schemas/NfeTotals"},"xml":{"description":"Unsigned XML.","type":"string"}},"required":["report","draft","totals","xml"],"type":"object"},"FiscalProfile":{"properties":{"additional_info":{"type":["string","null"]},"auto_emit":{"description":"`off`, `on_paid` or `on_packed` (see the `fiscal_auto_emit` worker).","type":"string"},"auto_emit_since":{"format":"date-time","type":["string","null"]},"cep":{"type":"string"},"cert_cnpj":{"type":["string","null"]},"cert_fingerprint":{"type":["string","null"]},"cert_not_after":{"format":"date-time","type":["string","null"]},"cert_not_before":{"format":"date-time","type":["string","null"]},"cert_subject":{"type":["string","null"]},"cert_uploaded_at":{"format":"date-time","type":["string","null"]},"city_code":{"type":"string"},"city_name":{"type":"string"},"cnae":{"type":["string","null"]},"cnpj":{"type":"string"},"complement":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"crt":{"description":"`simples_nacional`, `mei` (supported), `simples_excesso_sublimite`\n(refused at emission), `regime_normal` (item taxes resolved by the\ntax engine in `commerce::invoicing`).","type":"string"},"default_tax_class_id":{"format":"uuid","type":["string","null"]},"dispatch_place":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfePlace","description":"Where the goods leave from when not the emitter's address: the\nNF-e `retirada` of shipped and picked-up orders."}]},"district":{"type":"string"},"environment":{"description":"`homologacao` or `producao`.","type":"string"},"future_billing_cfop_internal":{"description":"Venda para entrega futura: the simples faturamento's CFOP (5922 /\n6922), CSOSN and natureza, and the remessas' (5116/5117 / 6116/6117).","type":"string"},"future_billing_cfop_interstate":{"type":"string"},"future_billing_csosn":{"type":"string"},"future_billing_nature":{"type":"string"},"future_delivery_cfop_internal":{"type":"string"},"future_delivery_cfop_interstate":{"type":"string"},"future_delivery_csosn":{"type":"string"},"future_delivery_nature":{"type":"string"},"gift_csosn":{"description":"Nota de bonificação (doação ou brinde): the CSOSN and natureza.","type":"string"},"gift_nature":{"type":"string"},"has_certificate":{"type":"boolean"},"has_nfce_csc":{"type":"boolean"},"ibs_cbs_regular":{"description":"Simples Nacional (CRT 1, 2) that opted for the regular IBS/CBS regime\n(NT 2026.005: `tpRegimeIBSCBS` 1 and the regular group).","type":"boolean"},"id":{"description":"The issuer's id. The store's default issuer (the company profile's\nCNPJ) has the store's id.","format":"uuid","type":"string"},"ie":{"type":"string"},"ie_st":{"description":"IE of the substitute taxpayer (IEST), written on the NF-e when set.","type":["string","null"]},"im":{"type":["string","null"]},"is_default":{"description":"The store's default issuer: its identity is the company profile\n(\"Dados da empresa\"). Another issuer is a branch (filial) with its\nown CNPJ, IE and address.","type":"boolean"},"issue_loss_notes":{"description":"Whether a stock adjustment for a loss (damaged, lost, theft,\nexpired) issues the NF-e de baixa de estoque (5.927): `off`, `ask`\n(when the adjustment asks for it, `loss_note: true`) or `always`.","type":"string"},"legal_name":{"type":"string"},"name":{"description":"What the team calls a branch (\"Filial Rio\"); null for the default.","type":["string","null"]},"nature":{"type":"string"},"nfce_csc_id":{"description":"The CSC's id as the state gave it. The secret never leaves the\ndatabase in a response: `has_nfce_csc` says whether it is stored.","format":"int32","type":["integer","null"]},"nfce_enabled":{"description":"The store emits NFC-e (counter sales).","type":"boolean"},"nfce_serie":{"description":"The NFC-e series, different from `serie`; None until chosen.","format":"int32","type":["integer","null"]},"number":{"type":"string"},"phone":{"type":["string","null"]},"pis_cofins_regime":{"description":"Regime normal: PIS/COFINS `cumulative` (Lucro Presumido) or\n`non_cumulative` (Lucro Real). None until the store says; a\nregime-normal store cannot issue without it.","type":["string","null"]},"production_enabled_at":{"format":"date-time","type":["string","null"]},"registration_checked_at":{"description":"Last SEFAZ registry check of the emitter.","format":"date-time","type":["string","null"]},"registration_ie":{"description":"The IE SEFAZ has on file for the CNPJ.","type":["string","null"]},"registration_message":{"type":["string","null"]},"registration_ok":{"type":["boolean","null"]},"serie":{"format":"int32","type":"integer"},"sn_credit_rate":{"description":"pCredSN (CSOSN 101, 201) typed by the store, percent × 10^4. It\noverrides the one derived from `sn_rbt12_cents` ([`Profile::credit_rate`]).","format":"int32","type":["integer","null"]},"sn_rbt12_cents":{"description":"Simples Nacional revenue of the last twelve months (RBT12), cents, and\nthe month (its first day) it is for.","format":"int64","type":["integer","null"]},"sn_rbt12_month":{"format":"date","type":["string","null"]},"st_registrations":{"description":"IE as substitute taxpayer per state (`{\"RJ\": \"123\"}`): the IEST of a\nnote retaining ST to that state.","type":"object"},"store_id":{"format":"uuid","type":"string"},"street":{"type":"string"},"trade_name":{"type":["string","null"]},"uf":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","is_default","environment","cnpj","ie","legal_name","crt","street","number","district","city_code","city_name","uf","cep","serie","nature","auto_emit","issue_loss_notes","has_certificate","nfce_enabled","has_nfce_csc","future_billing_cfop_internal","future_billing_cfop_interstate","future_delivery_cfop_internal","future_delivery_cfop_interstate","future_billing_csosn","future_delivery_csosn","future_billing_nature","future_delivery_nature","gift_csosn","gift_nature","created_at","updated_at"],"type":"object"},"FiscalProfileInput":{"properties":{"additional_info":{"type":["string","null"]},"auto_emit":{"description":"`off`, `on_paid` (an order's note once it is paid) or `on_packed`\n(a shipment's note once its boxes are confirmed).","type":["string","null"]},"cep":{"type":["string","null"]},"city_code":{"type":["string","null"]},"city_name":{"type":["string","null"]},"cnae":{"type":["string","null"]},"cnpj":{"description":"Deprecated: the emitter's identity is the company profile\n(`PUT /stores/{store_id}/legal-info`). Accepted when equal to it;\na different CNPJ or IE is refused with `fiscal_identity_moved`.\nThe other identity fields are ignored.","type":["string","null"]},"complement":{"type":["string","null"]},"crt":{"type":["string","null"]},"default_tax_class_id":{"format":"uuid","type":["string","null"]},"district":{"type":["string","null"]},"ibs_cbs_regular":{"description":"Simples Nacional (CRT 1, 2): opted for the regular IBS/CBS regime\n(NT 2026.005: `tpRegimeIBSCBS` 1 and the regular group). Absent keeps\nthe saved value.","type":["boolean","null"]},"ie":{"type":["string","null"]},"im":{"type":["string","null"]},"issue_loss_notes":{"description":"Whether a stock adjustment for a loss (damaged, lost, theft,\nexpired) issues the NF-e de baixa de estoque (5.927): `off`, `ask`\n(the adjustment says, `loss_note`) or `always`. Absent keeps the\nsaved value (`ask` at first).","type":["string","null"]},"legal_name":{"type":["string","null"]},"nature":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"pis_cofins_regime":{"description":"Regime normal: `cumulative` (Lucro Presumido) or `non_cumulative`\n(Lucro Real) PIS/COFINS. Absent keeps the saved value.","type":["string","null"]},"serie":{"format":"int32","type":["integer","null"]},"sn_credit_rate":{"description":"pCredSN for CSOSN 101 and 201, percent × 10^4 (2.56% = 25600): a\nvalue typed here overrides the one derived from `sn_rbt12_cents`.","format":"int32","type":["integer","null"]},"sn_rbt12_cents":{"description":"Simples Nacional: the revenue of the last twelve months (RBT12), in\ncents, and the month it was computed for (any day of it). pCredSN is\nderived from it (LC 123 Anexo I) unless `sn_credit_rate` is set.","format":"int64","type":["integer","null"]},"sn_rbt12_month":{"format":"date","type":["string","null"]},"st_registrations":{"additionalProperties":{"type":"string"},"description":"The IE as substitute taxpayer (IEST) the issuer holds in other\nstates, by UF (`{\"RJ\": \"12345678\"}`). Absent keeps the saved map.","propertyNames":{"type":"string"},"type":["object","null"]},"street":{"type":["string","null"]},"trade_name":{"type":["string","null"]},"uf":{"type":["string","null"]}},"type":"object"},"FiscalProfileView":{"properties":{"next_number_homologacao":{"description":"Next number per environment for the profile's série (production:\nnull until confirmed).","format":"int64","type":["integer","null"]},"next_number_producao":{"format":"int64","type":["integer","null"]},"nfce_next_number_homologacao":{"description":"The same for the NFC-e series (null until the store chooses one).","format":"int64","type":["integer","null"]},"nfce_next_number_producao":{"format":"int64","type":["integer","null"]},"nfce_production_numbering_confirmed":{"type":"boolean"},"problems":{"description":"Problems that would block emission.","items":{"type":"string"},"type":"array"},"production_numbering_confirmed":{"type":"boolean"},"profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalProfile","description":"None until the store saves its fiscal data."}]},"sn_bracket":{"format":"int32","minimum":0,"type":["integer","null"]},"sn_credit_rate_from_rbt12":{"description":"The pCredSN the profile's RBT12 gives (LC 123 Anexo I), percent × 10^4,\nand its bracket (1 to 6); what CSOSN 101 and 201 use unless\n`profile.sn_credit_rate` overrides it.","format":"int32","type":["integer","null"]},"voiding_unavailable":{"description":"SEFAZ has dropped the voiding (inutilização) service for this state:\nskipped numbers are simply left unused. Only set once SEFAZ said so.","type":["boolean","null"]}},"required":["problems","production_numbering_confirmed","nfce_production_numbering_confirmed"],"type":"object"},"FiscalRate":{"description":"A percentage with four decimals: `Rate(12_500)` is 1.25%.","format":"int32","minimum":0,"type":"integer"},"FiscalReadiness":{"properties":{"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"items":{"items":{"$ref":"#/components/schemas/FiscalReadinessItem"},"type":"array"},"ready_for_production":{"type":"boolean"}},"required":["environment","ready_for_production","items"],"type":"object"},"FiscalReadinessItem":{"properties":{"advisory":{"description":"Never gates production: a warning only.","type":"boolean"},"key":{"description":"`profile`, `certificate`, `registration`, `homologation_status`,\n`homologation_authorized`, `homologation_cancelled`, `production_numbering`,\n`fiscal_responsibility` (once Mobiari's term is in force),\n`approx_taxes` (advisory: does not hold production back).","type":"string"},"message":{"type":"string"},"ok":{"type":"boolean"}},"required":["key","ok","advisory","message"],"type":"object"},"FiscalReport":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/FiscalIssue"},"type":"array"}},"required":["issues"],"type":"object"},"FiscalStRule":{"properties":{"agreement":{"type":["string","null"]},"base_reduction_bp":{"format":"int32","minimum":0,"type":["integer","null"]},"evidence":{"description":"The citation: law, address, the sentence that decides, confidence.","type":["string","null"]},"fcp_bp":{"format":"int32","minimum":0,"type":["integer","null"]},"mva_applied_bp":{"description":"The MVA a regime-normal seller applies on this pair, goods of\nnational origin (adjusted between states where the destination adjusts).","format":"int32","minimum":0,"type":["integer","null"]},"mva_bp":{"description":"Original MVA, basis points.","format":"int32","minimum":0,"type":["integer","null"]},"segment":{"type":["string","null"]},"source":{"type":"string"},"st_rate_bp":{"format":"int32","minimum":0,"type":["integer","null"]},"subject":{"description":"Under ST for this pair (true), or verified not to be (false).","type":"boolean"},"to":{"type":"string"},"valid_from":{"format":"date","type":"string"},"valid_to":{"format":"date","type":["string","null"]},"verified":{"description":"In force (verified) or a proposal waiting for review.","type":"boolean"}},"required":["to","verified","subject","valid_from","source"],"type":"object"},"FiscalStRules":{"properties":{"cest":{"type":["string","null"]},"date":{"description":"The day the rules were read for (today in São Paulo).","format":"date","type":"string"},"from":{"description":"The origin: the issuer's state.","type":"string"},"ncm":{"type":"string"},"pending_review":{"description":"The ICMS-ST rules are still waiting for the owner's review: none is\nin force, and goods with a CEST sold to a reseller are refused.","type":"boolean"},"rules":{"description":"One per destination state some rule speaks of, the origin's own first.","items":{"$ref":"#/components/schemas/FiscalStRule"},"type":"array"},"snapshot":{"description":"The snapshot in force.","type":"string"}},"required":["from","ncm","date","pending_review","snapshot","rules"],"type":"object"},"FiscalTaxClass":{"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"]},"icms_base_reduction":{"description":"CST 20: the base reduction, percent × 10^4.","format":"int32","type":["integer","null"]},"icms_benefit_code":{"description":"`cBenef`, for the states that require it next to CST 20, 40 and 41.","type":["string","null"]},"icms_cst":{"description":"Regime normal: the ICMS CST of the goods, `00` (the rate comes from\nthe tax engine), `20` (with `icms_base_reduction`), `40` or `41`.","type":"string"},"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"]},"sn_activity":{"description":"Simples Nacional: `cAtivSN`, the activity the item's revenue falls in\n(NT 2026.005): 01 resale or own manufacture (Anexo I, the default),\n02 other goods without ICMS, 03/04 the Zona Franca de Manaus ones\n(Anexo II), 90 not taxable.","type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"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","store_id","name","ncm","origin","csosn","pis_cst","cofins_cst","cfop_internal","cfop_interstate","cfop_interstate_consumer","unit","icms_cst","created_at","updated_at"],"type":"object"},"FiscalTaxClassAssign":{"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"},"FiscalTaxClassAssignResult":{"properties":{"products":{"format":"int64","minimum":0,"type":"integer"},"variants":{"format":"int64","minimum":0,"type":"integer"}},"required":["products","variants"],"type":"object"},"FiscalTaxClassInput":{"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"]},"icms_base_reduction":{"description":"CST 20: the base reduction, percent × 10^4 (33.33% = 333300).","format":"int32","type":["integer","null"]},"icms_benefit_code":{"description":"`cBenef` (8 or 10 characters), for the states that require it.","type":["string","null"]},"icms_cst":{"description":"ICMS by CST (regime normal, CRT 2): `00` (default; the rate comes\nfrom the tax engine), `20`, `40`, `41`, or `60` when the goods were\nbought with the ICMS-ST retained. Where the store is the substitute,\nthe note takes 10, 70 or 30 by itself.","type":["string","null"]},"name":{"type":"string"},"ncm":{"type":"string"},"origin":{"format":"int32","type":["integer","null"]},"pis_cst":{"type":["string","null"]},"sn_activity":{"description":"Simples Nacional: the activity code of the goods (`cAtivSN`, NT\n2026.005): `01` resale or own manufacture (Anexo I; the default when\nempty), `02` other goods without ICMS, `03`/`04` the Zona Franca de\nManaus ones (Anexo II), `90` not taxable.","type":["string","null"]},"unit":{"type":["string","null"]}},"required":["name","ncm"],"type":"object"},"FiscalVoiding":{"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"]},"serie":{"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","environment","serie","first_number","last_number","justification","status","created_at"],"type":"object"},"FiscalVoidingInput":{"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"},"FixIn":{"description":"Where in Mobiari a problem is fixed.","enum":["reconnect_ads","social_accounts","whatsapp_channel","marketing_pixel","catalog"],"type":"string"},"ForecastDay":{"description":"One forecast day.","properties":{"day":{"format":"date","type":"string"},"expected_cents":{"description":"What that weekday averaged in the history, in cents.","format":"int64","type":"integer"},"high_cents":{"description":"One standard deviation above.","format":"int64","type":"integer"},"low_cents":{"description":"One standard deviation below, not under zero.","format":"int64","type":"integer"}},"required":["day","expected_cents","low_cents","high_cents"],"type":"object"},"ForgotPasswordRequest":{"properties":{"email":{"example":"ana@example.com","type":"string"}},"required":["email"],"type":"object"},"Format":{"description":"What is published.","enum":["post","carousel","reel","story"],"type":"string"},"FranchiseNetwork":{"description":"A brand's franchise network.","properties":{"billed_to":{"$ref":"#/components/schemas/NetworkBilledTo"},"created_at":{"format":"date-time","type":"string"},"default_ceiling":{"description":"What a new invite proposes unless it says otherwise.","items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"member_count":{"description":"Members whose membership is active or suspended.","format":"int64","type":"integer"},"name":{"type":"string"},"owner_store_id":{"description":"The brand's store: catalog source and online store.","format":"uuid","type":"string"},"owner_tenant_id":{"format":"uuid","type":"string"}},"required":["id","owner_tenant_id","owner_store_id","name","billed_to","default_ceiling","member_count","created_at"],"type":"object"},"FreeShippingProgress":{"description":"What the cart still needs for free shipping.","properties":{"qualifies":{"type":"boolean"},"remaining_cents":{"description":"How much more the subtotal needs; 0 once it qualifies.","format":"int64","type":"integer"},"threshold_cents":{"description":"The lowest subtotal (after discounts) at which a free-shipping rule applies to this cart.","format":"int64","type":"integer"}},"required":["threshold_cents","remaining_cents","qualifies"],"type":"object"},"FreightCancelReason":{"description":"A reason the carrier accepts for cancelling an order.","properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"FreightCargoType":{"description":"A cargo type Central do Frete quotes for.","properties":{"cargo_type_id":{"format":"int64","type":["integer","null"]},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"FreightCarrier":{"description":"The carrier of the chosen quote option.","properties":{"air":{"type":"boolean"},"cnpj":{"description":"14 digits, when the quote gave it.","type":["string","null"]},"name":{"type":"string"}},"required":["name","air"],"type":"object"},"FreightCoverage":{"description":"How much of the catalogue ships from recorded data.","properties":{"complete":{"description":"Every measurement is recorded.","format":"int64","type":"integer"},"estimated":{"description":"Some measurement is a default or an estimate.","format":"int64","type":"integer"},"from_parts":{"description":"Variants built from parts, of `variants`.","format":"int64","type":"integer"},"inside":{"description":"Variants that ride inside another box, of `variants`.","format":"int64","type":"integer"},"needs_review":{"description":"Profiles the migration guessed, still to review.","format":"int64","type":"integer"},"not_shipped":{"format":"int64","type":"integer"},"variants":{"description":"Active variants counted.","format":"int64","type":"integer"},"with_boxes":{"description":"Variants with their own list of boxes, of `variants`.","format":"int64","type":"integer"}},"required":["variants","complete","estimated","not_shipped","from_parts","with_boxes","inside","needs_review"],"type":"object"},"FreightProvider":{"description":"A carrier integration of the store.","properties":{"code":{"description":"The registry module, e.g. `central_do_frete`.","type":"string"},"config_json":{"description":"Module settings. Secret values come back as `__stored__`; send that\nplaceholder back to keep the stored secret.","type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_default":{"description":"The store's primary carrier.","type":"boolean"},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","code","config_json","is_active","is_default","created_at","updated_at"],"type":"object"},"FreightProviderCreateRequest":{"description":"A new freight provider.","properties":{"code":{"description":"The registry module, e.g. `central_do_frete`.","type":"string"},"config_json":{"type":["object","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"is_default":{"description":"Defaults to false. Setting it clears the previous default.","type":["boolean","null"]},"name":{"type":"string"}},"required":["name","code"],"type":"object"},"FreightProviderHealth":{"description":"Whether a provider has every setting it needs.","properties":{"checks":{"description":"Per-setting presence, e.g. `{\"has_token\": true}`.","type":"object"},"healthy":{"description":"Every required setting is present.","type":"boolean"},"provider_code":{"type":"string"}},"required":["provider_code","healthy","checks"],"type":"object"},"FreightProviderUpdateRequest":{"description":"Fields to change; omitted fields keep their value. `config_json` is\nmerged into the stored settings, and `__stored__` values are ignored.","properties":{"config_json":{"type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"description":"`true` makes it the default and clears the previous one.","type":["boolean","null"]},"name":{"type":["string","null"]}},"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"},"FreightSettings":{"description":"Defaults of the store's Central do Frete integration, for pre-filling\nthe carrier order form.","properties":{"default_cargo_types":{"items":{"format":"int64","type":"integer"},"type":["array","null"]},"origin_postal_code":{"type":"string"},"sender_complement":{"type":["string","null"]},"sender_number":{"type":["string","null"]}},"required":["origin_postal_code"],"type":"object"},"FreightStatus":{"description":"How complete a variant's shipping data is.","enum":["complete","estimated","not_shipped"],"type":"string"},"FreightVariantRow":{"description":"One variant's freight data, per one unit sold.","properties":{"box_count":{"format":"int32","type":"integer"},"boxes":{"description":"The boxes one unit ships as.","items":{"$ref":"#/components/schemas/PlannedBox"},"type":"array"},"height_cm":{"format":"double","type":["number","null"]},"is_active":{"type":"boolean"},"is_physical":{"description":"Digital products ship nothing.","type":"boolean"},"issues":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array"},"length_cm":{"description":"Recorded on the variant itself (editable with `updateVariantShipping`).","format":"double","type":["number","null"]},"mode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingMode","description":"The profile's mode; null in automatic mode."}]},"needs_review":{"description":"The profile was guessed by the migration and nobody has saved it yet.","type":"boolean"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"product_weight_grams":{"description":"The product's weight, used when the variant has none.","format":"int32","type":["integer","null"]},"profile_level":{"$ref":"#/components/schemas/ProfileLevel"},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/FreightStatus"},"unit_weight_g":{"description":"Weight of one unit, all boxes, in grams.","format":"int64","type":"integer"},"used_as_part":{"description":"This variant goes into another product as a part.","type":"boolean"},"uses_parts":{"description":"Has a recipe (built from warehouse items).","type":"boolean"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"description":"The variant's own title; null for a default variant.","type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["variant_id","product_id","product_title","sku","is_active","is_physical","uses_parts","used_as_part","profile_level","needs_review","status","boxes","box_count","unit_weight_g","issues"],"type":"object"},"Frequency":{"enum":["weekly","monthly"],"type":"string"},"FromLibraryRequest":{"description":"Library file import request.","properties":{"file_id":{"description":"Library file id.","format":"uuid","type":"string"},"path":{"description":"Theme path starting with `/assets/`.","type":"string"}},"required":["file_id","path"],"type":"object"},"FulfillmentMode":{"enum":["stocked","on_demand","stocked_or_on_demand"],"type":"string"},"Funnel":{"description":"The funnel of a pipeline.","properties":{"created":{"format":"int64","type":"integer"},"forecast_cents":{"description":"Open value weighted by each stage's probability.","format":"int64","type":"integer"},"lost":{"format":"int64","type":"integer"},"open_value_cents":{"format":"int64","type":"integer"},"pipeline_id":{"format":"uuid","type":"string"},"stages":{"items":{"$ref":"#/components/schemas/FunnelStage"},"type":"array"},"win_rate":{"description":"Won out of those closed, 0 to 100; null while none closed.","format":"double","type":["number","null"]},"won":{"format":"int64","type":"integer"},"won_value_cents":{"format":"int64","type":"integer"}},"required":["pipeline_id","stages","created","won","lost","won_value_cents","open_value_cents","forecast_cents"],"type":"object"},"FunnelStage":{"description":"One stage of the funnel.","properties":{"avg_days_in_stage":{"description":"Average days deals spent in this stage before leaving it; null when none left.","format":"double","type":["number","null"]},"kind":{"type":"string"},"name":{"type":"string"},"open_now":{"description":"Of those, how many are still open in it now.","format":"int64","type":"integer"},"percent_of_created":{"description":"Deals that reached this stage, as a percentage of the deals created (0 to 100).","format":"double","type":"number"},"reached":{"description":"Deals that were ever in this stage.","format":"int64","type":"integer"},"stage_id":{"format":"uuid","type":"string"}},"required":["stage_id","name","kind","reached","open_now","percent_of_created"],"type":"object"},"GenerateBrandSystemRequest":{"description":"Sources to generate the brand system from.","properties":{"attachments":{"description":"Text files (CSS, markdown, brand notes) read client-side; up to\n60 000 characters each, 200 000 in all.","items":{"$ref":"#/components/schemas/BrandAttachment"},"type":"array"},"from_kit":{"description":"Start from the current e-mail brand kit instead (no crawl, no AI):\nsaves at once and answers 200.","type":"boolean"},"notes":{"description":"Free notes about the brand.","type":"string"},"urls":{"description":"Pages to crawl for styles, logos and copy, and GitHub repositories\n(`https://github.com/owner/repo`) to read. Defaults to the\nstorefront when empty.","items":{"type":"string"},"type":"array"}},"type":"object"},"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"},"GenerateVariantsRequest":{"description":"Prices and SKU root for the variants a generation creates.","properties":{"compare_at_cents":{"description":"Promotional price of each new variant (charged while lower than\n`price_cents`).","format":"int64","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"dry_run":{"description":"True only computes what would happen; nothing is written.","type":"boolean"},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"price_cents":{"description":"Price of each new variant, above zero. Optional on a dry run.","format":"int64","type":["integer","null"]},"sku_prefix":{"description":"Root of the generated SKUs; saved as the product's SKU prefix.\nDefaults to the product's prefix, else its slug.","type":["string","null"]}},"type":"object"},"GenerateVariantsResult":{"properties":{"adjusted":{"items":{"$ref":"#/components/schemas/AdjustedVariant"},"type":"array"},"created":{"items":{"$ref":"#/components/schemas/GeneratedVariant"},"type":"array"},"dry_run":{"type":"boolean"},"skipped":{"items":{"$ref":"#/components/schemas/SkippedCombination"},"type":"array"}},"required":["dry_run","created","adjusted","skipped"],"type":"object"},"GeneratedImages":{"description":"The images made, saved to the library.","properties":{"images":{"items":{"$ref":"#/components/schemas/PostMedia"},"type":"array"}},"required":["images"],"type":"object"},"GeneratedVariant":{"description":"A variant the generation created (or would create).","properties":{"option_value_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"sku":{"type":"string"},"title":{"description":"The option values, \"Azul / M\".","type":"string"},"variant_id":{"description":"Null on a dry run.","format":"uuid","type":["string","null"]}},"required":["sku","title","option_value_ids"],"type":"object"},"GiftCardCode":{"description":"A gift card's code, whole.","properties":{"code":{"type":"string"}},"required":["code"],"type":"object"},"GiftCardProduct":{"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"},"variants":{"description":"Variants of the product, each a face value.","format":"int64","type":"integer"}},"required":["product_id","is_gift_card","variants","custom_amount"],"type":"object"},"Goal":{"description":"A goal: `target` of `metric` every `period`, for `user_id` (or the team).","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"metric":{"description":"`calls_made`, `calls_talked`, `deals_won`, `won_value` or `tasks_completed`.","type":"string"},"period":{"description":"`week` or `month`.","type":"string"},"target":{"description":"A count, or cents for `won_value`.","format":"int64","type":"integer"},"updated_at":{"format":"date-time","type":"string"},"user_id":{"description":"The member; null for a team goal.","format":"uuid","type":["string","null"]},"user_name":{"type":["string","null"]}},"required":["id","metric","period","target","created_at","updated_at"],"type":"object"},"GoalCreateRequest":{"description":"A new goal.","properties":{"metric":{"description":"`calls_made`, `calls_talked`, `deals_won`, `won_value` or `tasks_completed`.","type":"string"},"period":{"description":"`week` or `month`.","type":"string"},"target":{"description":"Above zero: a count, or cents for `won_value`.","format":"int64","type":"integer"},"user_id":{"description":"A team member; omit for a team goal.","format":"uuid","type":["string","null"]}},"required":["metric","period","target"],"type":"object"},"GoalProgress":{"description":"One goal in one period.","properties":{"actual":{"description":"Done so far (a count, or cents for `won_value`).","format":"int64","type":"integer"},"expected":{"description":"What pro-rata pace expects by now: the target times the share of the\nperiod gone (all of it for a past period, none for a future one).","format":"int64","type":"integer"},"goal":{"$ref":"#/components/schemas/Goal"},"percent":{"description":"Of the target, 0 and up.","format":"double","type":"number"},"period_end":{"description":"The period's last day.","format":"date","type":"string"},"period_start":{"description":"The period's first day.","format":"date","type":"string"},"status":{"description":"`met`, `on_track` (at or above `expected`) or `behind`.","type":"string"}},"required":["goal","period_start","period_end","actual","percent","expected","status"],"type":"object"},"GoalProgressReport":{"properties":{"goals":{"items":{"$ref":"#/components/schemas/GoalProgress"},"type":"array"},"on":{"description":"The day the periods hold.","format":"date","type":"string"},"today":{"description":"The store's today.","format":"date","type":"string"}},"required":["today","on","goals"],"type":"object"},"GoalUpdateRequest":{"description":"A new target. The metric, period and member make the goal what it is: to\nchange them, delete it and create another.","properties":{"target":{"format":"int64","type":["integer","null"]}},"type":"object"},"GoodsNote":{"description":"A goods note.","properties":{"counterparty_name":{"type":["string","null"]},"counterparty_tax_id":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"document":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalDocument"}]},"error":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"issuer_id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/GoodsNoteItem"},"type":"array"},"kind":{"$ref":"#/components/schemas/GoodsNoteKind"},"location_id":{"format":"uuid","type":["string","null"]},"reason":{"type":["string","null"]},"received_at":{"description":"A transfer: the goods arrived at the destination.","format":"date-time","type":["string","null"]},"reversed_at":{"description":"They moved back (the note was cancelled).","format":"date-time","type":["string","null"]},"settled_at":{"description":"The goods moved (the note was authorized in production).","format":"date-time","type":["string","null"]},"status":{"description":"`issuing`, `issued` (the document's own status says where it stands)\nor `failed` (`error` says why).","type":"string"},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_invoice_id":{"format":"uuid","type":["string","null"]},"to_issuer_id":{"format":"uuid","type":["string","null"]},"to_location_id":{"format":"uuid","type":["string","null"]},"total_cents":{"format":"int64","type":"integer"},"transfer_status":{"description":"A transfer: `awaiting_note`, `in_transit`, `received` or `cancelled`.","type":["string","null"]}},"required":["id","kind","status","issuer_id","total_cents","items","created_at"],"type":"object"},"GoodsNoteCancel":{"properties":{"justification":{"description":"15 to 255 characters, sent to SEFAZ.","type":"string"}},"required":["justification"],"type":"object"},"GoodsNoteItem":{"description":"One line of a goods note, and what it moved.","properties":{"description":{"type":"string"},"item_id":{"format":"uuid","type":["string","null"]},"line_number":{"format":"int32","type":"integer"},"quantity":{"format":"double","type":"number"},"stock_note":{"description":"Why it moved less, or nothing.","type":["string","null"]},"stock_units":{"description":"Base units the note moved in stock once authorized.","format":"double","type":"number"},"unit_value_cents":{"format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["line_number","description","quantity","unit_value_cents","stock_units"],"type":"object"},"GoodsNoteKind":{"description":"What a goods note does.","type":"string","x-extensible-enum":["transfer","repair_out","demonstration_out","consignment_out","repair_back","demonstration_back","consignment_back","write_off"]},"GoodsNoteLineRequest":{"description":"One line of a goods note.","properties":{"item_id":{"description":"A stock item without a variant (own goods sent out).","format":"uuid","type":["string","null"]},"line_number":{"description":"Goods going back: `nItem` of the note they came with.","format":"int32","type":["integer","null"]},"quantity":{"description":"Base units (a transfer, own goods), or the unit of the note the goods\ncame with; up to four decimals.","format":"double","type":"number"},"unit_value_cents":{"description":"The unit value on the note. Defaults to the average cost (own goods,\na transfer) or the original note's value (goods going back).","format":"int64","type":["integer","null"]},"variant_id":{"description":"The goods (a transfer, own goods sent out).","format":"uuid","type":["string","null"]}},"required":["quantity"],"type":"object"},"GoodsNotePreview":{"description":"The note as it would go out.","properties":{"cfop":{"description":"The CFOP of the lines.","type":["string","null"]},"environment":{"description":"`homologacao` or `producao`: only production moves the goods.","type":["string","null"]},"issues":{"description":"Errors block emitting; warnings do not.","items":{"$ref":"#/components/schemas/FiscalIssue"},"type":"array"},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTotals","description":"Absent when the note cannot be built."}]}},"required":["issues"],"type":"object"},"GoodsNoteRecipient":{"description":"Who receives the goods: the third party of a remessa.","properties":{"cep":{"type":"string"},"city_code":{"description":"IBGE code (7 digits); looked up from the city and state when absent.","type":["string","null"]},"city_name":{"type":"string"},"complement":{"type":["string","null"]},"district":{"type":"string"},"ie":{"description":"The state registration; `ISENTO` for an exempt contributor; empty or\nabsent for a non-contributor (a person, a company without IE).","type":["string","null"]},"name":{"type":"string"},"number":{"type":"string"},"phone":{"type":["string","null"]},"street":{"type":"string"},"tax_id":{"description":"CNPJ or CPF.","type":"string"},"uf":{"description":"Two letters.","type":"string"}},"required":["tax_id","name","street","number","district","city_name","uf","cep"],"type":"object"},"GoodsNoteRequest":{"description":"A goods note to emit.","properties":{"force":{"description":"A transfer on a store whose stock an ERP owns: move the local stock\nanyway. Without it the transfer answers 409\n`inventory_managed_externally`, as a plain transfer does.","type":"boolean"},"from_location_id":{"description":"Where the goods leave from: a transfer's origin, own goods' shelf\n(the store's first location by default).","format":"uuid","type":["string","null"]},"kind":{"$ref":"#/components/schemas/GoodsNoteKind"},"lines":{"items":{"$ref":"#/components/schemas/GoodsNoteLineRequest"},"type":"array"},"reason":{"description":"Printed on the note.","type":["string","null"]},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GoodsNoteRecipient","description":"Own goods sent out: who receives them."}]},"supplier_id":{"description":"Own goods sent out: the supplier the recipient is, when registered.","format":"uuid","type":["string","null"]},"supplier_invoice_id":{"description":"Goods going back: the received note they came with.","format":"uuid","type":["string","null"]},"to_location_id":{"description":"A transfer's destination.","format":"uuid","type":["string","null"]},"transport":{"$ref":"#/components/schemas/SupplierReturnTransport"}},"required":["kind","lines"],"type":"object"},"GoogleAdsAccount":{"description":"A Google Ads account the connected login reaches.","properties":{"currency":{"type":["string","null"]},"customer_id":{"description":"10 digits.","type":"string"},"login_customer_id":{"description":"The manager account it is reached through; `null` when the login has\ndirect access.","type":["string","null"]},"name":{"type":["string","null"]},"test":{"description":"A test account (cannot serve ads).","type":"boolean"}},"required":["customer_id","test"],"type":"object"},"GoogleAdsAccounts":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/GoogleAdsAccount"},"type":"array"}},"required":["accounts"],"type":"object"},"GoogleAdsReport":{"description":"The Google Ads account's campaigns and how they did.","properties":{"campaigns":{"items":{"$ref":"#/components/schemas/GoogleCampaign"},"type":"array"},"currency":{"type":"string"},"days":{"format":"int64","type":"integer"},"totals":{"$ref":"#/components/schemas/GoogleAdsTotals"},"unmatched_orders":{"description":"Paid orders from a Google Ads click that no campaign above claims\n(a removed campaign, a click Google has not reported yet).","format":"int64","type":"integer"},"unmatched_revenue_cents":{"format":"int64","type":"integer"}},"required":["days","currency","totals","campaigns","unmatched_orders","unmatched_revenue_cents"],"type":"object"},"GoogleAdsTestResult":{"description":"What Google said about the test upload.","properties":{"answer":{"description":"Google's answer as it came (`{\"requestId\": …}` when accepted), or\n`{\"error\": {\"message\": …}}` when nothing could be sent.","type":"object"},"message":{"description":"The outcome in a sentence: Google's message, or what to do (a Google\nlogin without the Data Manager scope: reconnect).","type":["string","null"]},"ok":{"description":"Google accepted the request (validation only: nothing was recorded).","type":"boolean"},"request":{"description":"The `events:ingest` body sent, identifiers hashed as they go.","type":"object"},"skipped":{"description":"Why the real upload of this order would be skipped (`no ads consent`,\n`no_gclid`, `config_incomplete`); the test still ran, with a\nplaceholder click id when there was none.","type":["string","null"]}},"required":["ok","request","answer"],"type":"object"},"GoogleAdsTestUpload":{"description":"Which order to test with.","properties":{"order_id":{"description":"A real order of the store; null for a made-up R$ 1,00 order with a\nplaceholder click id.","format":"uuid","type":["string","null"]}},"type":"object"},"GoogleAdsTotals":{"description":"The window's totals.","properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"google_conversion_value_cents":{"format":"int64","type":"integer"},"google_conversions":{"format":"double","type":"number"},"impressions":{"format":"int64","type":"integer"},"roas":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["spend_cents","impressions","clicks","google_conversions","google_conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"GoogleAuthorizeRequest":{"properties":{"connection_id":{"description":"Reconnect this Google Sheets connection (a new sign-in for the same\nspreadsheet) instead of creating one.","format":"uuid","type":["string","null"]},"name":{"description":"Name of the new connection; ignored when reconnecting.","type":["string","null"]}},"type":"object"},"GoogleAuthorizeUrl":{"description":"Where the browser goes to connect a Google account.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"GoogleCampaign":{"description":"A campaign with its numbers for the window. Money in cents of the ad\naccount's currency.","properties":{"attributed_orders":{"description":"Paid orders our attribution credits to the campaign (last touch).","format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"cpc_cents":{"format":"int64","type":["integer","null"]},"ctr":{"description":"Clicks per impression (0 to 1).","format":"double","type":["number","null"]},"daily_budget_cents":{"format":"int64","type":["integer","null"]},"flag":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CampaignFlag"}]},"google_conversion_value_cents":{"format":"int64","type":"integer"},"google_conversions":{"description":"Conversions and their value as Google counts them (all the\nconversion actions the account optimises for).","format":"double","type":"number"},"id":{"type":"string"},"impressions":{"format":"int64","type":"integer"},"name":{"type":"string"},"roas":{"description":"Attributed revenue over spend.","format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"},"status":{"description":"`enabled`, `paused` or Google's own state in lowercase.","type":"string"}},"required":["id","name","status","spend_cents","impressions","clicks","google_conversions","google_conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"GoogleCampaignCreated":{"description":"The campaign made.","properties":{"campaign_id":{"description":"Google's numeric campaign id.","type":"string"},"daily_budget_cents":{"format":"int64","type":"integer"},"ends_on":{"format":"date","type":["string","null"]},"id":{"description":"The row in Mobiari.","format":"uuid","type":"string"},"starts_on":{"format":"date","type":"string"},"status":{"$ref":"#/components/schemas/GoogleCampaignState"}},"required":["id","campaign_id","status","daily_budget_cents","starts_on"],"type":"object"},"GoogleCampaignRequest":{"description":"A Performance Max campaign to create (or check).","properties":{"business_name":{"description":"1 to 25 characters.","type":"string"},"daily_budget_cents":{"description":"At least 1000 (R$ 10).","format":"int64","type":"integer"},"descriptions":{"description":"2 to 5, each 1 to 90 characters, at least one of 60 or fewer.","items":{"type":"string"},"type":"array"},"ends_on":{"description":"Last day, on or after `starts_on`.","format":"date","type":["string","null"]},"final_url":{"description":"https, on the store's own domain; null is the store's address.","type":["string","null"]},"headlines":{"description":"3 to 15, each 1 to 30 characters, all different.","items":{"type":"string"},"type":"array"},"image_file_ids":{"description":"1 to 20 library images; each is cropped to 1.91:1 (at least 600x314) and 1:1 (at least 300x300).","items":{"format":"uuid","type":"string"},"type":"array"},"language_id":{"description":"Google language constant id; null means Portuguese (1014).","type":["string","null"]},"location_ids":{"description":"Google geo target constant ids; empty means Brazil (2076).","items":{"type":"string"},"type":"array"},"logo_file_id":{"description":"A library image, 1:1 of at least 128x128 after cropping; null is the brand kit's logo.","format":"uuid","type":["string","null"]},"long_headlines":{"description":"1 to 5, each 1 to 90 characters.","items":{"type":"string"},"type":"array"},"name":{"description":"1 to 255 characters, trimmed; unique among the account's campaigns.","type":"string"},"start_active":{"description":"false (default) creates it paused.","type":"boolean"},"starts_on":{"description":"First day, in the account's time zone; null is today.","format":"date","type":["string","null"]},"target_roas":{"description":"Target return on ad spend (4.0 = 400 %), 0.1 to 100; null maximises conversion value with no target.","format":"double","type":["number","null"]},"youtube_urls":{"description":"Up to 5 YouTube videos (watch, youtu.be or shorts links).","items":{"type":"string"},"type":"array"}},"required":["name","daily_budget_cents","business_name","headlines","long_headlines","descriptions","image_file_ids"],"type":"object"},"GoogleCampaignSetup":{"description":"What the campaign wizard needs to start.","properties":{"business_name":{"description":"The store's name, for the default business name.","type":"string"},"configured":{"description":"Google Ads can be reached for this store (shared access or its own credentials).","type":"boolean"},"currency":{"description":"The Google Ads account's currency (`BRL`).","type":"string"},"customer_id":{"description":"`893-290-4813` style.","type":["string","null"]},"eligible_products":{"description":"Products Merchant Center reports as eligible; null when it could not be read.","format":"int64","type":["integer","null"]},"logo_file_id":{"description":"The brand kit's logo, when it is a library file.","format":"uuid","type":["string","null"]},"merchant_center_id":{"description":"The Merchant Center linked to the Google Ads account.","type":["string","null"]},"store_url":{"description":"The store's primary address (the default landing page).","type":"string"},"time_zone":{"description":"The Google Ads account's time zone.","type":"string"},"total_products":{"format":"int64","type":["integer","null"]}},"required":["configured","store_url","business_name","currency","time_zone"],"type":"object"},"GoogleCampaignState":{"description":"Running or paused.","enum":["active","paused"],"type":"string"},"GoogleCampaignUpdate":{"description":"Pause or resume a campaign, or change its daily budget. At least one.","properties":{"daily_budget_cents":{"description":"At least 1000 (R$ 10).","format":"int64","type":["integer","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GoogleCampaignState"}]}},"type":"object"},"GoogleCampaignUpdated":{"description":"The campaign after the change.","properties":{"campaign_id":{"type":"string"},"daily_budget_cents":{"format":"int64","type":["integer","null"]},"status":{"$ref":"#/components/schemas/GoogleCampaignState"}},"required":["campaign_id","status"],"type":"object"},"GoogleCheck":{"description":"One line of the checklist.","properties":{"fix_url":{"description":"The Google Ads or Merchant Center page to fix it on.","type":["string","null"]},"id":{"$ref":"#/components/schemas/GoogleCheckId"},"message":{"description":"pt-BR, shown as is.","type":"string"},"status":{"$ref":"#/components/schemas/GoogleCheckStatus"}},"required":["id","status","message"],"type":"object"},"GoogleCheckId":{"description":"What a check looks at.","enum":["account","sign_in","merchant_center","products","conversion_action","conversions_recent","dry_run"],"type":"string"},"GoogleCheckStatus":{"description":"A check's outcome. The same three values as Meta's checklist, kept as\nits own schema so the two can change apart.","enum":["pass","warn","fail"],"type":"string"},"GoogleCompletion":{"description":"The completion id the callback put in the address, and the starting tab's\nnonce.","properties":{"browser_nonce":{"type":"string"},"completion_id":{"type":"string"}},"required":["completion_id","browser_nonce"],"type":"object"},"GoogleConnection":{"description":"The store's Google sign-in connection.","properties":{"connected":{"description":"The store connected its own Google login.","type":"boolean"},"customer_id":{"description":"The Google Ads account the store uses (10 digits).","type":["string","null"]},"email":{"description":"The Google account's e-mail, when Google told it.","type":["string","null"]},"enabled":{"description":"Sign in with Google is switched on for this server.","type":"boolean"},"login_customer_id":{"description":"The manager account it is reached through, when there is one.","type":["string","null"]}},"required":["enabled","connected"],"type":"object"},"GoogleFieldProblem":{"description":"A problem with the request, from Mobiari's checks or from Google's dry run.","properties":{"field":{"description":"The request field (`headlines`, `headlines[2]`, `image_file_ids[0]`...); null for the whole request.","type":["string","null"]},"message":{"description":"pt-BR.","type":"string"}},"required":["message"],"type":"object"},"GooglePendingConnection":{"description":"What is about to be linked, shown before the admin confirms.","properties":{"email":{"description":"The Google account that consented, when Google told it.","type":["string","null"]},"store_name":{"description":"The store it would be linked to.","type":"string"}},"required":["store_name"],"type":"object"},"GooglePreflight":{"description":"The checklist of a campaign.","properties":{"checks":{"items":{"$ref":"#/components/schemas/GoogleCheck"},"type":"array"},"problems":{"items":{"$ref":"#/components/schemas/GoogleFieldProblem"},"type":"array"},"ready":{"description":"No check failed.","type":"boolean"}},"required":["checks","ready","problems"],"type":"object"},"GoogleServiceAccount":{"description":"Mobiari's account for BigQuery.","properties":{"email":{"description":"The e-mail to give access to the dataset; empty when not configured.","type":["string","null"]}},"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"},"GraphCustomer":{"description":"The customer's own fields, with order aggregates.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_name":{"type":["string","null"]},"last_order_at":{"format":"date-time","type":["string","null"]},"lead_score":{"format":"int32","type":"integer"},"lifecycle":{"description":"`lead`, `new`, `active`, `vip`, `at_risk` or `dormant`\n(`infra::customers::classify_lifecycle`).","type":"string"},"marketing_opt_in":{"type":"boolean"},"phone":{"type":["string","null"]},"total_orders":{"format":"int32","type":"integer"},"total_spent":{"description":"Lifetime spend in cents.","format":"int32","type":"integer"},"whatsapp_opt_in":{"type":"boolean"}},"required":["id","total_orders","total_spent","created_at","marketing_opt_in","whatsapp_opt_in","lead_score","lifecycle"],"type":"object"},"Group":{"properties":{"attachment_count":{"description":"Policies attached to the group.","format":"int64","type":"integer"},"color":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"member_count":{"format":"int64","type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","member_count","attachment_count","created_at","updated_at"],"type":"object"},"GroupMember":{"properties":{"added_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"kind":{"description":"`person` or `service`.","type":"string"},"name":{"type":["string","null"]},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","email","kind","added_at"],"type":"object"},"GroupRequest":{"properties":{"name":{"description":"1 to 60 characters, unique in the store regardless of case.","type":"string"}},"required":["name"],"type":"object"},"GroupView":{"properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"bidding_strategy":{"type":["string","null"]},"campaign_id":{"format":"uuid","type":"string"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"daily_budget_cents":{"format":"int64","type":["integer","null"]},"effective_status":{"type":["string","null"]},"ends_at":{"format":"date-time","type":["string","null"]},"external_id":{"type":"string"},"id":{"format":"uuid","type":"string"},"impressions":{"format":"int64","type":"integer"},"lifetime_budget_cents":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"optimization_goal":{"type":["string","null"]},"provider":{"type":"string"},"spend_cents":{"format":"int64","type":"integer"},"starts_at":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"targeting":{"type":"object"}},"required":["id","campaign_id","provider","external_id","name","status","targeting","spend_cents","impressions","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"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"},"GroupWithFields":{"allOf":[{"$ref":"#/components/schemas/SpecGroup"},{"properties":{"fields":{"items":{"$ref":"#/components/schemas/SpecField"},"type":"array"}},"required":["fields"],"type":"object"}]},"HeldCount":{"description":"Messages consent held back, grouped.","properties":{"channel":{"type":"string"},"count":{"format":"int64","type":"integer"},"last_at":{"format":"date-time","type":"string"},"purpose":{"description":"`transactional`, `feedback` or `marketing`.","type":"string"},"reason":{"description":"`no_consent`, `opted_out`, `undeliverable`, `blocked`, `erased`, `unsupported`, `no_address`.","type":"string"},"what":{"description":"What was not sent: an event, a workflow step, a template.","type":"string"}},"required":["channel","purpose","reason","what","count","last_at"],"type":"object"},"HelpCenter":{"description":"The workspace's help center.","properties":{"enabled":{"type":"boolean"},"intro":{"description":"A line under the title.","type":"string"},"public_articles":{"description":"Published articles marked public: what it shows.","format":"int64","type":"integer"},"title":{"description":"The page title; the workspace's name when empty.","type":"string"},"url":{"description":"Its public address (`https://<host>/ajuda`).","type":"string"}},"required":["enabled","title","intro","url","public_articles"],"type":"object"},"HelpCenterUpdate":{"properties":{"enabled":{"type":["boolean","null"]},"intro":{"description":"Up to 300 characters.","type":["string","null"]},"title":{"description":"Up to 120 characters.","type":["string","null"]}},"type":"object"},"Identity":{"description":"One way the customer is known: an e-mail, phone, WhatsApp number,\nstorefront account or browser visitor id.","properties":{"first_seen_at":{"format":"date-time","type":"string"},"kind":{"description":"`email`, `phone`, `whatsapp`, `account` or `visitor`.","type":"string"},"last_seen_at":{"format":"date-time","type":"string"},"source":{"description":"Where the identity was learned (`checkout`, `whatsapp`, `import`, ...).","type":["string","null"]},"value":{"type":"string"},"verified":{"type":"boolean"}},"required":["kind","value","verified","first_seen_at","last_seen_at"],"type":"object"},"IdentityContext":{"properties":{"email":{"type":["string","null"]},"external_id":{"description":"The company's id for the customer (`sub` of the token).","type":["string","null"]},"fields":{"items":{"$ref":"#/components/schemas/ContextField"},"type":"array"},"name":{"type":["string","null"]}},"required":["fields"],"type":"object"},"IgnoreFinding":{"description":"Why a finding is ignored.","properties":{"reason":{"description":"Shown beside the finding; 3 to 500 characters.","type":"string"}},"required":["reason"],"type":"object"},"ImageRequest":{"description":"An image to make.","properties":{"aspect_ratio":{"description":"`1:1`, `4:5`, `9:16` or `16:9`. Defaults to `4:5`.","type":["string","null"]},"count":{"description":"1 to 4 variations. Defaults to 1.","format":"int32","minimum":0,"type":["integer","null"]},"prompt":{"description":"What to show (\"a mesa numa sala clara com plantas, luz da manhã\").","type":"string"},"source_file_id":{"description":"A library photo to start from (the product stays as it is).","format":"uuid","type":["string","null"]}},"required":["prompt"],"type":"object"},"ImageUploadResponse":{"description":"The stored image and its public URL.","properties":{"image":{"$ref":"#/components/schemas/ProductImageWithVariants"},"upload_url":{"type":"string"}},"required":["image","upload_url"],"type":"object"},"ImageVariant":{"description":"A resized rendition of a product image.","properties":{"cdn_url":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"file_path":{"type":"string"},"file_size_bytes":{"format":"int32","type":"integer"},"height":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"mime_type":{"type":"string"},"product_image_id":{"format":"uuid","type":"string"},"quality":{"format":"int32","type":["integer","null"]},"variant_name":{"description":"e.g. `thumbnail_jpeg`, `medium_webp`.","type":"string"},"width":{"format":"int32","type":["integer","null"]}},"required":["id","product_image_id","variant_name","file_path","mime_type","file_size_bytes","created_at"],"type":"object"},"ImportAuthKind":{"description":"How a source is connected.","enum":["none","api_key","oauth"],"type":"string"},"ImportAuthorizeRequest":{"properties":{"credentials":{"additionalProperties":{"type":"string"},"description":"Per-merchant OAuth app fields listed in the source's credential_fields.","propertyNames":{"type":"string"},"type":"object"}},"type":"object"},"ImportAuthorizeUrl":{"description":"Where to send the browser to connect a source.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"ImportConnection":{"properties":{"auth_kind":{"description":"`api_key` or `oauth`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"error":{"type":["string","null"]},"external_shop_id":{"type":["string","null"]},"external_shop_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_verified_at":{"format":"date-time","type":["string","null"]},"source":{"type":"string"},"status":{"description":"`pending` (stored, not verified yet), `active`, `error` or `revoked`.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","source","auth_kind","status","created_at","updated_at"],"type":"object"},"ImportEmailBrandKitRequest":{"properties":{"url":{"description":"Public page to read colors, fonts and logo from (`https://` assumed).","type":"string"}},"required":["url"],"type":"object"},"ImportEntity":{"description":"What an import brings, in the order a run brings it.","enum":["products","customers","orders"],"type":"string"},"ImportIssue":{"properties":{"created_at":{"format":"date-time","type":"string"},"entity":{"description":"`products`, `customers` or `orders`.","type":"string"},"external_id":{"description":"The source's id of the item (a spreadsheet's \"linha 12\").","type":["string","null"]},"id":{"format":"uuid","type":"string"},"message":{"type":"string"},"severity":{"description":"`error` (not imported) or `warning` (imported with a caveat).","type":"string"}},"required":["id","entity","severity","message","created_at"],"type":"object"},"ImportPreview":{"properties":{"counts":{"additionalProperties":{"format":"int64","minimum":0,"type":["integer","null"]},"description":"Items per entity; absent when the source cannot tell.","propertyNames":{"type":"string"},"type":"object"},"issues":{"description":"The first page's issues, up to 50 per entity.","items":{"$ref":"#/components/schemas/ImportPreviewIssue"},"type":"array"},"samples":{"additionalProperties":{"items":{"type":"object"},"type":"array"},"description":"The first items of each entity, normalized as they would be written.","propertyNames":{"type":"string"},"type":"object"}},"required":["counts","samples","issues"],"type":"object"},"ImportPreviewIssue":{"properties":{"entity":{"$ref":"#/components/schemas/ImportEntity"},"external_id":{"type":["string","null"]},"message":{"type":"string"},"severity":{"description":"`error` (left out) or `warning`.","type":"string"}},"required":["entity","severity","message"],"type":"object"},"ImportRun":{"properties":{"connection_id":{"format":"uuid","type":["string","null"]},"counts":{"additionalProperties":{"$ref":"#/components/schemas/EntityCounts"},"description":"Per entity.","propertyNames":{"type":"string"},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_entity":{"description":"The entity being imported now.","type":["string","null"]},"entities":{"description":"In the order they run.","items":{"type":"string"},"type":"array"},"error":{"type":["string","null"]},"errors":{"format":"int64","type":"integer"},"finished_at":{"format":"date-time","type":["string","null"]},"heartbeat_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"retry_of":{"description":"The run whose failed items this one retries.","format":"uuid","type":["string","null"]},"source":{"type":"string"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`queued`, `running`, `done`, `failed` or `canceled`.","type":"string"},"warnings":{"format":"int64","type":"integer"}},"required":["id","source","entities","status","counts","errors","warnings","created_at"],"type":"object"},"ImportRunCreated":{"properties":{"preview":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ImportPreview","description":"The preview of a dry run."}]},"run":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ImportRun","description":"The queued run."}]}},"type":"object"},"ImportSheetTab":{"description":"One tab of a spreadsheet.","properties":{"columns":{"description":"Its first row.","items":{"type":"string"},"type":"array"},"entity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ImportEntity","description":"What the tab most likely holds, by its name and columns."}]},"layout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExportPlatform","description":"The platform whose export it is, when its columns say so."}]},"rows":{"description":"Data rows, when known (a private Google sheet is listed by its first\nrow only).","minimum":0,"type":["integer","null"]},"title":{"description":"The tab's name, as `tab` takes it when loading it.","type":"string"}},"required":["title","columns"],"type":"object"},"ImportSheetTabs":{"description":"A spreadsheet's tabs.","properties":{"name":{"description":"The file's name, or the link's.","type":"string"},"tabs":{"items":{"$ref":"#/components/schemas/ImportSheetTab"},"type":"array"}},"required":["name","tabs"],"type":"object"},"ImportSheetTabsForm":{"description":"The multipart form of a spreadsheet to list.","properties":{"file":{"description":"CSV, XLSX, XLS or ODS; up to 10 MB.","format":"binary","type":"string"}},"required":["file"],"type":"object"},"ImportSheets":{"description":"The uploaded sheet and mapping of each entity a spreadsheet run brings.","properties":{"customers":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CustomerSheet"}]},"orders":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderSheet"}]},"products":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductSheet"}]}},"type":"object"},"ImportSource":{"properties":{"auth_kind":{"$ref":"#/components/schemas/ImportAuthKind"},"configured":{"description":"A store can import from it on this server now. A source that is not\nis shown as \"available soon\".","type":"boolean"},"connected":{"description":"This store has a connection to it.","type":"boolean"},"credential_fields":{"description":"The fields an `api_key` connection takes.","items":{"type":"string"},"type":"array"},"entities":{"items":{"$ref":"#/components/schemas/ImportEntity"},"type":"array"},"key":{"description":"`csv`, `excel`, `google_sheets`, `google_sheets_private`,\n`nuvemshop`, `tiny`, `woocommerce`, `bling` or `tray`.","type":"string"},"name":{"type":"string"}},"required":["key","name","auth_kind","entities","configured","credential_fields","connected"],"type":"object"},"ImportStatement":{"description":"A statement to import.","properties":{"content":{"description":"The file's text, OFX 1.x or 2.x.","type":"string"},"filename":{"description":"For the history (\"extrato-outubro.ofx\").","type":["string","null"]}},"required":["content"],"type":"object"},"Imported":{"description":"What an import did.","properties":{"account":{"type":"string"},"added":{"description":"Not seen before.","format":"int64","type":"integer"},"duplicates":{"description":"Already imported earlier.","format":"int64","type":"integer"},"import_id":{"format":"uuid","type":"string"},"lines":{"description":"Transactions in the file.","format":"int64","type":"integer"}},"required":["import_id","account","lines","added","duplicates"],"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"},"IncomingPurchase":{"properties":{"expected_at":{"format":"date","type":["string","null"]},"number":{"type":"string"},"purchase_order_id":{"format":"uuid","type":"string"},"quantity":{"description":"Units still to be received on this purchase order.","format":"int32","type":"integer"}},"required":["purchase_order_id","number","quantity"],"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"},"InsightCount":{"description":"A count by name: a sales channel, a payment method.","properties":{"count":{"format":"int64","type":"integer"},"name":{"description":"`null` for orders without a sales channel.","type":["string","null"]}},"required":["count"],"type":"object"},"InsightProduct":{"description":"A product a customer buys.","properties":{"orders":{"description":"Orders it was in.","format":"int64","type":"integer"},"product_id":{"format":"uuid","type":["string","null"]},"quantity":{"format":"int64","type":"integer"},"title":{"type":"string"}},"required":["title","quantity","orders"],"type":"object"},"InsightsDay":{"description":"One day, summed over the accounts.","properties":{"day":{"format":"date","type":"string"},"interactions":{"format":"int64","type":"integer"},"reach":{"format":"int64","type":"integer"},"views":{"format":"int64","type":"integer"}},"required":["day","reach","views","interactions"],"type":"object"},"InsightsTotals":{"description":"The window's totals.","properties":{"engagement_rate":{"description":"Interactions per post reached, among the window's posts (0 to 1).","format":"double","type":["number","null"]},"interactions":{"format":"int64","type":"integer"},"posts":{"description":"Posts published in the window.","format":"int64","type":"integer"},"reach":{"format":"int64","type":"integer"},"views":{"format":"int64","type":"integer"}},"required":["reach","views","interactions","posts"],"type":"object"},"InstagramAuthorizeUrl":{"description":"Where to send the browser to connect an Instagram account.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"InstagramConnectConfig":{"description":"Whether Business Login for Instagram is set up on this server.","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"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"},"Interest":{"description":"An interest Meta can target.","properties":{"audience_size":{"description":"Rough size of the audience, when Meta says.","format":"int64","type":["integer","null"]},"id":{"type":"string"},"name":{"type":"string"},"topic":{"type":["string","null"]}},"required":["id","name"],"type":"object"},"InterestRef":{"description":"An interest to target, as `searchSocialAdInterests` returns it.","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"Interests":{"description":"Interests found.","properties":{"interests":{"items":{"$ref":"#/components/schemas/Interest"},"type":"array"}},"required":["interests"],"type":"object"},"Interval":{"enum":["day","week","month"],"type":"string"},"InventoryLocation":{"description":"A place stock is kept: a warehouse, a shop's back room, a supplier's\nconsignment shelf.","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"]},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","is_active","created_at","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"},"InventoryModeResponse":{"properties":{"inventory_mode":{"description":"The module now active.","type":"string"}},"required":["inventory_mode"],"type":"object"},"InventoryPosition":{"description":"What the store held at the end of a day.","properties":{"as_of":{"format":"date","type":"string"},"cutoff":{"description":"The instant the position stands at: the next midnight in São Paulo.","format":"date-time","type":"string"},"own_total_cents":{"description":"The store's own goods at their average cost.","format":"int64","type":"integer"},"rows":{"description":"The store's own goods first (`ownership` 0), then someone else's (2).","items":{"$ref":"#/components/schemas/PositionRow"},"type":"array"},"third_party_total_cents":{"description":"Someone else's goods at the value of their notes.","format":"int64","type":"integer"}},"required":["as_of","cutoff","rows","own_total_cents","third_party_total_cents"],"type":"object"},"InventoryReport":{"properties":{"days":{"format":"int32","type":"integer"},"rows":{"items":{"$ref":"#/components/schemas/InventoryRow"},"type":"array"},"summary":{"$ref":"#/components/schemas/InventorySummary"},"total_variants":{"description":"Matching variants, worst first, before the limit.","format":"int64","type":"integer"}},"required":["days","summary","total_variants","rows"],"type":"object"},"InventoryRow":{"properties":{"available":{"description":"On hand less reserved.","format":"int64","type":"integer"},"cost_cents":{"format":"int64","type":["integer","null"]},"days_of_cover":{"description":"Available stock over daily sales; null without sales.","format":"int64","type":["integer","null"]},"on_hand":{"format":"int64","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/StockStatus"},"stock_value_cents":{"description":"On hand times cost; zero without a cost.","format":"int64","type":"integer"},"units_sold":{"description":"Units sold in the window.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"type":["string","null"]}},"required":["variant_id","product_id","product_title","sku","on_hand","available","units_sold","stock_value_cents","status"],"type":"object"},"InventorySummary":{"properties":{"annual_turnover":{"description":"Cost of goods sold in the window, scaled to a year, over the stock\nvalue: how many times the stock turns in a year. Null without stock value.","format":"double","type":["number","null"]},"low_variants":{"format":"int64","type":"integer"},"out_of_stock_variants":{"format":"int64","type":"integer"},"slow_value_cents":{"description":"What `slow` variants hold, at cost.","format":"int64","type":"integer"},"slow_variants":{"format":"int64","type":"integer"},"stock_value_cents":{"description":"Everything on hand, at cost.","format":"int64","type":"integer"},"variants_in_stock":{"format":"int64","type":"integer"},"variants_without_cost":{"description":"Variants with stock and no cost, so the values above are understated.","format":"int64","type":"integer"}},"required":["stock_value_cents","slow_value_cents","variants_in_stock","slow_variants","low_variants","out_of_stock_variants","variants_without_cost"],"type":"object"},"InviteLookupRequest":{"properties":{"token":{"description":"The invite's `token`, from the acceptance link.","type":"string"}},"required":["token"],"type":"object"},"InvitePreview":{"description":"What an invite link is for, shown before accepting.","properties":{"email":{"description":"The invited e-mail: only an account with it can accept.","type":"string"},"expires_at":{"format":"date-time","type":"string"},"group_names":{"description":"Groups joined on acceptance (empty for an owner invite).","items":{"type":"string"},"type":"array"},"has_account":{"description":"Whether that e-mail already has an account (sign in to accept) or\nnot (create one).","type":"boolean"},"invited_by_name":{"type":["string","null"]},"organization_name":{"type":"string"},"policy_names":{"description":"Permission sets attached on acceptance (empty for an owner invite).","items":{"type":"string"},"type":"array"},"store_name":{"type":"string"},"transfers_ownership":{"description":"Accepting makes the person the owner of the whole organization.","type":"boolean"}},"required":["email","has_account","store_name","organization_name","policy_names","group_names","transfers_ownership","expires_at"],"type":"object"},"InviteStatus":{"description":"Where an invite stands.","enum":["pending","accepted","cancelled","expired"],"type":"string"},"Invoice":{"description":"An invoice for a period of the Mobiari subscription.","properties":{"amount_cents":{"description":"BRL cents.","format":"int64","type":"integer"},"auto_debit":{"description":"Debited on the due date by the organization's Pix Automático\nauthorization: nothing to pay by hand.","type":"boolean"},"billing_cycle":{"$ref":"#/components/schemas/BillingCycle"},"created_at":{"format":"date-time","type":"string"},"due_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"paid_at":{"format":"date-time","type":["string","null"]},"payment_url":{"description":"A payment page, when the provider hosts one.","type":["string","null"]},"period_end":{"format":"date-time","type":"string"},"period_start":{"format":"date-time","type":"string"},"pix_copy_paste":{"description":"Pix \"copia e cola\" to pay the invoice from any bank app.","type":["string","null"]},"plan_code":{"type":"string"},"provider":{"type":"string"},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"tenant_id":{"format":"uuid","type":"string"}},"required":["id","tenant_id","plan_code","billing_cycle","amount_cents","period_start","period_end","due_at","status","provider","auto_debit","created_at"],"type":"object"},"InvoiceIssuer":{"description":"The issuer a note would go out under, and why.","properties":{"cnpj":{"type":"string"},"environment":{"description":"`homologacao` or `producao`.","type":"string"},"id":{"format":"uuid","type":"string"},"is_default":{"description":"The store's default issuer (the company profile's CNPJ).","type":"boolean"},"label":{"description":"How the admin names it: the branch's name or the company's, with the CNPJ.","type":"string"},"reason":{"description":"Why, for the team (Portuguese, as the admin shows it).","type":"string"},"source":{"$ref":"#/components/schemas/InvoiceIssuerSource"},"uf":{"description":"The issuer's state: the origin of the sale for ICMS (internal or\ninterstate, DIFAL).","type":"string"}},"required":["id","is_default","label","cnpj","uf","environment","source","reason"],"type":"object"},"InvoiceIssuerSource":{"description":"Why an issuer was picked.","enum":["chosen","pickup_location","stock_location","pos_location","channel","billing","default"],"type":"string"},"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"},"InvoiceProfile":{"properties":{"city":{"type":"string"},"city_code":{"description":"Brazil only: the IBGE code of the city (7 digits). Optional: it is looked up from\nthe city and state when the invoice is issued.","type":["string","null"]},"complement":{"type":["string","null"]},"country":{"description":"`BR` for a client in Brazil, otherwise its ISO 3166-1 alpha-2 country (`US`).","type":"string"},"district":{"description":"Required in Brazil; `N/A` is written when an address abroad has none.","type":["string","null"]},"number":{"type":"string"},"postal_code":{"description":"Postal code (CEP in Brazil, 8 digits); optional abroad.","type":["string","null"]},"region":{"description":"State or province; `EX` is written when there is none.","type":["string","null"]},"street":{"type":"string"}},"required":["country","street","number","city"],"type":"object"},"InvoiceSent":{"properties":{"already_sent":{"description":"The marketplace already had a note for this shipment (sent before).","type":"boolean"},"not_required":{"description":"The marketplace needs no note for this shipment.","type":"boolean"},"pending":{"description":"The marketplace received the note and checks it later.","type":"boolean"}},"required":["already_sent","pending","not_required"],"type":"object"},"InvoiceStLine":{"description":"Where an item's ICMS-ST comes from, for the invoice preview: the rule\n(its segment, agreement, source and start), the MVA before and after any\nadjustment, and whether the store pays it by GNRE (no IE as substitute\nin the destination).","properties":{"agreement":{"type":["string","null"]},"base_cents":{"format":"int64","type":"integer"},"due_to":{"description":"The state the ST is due to.","type":"string"},"fcp_st_cents":{"format":"int64","type":"integer"},"gnre_required":{"description":"Between states, without an IE as substitute in `due_to`: the ST is\npaid by GNRE, per note, before the goods leave (Conv 142/2018 cl. 18ª),\nand a copy travels with them.","type":"boolean"},"icms_st_cents":{"format":"int64","type":"integer"},"item":{"description":"The draft item (`draft.items[item]`).","minimum":0,"type":"integer"},"mva_applied":{"$ref":"#/components/schemas/FiscalRate","description":"`pMVAST` on the note (adjusted between states where the destination adjusts)."},"mva_original_bp":{"description":"The rule's original MVA, basis points.","format":"int32","minimum":0,"type":"integer"},"rate":{"$ref":"#/components/schemas/FiscalRate"},"segment":{"type":["string","null"]},"snapshot":{"description":"The snapshot the rule was read from.","type":"string"},"source":{"description":"The dataset the rule came from.","type":"string"},"valid_from":{"format":"date","type":"string"}},"required":["item","due_to","source","valid_from","mva_original_bp","mva_applied","base_cents","rate","icms_st_cents","fcp_st_cents","gnre_required","snapshot"],"type":"object"},"InvoiceStatus":{"description":"Where an invoice stands. `void` invoices were replaced (plan change) or\nwithdrawn (subscription ended) and are never charged.","enum":["open","paid","void"],"type":"string"},"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"},"IssueInvoiceResult":{"description":"The result of issuing a charge's service invoice.","properties":{"charge":{"$ref":"#/components/schemas/Charge"},"invoice_status":{"description":"`pending`, `unknown`, `authorized` or `rejected`.","type":"string"},"message":{"description":"What the national system said, when it refused or is still deciding.","type":["string","null"]}},"required":["charge","invoice_status"],"type":"object"},"IssuePackage":{"properties":{"client_email":{"description":"An e-mail or a phone is required; the e-mail gets the code.","type":["string","null"]},"client_name":{"type":"string"},"client_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":["client_name"],"type":"object"},"IssueWalletPass":{"description":"The record to make a pass of.","properties":{"kind":{"description":"`loyalty` (`source_id` is the customer), `gift_card` (the credit\naccount), `booking` (the booking).","type":"string"},"source_id":{"format":"uuid","type":"string"}},"required":["kind","source_id"],"type":"object"},"IssuedPackage":{"description":"A package just issued, with the code the client 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"},"ItemCreateRequest":{"properties":{"allow_backorder":{"description":"Defaults to true.","type":["boolean","null"]},"base_unit":{"description":"The unit quantities are counted in. Defaults to `un`.","type":["string","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"initial_on_hand":{"description":"Opening stock in base units.","format":"int32","minimum":0,"type":["integer","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ItemKind"}]},"length_cm":{"format":"double","type":["number","null"]},"location_id":{"description":"Location for `initial_on_hand`.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"packs":{"description":"Packs to create with the item.","items":{"$ref":"#/components/schemas/ItemPackInput"},"type":"array"},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"ships_as_package":{"type":["boolean","null"]},"sku":{"description":"Unique in the store across every variant.","type":"string"},"tracking":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ItemTracking"}]},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["name","sku"],"type":"object"},"ItemDetail":{"allOf":[{"$ref":"#/components/schemas/ItemRow"},{"properties":{"allow_backorder":{"description":"Whether recipes may sell with this item missing (it can be purchased).","type":"boolean"},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"length_cm":{"format":"double","type":["number","null"]},"packs":{"items":{"$ref":"#/components/schemas/ItemPack"},"type":"array"},"recipe_lines":{"description":"Lines in the item's own recipe (0 for a purchased item).","format":"int64","type":"integer"},"reorder_point":{"format":"double","type":["number","null"]},"reorder_quantity":{"format":"double","type":["number","null"]},"stock_by_location":{"items":{"$ref":"#/components/schemas/ItemLocationStock"},"type":"array"},"supplier_id":{"format":"uuid","type":["string","null"]},"used_in":{"items":{"$ref":"#/components/schemas/ItemUsage"},"type":"array"},"used_in_items":{"description":"Made items this one is a component of.","items":{"$ref":"#/components/schemas/ItemUsageItem"},"type":"array"},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["allow_backorder","packs","stock_by_location","used_in","used_in_items","recipe_lines"],"type":"object"}]},"ItemKind":{"enum":["purchased","made"],"type":"string"},"ItemLocationStock":{"properties":{"location_id":{"format":"uuid","type":"string"},"location_name":{"type":"string"},"on_hand":{"format":"double","type":"number"},"reserved":{"format":"double","type":"number"}},"required":["location_id","location_name","on_hand","reserved"],"type":"object"},"ItemPack":{"description":"A named conversion of an item to its base unit.","properties":{"barcode":{"type":["string","null"]},"height_mm":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"length_mm":{"description":"Outer size and gross weight of one pack as the supplier ships it\n(its box), for the purchase order's box breakdown and freight quote.","format":"int32","type":["integer","null"]},"name":{"description":"\"Caixa c/ 4\".","type":"string"},"supplier_sku":{"description":"The supplier's own code for this pack.","type":["string","null"]},"units_per_pack":{"description":"Base units in one pack.","format":"double","type":"number"},"weight_g":{"format":"int32","type":["integer","null"]},"width_mm":{"format":"int32","type":["integer","null"]}},"required":["id","name","units_per_pack"],"type":"object"},"ItemPackInput":{"allOf":[{"$ref":"#/components/schemas/PackSize"},{"properties":{"barcode":{"type":["string","null"]},"name":{"description":"\"Caixa c/ 4\".","type":"string"},"supplier_sku":{"type":["string","null"]},"units_per_pack":{"description":"Base units in one pack; more than zero.","format":"double","type":"number"}},"required":["name","units_per_pack"],"type":"object"}]},"ItemPackRequest":{"allOf":[{"$ref":"#/components/schemas/PackSize"},{"properties":{"barcode":{"type":["string","null"]},"name":{"description":"\"Caixa c/ 4\". Unique per item.","type":"string"},"supplier_sku":{"type":["string","null"]},"units_per_pack":{"description":"Base units in one pack; more than zero.","format":"double","type":"number"}},"required":["name","units_per_pack"],"type":"object"}]},"ItemPackUpdate":{"allOf":[{"$ref":"#/components/schemas/PackSize"},{"properties":{"barcode":{"type":["string","null"]},"name":{"type":["string","null"]},"supplier_sku":{"type":["string","null"]},"units_per_pack":{"format":"double","type":["number","null"]}},"type":"object"}]},"ItemRecipeLine":{"description":"One line of an item's recipe: a component item and how much of it one\nbase unit of the item needs.","properties":{"available":{"description":"Finished units of the component plus what its own recipe could make.","format":"double","type":"number"},"base_unit":{"type":"string"},"component_item_id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"on_hand":{"format":"double","type":"number"},"pack_id":{"format":"uuid","type":["string","null"]},"quantity":{"description":"Base units of the component per base unit of the item.","format":"double","type":"number"},"reserved":{"format":"double","type":"number"},"sku":{"type":"string"},"supports_units":{"description":"Whole units of the item this component alone could supply.","format":"int64","type":"integer"}},"required":["component_item_id","sku","name","base_unit","kind","quantity","on_hand","reserved","available","supports_units"],"type":"object"},"ItemRecipeLineRequest":{"description":"How much of a component one unit of the item needs: `quantity` (base\nunits, decimals allowed) or `packs` of `pack_id`.","properties":{"pack_id":{"format":"uuid","type":["string","null"]},"packs":{"format":"double","type":["number","null"]},"quantity":{"format":"double","type":["number","null"]}},"type":"object"},"ItemReconciliationCheck":{"description":"One check of the item mirror against the legacy tables.","properties":{"check_name":{"description":"items, stock_rows, stock_rows_match, on_hand, reserved, movements,\nmovement_units, variant_recipe_lines, variant_recipe_lines_match,\nproduct_recipe_lines, product_recipe_lines_match or\neffective_recipe_match. A `_match` check counts the legacy rows that\nhave an identical mirrored row, so a stale quantity shows even when\nthe row counts agree. `effective_recipe_match` compares the merged\nrecipe per variant (a variant line wins over the product base line)\ninstead of single lines.","type":"string"},"legacy_value":{"description":"The figure read from the variants, stock and recipe tables.","format":"double","type":"number"},"mirror_value":{"description":"The same figure read from the item tables.","format":"double","type":"number"},"ok":{"type":"boolean"}},"required":["check_name","legacy_value","mirror_value","ok"],"type":"object"},"ItemRow":{"properties":{"available":{"format":"double","type":"number"},"base_unit":{"description":"un, m, kg: what every quantity of this item is counted in.","type":"string"},"cost_cents":{"format":"int64","type":["integer","null"]},"has_size":{"description":"Size and weight are recorded (all three sides and the weight).","type":"boolean"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/ItemKind"},"legacy_variant_id":{"description":"The variant this item was created from. While the mirror is live its\nstock and usage are read from there.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"on_hand":{"description":"On hand over every location, in base units.","format":"double","type":"number"},"on_hand_packs":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PackBreakdown","description":"`on_hand` as whole packs plus a remainder; null when the item has no\npack or less than one pack."}]},"pack_count":{"format":"int64","type":"integer"},"reserved":{"format":"double","type":"number"},"ships_as_package":{"type":"boolean"},"sku":{"type":"string"},"tracking":{"$ref":"#/components/schemas/ItemTracking"},"used_in_count":{"description":"Products and variants whose recipe uses this item.","format":"int64","type":"integer"}},"required":["id","sku","name","kind","tracking","base_unit","is_active","on_hand","reserved","available","pack_count","used_in_count","has_size","ships_as_package"],"type":"object"},"ItemStockAdjust":{"description":"A manual stock adjustment of an item: exactly one of `delta`, `set_to`,\n`delta_packs` and `set_to_packs`. The pack forms need `pack_id` and must\ncome to whole base units.","properties":{"delta":{"description":"Signed change in base units.","format":"int32","type":["integer","null"]},"delta_packs":{"description":"Signed change in whole packs, e.g. 10 boxes received.","format":"int32","type":["integer","null"]},"force":{"description":"Write even though an ERP owns this store's stock.","type":"boolean"},"location_id":{"description":"Defaults to the store's default location; required with a `set_to`\nwhen the item is stocked at more than one.","format":"uuid","type":["string","null"]},"note":{"type":["string","null"]},"pack_id":{"description":"One of the item's packs, for the `_packs` fields.","format":"uuid","type":["string","null"]},"reason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdjustReason"}]},"set_to":{"description":"Absolute count in base units.","format":"int32","minimum":0,"type":["integer","null"]},"set_to_packs":{"description":"Absolute count in whole packs.","format":"int32","minimum":0,"type":["integer","null"]}},"type":"object"},"ItemStockResult":{"properties":{"item":{"$ref":"#/components/schemas/ItemDetail"},"location_id":{"description":"The location that was adjusted.","format":"uuid","type":"string"},"movement_id":{"description":"The ledger entry written; null when nothing changed.","format":"uuid","type":["string","null"]}},"required":["location_id","item"],"type":"object"},"ItemSyncResult":{"properties":{"items":{"description":"Items of the store after the sync.","format":"int64","type":"integer"}},"required":["items"],"type":"object"},"ItemTracking":{"enum":["counted","consumable"],"type":"string"},"ItemUpdate":{"description":"Fields to change; omitted ones stay. What the item owns (kind, tracking,\nbase unit, description, ships-as-package) is stored on the item; the rest\n(name, SKU, cost, reorder point, size, weight, backorder) is written where\nit still lives, on the variant the item was created from, with the same\nrules as `updateComponent`. Measures, cost and reorder fields accept null\nto clear.","properties":{"allow_backorder":{"type":["boolean","null"]},"base_unit":{"description":"The unit every quantity of this item is counted in (un, m, kg).","type":["string","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ItemKind"}]},"length_cm":{"format":"double","type":["number","null"]},"name":{"type":["string","null"]},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"ships_as_package":{"description":"Freight sends this item as one volume and does not look inside it.","type":["boolean","null"]},"sku":{"type":["string","null"]},"tracking":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ItemTracking"}]},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"type":"object"},"ItemUsage":{"description":"One place an item is used, per one unit of the parent.","properties":{"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"quantity":{"description":"Base units of this item in one unit of the parent.","format":"double","type":"number"},"sku":{"type":["string","null"]},"variant_id":{"description":"Set for a variant's own line; null for a product's shared line.","format":"uuid","type":["string","null"]},"variant_title":{"type":["string","null"]}},"required":["product_id","product_title","quantity"],"type":"object"},"ItemUsageItem":{"description":"A made item that uses this item.","properties":{"item_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"quantity":{"description":"Base units of this item per base unit of the made item.","format":"double","type":"number"},"sku":{"type":"string"}},"required":["item_id","sku","name","quantity"],"type":"object"},"JoinWaitlist":{"description":"What a client asks to wait for.","properties":{"client_email":{"description":"An e-mail or a phone is required; only an e-mail is told by itself.","type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"day":{"description":"`YYYY-MM-DD`, today or later.","format":"date","type":"string"},"provider_id":{"description":"Empty: anyone who delivers the service.","format":"uuid","type":["string","null"]},"service_id":{"format":"uuid","type":"string"}},"required":["service_id","day","client_name"],"type":"object"},"JourneyOrder":{"description":"An order of the customer and the touch it was credited to.","properties":{"conversation_id":{"description":"The conversation it was sold in, if any.","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"last_campaign":{"type":["string","null"]},"last_channel":{"type":["string","null"]},"last_medium":{"type":["string","null"]},"last_source":{"type":["string","null"]},"number":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"status":{"description":"Order status (`pending`, `paid`, `fulfilled`, `cancelled`...).","type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["order_id","status","total_cents","created_at"],"type":"object"},"JourneyTouch":{"description":"One step of a customer's journey.","properties":{"at":{"format":"date-time","type":"string"},"campaign":{"type":["string","null"]},"channel":{"description":"See `AttributionRow.channel`; `direct` when nothing is known.","type":"string"},"channel_kind":{"type":["string","null"]},"content":{"type":["string","null"]},"conversation_id":{"description":"Conversations: the conversation, its inbox channel, who set the\norigin (`visit`, `agent`, `ad`, `link`) and the lead stage.","format":"uuid","type":["string","null"]},"kind":{"$ref":"#/components/schemas/JourneyTouchKind"},"landing_url":{"type":["string","null"]},"lead_stage":{"type":["string","null"]},"medium":{"type":["string","null"]},"origin_set_by":{"type":["string","null"]},"page_count":{"format":"int32","type":["integer","null"]},"referrer":{"type":["string","null"]},"session_id":{"description":"Visits: the session, its landing page, referrer and page count.","format":"uuid","type":["string","null"]},"source":{"description":"Null when direct or unknown.","type":["string","null"]}},"required":["kind","at","channel"],"type":"object"},"JourneyTouchKind":{"description":"What a journey touch was.","enum":["visit","conversation"],"type":"string"},"KbArticle":{"description":"A knowledge base article.","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"},"index_error":{"type":["string","null"]},"indexed_at":{"format":"date-time","type":["string","null"]},"public":{"description":"Shown in the help center when published; otherwise only the AI and\nthe team read 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","public","created_at","updated_at"],"type":"object"},"KbArticleStatus":{"enum":["draft","published"],"type":"string"},"KbArticleSummary":{"description":"An article in a list (without its body).","properties":{"chunk_count":{"description":"Indexed passages.","format":"int64","type":"integer"},"collection_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"index_error":{"type":["string","null"]},"indexed_at":{"description":"When the bot's index last picked it up. Null while (re)indexing.","format":"date-time","type":["string","null"]},"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","chunk_count","public","updated_at"],"type":"object"},"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"},"KbReindexResult":{"properties":{"queued":{"description":"Published articles queued for indexing.","minimum":0,"type":"integer"}},"required":["queued"],"type":"object"},"KbSearchHit":{"description":"A knowledge base passage matching a question.","properties":{"article_id":{"format":"uuid","type":"string"},"chunk_index":{"description":"Position of the passage in the article.","format":"int32","type":"integer"},"content":{"description":"The passage, with its neighbours.","type":"string"},"score":{"description":"Relevance; higher is better. Only comparable within one search.","format":"double","type":"number"},"title":{"description":"The article's title.","type":"string"}},"required":["article_id","title","chunk_index","content","score"],"type":"object"},"KbSearchRequest":{"properties":{"query":{"type":"string"}},"required":["query"],"type":"object"},"KbSearchResult":{"properties":{"embeddings_configured":{"description":"Whether semantic ranking took part (else full-text only).","type":"boolean"},"hits":{"description":"The passages the bot would read, best first (at most six).","items":{"$ref":"#/components/schemas/KbSearchHit"},"type":"array"}},"required":["hits","embeddings_configured"],"type":"object"},"KeyFieldView":{"description":"One field of the keys form.","properties":{"help":{"description":"Where the seller finds it.","type":["string","null"]},"label":{"description":"What the form shows.","type":"string"},"name":{"description":"The key in the `keys` request.","type":"string"},"required":{"type":"boolean"},"secret":{"description":"Typed masked; never sent back.","type":"boolean"}},"required":["name","label","secret","required"],"type":"object"},"Kind":{"description":"What a field holds.","enum":["text","longtext","number","integer","boolean","date","select","multiselect","email","url","phone","document"],"type":"string"},"Kit":{"description":"A variant with a bill of materials.","properties":{"buildable":{"description":"Kits buildable right now: the minimum over the lines of\n`available / quantity_required`.","format":"int32","type":"integer"},"line_count":{"format":"int32","type":"integer"},"name":{"type":"string"},"open_builds":{"description":"Units on queued or running build jobs.","format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_name":{"type":"string"},"sku":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","product_id","sku","name","product_name","line_count","buildable","open_builds"],"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"},"Lang":{"enum":["pt","en"],"type":"string"},"LeadFollowupSettings":{"description":"A store's follow-up switches.","properties":{"ai_nudges":{"description":"Send the AI nudges to customers. Off: agent reminders only.","type":"boolean"},"email_nudges":{"description":"Also send the cart e-mail when the customer record has an address.","type":"boolean"},"enabled":{"description":"Run the sequence. Off by default; on, it replaces the sales\nblueprint's single cart follow-up (`followup_enabled`).","type":"boolean"}},"required":["enabled","ai_nudges","email_nudges"],"type":"object"},"LeadItem":{"description":"A conversation opened by someone who had not bought yet.","properties":{"ad_headline":{"description":"The ad's headline, on a click-to-chat lead.","type":["string","null"]},"ad_id":{"description":"Meta's ad id, on a click-to-chat lead.","type":["string","null"]},"campaign":{"type":["string","null"]},"channel":{"description":"See `ChannelPerformance.channel`; `direct` when unknown.","type":"string"},"contact_email":{"type":["string","null"]},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"converted":{"description":"Whether the lead bought (see the module docs).","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"inbox":{"description":"The inbox channel: `whatsapp`, `instagram`, `web` or `email`.","type":"string"},"last_message_at":{"format":"date-time","type":["string","null"]},"order_id":{"description":"The first paid order that converted it.","format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"quoted_at":{"format":"date-time","type":["string","null"]},"revenue_cents":{"description":"Paid orders that converted it, summed.","format":"int64","type":"integer"},"source":{"type":["string","null"]},"stage":{"description":"`new`, `qualified`, `quoted`, `won` or `lost`.","type":"string"}},"required":["conversation_id","created_at","inbox","channel","stage","converted","revenue_cents"],"type":"object"},"LeadStage":{"description":"Where a lead stands.","enum":["new","qualified","quoted","won","lost"],"type":"string"},"LeadsReport":{"description":"Leads by origin over a window.","properties":{"from":{"format":"date-time","type":"string"},"leads":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"rows":{"description":"One row per origin and inbox channel, most leads first.","items":{"$ref":"#/components/schemas/LeadsRow"},"type":"array"},"to":{"format":"date-time","type":"string"},"won":{"format":"int64","type":"integer"}},"required":["from","to","leads","won","revenue_cents","rows"],"type":"object"},"LeadsRow":{"description":"Conversations from one origin on one inbox channel, and what they sold.","properties":{"channel":{"description":"See `AttributionRow.channel`; null while the origin is unknown.","type":["string","null"]},"channel_kind":{"description":"The inbox channel: `whatsapp`, `instagram`, `web` or `email`.","type":"string"},"leads":{"description":"Conversations opened by leads (contacts without a paid order).","format":"int64","type":"integer"},"lost":{"format":"int64","type":"integer"},"orders":{"description":"Paid or fulfilled orders sold in these conversations.","format":"int64","type":"integer"},"quoted":{"description":"Of `leads`, how many got a cart link or a PIX (or bought), even if\nlater lost.","format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"source":{"type":["string","null"]},"won":{"format":"int64","type":"integer"}},"required":["channel_kind","leads","quoted","won","lost","orders","revenue_cents"],"type":"object"},"LedgerEntry":{"description":"One consent change.","properties":{"actor_name":{"description":"The team member who recorded it.","type":["string","null"]},"at":{"format":"date-time","type":"string"},"channel":{"description":"`email`, `whatsapp` or `sms`.","type":"string"},"customer_id":{"format":"uuid","type":"string"},"customer_name":{"type":["string","null"]},"evidence":{"type":"object"},"id":{"format":"uuid","type":"string"},"ip":{"type":["string","null"]},"source":{"description":"`checkout`, `form`, `preferences`, `account`, `whatsapp_keyword`, `whatsapp_button`, `meta_opt_out`, `import`, `staff`, `lgpd_erase`, …","type":["string","null"]},"status":{"description":"`granted` or `revoked`.","type":"string"},"user_agent":{"type":["string","null"]},"wording":{"description":"The words the person agreed to.","type":["string","null"]}},"required":["id","customer_id","channel","status","evidence","at"],"type":"object"},"LegalInfoSource":{"description":"Where the shown identity comes from.","enum":["saved","organization","empty"],"type":"string"},"LegalPage":{"description":"A page generated from the legal identity.","properties":{"content":{"description":"The generated body (HTML), also the starting text to customize.","type":"string"},"customized":{"description":"Something else at this slug replaces the generated page.","type":"boolean"},"override_source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LegalPageOverride","description":"What replaces it, when `customized`."}]},"slug":{"type":"string"},"title":{"type":"string"}},"required":["slug","title","customized","content"],"type":"object"},"LegalPageOverride":{"description":"What replaces a generated page on the storefront.","enum":["page","theme"],"type":"string"},"Level":{"description":"Coarse level a code belongs to inside its group. The picker offers\nNone / Read / Write / Manage per group; Read ⊂ Write ⊂ Manage.","enum":["read","write","manage"],"type":"string"},"LicenseKeyPool":{"description":"A product's pool in numbers.","properties":{"available":{"description":"Not given to any order yet.","format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"},"used":{"format":"int64","type":"integer"}},"required":["total","available","used"],"type":"object"},"LinkDestination":{"description":"Where a tracked link sends people.","enum":["whatsapp","instagram","url"],"type":"string"},"LinkRequest":{"properties":{"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"LinkableOrder":{"description":"An order the inbox can link.","properties":{"conversation_id":{"description":"The conversation the order is linked to now, if any.","format":"uuid","type":["string","null"]},"conversation_linked_by":{"description":"`inbox`, `phone` or `agent`.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"customer_phone":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"number":{"type":["string","null"]},"status":{"description":"`pending`, `paid`, `fulfilled`, `cancelled`...","type":["string","null"]},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["id","created_at"],"type":"object"},"Listing":{"description":"A listing and the variant it is tied to.","properties":{"available_quantity":{"format":"int32","type":["integer","null"]},"external_item_id":{"type":"string"},"external_variation_id":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_catalog":{"description":"A catalog copy the marketplace keeps in step with the seller's own\nlisting: Mobiari writes stock to the original only.","type":"boolean"},"link_source":{"description":"`sku` (matched by Mobiari), `manual`, or `unlinked` (a person untied it\nand matching by SKU must not tie it again).","type":["string","null"]},"logistic_type":{"type":["string","null"]},"permalink":{"type":["string","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"sku":{"type":["string","null"]},"status":{"description":"The marketplace's status: active, paused, closed, under_review…","type":"string"},"stock_held_by_marketplace":{"description":"The marketplace holds this stock (Full, FBA): Mobiari does not write it.","type":"boolean"},"sync_error":{"description":"Why the last push failed; empty when it did not.","type":["string","null"]},"synced_at":{"format":"date-time","type":["string","null"]},"synced_quantity":{"format":"int32","type":["integer","null"]},"thumbnail":{"type":["string","null"]},"title":{"type":"string"},"variant_id":{"format":"uuid","type":["string","null"]},"variant_sku":{"type":["string","null"]},"variant_title":{"description":"The Mobiari product and variant, for the screen.","type":["string","null"]}},"required":["id","external_item_id","title","status","is_catalog","stock_held_by_marketplace"],"type":"object"},"ListingCounts":{"properties":{"linked":{"description":"Tied to a Mobiari variant.","format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"},"unlinked":{"description":"Waiting for a variant (no SKU match, or SKU not found).","format":"int64","type":"integer"},"with_errors":{"description":"The last push to the marketplace failed.","format":"int64","type":"integer"}},"required":["total","linked","unlinked","with_errors"],"type":"object"},"Locale":{"description":"A language the admin and alerts are available in.","enum":["pt-BR","en-US"],"type":"string"},"Location":{"description":"A place Meta can target: a region, a city or a ZIP code.","properties":{"country":{"description":"Its two-letter country code.","type":["string","null"]},"key":{"description":"Meta's key: what `regions`, `cities` and `zips` take.","type":"string"},"name":{"type":"string"},"region":{"description":"The region it is in (cities and ZIP codes), when Meta says.","type":["string","null"]},"type":{"description":"`region`, `city` or `zip`.","type":"string"}},"required":["key","name","type"],"type":"object"},"Locations":{"description":"Places found.","properties":{"locations":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"}},"required":["locations"],"type":"object"},"LoggedDecision":{"description":"A logged decision, as the explain screen and dry runs read it.","properties":{"action":{"type":"string"},"allowed":{"type":"boolean"},"context":{"description":"What the handler passed (`{\"amount_cents\": n}`), when anything.","type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"reasons":{"items":{"type":"string"},"type":"array"},"resource_id":{"type":["string","null"]},"resource_type":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["id","user_id","action","resource_type","allowed","reasons","created_at"],"type":"object"},"LoginRequest":{"properties":{"device_name":{"description":"A name for this device, shown in the user's session list\n(`GET /me/sessions`), e.g. \"iPhone de Ana\".","type":["string","null"]},"email":{"example":"ana@example.com","type":"string"},"password":{"type":"string"}},"required":["email","password"],"type":"object"},"LoginResponse":{"description":"Outcome of a password sign-in, told apart by `status`.","discriminator":{"mapping":{"authenticated":"#/components/schemas/LoginResponseAuthenticated","two_factor_required":"#/components/schemas/LoginResponseTwoFactorRequired"},"propertyName":"status"},"oneOf":[{"$ref":"#/components/schemas/LoginResponseAuthenticated"},{"$ref":"#/components/schemas/LoginResponseTwoFactorRequired"}]},"LoginResponseAuthenticated":{"allOf":[{"$ref":"#/components/schemas/Session","description":"Signed in."},{"properties":{"status":{"enum":["authenticated"],"type":"string"}},"required":["status"],"type":"object"}],"description":"Signed in."},"LoginResponseTwoFactorRequired":{"allOf":[{"$ref":"#/components/schemas/TwoFactorChallenge","description":"A second factor is required."},{"properties":{"status":{"enum":["two_factor_required"],"type":"string"}},"required":["status"],"type":"object"}],"description":"A second factor is required."},"LogoutRequest":{"properties":{"refresh_token":{"description":"The session's current refresh token.","type":"string"}},"required":["refresh_token"],"type":"object"},"LookupMatch":{"description":"What a lookup code matched.","enum":["sku","barcode","product_gtin"],"type":"string"},"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"},"LoyaltyImport":{"description":"A past import.","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"filename":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"source":{"type":"string"},"summary":{"description":"Rows by status, and the points and cashback imported.","type":"object"}},"required":["id","source","summary","created_at"],"type":"object"},"LoyaltyImportReport":{"description":"What a file became, or would.","properties":{"cashback_cents":{"format":"int64","type":"integer"},"counts":{"additionalProperties":{"format":"int64","minimum":0,"type":"integer"},"description":"Rows by status.","propertyNames":{"type":"string"},"type":"object"},"dry_run":{"type":"boolean"},"import_id":{"description":"The import's id once applied.","format":"uuid","type":["string","null"]},"points":{"description":"Points and cashback of the `ok` rows.","format":"int64","type":"integer"},"rows":{"description":"Up to 1000 rows, the problems first.","items":{"$ref":"#/components/schemas/LoyaltyImportRow"},"type":"array"},"source":{"type":"string"}},"required":["dry_run","source","counts","points","cashback_cents","rows"],"type":"object"},"LoyaltyImportRequest":{"description":"A file of balances to bring in.","properties":{"csv":{"description":"The CSV itself (`;` or `,`). Columns, by header: `email`, `cpf` (or\n`documento`, `cnpj`), `telefone` (or `celular`, `phone`) to find the\ncustomer; `pontos` (or `points`) and/or `cashback` (or `saldo`,\n`credito`, in reais: `12,50`); `validade` (or `expira`, `vencimento`,\n`expires_at`: `31/12/2026` or `2026-12-31`) for the cashback. A row\nwithout a day expires `cashback_expire_months` from today.","type":"string"},"dry_run":{"description":"True: only say what each row would become. Left out: a dry run.","type":"boolean"},"filename":{"description":"The file's name, kept with the import.","type":["string","null"]},"source":{"description":"Where the balances come from, as the history will say it: \"Clube\nFidelidade antigo\". 1 to 80 characters.","type":"string"}},"required":["source","csv"],"type":"object"},"LoyaltyImportRow":{"description":"What a row became, or would.","properties":{"cashback_cents":{"format":"int64","type":"integer"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"expires_at":{"format":"date-time","type":["string","null"]},"identifier":{"description":"What identified the customer, as written.","type":"string"},"line":{"description":"The line in the file (the header is line 1).","minimum":0,"type":"integer"},"message":{"type":["string","null"]},"points":{"format":"int64","type":"integer"},"status":{"description":"`ok` (imported, or would be), `duplicate` (already imported),\n`not_found`, `ambiguous` (several customers match), `invalid` or\n`expired` (the day has passed).","type":"string"}},"required":["line","identifier","points","cashback_cents","status"],"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"},"LoyaltySummary":{"description":"The program in numbers.","properties":{"cashback_pending_cents":{"description":"Cashback still waiting for its orders to stand, in cents.","format":"int64","type":"integer"},"cashback_released_cents":{"description":"Cashback that reached customers' wallets, net of what refunds took\nback, in cents.","format":"int64","type":"integer"},"members_with_points":{"description":"Customers with points they can use now.","format":"int64","type":"integer"},"points_available":{"description":"Points customers can use now, in all.","format":"int64","type":"integer"},"points_pending":{"description":"Points still waiting for their orders to stand.","format":"int64","type":"integer"},"points_value_cents":{"description":"The store credit the usable points would become, in whole blocks.","format":"int64","type":"integer"},"referral_rewards_cents":{"description":"Store credit given for referrals (both sides), in cents.","format":"int64","type":"integer"},"referrals_pending":{"format":"int64","type":"integer"},"referrals_rewarded":{"format":"int64","type":"integer"},"tiers":{"description":"Customers in each tier, lowest first (by their last worked-out level).","items":{"$ref":"#/components/schemas/TierCount"},"type":"array"}},"required":["members_with_points","points_available","points_pending","points_value_cents","referrals_pending","referrals_rewarded","referral_rewards_cents","cashback_pending_cents","cashback_released_cents","tiers"],"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"},"ManifestKind":{"description":"The conclusive manifestations a member sends for a supplier note.","enum":["confirmation","unknown","not_performed"],"type":"string"},"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"},"ManualRefundRequest":{"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"]},"reason":{"description":"Kept with the refund for the team; not sent to the customer.","type":["string","null"]}},"type":"object"},"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"},"ManualSaleRequest":{"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"]}},"required":["items","payments"],"type":"object"},"ManualSaleResponse":{"description":"The sale just recorded.","properties":{"change_cents":{"description":"What goes back in cash: what was handed over above each cash\npayment's amount, never negative.","format":"int64","type":"integer"},"fulfillment_method":{"description":"`pickup` for a retirada sale, `shipping` otherwise.","type":"string"},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":"string"},"pickup_location_id":{"description":"The retirada location, when `fulfillment_method` is `pickup`.","format":"uuid","type":["string","null"]},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ManualSalePix","description":"Only for `pix_qr`: poll `GET .../orders/{order_id}/payments` until\nan intent is `approved`."}]},"shipping_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["order_id","order_number","total_cents","shipping_cents","change_cents","fulfillment_method"],"type":"object"},"MarkNotificationsRequest":{"description":"Which of my notifications to mark. Give exactly one of `ids`,\n`category` or `all`.","properties":{"all":{"description":"Every one of mine in this store.","type":"boolean"},"category":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NotificationCategory"}]},"ids":{"items":{"format":"uuid","type":"string"},"type":["array","null"]},"until":{"description":"Only what happened up to this moment (what the user saw), so one\narriving meanwhile stays unread. Defaults to now.","format":"date-time","type":["string","null"]}},"type":"object"},"MarketingConfig":{"description":"The store's ad-platform tracking setup. Secrets (access tokens, OAuth\ncredentials) are write-only: they show as `*_configured` flags.","properties":{"ga4_configured":{"description":"A Measurement Protocol API secret is stored.","type":"boolean"},"ga4_measurement_id":{"description":"GA4 measurement id (`G-…`) the server-side events go to.","type":["string","null"]},"google_ads_configured":{"description":"The store's Google Ads account can be reached: a customer id plus its\nown OAuth credentials or Mobiari's shared access.","type":"boolean"},"google_ads_conversion_action_id":{"type":["string","null"]},"google_ads_conversion_id":{"description":"Conversion id for the browser tag (`AW-...`).","type":["string","null"]},"google_ads_conversion_label":{"type":["string","null"]},"google_ads_customer_id":{"type":["string","null"]},"google_ads_enhanced_conversions":{"description":"Enhanced conversions: uploads carry the buyer's hashed e-mail and\nphone (needs Google's customer data terms accepted in the account).","type":"boolean"},"google_ads_lead_action_id":{"description":"Conversion action the storefront's WhatsApp leads (a number typed\nbefore opening WhatsApp from an ad click) are uploaded to. Unset: no\nlead goes to Google Ads.","type":["string","null"]},"google_ads_login_customer_id":{"description":"Manager (MCC) account the API calls go through, when there is one.","type":["string","null"]},"google_ads_oauth_client_id":{"description":"OAuth client id (its secret and refresh token are write-only).","type":["string","null"]},"google_ads_shared_access":{"description":"Mobiari enabled its own Google Ads access for this store (server-side\nlist): it needs only its customer id and conversion action, no\ndeveloper token or OAuth credentials.","type":"boolean"},"gtm_container_id":{"description":"Google Tag Manager container (`GTM-…`) the storefront loads, with\nthe commerce events in its data layer.","type":["string","null"]},"meta_ad_account_id":{"type":["string","null"]},"meta_ads_token_configured":{"description":"A token for reading ad spend is stored (the CAPI token counts).","type":"boolean"},"meta_capi_configured":{"description":"A Conversions API access token is stored.","type":"boolean"},"meta_catalog_configured":{"description":"Catalog id and catalog access token are both stored.","type":"boolean"},"meta_catalog_id":{"type":["string","null"]},"meta_pixel_id":{"description":"Meta pixel the storefront loads.","type":["string","null"]},"meta_test_event_code":{"description":"Test event code: while set, every CAPI event goes to \"Test events\"\nin Meta and counts for neither reports nor ad delivery.","type":["string","null"]},"tiktok_configured":{"description":"An Events API access token is stored.","type":"boolean"},"tiktok_pixel_code":{"description":"TikTok pixel code (Events API `event_source_id`).","type":["string","null"]},"tiktok_test_event_code":{"description":"While set, every TikTok event goes to \"Test events\" only.","type":["string","null"]}},"required":["meta_capi_configured","meta_ads_token_configured","meta_catalog_configured","google_ads_configured","google_ads_shared_access","google_ads_enhanced_conversions","tiktok_configured","ga4_configured"],"type":"object"},"MarketingInsights":{"description":"Revenue by traffic source over a window.","properties":{"attributed_orders":{"description":"Orders credited to a source (any channel but direct).","format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"from":{"format":"date-time","type":"string"},"rows":{"description":"One row per source / medium / campaign, highest revenue first.","items":{"$ref":"#/components/schemas/AttributionRow"},"type":"array"},"to":{"format":"date-time","type":"string"},"total_orders":{"description":"Paid or fulfilled orders created in the window, attributed or not.","format":"int64","type":"integer"},"total_revenue_cents":{"format":"int64","type":"integer"},"touch":{"$ref":"#/components/schemas/AttributionTouch"}},"required":["from","to","touch","total_orders","total_revenue_cents","attributed_orders","attributed_revenue_cents","rows"],"type":"object"},"MarketingLink":{"description":"A tracked link and what it brought.","properties":{"campaign":{"type":["string","null"]},"clicks":{"format":"int64","type":"integer"},"code":{"description":"The link's short code (`/_/l/{code}`).","type":"string"},"content":{"type":["string","null"]},"conversations":{"description":"Conversations credited to the link.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"destination":{"$ref":"#/components/schemas/LinkDestination"},"id":{"format":"uuid","type":"string"},"medium":{"type":["string","null"]},"message":{"description":"WhatsApp: the message the person starts with (the code is appended).","type":["string","null"]},"name":{"type":"string"},"revenue_cents":{"description":"Paid orders sold in those conversations.","format":"int64","type":"integer"},"source":{"description":"The source the conversations and visits it brings are credited to.","type":"string"},"target":{"description":"WhatsApp: the number (digits); Instagram: the username; url: the page.","type":"string"},"url":{"description":"The address to share: the store's own domain when it has one.","type":"string"},"won":{"description":"Of `conversations`, the leads won.","format":"int64","type":"integer"}},"required":["id","code","name","destination","target","source","created_at","url","clicks","conversations","won","revenue_cents"],"type":"object"},"MarketingOverview":{"description":"The marketing dashboard over a window.","properties":{"channels":{"description":"Most revenue first, then most leads, then most visitors.","items":{"$ref":"#/components/schemas/ChannelPerformance"},"type":"array"},"current":{"$ref":"#/components/schemas/OverviewTotals"},"daily":{"description":"Every day of the window, oldest first, zeros included.","items":{"$ref":"#/components/schemas/OverviewDay"},"type":"array"},"from":{"format":"date-time","type":"string"},"funnel":{"$ref":"#/components/schemas/SiteFunnel"},"previous":{"$ref":"#/components/schemas/OverviewTotals"},"previous_from":{"description":"The window of the same length just before `from`.","format":"date-time","type":"string"},"stale_leads":{"description":"Leads opened in the window still `new`, without a quote, more than a\nday after they came in.","format":"int64","type":"integer"},"timezone":{"description":"The store's time zone, the one `daily` is cut in.","type":"string"},"to":{"format":"date-time","type":"string"},"touch":{"$ref":"#/components/schemas/AttributionTouch"}},"required":["from","to","previous_from","touch","timezone","current","previous","daily","funnel","stale_leads","channels"],"type":"object"},"MarketingStats":{"description":"Storefront traffic over a window.","properties":{"avg_pages_per_session":{"description":"Pageviews per session.","format":"double","type":"number"},"conversion_revenue_cents":{"format":"int64","type":"integer"},"conversions":{"description":"Paid or fulfilled orders attributed to a tracked visitor.","format":"int64","type":"integer"},"custom_events":{"description":"Events other than pageviews and identifies.","format":"int64","type":"integer"},"from":{"format":"date-time","type":"string"},"identifies":{"description":"Visitors identified (e-mail or phone typed on the storefront).","format":"int64","type":"integer"},"pageviews":{"format":"int64","type":"integer"},"sessions":{"format":"int64","type":"integer"},"to":{"format":"date-time","type":"string"},"visitors":{"description":"Distinct visitors (tracker cookie).","format":"int64","type":"integer"}},"required":["from","to","visitors","sessions","pageviews","custom_events","identifies","conversions","conversion_revenue_cents","avg_pages_per_session"],"type":"object"},"MarketplaceAttributeKind":{"description":"What an attribute's value is.","enum":["text","number","number_unit","boolean","list"],"type":"string"},"MarketplaceAttributeLevel":{"description":"Where an attribute sits on the marketplace.","enum":["listing","variant","axis"],"type":"string"},"MarketplaceAttributeOption":{"description":"One value of a list attribute.","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"MarketplaceAttributeSpec":{"description":"One attribute a category asks for, as the form shows it.","properties":{"conditional":{"description":"Required in some cases only, which the marketplace decides (Mercado\nLivre's `conditional_required`): asked for, not enforced here; the\nmarketplace's preflight says when it is missing.","type":"boolean"},"custom_values":{"description":"A value outside the list is accepted (written as text).","type":"boolean"},"default_unit":{"type":["string","null"]},"field":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MarketplaceProductField","description":"The Mobiari field that fills it, when the adapter knows one."}]},"group":{"description":"The marketplace's grouping, to order the form (Mercado Livre's\nattribute groups; Magalu's attributes against its datasheet).","type":["string","null"]},"hint":{"description":"A line under the field, in the marketplace's words.","type":["string","null"]},"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/MarketplaceAttributeKind"},"level":{"$ref":"#/components/schemas/MarketplaceAttributeLevel"},"max_length":{"format":"int32","minimum":0,"type":["integer","null"]},"multiple":{"description":"Several values at once.","type":"boolean"},"name":{"type":"string"},"required":{"description":"The listing is refused without it.","type":"boolean"},"units":{"items":{"type":"string"},"type":"array"},"values":{"description":"The values a list offers (empty for free text).","items":{"$ref":"#/components/schemas/MarketplaceAttributeOption"},"type":"array"}},"required":["id","name","kind","level","required","conditional","multiple","values","custom_values","units"],"type":"object"},"MarketplaceAttributeValue":{"description":"An attribute's value as the listing carries it: the value's id when the\nmarketplace has a list, the text otherwise (or both: the id wins).","properties":{"id":{"type":"string"},"unit":{"type":["string","null"]},"value":{"type":["string","null"]},"value_id":{"type":["string","null"]}},"required":["id"],"type":"object"},"MarketplaceAxisMapping":{"description":"A variation axis of the marketplace filled from one of the product's options.","properties":{"attribute_id":{"type":"string"},"option":{"description":"The product's option (its name).","type":"string"},"values":{"items":{"$ref":"#/components/schemas/MarketplaceAxisValue"},"type":"array"}},"required":["attribute_id","option","values"],"type":"object"},"MarketplaceAxisValue":{"description":"One value of the product's option and what it becomes on the marketplace.","properties":{"option_value":{"type":"string"},"value":{"type":["string","null"]},"value_id":{"type":["string","null"]}},"required":["option_value"],"type":"object"},"MarketplaceCapabilities":{"description":"What an adapter can do. The screen shows only what is `true`, and the\nloops skip the rest.","properties":{"arrange_shipment":{"description":"The order has to be arranged for shipping (Shopee `ship_order`: drop-off\nor pickup) before the marketplace makes its label. The label route\ncalls [`Marketplace::arrange_shipment`] first.","type":"boolean"},"chat":{"description":"Buyer messages about an order, answered from the inbox.","type":"boolean"},"claims":{"type":"boolean"},"fees":{"description":"The marketplace's fees per order (commission, shipping it charges).","type":"boolean"},"invoice_before_label":{"description":"The marketplace releases the label only after it has the NF-e.","type":"boolean"},"invoice_upload":{"description":"The NF-e is sent to the marketplace from Mobiari.","type":"boolean"},"label":{"description":"The marketplace's shipping label is printed from Mobiari.","type":"boolean"},"listing_create":{"description":"Publish a Mobiari product as a new listing.","type":"boolean"},"listing_import":{"description":"Bring the seller's existing listings in and link them to variants.","type":"boolean"},"notifications":{"description":"The marketplace notifies changes (a webhook); without it the poll is\nall there is.","type":"boolean"},"order_import":{"type":"boolean"},"price_push":{"type":"boolean"},"questions":{"description":"Pre-sale buyer questions, answered from the inbox.","type":"boolean"},"stock_push":{"type":"boolean"}},"required":["listing_import","listing_create","stock_push","price_push","notifications","order_import","invoice_upload","invoice_before_label","label","arrange_shipment","questions","chat","claims","fees"],"type":"object"},"MarketplaceCategory":{"description":"A node of the marketplace's category tree: a Mercado Livre category, a\nShopee or TikTok Shop category, a Magalu category, an Amazon product type,\na Mirakl operator's hierarchy.","properties":{"id":{"type":"string"},"leaf":{"description":"Has no children. A listing goes in a leaf (Amazon's product types are\nall leaves).","type":"boolean"},"name":{"type":"string"},"path":{"description":"The names from the top of the tree down to this one, itself included.","items":{"type":"string"},"type":"array"},"restricted":{"description":"Why the seller cannot publish here, when they cannot (TikTok's\ninvite-only and prohibited categories, a Mercado Livre category that\ntakes no listings). `None` when they can.","type":["string","null"]}},"required":["id","name","path","leaf"],"type":"object"},"MarketplaceCategoryList":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/MarketplaceCategory"},"type":"array"},"fetched_at":{"description":"When the marketplace was read.","format":"date-time","type":"string"}},"required":["categories","fetched_at"],"type":"object"},"MarketplaceCategorySchema":{"description":"What a category asks of a listing.","properties":{"attributes":{"items":{"$ref":"#/components/schemas/MarketplaceAttributeSpec"},"type":"array"},"category":{"$ref":"#/components/schemas/MarketplaceCategory"},"gtin_required":{"description":"Every variant needs a GTIN, or the marketplace's way of saying it has\nnone (Shopee's per-category GTIN rule).","type":"boolean"},"listing_types":{"description":"Empty where the marketplace has one kind of listing.","items":{"$ref":"#/components/schemas/MarketplaceListingType"},"type":"array"},"max_axes":{"description":"How many axes the variations may use (Shopee: 2; SHEIN: colour and size).","format":"int32","minimum":0,"type":["integer","null"]},"max_images":{"format":"int32","minimum":0,"type":["integer","null"]},"package_required":{"description":"The package's weight and dimensions are required (TikTok's category\nrules, Shopee's limits).","type":"boolean"},"title_max":{"format":"int32","minimum":0,"type":["integer","null"]},"variations":{"description":"Listings in the category may have variations.","type":"boolean"}},"required":["category","attributes","variations","listing_types","gtin_required","package_required"],"type":"object"},"MarketplaceCategorySchemaView":{"properties":{"fetched_at":{"format":"date-time","type":"string"},"schema":{"$ref":"#/components/schemas/MarketplaceCategorySchema"}},"required":["schema","fetched_at"],"type":"object"},"MarketplaceCategorySuggestion":{"description":"A category the marketplace suggests for a product, read from its title\n(Mercado Livre's domain discovery, TikTok's and Shopee's recommendation,\nAmazon's product type search).","properties":{"attributes":{"description":"Values the marketplace read from the title along with it (Mercado\nLivre's domain discovery names the brand, the model...).","items":{"$ref":"#/components/schemas/MarketplaceAttributeValue"},"type":"array"},"category":{"$ref":"#/components/schemas/MarketplaceCategory"}},"required":["category"],"type":"object"},"MarketplaceCategorySuggestions":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/MarketplaceCategorySuggestion"},"type":"array"}},"required":["suggestions"],"type":"object"},"MarketplaceClaim":{"description":"A claim against the seller.","properties":{"action_responsible":{"description":"Who has to move: `seller`, `buyer` or `mediator`.","type":["string","null"]},"claim_type":{"description":"`mediations`, `return`, `cancel_purchase`, `change`...","type":["string","null"]},"description":{"type":["string","null"]},"due_date":{"description":"The seller's deadline.","format":"date-time","type":["string","null"]},"external_claim_id":{"type":"string"},"id":{"format":"uuid","type":"string"},"mandatory_action":{"description":"The action the marketplace marks mandatory for the seller (`refund`, `send_message_to_complainant`...).","type":["string","null"]},"opened_at":{"format":"date-time","type":["string","null"]},"order_id":{"description":"The Mobiari order it is about, when it is one brought in from the marketplace.","format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"problem":{"type":["string","null"]},"reason_id":{"type":["string","null"]},"resolution":{"description":"How a closed claim ended (`payment_refunded`, `item_returned`...).","type":["string","null"]},"stage":{"description":"`claim`, `dispute`, `recontact`...","type":["string","null"]},"status":{"description":"`opened` or `closed`.","type":"string"},"title":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","external_claim_id","status","updated_at"],"type":"object"},"MarketplaceDraftVariant":{"properties":{"active":{"type":"boolean"},"gtin":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"options":{"description":"Option name and value.","items":{"$ref":"#/components/schemas/MarketplaceOptionChoice"},"type":"array"},"price_cents":{"format":"int64","type":["integer","null"]},"quantity":{"format":"int32","type":"integer"},"sku":{"type":"string"},"title":{"type":"string"}},"required":["id","sku","title","quantity","active","options"],"type":"object"},"MarketplaceFormAttribute":{"description":"A listing attribute's value in the form, with where Mobiari took it from\n(`field:brand`, `spec:material`, `option:cor`): what is chosen for a\nsource is remembered for the next product.","properties":{"id":{"type":"string"},"source":{"type":["string","null"]},"unit":{"type":["string","null"]},"value":{"type":["string","null"]},"value_id":{"type":["string","null"]}},"required":["id"],"type":"object"},"MarketplaceItemCondition":{"description":"The condition of what is sold.","enum":["new","used","refurbished"],"type":"string"},"MarketplaceList":{"properties":{"marketplaces":{"items":{"$ref":"#/components/schemas/MarketplaceSummary"},"type":"array"}},"required":["marketplaces"],"type":"object"},"MarketplaceListingAction":{"description":"What a person can do to a published listing.","enum":["pause","activate","close"],"type":"string"},"MarketplaceListingProblem":{"description":"Something that keeps a listing from going out, said before it is sent.","properties":{"code":{"description":"Mobiari's own check, for a screen to word (`required`, `not_on_list`,\n`title_too_long`...) with `params`; `None` for the marketplace's own,\nwhose words are `message`.","type":["string","null"]},"field":{"description":"The attribute id, or `title`, `description`, `images`, `variants`,\n`category`, `listing_type`; `None` when the marketplace does not say.","type":["string","null"]},"message":{"type":"string"},"params":{"additionalProperties":{"type":"string"},"propertyNames":{"type":"string"},"type":"object"}},"required":["message"],"type":"object"},"MarketplaceListingState":{"description":"Where a listing stands on the marketplace, in Mobiari's words.","enum":["draft","submitted","under_review","active","paused","rejected","closed"],"type":"string"},"MarketplaceListingType":{"description":"One way to list in a category (Mercado Livre's Clássico and Premium).","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"MarketplaceOptionChoice":{"description":"A variant as it would be published: the price with the account's markup,\nthe quantity less its buffer.\nOne of a variant's options: its name and the variant's value.","properties":{"option":{"type":"string"},"value":{"type":"string"}},"required":["option","value"],"type":"object"},"MarketplaceOrder":{"description":"An order from the marketplace.","properties":{"created_at":{"format":"date-time","type":"string"},"external_order_id":{"type":"string"},"external_status":{"description":"The marketplace's own word for the state.","type":"string"},"id":{"format":"uuid","type":"string"},"imported_at":{"format":"date-time","type":["string","null"]},"invoiced_by_marketplace":{"description":"The marketplace issues the NF-e of this order itself.","type":"boolean"},"order_id":{"description":"The Mobiari order, once made.","format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"problems":{"description":"What a person must look at: `unlinked_listing` (the order waits for\na variant), `stock_short`, `fraud_risk`, `total_differs`,\n`cancelled_after_shipping`, `cancel_requested` (the buyer\nasked to cancel), `invoice_rejected` (with `reason` and, for a split\norder, `package`),\n`lines_changed` (the marketplace's lines changed in a way Mobiari does\nnot apply by itself: `why` and each line `before` and `after`),\n`acceptance_pending` (the marketplace waits for the seller to accept\nthe order, and Mobiari did not: `reason` says why),\n`shipment_not_confirmed` and `delivery_not_confirmed` (the marketplace\nrefused the shipment, its tracking or the delivery Mobiari reported:\n`reason`), `buyer_data_restricted` (the marketplace withholds the\nbuyer's address and CPF: ship from its own screen).","items":{"type":"object"},"type":"array"},"ready_to_ship":{"description":"False while the marketplace holds the order back (no NF-e and no\nlabel until it lets go).","type":"boolean"},"stage":{"description":"Where it stands in Mobiari's terms: `pending`, `paid` or `cancelled`.","type":"string"}},"required":["id","external_order_id","external_status","stage","problems","ready_to_ship","invoiced_by_marketplace","created_at"],"type":"object"},"MarketplaceProductField":{"description":"A Mobiari field the generic layer fills an attribute from without asking.","enum":["brand","model","gtin","sku","ncm","weight","length","width","height","color","size"],"type":"string"},"MarketplacePublication":{"description":"A product published (or being prepared) on a marketplace.","properties":{"attributes":{"items":{"$ref":"#/components/schemas/MarketplaceFormAttribute"},"type":"array"},"axes":{"items":{"$ref":"#/components/schemas/MarketplaceAxisMapping"},"type":"array"},"category_id":{"type":"string"},"category_path":{"items":{"type":"string"},"type":"array"},"checked_at":{"format":"date-time","type":["string","null"]},"condition":{"$ref":"#/components/schemas/MarketplaceItemCondition"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"external_id":{"description":"The listing on the marketplace; null while a draft.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"image_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"last_error":{"description":"Why the last send failed; the publication keeps what was chosen.","type":["string","null"]},"listing_type":{"type":["string","null"]},"listing_type_name":{"description":"The listing type's name on the marketplace (Clássico), when known.","type":["string","null"]},"listings":{"items":{"$ref":"#/components/schemas/MarketplacePublicationListing"},"type":"array"},"marketplace_status":{"description":"The marketplace's own word for it.","type":["string","null"]},"pending":{"description":"A write the marketplace has accepted and not decided yet.","type":"boolean"},"permalink":{"type":["string","null"]},"problems":{"items":{"$ref":"#/components/schemas/MarketplaceListingProblem"},"type":"array"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"provider":{"description":"The marketplace's code (`mercado_livre`).","type":"string"},"provider_slug":{"description":"Its path slug (`mercado-livre`).","type":"string"},"published_at":{"format":"date-time","type":["string","null"]},"reasons":{"description":"The marketplace's reasons: a review's findings, a refusal's causes.","items":{"type":"string"},"type":"array"},"state":{"$ref":"#/components/schemas/MarketplaceListingState"},"title":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"variant_attributes":{"items":{"$ref":"#/components/schemas/MarketplaceVariantAttributes"},"type":"array"},"variant_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","provider","provider_slug","product_id","product_title","category_id","category_path","condition","image_ids","variant_ids","attributes","axes","variant_attributes","state","reasons","pending","problems","warnings","created_at","updated_at","listings"],"type":"object"},"MarketplacePublicationCheck":{"properties":{"problems":{"description":"Empty when the marketplace would take it.","items":{"$ref":"#/components/schemas/MarketplaceListingProblem"},"type":"array"}},"required":["problems"],"type":"object"},"MarketplacePublicationDraft":{"properties":{"form":{"$ref":"#/components/schemas/MarketplacePublicationForm"},"problems":{"description":"What would keep it from going out as it is.","items":{"$ref":"#/components/schemas/MarketplaceListingProblem"},"type":"array"},"product":{"$ref":"#/components/schemas/MarketplaceSourceProduct"},"schema":{"$ref":"#/components/schemas/MarketplaceCategorySchema"}},"required":["form","schema","product","problems"],"type":"object"},"MarketplacePublicationForm":{"description":"What the seller chooses for a listing: the request to save or send a\npublication, and the prefilled form the screen starts from.","properties":{"attributes":{"items":{"$ref":"#/components/schemas/MarketplaceFormAttribute"},"type":"array"},"axes":{"items":{"$ref":"#/components/schemas/MarketplaceAxisMapping"},"type":"array"},"catalog_product_id":{"description":"The marketplace's catalog product the offer attaches to.","type":["string","null"]},"category_id":{"type":"string"},"condition":{"$ref":"#/components/schemas/MarketplaceItemCondition"},"description":{"description":"The listing's own description (plain text); `null` uses the product's.","type":["string","null"]},"image_ids":{"description":"The product's photos to show, in order.","items":{"format":"uuid","type":"string"},"type":"array"},"listing_type":{"type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"title":{"description":"The listing's own title; `null` uses the product's.","type":["string","null"]},"variant_attributes":{"items":{"$ref":"#/components/schemas/MarketplaceVariantAttributes"},"type":"array"},"variant_ids":{"description":"The variants to sell, in order.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["product_id","category_id","image_ids","variant_ids"],"type":"object"},"MarketplacePublicationListing":{"description":"A listing row of a publication: one per variant (or item) on the marketplace.","properties":{"external_item_id":{"type":"string"},"external_variation_id":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"permalink":{"type":["string","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"sku":{"type":["string","null"]},"status":{"type":"string"},"sync_error":{"type":["string","null"]},"synced_quantity":{"format":"int32","type":["integer","null"]},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["id","external_item_id","status"],"type":"object"},"MarketplacePublicationRequest":{"allOf":[{"$ref":"#/components/schemas/MarketplacePublicationForm"},{"properties":{"submit":{"description":"Send it to the marketplace now; `false` keeps it as a draft in Mobiari.","type":"boolean"}},"type":"object"}]},"MarketplacePublicationStateRequest":{"properties":{"action":{"$ref":"#/components/schemas/MarketplaceListingAction"}},"required":["action"],"type":"object"},"MarketplaceSourceImage":{"properties":{"id":{"format":"uuid","type":"string"},"url":{"description":"Public, so the marketplace can fetch it.","type":"string"},"variant_ids":{"description":"Variants this photo shows (empty: the whole product).","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["id","url","variant_ids"],"type":"object"},"MarketplaceSourceOption":{"properties":{"color":{"type":"boolean"},"name":{"type":"string"},"values":{"items":{"type":"string"},"type":"array"}},"required":["name","color","values"],"type":"object"},"MarketplaceSourceProduct":{"description":"The product as the form shows it.","properties":{"brand":{"type":["string","null"]},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"images":{"items":{"$ref":"#/components/schemas/MarketplaceSourceImage"},"type":"array"},"options":{"items":{"$ref":"#/components/schemas/MarketplaceSourceOption"},"type":"array"},"title":{"type":"string"},"variants":{"items":{"$ref":"#/components/schemas/MarketplaceDraftVariant"},"type":"array"}},"required":["id","title","description","images","options","variants"],"type":"object"},"MarketplaceStatus":{"properties":{"account":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AccountView"}]},"capabilities":{"$ref":"#/components/schemas/MarketplaceCapabilities","description":"What Mobiari does on this marketplace."},"configured":{"description":"This server has the platform's application for the marketplace. When\nfalse, connecting is not possible and the screen says so.","type":"boolean"},"connect_mode":{"$ref":"#/components/schemas/ConnectModeCode","description":"How the seller connects: `oauth` (the marketplace's consent page,\nthrough `authorize`) or `keys` (a form with `key_fields`, sent to `keys`)."},"key_fields":{"description":"The fields of the form, for `keys`; empty for `oauth`.","items":{"$ref":"#/components/schemas/KeyFieldView"},"type":"array"}},"required":["configured","capabilities","connect_mode","key_fields"],"type":"object"},"MarketplaceSummary":{"description":"A marketplace Mobiari can sell on, and the store's account there.","properties":{"account":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AccountSummary"}]},"available":{"description":"This server has an adapter for it.","type":"boolean"},"capabilities":{"$ref":"#/components/schemas/MarketplaceCapabilities"},"code":{"$ref":"#/components/schemas/Provider","description":"The stored code (`mercado_livre`)."},"configured":{"description":"This server has the platform's application for it: it can be connected.","type":"boolean"},"connect_mode":{"$ref":"#/components/schemas/ConnectModeCode","description":"How the seller connects: `oauth` or `keys` (then `key_fields` is the form)."},"key_fields":{"items":{"$ref":"#/components/schemas/KeyFieldView"},"type":"array"},"name":{"type":"string"},"slug":{"description":"The path segment (`mercado-livre`).","type":"string"},"tag":{"description":"The prefix of the parameters the marketplace's way back carries to\nthe admin app (`ml`: `ml_code`, `ml_state`).","type":"string"}},"required":["code","slug","name","tag","available","configured","capabilities","connect_mode","key_fields"],"type":"object"},"MarketplaceVariantAttributes":{"description":"One variant's own attribute values.","properties":{"attributes":{"items":{"$ref":"#/components/schemas/MarketplaceAttributeValue"},"type":"array"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","attributes"],"type":"object"},"MatchLine":{"description":"What a line was: the payable a debit paid, or the payment a credit\nconfirms. Exactly one.","properties":{"payable_id":{"format":"uuid","type":["string","null"]},"payment_id":{"description":"The `payment_id` of a receivable.","format":"uuid","type":["string","null"]}},"type":"object"},"McpApproval":{"description":"Which writes an MCP client's key may make without a person approving\nthem in the app (`api_tokens.mcp_approval`).","enum":["risky","all","none"],"type":"string"},"McpRequest":{"description":"A write an AI client connected over MCP asked for.","properties":{"account_name":{"description":"The service account the operation runs as.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by_name":{"type":["string","null"]},"error":{"type":["string","null"]},"expires_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"key_name":{"description":"The API key that asked.","type":["string","null"]},"op_id":{"description":"Catalog operation id, e.g. `orders.cancel`.","type":"string"},"preview":{"description":"The approval card: method, path, parameters, body, risk tags and\nthe current state of what it changes.","type":"object"},"reason":{"description":"The client's reason for the change, in its own words.","type":["string","null"]},"requires_confirmation":{"description":"Destructive, moves money or reaches outside the store: approving\nneeds `confirmed=true`.","type":"boolean"},"result":{"description":"`{ status, body }` of the API response once applied (redacted).","type":["object","null"]},"status":{"$ref":"#/components/schemas/McpRequestStatus"},"summary":{"description":"What the operation does, from the catalog.","type":"string"}},"required":["id","op_id","summary","preview","status","requires_confirmation","expires_at","created_at"],"type":"object"},"McpRequestStatus":{"description":"Where a request is.","enum":["pending","applying","applied","failed","declined","expired"],"type":"string"},"MediaFile":{"description":"A file of the library.","properties":{"alt_text":{"type":["string","null"]},"cdn_url":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"file_path":{"type":"string"},"file_size_bytes":{"format":"int64","type":"integer"},"filename":{"description":"Stored filename; `/images/{size}/{filename}` serves images.","type":"string"},"folder_id":{"description":"Null for a file at the root.","format":"uuid","type":["string","null"]},"height":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"is_public":{"type":"boolean"},"mime_type":{"type":"string"},"name":{"description":"Display name.","type":"string"},"original_name":{"description":"The name it was uploaded with.","type":["string","null"]},"store_id":{"format":"uuid","type":["string","null"]},"tags":{"items":{"type":"string"},"type":["array","null"]},"tenant_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"format":"uuid","type":["string","null"]},"uploaded_by":{"format":"uuid","type":"string"},"video_error":{"description":"Why the conversion failed, when `video_status` is `failed`\n(`ffmpeg_missing`, or the converter's message).","type":["string","null"]},"video_status":{"description":"A video's web rendition (`catalog::video_renditions`): `pending`\n(waiting to convert), `processing` (converting), `ready` or `failed`.\nNull for anything that is not a video. Storefronts play the original\nuntil it is `ready`.","type":["string","null"]},"width":{"format":"int32","type":["integer","null"]}},"required":["id","tenant_id","name","filename","file_path","mime_type","file_size_bytes","is_public","uploaded_by","created_at","updated_at"],"type":"object"},"MediaFileBulkAction":{"description":"What to do with several files at once.","enum":["move","star","unstar","delete"],"type":"string"},"MediaFileBulkRequest":{"description":"A bulk change.","properties":{"action":{"$ref":"#/components/schemas/MediaFileBulkAction"},"file_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"folder_id":{"description":"For `move`.","format":"uuid","type":["string","null"]},"force":{"description":"For `delete`: delete files in use too.","type":["boolean","null"]}},"required":["file_ids","action"],"type":"object"},"MediaFileBulkResult":{"description":"The outcome of a bulk change.","properties":{"done":{"description":"Files changed.","items":{"format":"uuid","type":"string"},"type":"array"},"in_use":{"description":"Files skipped because live things use them (`delete` without `force`).","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["done","in_use"],"type":"object"},"MediaFileTree":{"description":"Every folder of the tenant and, unless `include_files=false`, every\nfile.","properties":{"files":{"description":"By name.","items":{"$ref":"#/components/schemas/MediaFileWithMeta"},"type":"array"},"folders":{"description":"By path.","items":{"$ref":"#/components/schemas/MediaFolder"},"type":"array"}},"required":["folders","files"],"type":"object"},"MediaFileUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; `folder_id: null`\nmoves the file to the root.","properties":{"alt_text":{"type":["string","null"]},"folder_id":{"format":"uuid","type":["string","null"]},"name":{"type":["string","null"]}},"type":"object"},"MediaFileUpload":{"description":"The stored file and its public URL.","properties":{"file":{"$ref":"#/components/schemas/MediaFileWithVariants"},"upload_url":{"type":"string"}},"required":["file","upload_url"],"type":"object"},"MediaFileUploadForm":{"description":"The multipart form of a file upload.","properties":{"alt_text":{"type":["string","null"]},"description":{"type":["string","null"]},"file":{"description":"The file. Images (JPEG, PNG, WebP) up to 10 MB get resized\nrenditions; anything else is stored as-is, up to 50 MB.","format":"binary","type":"string"},"folder_id":{"format":"uuid","type":["string","null"]},"is_public":{"type":["boolean","null"]},"name":{"description":"Display name; defaults to the uploaded filename.","type":["string","null"]},"tags":{"description":"Comma-separated.","type":["string","null"]}},"required":["file"],"type":"object"},"MediaFileUsage":{"description":"One thing that uses a file.","properties":{"admin_path":{"description":"Where it is edited in the admin, when it has a screen.","type":["string","null"]},"kind":{"description":"`product`, `cms_document`, `page`, `storefront` (the live theme),\n`brand`, `email_template`, `email_broadcast`, `transactional_email`,\n`reference_table` or `manual` (marked public at upload).","type":"string"},"live":{"description":"Live owners make the file public; a draft product or an inactive\ndocument does not.","type":"boolean"},"name":{"description":"The owner's own name: a product title, `collection · document`, a\nstore name. Null for `manual`.","type":["string","null"]},"owner_id":{"format":"uuid","type":"string"}},"required":["kind","owner_id","live"],"type":"object"},"MediaFileVariant":{"description":"A stored rendition of a file (resized image).","properties":{"cdn_url":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"file_id":{"format":"uuid","type":"string"},"file_path":{"type":"string"},"file_size_bytes":{"format":"int32","type":"integer"},"height":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"mime_type":{"type":"string"},"quality":{"format":"int32","type":["integer","null"]},"variant_name":{"description":"e.g. `thumbnail_jpeg`, `medium_webp`.","type":"string"},"width":{"format":"int32","type":["integer","null"]}},"required":["id","file_id","variant_name","file_path","mime_type","file_size_bytes","created_at"],"type":"object"},"MediaFileWithMeta":{"allOf":[{"$ref":"#/components/schemas/MediaFile"},{"properties":{"draft_usage_count":{"description":"Uses by things not live (a draft product, an inactive document).","format":"int64","type":"integer"},"is_starred":{"description":"Starred by the current user.","type":"boolean"},"uploaded_by_name":{"description":"Who uploaded it.","type":["string","null"]},"usage_count":{"description":"Live things that use the file (an active product, a published page,\nthe live theme...). The file is public while this is above zero.","format":"int64","type":"integer"}},"required":["is_starred","usage_count","draft_usage_count"],"type":"object"}],"description":"A file with what the current user sees about it."},"MediaFileWithVariants":{"allOf":[{"$ref":"#/components/schemas/MediaFile"},{"properties":{"variants":{"items":{"$ref":"#/components/schemas/MediaFileVariant"},"type":"array"}},"required":["variants"],"type":"object"}],"description":"A file with its renditions."},"MediaFolder":{"description":"A folder of the file library.","properties":{"color":{"description":"`#RRGGBB`.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_system":{"description":"Folders the platform created; not meant to be renamed.","type":"boolean"},"name":{"type":"string"},"parent_id":{"description":"Null for a top-level folder.","format":"uuid","type":["string","null"]},"path":{"description":"Slash-separated path from the root, kept in sync on rename.","type":["string","null"]},"position":{"format":"int32","type":"integer"},"store_id":{"format":"uuid","type":["string","null"]},"tenant_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by":{"format":"uuid","type":["string","null"]}},"required":["id","tenant_id","name","is_system","position","created_by","created_at","updated_at"],"type":"object"},"MediaFolderCreateRequest":{"description":"A new folder.","properties":{"color":{"description":"`#RRGGBB`.","type":["string","null"]},"description":{"type":["string","null"]},"name":{"type":"string"},"parent_id":{"description":"A folder of the tenant; omit for a top-level folder.","format":"uuid","type":["string","null"]}},"required":["name"],"type":"object"},"MediaFolderUpdateRequest":{"description":"Fields to change; omitted fields keep their value. Renaming updates the\npaths of the folder and everything under it.","properties":{"color":{"type":["string","null"]},"description":{"type":["string","null"]},"name":{"type":["string","null"]},"position":{"format":"int32","type":["integer","null"]}},"type":"object"},"MediaRef":{"description":"A library file in a post.","properties":{"file_id":{"format":"uuid","type":"string"}},"required":["file_id"],"type":"object"},"MemberPermissions":{"description":"What a member may do in the store.","properties":{"codes":{"description":"Effective permission codes here, `[\"*\"]` for an owner: what every\nattachment reaching the member adds up to, after the rules.","items":{"type":"string"},"type":"array"},"is_owner":{"description":"Owner of the store or of its organization: may do everything.","type":"boolean"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","is_owner","codes"],"type":"object"},"MemberStatus":{"description":"`active`, `suspended` (the member suspended the brand's access) or `left`.","enum":["active","suspended","left"],"type":"string"},"MercadoPagoAuthorizeUrl":{"description":"Where to send the browser to connect Mercado Pago.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"MercadoPagoConnectStatus":{"description":"Whether the store can connect by logging in, and whether it did.","properties":{"account_id":{"description":"The Mercado Pago account (seller id) connected.","type":["string","null"]},"connected":{"description":"The store's credentials came from connecting (not pasted).","type":"boolean"},"enabled":{"description":"The server has Mobiari's Mercado Pago application: offer the button.","type":"boolean"},"expires_at":{"description":"When the access token expires; it is renewed a month ahead.","format":"date-time","type":["string","null"]}},"required":["enabled","connected"],"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"},"MessageApp":{"description":"Where a `messages` ad opens the chat.","enum":["whatsapp","instagram"],"type":"string"},"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"},"MetaAdsDay":{"description":"One day of Meta ad account insights.","properties":{"clicks":{"format":"int64","type":"integer"},"day":{"description":"`YYYY-MM-DD`.","type":"string"},"impressions":{"format":"int64","type":"integer"},"meta_purchase_value":{"format":"double","type":"number"},"meta_purchases":{"format":"double","type":"number"},"spend":{"description":"In the ad account's currency (reais), as Meta reports it.","format":"double","type":"number"}},"required":["day","spend","impressions","clicks","meta_purchases","meta_purchase_value"],"type":"object"},"MetaAdsInsights":{"properties":{"configured":{"description":"False when Meta is not connected or the query failed (see `error`).","type":"boolean"},"error":{"type":["string","null"]},"series":{"items":{"$ref":"#/components/schemas/MetaAdsDay"},"type":"array"},"spend":{"description":"Total spend over the window.","format":"double","type":"number"}},"required":["configured","series","spend"],"type":"object"},"MetaAttributedOrders":{"description":"Orders whose first touch points at Meta (utm_source facebook/instagram/\nmeta, or an fbclid).","properties":{"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"series":{"items":{"$ref":"#/components/schemas/AttributedOrdersDay"},"type":"array"}},"required":["orders","revenue_cents","series"],"type":"object"},"MetaCatalogSyncResult":{"description":"What a catalog sync pushed.","properties":{"pushed":{"description":"Variants sent to Meta.","minimum":0,"type":"integer"},"result":{"description":"Meta's batch response; null when there was nothing to push.","type":["object","null"]}},"required":["pushed"],"type":"object"},"MethodPrice":{"description":"The price for one payment method.","properties":{"discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PricedDiscount","description":"The automatic discount this method gets, if any."}]},"installment_cents":{"description":"Each installment at `max_installments` after the first: the total\ndivided down to the cent (the first installment takes the\nremainder), or, when the store rounds prices, in whole reais rounded\nup (`installments::split`).","format":"int64","type":"integer"},"max_installments":{"description":"Interest-free installments allowed (1 for PIX and boleto). With\ninterest, more may be offered: `installments::plan` lists them.","format":"int32","type":"integer"},"method":{"description":"`pix`, `card` or `boleto`.","type":"string"},"total_cents":{"description":"What is charged with this method.","format":"int64","type":"integer"}},"required":["method","total_cents","max_installments","installment_cents"],"type":"object"},"MethodTerms":{"description":"A payment method's fee and settlement terms.","properties":{"configured":{"description":"False when the store has not set this method and the default applies.","type":"boolean"},"fee_bps":{"description":"The processor's percentage, in basis points (299 = 2.99%).","format":"int32","type":"integer"},"fee_fixed_cents":{"description":"A fixed fee per payment.","format":"int64","type":"integer"},"method":{"type":"string"},"settle_days":{"description":"Days from the payment until the money is available.","format":"int32","type":"integer"}},"required":["method","fee_bps","fee_fixed_cents","settle_days"],"type":"object"},"MethodTermsInput":{"properties":{"fee_bps":{"format":"int32","type":"integer"},"fee_fixed_cents":{"format":"int64","type":"integer"},"method":{"type":"string"},"settle_days":{"format":"int32","type":"integer"}},"required":["method","fee_bps","settle_days"],"type":"object"},"MethodTermsList":{"properties":{"terms":{"items":{"$ref":"#/components/schemas/MethodTerms"},"type":"array"}},"required":["terms"],"type":"object"},"MethodTermsUpdate":{"properties":{"terms":{"items":{"$ref":"#/components/schemas/MethodTermsInput"},"type":"array"}},"required":["terms"],"type":"object"},"Metrics":{"description":"Numbers of one level over the window.","properties":{"clicks":{"format":"int64","type":"integer"},"conversations_started":{"description":"Chats started from the ad, as Meta counts them.","format":"int64","type":"integer"},"cost_per_conversation_cents":{"format":"int64","type":["integer","null"]},"cpc_cents":{"format":"int64","type":["integer","null"]},"ctr":{"description":"Clicks per impression (0 to 1).","format":"double","type":["number","null"]},"impressions":{"format":"int64","type":"integer"},"meta_purchase_value_cents":{"format":"int64","type":"integer"},"meta_purchases":{"format":"int64","type":"integer"},"reach":{"format":"int64","type":"integer"},"spend_cents":{"format":"int64","type":"integer"}},"required":["spend_cents","impressions","reach","clicks","meta_purchases","meta_purchase_value_cents","conversations_started"],"type":"object"},"ModelStudioForm":{"description":"Multipart body of a studio save.","properties":{"file":{"description":"The exported model (GLB).","format":"binary","type":"string"},"studio":{"description":"The studio's settings, as JSON (kept to reopen the edit).","type":["string","null"]}},"required":["file"],"type":"object"},"ModelStudioResult":{"description":"The product's model after a studio save or restore.","properties":{"model_source_url":{"type":["string","null"]},"model_studio":{"type":["object","null"]},"model_url":{"type":["string","null"]},"size_bytes":{"description":"Size of the stored model, in bytes (a save only).","format":"int64","type":["integer","null"]}},"type":"object"},"ModuleField":{"properties":{"default":{"description":"Written into `config_json` when the module is first created, so a\nprovider row is never missing a value the driver needs.","type":["string","null"]},"help":{"type":["string","null"]},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"$ref":"#/components/schemas/FieldOption"},"type":"array"},"options_path":{"description":"For [`FieldType::MultiSelect`]: path (relative to this module's provider\nrow) serving the choices as `[{ id, name }]`. Keeping the lookup in the\nspec means the admin fetches a provider's own vocabulary without\nknowing which provider it is.","type":["string","null"]},"placeholder":{"type":["string","null"]},"required":{"type":"boolean"},"secret":{"description":"Masked whenever the config is read back — never returned in the clear.","type":"boolean"},"type":{"$ref":"#/components/schemas/FieldType"}},"required":["key","label","type","required","secret"],"type":"object"},"ModuleKind":{"enum":["native","integration"],"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"]},"MyAccess":{"description":"Every store the signed-in user can reach.","properties":{"stores":{"description":"By store name. Group by `tenant_id` for a tenant/store switcher.","items":{"$ref":"#/components/schemas/StoreAccess"},"type":"array"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","stores"],"type":"object"},"MyMembership":{"description":"The store's membership, as the franchise sees it.","properties":{"billed_to":{"$ref":"#/components/schemas/NetworkBilledTo"},"brand_name":{"description":"The brand's organization: another company.","type":"string"},"brand_store_name":{"type":"string"},"ceiling":{"description":"The accepted ceiling, in plain words.","items":{"$ref":"#/components/schemas/CeilingCode"},"type":"array"},"ceiling_in_force":{"description":"The ceiling in force now: the accepted one plus approved grants.","items":{"$ref":"#/components/schemas/CeilingCode"},"type":"array"},"member":{"$ref":"#/components/schemas/NetworkMember"},"network_admins":{"description":"Who of the brand holds network access in this store.","items":{"$ref":"#/components/schemas/NetworkAdmin"},"type":"array"},"network_name":{"type":"string"},"never_shared":{"description":"What the brand never sees here unless a grant allows it for a while.","items":{"type":"string"},"type":"array"}},"required":["member","network_name","brand_name","brand_store_name","billed_to","ceiling","ceiling_in_force","never_shared","network_admins"],"type":"object"},"Network":{"description":"A network a post can go to.","enum":["instagram","facebook"],"type":"string"},"NetworkAccessEntry":{"description":"One check the engine answered through network access in this store.","properties":{"allowed":{"description":"Refused ones are kept too: what the brand tried beyond the ceiling.","type":"boolean"},"at":{"format":"date-time","type":"string"},"code":{"description":"The permission code asked.","type":"string"},"id":{"format":"uuid","type":"string"},"resource_id":{"type":["string","null"]},"resource_type":{"description":"`store`, `order`, `customer`… and its id, when one record.","type":"string"},"user_id":{"format":"uuid","type":["string","null"]},"user_name":{"type":["string","null"]}},"required":["id","code","resource_type","allowed","at"],"type":"object"},"NetworkAdmin":{"description":"Someone of the brand who holds network access in this store now.","properties":{"codes":{"description":"What they may do here now: their network roles cut down to the\nceiling. Empty while the membership is suspended.","items":{"type":"string"},"type":"array"},"name":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","name","codes"],"type":"object"},"NetworkBilledTo":{"description":"Who pays Mobiari for the member stores.","enum":["network","member"],"type":"string"},"NetworkCoverage":{"description":"The network paying for an organization's subscription, if any.","properties":{"brand_name":{"description":"The brand's organization, which pays.","type":"string"},"network_id":{"format":"uuid","type":"string"},"network_name":{"type":"string"}},"required":["network_id","network_name","brand_name"],"type":"object"},"NetworkInvite":{"description":"`pending`, `accepted`, `declined` or `cancelled`; `expired` when a\npending one ran out.","properties":{"accept_link":{"description":"Only when the e-mail failed: the link, to pass on by hand.","type":["string","null"]},"accepted_at":{"format":"date-time","type":["string","null"]},"access_ceiling":{"items":{"type":"string"},"type":"array"},"cnpj":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"decline_reason":{"type":["string","null"]},"declined_at":{"format":"date-time","type":["string","null"]},"email":{"type":"string"},"email_sent":{"description":"Only when just created: whether the e-mail went out.","type":["boolean","null"]},"expires_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"invited_by_name":{"type":["string","null"]},"network_id":{"format":"uuid","type":"string"},"status":{"type":"string"}},"required":["id","network_id","email","access_ceiling","status","expires_at","created_at"],"type":"object"},"NetworkInvitePreview":{"description":"What a network invite link is for, shown before accepting.","properties":{"billed_to":{"$ref":"#/components/schemas/NetworkBilledTo","description":"Who pays Mobiari for your store while you are a member."},"brand_name":{"description":"The brand's organization.","type":"string"},"brand_store_name":{"type":"string"},"ceiling":{"description":"What the brand will be able to do in your store, in plain words.","items":{"$ref":"#/components/schemas/CeilingCode"},"type":"array"},"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"has_account":{"description":"Whether that e-mail has an account (sign in to accept) or not (sign\nup through the invite).","type":"boolean"},"invited_by_name":{"type":["string","null"]},"network_name":{"type":"string"},"never_shared":{"description":"What the brand never sees unless you allow it for a while.","items":{"type":"string"},"type":"array"}},"required":["email","has_account","network_name","brand_name","brand_store_name","ceiling","never_shared","billed_to","expires_at"],"type":"object"},"NetworkInviteTokenRequest":{"properties":{"token":{"description":"The invite's `token`, from the link.","type":"string"}},"required":["token"],"type":"object"},"NetworkMember":{"description":"A franchise in the network.","properties":{"accepted_by_name":{"type":["string","null"]},"access_ceiling":{"description":"What the brand's network admins may do in this store, as the member\naccepted it (plus approved grants while they last).","items":{"type":"string"},"type":"array"},"ended_by_side":{"description":"Who ended it: `member` (left) or `brand` (removed).","type":["string","null"]},"fulfills_online":{"type":"boolean"},"grants":{"items":{"$ref":"#/components/schemas/AccessGrant"},"type":"array"},"id":{"format":"uuid","type":"string"},"joined_at":{"format":"date-time","type":"string"},"left_at":{"format":"date-time","type":["string","null"]},"network_id":{"format":"uuid","type":"string"},"offers_pickup":{"type":"boolean"},"shares_stock":{"type":"boolean"},"status":{"$ref":"#/components/schemas/MemberStatus"},"store_id":{"format":"uuid","type":"string"},"store_name":{"type":"string"},"suspended_at":{"format":"date-time","type":["string","null"]},"tenant_id":{"description":"The franchise's organization: another company.","format":"uuid","type":"string"},"tenant_name":{"type":"string"}},"required":["id","network_id","tenant_id","tenant_name","store_id","store_name","status","access_ceiling","shares_stock","fulfills_online","offers_pickup","joined_at","grants"],"type":"object"},"NetworkRole":{"description":"A brand person or group holding a permission set over the member\nstores, cut down to each member's ceiling. The brand's organization\nowner holds the whole ceiling without one.","properties":{"codes":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"policy_id":{"format":"uuid","type":"string"},"policy_name":{"type":"string"},"principal_id":{"format":"uuid","type":"string"},"principal_kind":{"description":"`user` or `group`.","type":"string"},"principal_name":{"type":["string","null"]}},"required":["id","policy_id","policy_name","codes","principal_kind","principal_id","created_at"],"type":"object"},"NetworkStoreAccess":{"description":"The network a store is reached through, for the store switcher.","properties":{"network_id":{"format":"uuid","type":"string"},"network_name":{"type":"string"},"relation":{"description":"`brand`: this store owns the network; `member`: this store is a\nmember; `network_access`: another company's store, reached only\nthrough the access its owner accepted.","type":"string"}},"required":["network_id","network_name","relation"],"type":"object"},"NfceConsumer":{"description":"`dest` of an NFC-e: the consumer who asked for the CPF/CNPJ on the note,\nwhen anyone did. The model takes no address and no IE.","properties":{"name":{"type":["string","null"]},"tax_id":{"$ref":"#/components/schemas/TaxDocument"}},"required":["tax_id"],"type":"object"},"NfceContingency":{"description":"An NFC-e issued offline (`tpEmis` 9): the internet was down at the\ncounter, so the note was printed first and is transmitted afterwards,\nwithin the state's deadline.","properties":{"reason":{"description":"`xJust`: why, 15 to 256 characters.","type":"string"},"since":{"description":"`dhCont`: when the contingency began.","format":"date-time","type":"string"}},"required":["since","reason"],"type":"object"},"NfeAddress":{"properties":{"cep":{"type":"string"},"city_code":{"description":"IBGE municipality code, 7 digits.","type":"string"},"city_name":{"type":"string"},"complement":{"type":["string","null"]},"district":{"type":"string"},"number":{"type":"string"},"phone":{"type":["string","null"]},"street":{"type":"string"},"uf":{"$ref":"#/components/schemas/BrazilianState"}},"required":["street","number","district","city_code","city_name","uf","cep"],"type":"object"},"NfeCardPayment":{"description":"`detPag/card` of a payment the store's system took itself (an online\ngateway, a marketplace): who processed it, the card brand and the\nauthorization code. NT 2025.001 (rule YA05-10, rejection 392): tpIntegra\n1 needs both the institution's CNPJ and `cAut`, so the note writes 1 only\nwith both and otherwise 2 with what it has.","properties":{"authorization":{"description":"`cAut`: the authorization code, 1 to 128 characters.","type":["string","null"]},"brand":{"description":"`tBand`: the card brand, two digits ([`card_brand_code`]).","type":["string","null"]},"institution_cnpj":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Cnpj","description":"`CNPJ`: the payment institution, acquirer or intermediary that paid\nthe seller (NT 2020.006 § 6.2)."}]}},"type":"object"},"NfeCarrier":{"properties":{"name":{"type":"string"},"tax_id":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TaxDocument"}]}},"required":["name"],"type":"object"},"NfeComplementLine":{"description":"One item of the original and what is added to it: a price difference,\nor the tax that was short (not both).","properties":{"icms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTaxAmount","description":"Tax: the ICMS base and value that were missing (ICMS by CST: regime\nnormal and CRT 2)."}]},"item":{"description":"The original note's item, from 0.","minimum":0,"type":"integer"},"st":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTaxAmount","description":"Tax: the ICMS-ST base and value that were missing (an item that\nretained ST)."}]},"value_cents":{"description":"Price: what the item's value goes up by, in cents.","format":"int64","type":"integer"}},"required":["item"],"type":"object"},"NfeDestinationIcms":{"description":"The destination state's share of ICMS (`ICMSUFDest`). `pICMSInterPart`\nis always 100% (since 2019) and `vICMSUFRemet` zero.","properties":{"base_cents":{"description":"`vBCUFDest` (and `vBCFCPUFDest` when the destination charges FCP).","format":"int64","type":"integer"},"dest_rate":{"$ref":"#/components/schemas/FiscalRate","description":"`pICMSUFDest`: the destination's internal rate, without FCP."},"fcp_cents":{"description":"`vFCPUFDest`.","format":"int64","type":"integer"},"fcp_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pFCPUFDest`, when the destination charges FCP."}]},"icms_dest_cents":{"description":"`vICMSUFDest`.","format":"int64","type":"integer"},"interstate_rate":{"$ref":"#/components/schemas/FiscalRate","description":"`pICMSInter`: 4%, 7% or 12%."}},"required":["base_cents","dest_rate","interstate_rate","icms_dest_cents"],"type":"object"},"NfeDirection":{"description":"`tpNF`: whether goods leave the emitter or come in.","enum":["entry","exit"],"type":"string"},"NfeDraft":{"properties":{"additional_info":{"description":"`infCpl`: free text printed on the DANFE.","type":["string","null"]},"change_cents":{"description":"`vTroco`.","format":"int64","type":"integer"},"consumer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfceConsumer","description":"NFC-e only: the CPF/CNPJ on the note, if the consumer asked."}]},"contingency":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfceContingency","description":"NFC-e only: set when issued offline."}]},"direction":{"$ref":"#/components/schemas/NfeDirection","description":"`tpNF`. Absent in older drafts: those are exits."},"emitter":{"$ref":"#/components/schemas/NfeEmitter"},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"final_consumer":{"description":"`indFinal`: sold to the final consumer.","type":"boolean"},"finality":{"$ref":"#/components/schemas/NfeFinality","description":"`finNFe`. Absent in drafts stored before returns and complements\nexisted: those are normal notes."},"intermediary":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIntermediary","description":"`indIntermed`/`infIntermed`: sold through someone else's platform (a\nmarketplace). `None` on a sale that is not in person writes\n`indIntermed` 0 (own site, no intermediary), and nothing in person;\n`Some` writes 1 and the group."}]},"issued_at":{"description":"`dhEmi`, with the emitter's UTC offset.","format":"date-time","type":"string"},"items":{"items":{"$ref":"#/components/schemas/NfeItem"},"type":"array"},"model":{"$ref":"#/components/schemas/FiscalDocumentModel","description":"Absent in drafts stored before NFC-e existed: those are NF-e."},"nature":{"description":"`natOp`, e.g. \"Venda de mercadoria\".","type":"string"},"number":{"format":"int32","minimum":0,"type":"integer"},"order_reference":{"description":"`compra/xPed`: the order number.","type":["string","null"]},"payments":{"items":{"$ref":"#/components/schemas/NfePayment"},"type":"array"},"pickup_place":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfePlace","description":"`retirada`: where the goods leave from, when that is not the\nemitter's address (a deposit, someone's house)."}]},"presence":{"$ref":"#/components/schemas/NfePresence"},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeRecipient","description":"Required for an NF-e; an NFC-e uses `consumer` instead."}]},"references":{"description":"`NFref/refNFe`: access keys of NF-e or NFC-e this one refers to (a\nremessa names its simples faturamento, a return or a complement the\nnote it returns or completes).","items":{"type":"string"},"type":"array"},"serie":{"format":"int32","minimum":0,"type":"integer"},"software_version":{"description":"`verProc`.","type":"string"},"tax_snapshot":{"description":"Regime normal: the content hash of the tax-engine snapshot the item\ntaxes were resolved with (`tax::Snapshot::version`), so the note can\nbe recomputed exactly as issued. Not part of the XML.","type":["string","null"]},"tech_responsible":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTechResponsible"}]},"transport":{"$ref":"#/components/schemas/NfeTransport"}},"required":["environment","serie","number","issued_at","nature","final_consumer","presence","emitter","items","transport","payments","software_version"],"type":"object"},"NfeEmitter":{"properties":{"address":{"$ref":"#/components/schemas/NfeAddress"},"cnae":{"type":["string","null"]},"cnpj":{"$ref":"#/components/schemas/Cnpj"},"crt":{"$ref":"#/components/schemas/TaxRegime"},"ibs_cbs_regular":{"description":"A Simples company (CRT 1, 2) that opted for the regular IBS/CBS\nregime: `tpRegimeIBSCBS` 1, and the regular IBS/CBS group instead of\nthe Simples one (NT 2026.005).","type":"boolean"},"ie":{"type":"string"},"iest":{"description":"IEST: the emitter's IE as substitute taxpayer in the destination\nstate, when it has one.","type":["string","null"]},"im":{"type":["string","null"]},"name":{"description":"Razão social.","type":"string"},"trade_name":{"type":["string","null"]}},"required":["cnpj","name","address","ie","crt"],"type":"object"},"NfeFinality":{"description":"`finNFe`: what the note is for.","enum":["normal","complementary","return"],"type":"string"},"NfeFreightMode":{"description":"`modFrete`.","enum":["sender","recipient","third_party","own_sender","own_recipient","none"],"type":"string"},"NfeIbsCbs":{"properties":{"cbs_rate":{"$ref":"#/components/schemas/FiscalRate"},"class_code":{"description":"cClassTrib, 6 digits.","type":"string"},"cst":{"description":"CST IBS/CBS, 3 digits.","type":"string"},"ibs_mun_rate":{"$ref":"#/components/schemas/FiscalRate"},"ibs_uf_rate":{"$ref":"#/components/schemas/FiscalRate"}},"required":["cst","class_code","ibs_uf_rate","ibs_mun_rate","cbs_rate"],"type":"object"},"NfeIbsCbsValues":{"properties":{"base_cents":{"format":"int64","type":"integer"},"cbs_cents":{"format":"int64","type":"integer"},"cbs_sn_cents":{"format":"int64","type":"integer"},"ibs_mun_cents":{"format":"int64","type":"integer"},"ibs_sn_cents":{"description":"Simples Nacional without the regular regime (NT 2026.005, `gTribSN`):\nthe IBS (`vIBSSN`, CRT 1) and CBS (`vCBSSN`) at the Simples's rates.","format":"int64","type":"integer"},"ibs_uf_cents":{"format":"int64","type":"integer"}},"required":["base_cents","ibs_uf_cents","ibs_mun_cents","cbs_cents"],"type":"object"},"NfeIeIndicator":{"description":"`indIEDest`.","enum":["contributor","exempt","non_contributor"],"type":"string"},"NfeIntermediary":{"properties":{"cnpj":{"$ref":"#/components/schemas/Cnpj","description":"The platform's CNPJ."},"seller_id":{"description":"`idCadIntTran`: the seller's id at the platform, 2 to 60 characters.","type":"string"}},"required":["cnpj","seller_id"],"type":"object"},"NfeItem":{"properties":{"cest":{"type":["string","null"]},"cfop":{"type":"string"},"code":{"description":"`cProd`: SKU or another stable code.","type":"string"},"description":{"type":"string"},"discount_cents":{"description":"This item's share of the order discount, freight, insurance and\nother charges. Each sums over items to the document total.","format":"int64","type":"integer"},"freight_cents":{"format":"int64","type":"integer"},"gtin":{"description":"A valid GTIN, or None for \"SEM GTIN\".","type":["string","null"]},"info":{"description":"`infAdProd`.","type":["string","null"]},"insurance_cents":{"format":"int64","type":"integer"},"ncm":{"type":"string"},"other_cents":{"format":"int64","type":"integer"},"quantity_e4":{"description":"Quantity in ten-thousandths (2 units = 20_000).","format":"int64","type":"integer"},"returned_ipi":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeReturnedIpi","description":"`impostoDevol`: the IPI the supplier charged on the goods a return\nnote sends back, in the share returned (`fiscal::supplier_return`).\nOnly on a return note."}]},"tax":{"$ref":"#/components/schemas/NfeItemTax"},"total_cents":{"description":"`vProd`: quantity × unit price, rounded to the cent.","format":"int64","type":"integer"},"unit":{"description":"`uCom`/`uTrib`, e.g. \"UN\".","type":"string"},"unit_price_cents":{"format":"int64","type":"integer"}},"required":["code","description","ncm","cfop","unit","quantity_e4","unit_price_cents","total_cents","tax"],"type":"object"},"NfeItemTax":{"properties":{"approx_tax_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"Approximate taxes for the Lei da Transparência (`vTotTrib`), as a\nrate over the operation value."}]},"approx_tax_source":{"description":"Where that rate comes from (IBPT table version and key), printed\nwith the approximate taxes.","type":["string","null"]},"cofins_cst":{"type":"string"},"csosn":{"description":"Simples Nacional CSOSN: \"101\", \"102\", \"103\", \"300\", \"400\", \"500\",\nand with `st` \"201\", \"202\", \"203\" or \"900\".","type":"string"},"ibs_cbs":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIbsCbs","description":"The IBS/CBS group (NT 2025.002; for CRT 1 and 2 in NT 2026.005's\nlayout, `compute::ibs_cbs_layout`). Required of regime normal in\nhomologação; never sent by an MEI."}]},"normal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeNormalTax","description":"Regime normal (CRT 3): the ICMS group and the PIS/COFINS rates. `csosn`\nis empty then. `None` for Simples Nacional and MEI."}]},"origin":{"description":"`orig`, 0..=8.","format":"int32","minimum":0,"type":"integer"},"pis_cst":{"description":"PIS CST without value: \"04\"..\"09\" or \"49\"..\"99\".","type":"string"},"sn_activity":{"description":"Simples Nacional (CRT 1, 2): `cAtivSN`, the Simples activity of the\nitem (NT 2026.005): 01, 02, 03, 04 or 90. Written from the date the\nschema takes it ([`crate::rules::ibs_cbs_simples_start`]).","type":["string","null"]},"sn_credit_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pCredSN` for CSOSN 101 and 201 (and 900 when it passes a credit)."}]},"sn_icms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeSnIcms","description":"Simples Nacional, CSOSN 900: the ICMS the note highlights itself\n(`modBC`, `vBC`, `pICMS`, `vICMS` of `ICMSSN900`), as a return to a\nsupplier outside the Simples does with the base and rate of the note\nit returns. `None` writes the group without them."}]},"st":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeStRetention","description":"Simples Nacional as the substitute: the ICMS-ST it retains (CSOSN\n201, 202, 203, and 900 when it carries ST). Regime normal keeps its ST\ninside `normal.icms`."}]}},"required":["origin","csosn","pis_cst","cofins_cst"],"type":"object"},"NfeNormalIcms":{"description":"The ICMS group by CST. Rates are `Rate` percentages (18% = `Rate(180_000)`).","oneOf":[{"description":"00: tributada integralmente.","properties":{"cst":{"enum":["00"],"type":"string"},"rate":{"$ref":"#/components/schemas/FiscalRate"}},"required":["rate","cst"],"type":"object"},{"description":"10: tributada e com cobrança do ICMS por substituição tributária.","properties":{"cst":{"enum":["10"],"type":"string"},"rate":{"$ref":"#/components/schemas/FiscalRate"},"st":{"$ref":"#/components/schemas/NfeStRetention"}},"required":["rate","st","cst"],"type":"object"},{"description":"20: com redução de base de cálculo.","properties":{"base_reduction":{"$ref":"#/components/schemas/FiscalRate"},"cst":{"enum":["20"],"type":"string"},"rate":{"$ref":"#/components/schemas/FiscalRate"}},"required":["rate","base_reduction","cst"],"type":"object"},{"description":"30: isenta ou não tributada e com cobrança do ICMS por ST.","properties":{"cst":{"enum":["30"],"type":"string"},"st":{"$ref":"#/components/schemas/NfeStRetention"}},"required":["st","cst"],"type":"object"},{"description":"40: isenta.","properties":{"cst":{"enum":["40"],"type":"string"}},"required":["cst"],"type":"object"},{"description":"41: não tributada.","properties":{"cst":{"enum":["41"],"type":"string"}},"required":["cst"],"type":"object"},{"description":"50: suspensão.","properties":{"cst":{"enum":["50"],"type":"string"}},"required":["cst"],"type":"object"},{"description":"60: ICMS cobrado anteriormente por substituição tributária (no values\nare informed here).","properties":{"cst":{"enum":["60"],"type":"string"}},"required":["cst"],"type":"object"},{"description":"70: com redução de base de cálculo e cobrança do ICMS por ST.","properties":{"base_reduction":{"$ref":"#/components/schemas/FiscalRate"},"cst":{"enum":["70"],"type":"string"},"rate":{"$ref":"#/components/schemas/FiscalRate"},"st":{"$ref":"#/components/schemas/NfeStRetention"}},"required":["rate","base_reduction","st","cst"],"type":"object"},{"description":"90: outras.","properties":{"base_reduction":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate"}]},"cst":{"enum":["90"],"type":"string"},"rate":{"$ref":"#/components/schemas/FiscalRate"}},"required":["rate","cst"],"type":"object"}]},"NfeNormalTax":{"description":"ICMS (with FCP, ST and the DIFAL group) and PIS/COFINS for an emitter\nwhose ICMS goes by CST: regime normal (CRT 3), and a Simples company over\nthe state sublimit (CRT 2), whose PIS/COFINS stay the Simples CSTs.","properties":{"benefit_code":{"description":"`cBenef`: the state's code for the tax benefit behind a reduced base,\nan exemption or a non-taxed operation (8 or 10 characters). Some\nstates require it next to CST 20, 40 and 41.","type":["string","null"]},"cofins_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pCOFINS` when the COFINS CST is 01 or 02."}]},"destination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeDestinationIcms","description":"`ICMSUFDest`: the DIFAL of an interstate sale to a non-contributor\nconsumer (EC 87/2015). The values come computed (`tax::difal`); this\ncrate writes and totals them."}]},"fcp_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pFCP`: the Fundo de Combate à Pobreza the emitter's state adds to an\ninternal operation (CST 00 and 20), on the ICMS base."}]},"icms":{"$ref":"#/components/schemas/NfeNormalIcms"},"icms_complement":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTaxAmount","description":"An NF-e complementar of tax alone: the ICMS base and value the\nreferenced note under-stated, written as they are instead of the rate\ntimes the item's value (which is zero on such a note)."}]},"pis_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pPIS` when the PIS CST is 01 or 02 (`pis_cst` on the item)."}]}},"required":["icms"],"type":"object"},"NfePayment":{"properties":{"amount_cents":{"format":"int64","type":"integer"},"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeCardPayment","description":"The `card` group's details, for a card (or PIX) paid through a\ngateway or a marketplace the store's system talks to. `None` writes\ntpIntegra 2 alone."}]},"description":{"description":"`xPag`, required for `Other`.","type":["string","null"]},"kind":{"$ref":"#/components/schemas/NfePaymentKind"}},"required":["kind","amount_cents"],"type":"object"},"NfePaymentKind":{"description":"`tPag` codes this platform produces.","type":"string","x-extensible-enum":["cash","credit_card","debit_card","boleto","pix_dynamic","bank_transfer","pix_static","store_credit","no_payment","other"]},"NfePlace":{"description":"A place goods leave from or arrive at (`TLocal`): who holds it and\nits address.","properties":{"address":{"$ref":"#/components/schemas/NfeAddress"},"name":{"type":["string","null"]},"tax_id":{"$ref":"#/components/schemas/TaxDocument","description":"CPF or CNPJ of whoever holds the place."}},"required":["tax_id","address"],"type":"object"},"NfePresence":{"description":"`indPres`.","enum":["not_applicable","in_person","internet","phone","home_delivery","other"],"type":"string"},"NfeRecipient":{"properties":{"address":{"$ref":"#/components/schemas/NfeAddress"},"email":{"type":["string","null"]},"ie":{"type":["string","null"]},"ie_indicator":{"$ref":"#/components/schemas/NfeIeIndicator"},"name":{"type":"string"},"tax_id":{"$ref":"#/components/schemas/TaxDocument"}},"required":["tax_id","name","address","ie_indicator"],"type":"object"},"NfeReturnedIpi":{"description":"`impostoDevol`: how much of the original item goes back (`pDevol`) and\nthe IPI that share carried (`vIPIDevol`), which the return note adds to\nits total.","properties":{"ipi_cents":{"format":"int64","type":"integer"},"share":{"$ref":"#/components/schemas/FiscalRate","description":"`pDevol`, two decimals (60% = `Rate(600_000)`)."}},"required":["share","ipi_cents"],"type":"object"},"NfeSnIcms":{"description":"The ICMS a Simples Nacional note highlights under CSOSN 900.","properties":{"base_cents":{"description":"`vBC`.","format":"int64","type":"integer"},"rate":{"$ref":"#/components/schemas/FiscalRate","description":"`pICMS`."}},"required":["base_cents","rate"],"type":"object"},"NfeStRetention":{"description":"ICMS-ST the emitter retains as substitute (`modBCST` 4, the MVA). The\nvalues come computed (`tax::st` through `commerce::tax_bridge`); this\ncrate checks their shape, writes and totals them. A later note type\n(a return) reuses it as is.","properties":{"base_cents":{"description":"`vBCST`.","format":"int64","type":"integer"},"base_reduction":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pRedBCST`."}]},"due_to":{"$ref":"#/components/schemas/BrazilianState","description":"The state the ST is due to (the recipient's). Not in the XML: the\npreview and the GNRE notice read it."},"fcp_cents":{"description":"`vFCPST`.","format":"int64","type":"integer"},"fcp_rate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalRate","description":"`pFCPST`, on the ST base (`vBCFCPST` = `vBCST`)."}]},"icms_st_cents":{"description":"`vICMSST`: base × rate − the operation's own ICMS.","format":"int64","type":"integer"},"mva":{"$ref":"#/components/schemas/FiscalRate","description":"`pMVAST`: the MVA applied (adjusted, between states, when the\ndestination adjusts it)."},"rate":{"$ref":"#/components/schemas/FiscalRate","description":"`pICMSST`: the destination's internal rate on the goods."}},"required":["mva","base_cents","rate","icms_st_cents","due_to"],"type":"object"},"NfeTaxAmount":{"description":"A tax's base and value, in cents, as a complement states them.","properties":{"base_cents":{"format":"int64","type":"integer"},"value_cents":{"format":"int64","type":"integer"}},"required":["base_cents","value_cents"],"type":"object"},"NfeTechResponsible":{"description":"`infRespTec`: the software house (the platform) responsible for the\nemitting system.","properties":{"cnpj":{"$ref":"#/components/schemas/Cnpj"},"contact":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["cnpj","contact","email","phone"],"type":"object"},"NfeTotals":{"properties":{"approx_tax_cents":{"format":"int64","type":["integer","null"]},"cofins_cents":{"format":"int64","type":"integer"},"discount_cents":{"format":"int64","type":"integer"},"fcp_cents":{"description":"`vFCP`, and the DIFAL totals (`vFCPUFDest`, `vICMSUFDest`), written\nonly when some item carries `ICMSUFDest` (`has_destination`).","format":"int64","type":"integer"},"fcp_dest_cents":{"format":"int64","type":"integer"},"fcp_st_cents":{"format":"int64","type":"integer"},"freight_cents":{"format":"int64","type":"integer"},"has_destination":{"type":"boolean"},"ibs_cbs":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIbsCbsValues"}]},"icms_base_cents":{"description":"`vBC`, `vICMS`, `vPIS` and `vCOFINS` of `ICMSTot`.","format":"int64","type":"integer"},"icms_cents":{"format":"int64","type":"integer"},"icms_dest_cents":{"format":"int64","type":"integer"},"insurance_cents":{"format":"int64","type":"integer"},"invoice_cents":{"description":"`vNF`: products - discount + freight + insurance + other, plus the\nICMS-ST and FCP-ST retained (the buyer pays them to the substitute).","format":"int64","type":"integer"},"ipi_devol_cents":{"description":"`vIPIDevol` of `ICMSTot`: the IPI a return note gives back, part of\n`vNF`.","format":"int64","type":"integer"},"other_cents":{"format":"int64","type":"integer"},"pis_cents":{"format":"int64","type":"integer"},"products_cents":{"format":"int64","type":"integer"},"sn_credit_cents":{"format":"int64","type":"integer"},"st_base_cents":{"description":"`vBCST`, `vST` and `vFCPST` of `ICMSTot`.","format":"int64","type":"integer"},"st_cents":{"format":"int64","type":"integer"}},"required":["products_cents","discount_cents","freight_cents","insurance_cents","other_cents","invoice_cents","sn_credit_cents","icms_base_cents","icms_cents","pis_cents","cofins_cents","fcp_cents","fcp_dest_cents","icms_dest_cents","has_destination"],"type":"object"},"NfeTransport":{"properties":{"carrier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeCarrier"}]},"mode":{"$ref":"#/components/schemas/NfeFreightMode"},"volumes":{"items":{"$ref":"#/components/schemas/NfeVolume"},"type":"array"}},"required":["mode"],"type":"object"},"NfeVolume":{"properties":{"gross_weight_grams":{"format":"int64","type":["integer","null"]},"net_weight_grams":{"format":"int64","type":["integer","null"]},"number":{"description":"The volume's number (`nVol`), when each box is its own `vol`.","type":["string","null"]},"quantity":{"format":"int32","minimum":0,"type":"integer"},"species":{"type":["string","null"]}},"required":["quantity"],"type":"object"},"NfseCancelInput":{"properties":{"justification":{"description":"15 to 255 characters.","type":"string"},"reason":{"description":"`issue_error`, `not_provided` or `other`.","type":"string"}},"required":["reason","justification"],"type":"object"},"NfseCheck":{"properties":{"id":{"type":"string"},"message":{"description":"What to do when it is not.","type":"string"},"ok":{"type":"boolean"}},"required":["id","ok","message"],"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"},"NfseDocument":{"properties":{"access_key":{"type":["string","null"]},"attempts":{"format":"int32","type":"integer"},"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":{"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"},"serie":{"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"]},"store_id":{"format":"uuid","type":"string"},"total_cents":{"format":"int64","type":"integer"},"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","store_id","environment","serie","number","dps_id","provider","status","competence","issued_at","total_cents","description","attempts","created_at","updated_at"],"type":"object"},"NfseDocumentDetail":{"properties":{"document":{"$ref":"#/components/schemas/NfseDocument"},"transmissions":{"items":{"$ref":"#/components/schemas/NfseTransmission"},"type":"array"}},"required":["document","transmissions"],"type":"object"},"NfseEnvironmentInput":{"properties":{"environment":{"description":"`homologacao` or `producao`.","type":"string"}},"required":["environment"],"type":"object"},"NfseNumberingInput":{"properties":{"next_number":{"description":"The next DPS number in production for the current series: one after\nthe last the company issued in that series anywhere.","format":"int64","type":"integer"}},"required":["next_number"],"type":"object"},"NfsePreview":{"properties":{"dps_xml":{"type":["string","null"]},"environment":{"type":"string"},"next_number":{"format":"int64","type":["integer","null"]},"report":{"$ref":"#/components/schemas/FiscalReport"}},"required":["report","environment"],"type":"object"},"NfseReadiness":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/NfseCheck"},"type":"array"},"ready":{"description":"Every check passes: production can be switched on.","type":"boolean"}},"required":["checks","ready"],"type":"object"},"NfseRequest":{"description":"What an emission asks for. Anything left out comes from the settings.","properties":{"additional_info":{"type":["string","null"]},"amount_cents":{"format":"int64","type":"integer"},"client":{"$ref":"#/components/schemas/NfseClient"},"competence":{"description":"The day the service started; today when empty.","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"},"NfseSettings":{"properties":{"additional_info":{"type":["string","null"]},"default_description":{"type":["string","null"]},"default_nbs":{"type":["string","null"]},"default_trib_mun":{"type":["string","null"]},"default_trib_nac":{"type":["string","null"]},"environment":{"description":"`homologacao` or `producao`.","type":"string"},"iss_rate":{"description":"Percent x 100.","format":"int32","type":["integer","null"]},"production_enabled_at":{"format":"date-time","type":["string","null"]},"reg_ap_trib_sn":{"format":"int32","type":["integer","null"]},"reg_esp_trib":{"format":"int32","type":"integer"},"ret_issqn":{"format":"int32","type":"integer"},"serie":{"format":"int32","type":"integer"},"sn_total_rate":{"description":"Percent x 100.","format":"int32","type":["integer","null"]},"sp_service_code":{"description":"São Paulo's own service code (4 or 5 digits), used by the Nota Paulistana.","type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["store_id","environment","serie","reg_esp_trib","ret_issqn","updated_at"],"type":"object"},"NfseSettingsInput":{"properties":{"additional_info":{"type":["string","null"]},"default_description":{"type":["string","null"]},"default_nbs":{"description":"`cNBS`, 9 digits.","type":["string","null"]},"default_trib_mun":{"description":"`cTribMun`, 3 digits.","type":["string","null"]},"default_trib_nac":{"description":"`cTribNac`, 6 digits.","type":["string","null"]},"iss_rate":{"description":"ISS rate in percent x 100, only when the municipality is not in the\nnational system.","format":"int32","type":["integer","null"]},"reg_ap_trib_sn":{"description":"Absent keeps the stored value; an explicit `null` clears it.","format":"int32","type":["integer","null"]},"reg_esp_trib":{"format":"int32","type":["integer","null"]},"ret_issqn":{"description":"1 not retained, 2 retained by the client.","format":"int32","type":["integer","null"]},"serie":{"description":"DPS series, 1 to 89999.","format":"int32","type":["integer","null"]},"sn_total_rate":{"description":"Approximate total of taxes of a Simples ME/EPP, percent x 100.","format":"int32","type":["integer","null"]},"sp_service_code":{"description":"São Paulo's own service code (4 or 5 digits), for the Nota Paulistana.","type":["string","null"]}},"type":"object"},"NfseSettingsView":{"description":"The service settings, or defaults for a store that has not saved any.","properties":{"next_number":{"description":"The next DPS (or RPS) number in the current environment.","format":"int64","type":["integer","null"]},"provider":{"description":"Who issues the notes of this company's city: `national` (the\nnational system) or `paulistana` (São Paulo's own web service).","type":"string"},"settings":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfseSettings"}]}},"required":["provider"],"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"},"NoShowClient":{"description":"A client who missed sessions.","properties":{"bookings":{"format":"int64","type":"integer"},"customer_id":{"format":"uuid","type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":"string"},"no_shows":{"format":"int64","type":"integer"},"phone":{"type":["string","null"]}},"required":["name","no_shows","bookings"],"type":"object"},"NotGoodsSkipReason":{"description":"Why a note was not marked.","enum":["not_found","not_pending","cancelled"],"type":"string"},"NotGoodsSkipped":{"description":"A note left as it was.","properties":{"invoice_id":{"format":"uuid","type":"string"},"reason":{"$ref":"#/components/schemas/NotGoodsSkipReason"}},"required":["invoice_id","reason"],"type":"object"},"Notification":{"description":"One of my notifications.","properties":{"actor_name":{"type":["string","null"]},"actor_user_id":{"description":"Who did it, when a teammate did.","format":"uuid","type":["string","null"]},"body":{"type":"string"},"category":{"description":"A `NotificationCategory`.","type":"string"},"count":{"description":"How many notices it folds (messages in a conversation while unread).","format":"int32","type":"integer"},"created_at":{"description":"When it happened (the latest news, for a folded one).","format":"date-time","type":"string"},"data":{"description":"Extra values, per kind (e.g. `order_number`, `total_cents`).","type":"object"},"id":{"format":"uuid","type":"string"},"kind":{"description":"A `NotificationKind`; clients must ignore kinds they do not know.","type":"string"},"link":{"description":"Admin path it opens, e.g. `/orders/<id>`.","type":["string","null"]},"read_at":{"description":"Null while unread.","format":"date-time","type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["id","store_id","kind","category","title","body","count","data","created_at"],"type":"object"},"NotificationCategory":{"description":"What part of the store a notification is about. The bell's icon and\nthe notifications page's filter.","type":"string","x-extensible-enum":["orders","inventory","conversations","tasks","documents","fiscal","purchasing","automations","bookings"]},"NotificationChannel":{"description":"A store notification channel (customer-facing automations).","properties":{"channel_type":{"$ref":"#/components/schemas/NotificationChannelType"},"config_json":{"description":"Channel settings, keys per `channel_type`. Secrets read as\n`__stored__`; send that value back to keep them.","type":"object"},"created_at":{"format":"date-time","type":"string"},"enabled_events":{"description":"Events this channel handles: `cart.abandoned`, `order.review_request`,\n`order.nps_request`.","items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_enabled":{"type":"boolean"},"locale":{"description":"Language of the messages (`pt-BR`, `en-US`).","type":"string"},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","channel_type","config_json","enabled_events","is_enabled","locale","created_at","updated_at"],"type":"object"},"NotificationChannelType":{"description":"How a channel delivers.","enum":["email","whatsapp","telegram","webhook","sms"],"type":"string"},"NotificationChannels":{"description":"The channels on for one kind.","properties":{"email":{"type":"boolean"},"in_app":{"type":"boolean"},"push":{"type":"boolean"},"whatsapp":{"type":"boolean"}},"required":["in_app","push","email","whatsapp"],"type":"object"},"NotificationDeliveryChannel":{"description":"Where a notification is delivered.","enum":["in_app","push","email","whatsapp"],"type":"string"},"NotificationDestinations":{"description":"Where my notifications can reach me.","properties":{"email":{"description":"My account e-mail.","type":["string","null"]},"has_phone":{"description":"Whether my profile has a phone (WhatsApp goes there). The number is\nnot repeated here.","type":"boolean"},"push_available":{"description":"Whether the server can send push at all.","type":"boolean"},"push_devices":{"description":"Mobile devices signed in to my account with push registered.","format":"int64","type":"integer"},"push_paused":{"description":"I paused every push from this store (in the mobile app). Turning\npush on for a kind here resumes it.","type":"boolean"},"whatsapp_available":{"description":"Whether Mobiari's WhatsApp account is set up.","type":"boolean"}},"required":["has_phone","push_devices","push_available","push_paused","whatsapp_available"],"type":"object"},"NotificationKind":{"description":"A kind of notification. Clients must ignore kinds they do not know: the\nset grows.","type":"string","x-extensible-enum":["orders.created","orders.paid","orders.cancelled","orders.return_requested","orders.claim_opened","shipping.carrier_key_expiring","bookings.created","bookings.attention","customers.address_changed","inventory.low_stock","inventory.out_of_stock","conversations.started","conversations.message_received","conversations.handed_over","conversations.assigned","conversations.sla_breached","conversations.ai_declined_return","conversations.discount_approval_requested","conversations.discount_decided","conversations.followup_due","tasks.assigned","tasks.due","customers.lead_assigned","crm.sla_breached","calls.keyword_alert","customers.note_mention","customers.privacy_request","customers.reseller_application","documents.expiring","signatures.updated","fiscal.document_rejected","purchasing.documents_received","inventory.reconciliation_findings","purchasing.invoice_cancelled_after_receipt","workflows.run_failed","marketing.conversions_unreported","marketing.email_campaigns_paused"]},"NotificationKindPreference":{"description":"One kind in my grid.","properties":{"category":{"$ref":"#/components/schemas/NotificationCategory"},"channels":{"$ref":"#/components/schemas/NotificationChannels","description":"What is on."},"defaults":{"$ref":"#/components/schemas/NotificationChannels","description":"What is on until I change it."},"is_personal":{"description":"About my own work (assigned to me, mentioning me) rather than the\nwhole team's.","type":"boolean"},"kind":{"$ref":"#/components/schemas/NotificationKind"},"supported":{"description":"What the kind can go through at all (WhatsApp only with an approved\ntemplate).","items":{"$ref":"#/components/schemas/NotificationDeliveryChannel"},"type":"array"}},"required":["kind","category","is_personal","channels","supported","defaults"],"type":"object"},"NotificationKindUpdate":{"description":"One kind's channels to change. Channels left out keep their value.","properties":{"email":{"type":["boolean","null"]},"in_app":{"type":["boolean","null"]},"kind":{"$ref":"#/components/schemas/NotificationKind"},"push":{"type":["boolean","null"]},"whatsapp":{"type":["boolean","null"]}},"required":["kind"],"type":"object"},"NotificationLog":{"description":"One message sent (or attempted): to a customer through a store channel,\nor a team member's e-mail/WhatsApp notification.","properties":{"channel_id":{"description":"The store channel it went through; null for team notifications and\norder e-mails.","format":"uuid","type":["string","null"]},"channel_name":{"description":"The channel's name; `Equipe · <member>` for a team notification,\n`platform:customer-email` for an order e-mail to the customer.","type":"string"},"channel_type":{"description":"`email`, `whatsapp`, `telegram`, `webhook`, `sms`.","type":"string"},"error":{"type":["string","null"]},"event":{"description":"Event name, e.g. `orders.paid`, `cart.abandoned`, `channel.test`.","type":"string"},"id":{"format":"uuid","type":"string"},"message":{"type":"string"},"sent_at":{"format":"date-time","type":"string"},"status":{"description":"`sent`, `failed`, `skipped` or `pending`.","type":"string"},"store_id":{"format":"uuid","type":"string"}},"required":["id","store_id","channel_name","channel_type","event","message","status","sent_at"],"type":"object"},"NotificationPreferences":{"description":"My notification grid for a store.","properties":{"destinations":{"$ref":"#/components/schemas/NotificationDestinations"},"kinds":{"description":"Every kind I can receive here (my permissions decide), in display\norder.","items":{"$ref":"#/components/schemas/NotificationKindPreference"},"type":"array"},"store_id":{"format":"uuid","type":"string"}},"required":["store_id","kinds","destinations"],"type":"object"},"NotificationSummary":{"description":"What the bell needs to know.","properties":{"by_category":{"description":"Categories with unread notifications.","items":{"$ref":"#/components/schemas/CategoryUnread"},"type":"array"},"latest_unread_at":{"description":"When the newest unread one happened: changes when something new\narrives (or an unread one takes news).","format":"date-time","type":["string","null"]},"unread":{"format":"int64","type":"integer"}},"required":["unread","by_category"],"type":"object"},"NpsResponse":{"description":"A survey answer, for the admin.","properties":{"answered_at":{"format":"date-time","type":"string"},"comment":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"score":{"format":"int32","type":"integer"}},"required":["score","answered_at"],"type":"object"},"NpsSummary":{"description":"The store's NPS over a period.","properties":{"answered":{"format":"int64","type":"integer"},"detractors":{"format":"int64","type":"integer"},"passives":{"format":"int64","type":"integer"},"promoters":{"format":"int64","type":"integer"},"recent":{"description":"The latest answers, comments first.","items":{"$ref":"#/components/schemas/NpsResponse"},"type":"array"},"score":{"description":"% promoters minus % detractors, -100 to 100; null without answers.","format":"int32","type":["integer","null"]},"sent":{"description":"Surveys sent in the period.","format":"int64","type":"integer"}},"required":["promoters","passives","detractors","sent","answered","recent"],"type":"object"},"OAuthConsentInfo":{"description":"What the consent screen shows.","properties":{"client_name":{"type":"string"},"client_uri":{"type":["string","null"]},"redirect_host":{"description":"Scheme and host the authorization goes back to.","type":"string"},"stores":{"items":{"$ref":"#/components/schemas/OAuthConsentStore"},"type":"array"}},"required":["client_name","redirect_host","stores"],"type":"object"},"OAuthConsentRequest":{"properties":{"approve":{"description":"`false` declines: the app is told `access_denied`.","type":"boolean"},"client_id":{"type":"string"},"code_challenge":{"type":"string"},"mcp_approval":{"$ref":"#/components/schemas/McpApproval","description":"Which writes wait for a person's approval in the app."},"policy_ids":{"description":"Permission sets of the connection's service account. Required to\napprove; each within your own permissions.","items":{"format":"uuid","type":"string"},"type":"array"},"redirect_uri":{"type":"string"},"state":{"type":["string","null"]},"store_id":{"description":"The store the connection works in. Required to approve.","format":"uuid","type":["string","null"]}},"required":["client_id","redirect_uri","code_challenge","approve"],"type":"object"},"OAuthConsentResult":{"description":"Where to send the browser next.","properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"],"type":"object"},"OAuthConsentSet":{"description":"A permission set the connection may receive.","properties":{"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"OAuthConsentStore":{"description":"A store the person may connect the app to (they manage its access and\nkeys there).","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"permission_sets":{"items":{"$ref":"#/components/schemas/OAuthConsentSet"},"type":"array"},"tenant_id":{"format":"uuid","type":"string"}},"required":["id","name","tenant_id","permission_sets"],"type":"object"},"OnboardingBlocker":{"description":"Why a step that looks set up still is not.","enum":["missing_origin"],"type":"string"},"OnboardingChecklist":{"description":"The store's setup checklist.","properties":{"completed":{"format":"int64","type":"integer"},"next_step":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OnboardingStepKey","description":"The one step to suggest now: the first essential not done, then the\nfirst order. None once the store has sold."}]},"state":{"$ref":"#/components/schemas/OnboardingState"},"steps":{"items":{"$ref":"#/components/schemas/OnboardingStep"},"type":"array"},"total":{"format":"int64","type":"integer"}},"required":["steps","completed","total","state"],"type":"object"},"OnboardingGroup":{"description":"Where a step stands on the way to selling.","enum":["essential","live","optional"],"type":"string"},"OnboardingState":{"description":"What the store's data cannot tell: the first-run wizard and the guide.","properties":{"answers":{"description":"The wizard's answers: `source` (where the store sells today, `none`\nwhen starting now), `sells`, `shipping`.","type":"object"},"completed_at":{"description":"When the wizard was finished or skipped.","format":"date-time","type":["string","null"]},"dismissed_at":{"description":"When the dashboard guide was hidden for good.","format":"date-time","type":["string","null"]},"snoozed_until":{"description":"The dashboard guide is hidden until then.","format":"date-time","type":["string","null"]},"wizard_step":{"description":"The wizard screen the merchant stopped on.","type":["string","null"]}},"required":["answers"],"type":"object"},"OnboardingStep":{"properties":{"blocker":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OnboardingBlocker","description":"Set when the step is not done for a reason other than nothing being\nset up."}]},"done":{"type":"boolean"},"group":{"$ref":"#/components/schemas/OnboardingGroup"},"key":{"$ref":"#/components/schemas/OnboardingStepKey"},"path":{"description":"The admin path where the step is done.","type":"string"},"pending":{"description":"What is still missing, when the step counts something (variations\nwithout shipping sizes).","format":"int64","type":["integer","null"]}},"required":["key","done","group","path"],"type":"object"},"OnboardingStepKey":{"description":"A setup step, in the order the checklist suggests.","enum":["products","payments","freight","shipping_sizes","fiscal","brand","whatsapp","team","legal","domain","first_order","knowledge","tickets","integration","first_conversation"],"type":"string"},"OpenCashShift":{"description":"Open a shift.","properties":{"opening_float_cents":{"description":"Cash already in the drawer, in cents.","format":"int64","type":"integer"}},"required":["opening_float_cents"],"type":"object"},"OpenTicketRequest":{"properties":{"category":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketCategory"}]},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketPriority","description":"Defaults to the conversation's priority."}]},"subject":{"description":"Defaults to the conversation's subject or its first customer message.","type":["string","null"]}},"type":"object"},"OptionDefinition":{"description":"A library option with its values, in their canonical order.","properties":{"archived_at":{"format":"date-time","type":["string","null"]},"channel_attributes":{"description":"Per-channel settings, by channel (a marketplace's attribute id, a\nGoogle size system).","type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/OptionKind"},"name":{"description":"Unique among the store's live options, ignoring case, accents and\nplural (\"Cor\" and \"Cores\" are one).","type":"string"},"position":{"format":"int32","type":"integer"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"usage_count":{"description":"Product options linked to it.","format":"int64","type":"integer"},"values":{"items":{"$ref":"#/components/schemas/OptionDefinitionValue"},"type":"array"}},"required":["id","store_id","name","kind","position","channel_attributes","created_at","updated_at","usage_count","values"],"type":"object"},"OptionDefinitionCreateRequest":{"description":"A new library option.","properties":{"channel_attributes":{"description":"A JSON object. Defaults to `{}`.","type":["object","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionKind","description":"Defaults to what the name says (`color` for \"Cor\", `size` for\n\"Tamanho\"), else `text`."}]},"name":{"type":"string"},"position":{"description":"Defaults to after the store's other options.","format":"int32","type":["integer","null"]},"values":{"description":"Values to add, in order. Spellings of one value are added once.","items":{"type":"string"},"type":["array","null"]}},"required":["name"],"type":"object"},"OptionDefinitionUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"archived":{"description":"True archives the option (it is no longer offered to new products;\nthe products linked to it keep their link), false restores it.","type":["boolean","null"]},"channel_attributes":{"type":["object","null"]},"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OptionKind"}]},"name":{"type":["string","null"]},"position":{"format":"int32","type":["integer","null"]}},"type":"object"},"OptionDefinitionValue":{"description":"A value of a library option.","properties":{"aliases":{"description":"Other spellings of the value (\"azul marinho\", \"Navy\"): a value typed\nor imported with one of them is this value.","items":{"type":"string"},"type":"array"},"archived_at":{"format":"date-time","type":["string","null"]},"code":{"description":"What a SKU carries for the value (`AZ` for Azul): unique in the\noption, archived values included, and kept when the value is renamed.","type":"string"},"color_hex":{"description":"`#RRGGBB`, or several joined by `/` for a multi-color swatch.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"definition_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"position":{"description":"The canonical order (P < M < G < GG).","format":"int32","type":"integer"},"swatch_image_id":{"description":"A library file shown as the swatch.","format":"uuid","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"usage_count":{"description":"Product values linked to it.","format":"int64","type":"integer"},"value":{"description":"Unique among the option's live values, ignoring case.","type":"string"}},"required":["id","definition_id","value","code","position","aliases","created_at","updated_at","usage_count"],"type":"object"},"OptionDefinitionValueCreateRequest":{"description":"A new value of a library option.","properties":{"aliases":{"items":{"type":"string"},"type":["array","null"]},"code":{"description":"Defaults to one made from the value's letters (`AZ` for Azul).","type":["string","null"]},"color_hex":{"description":"`#RRGGBB` or `RRGGBB`, several separated by `/`, `,`, `&` or `|`.","type":["string","null"]},"position":{"description":"Defaults to after the option's other values.","format":"int32","type":["integer","null"]},"swatch_image_id":{"format":"uuid","type":["string","null"]},"value":{"type":"string"}},"required":["value"],"type":"object"},"OptionDefinitionValueMerge":{"description":"What a merge did.","properties":{"moved":{"description":"Product values moved to the survivor (and renamed to it).","format":"int64","type":"integer"},"survivor":{"$ref":"#/components/schemas/OptionDefinitionValue"},"unlinked":{"items":{"$ref":"#/components/schemas/UnlinkedProductValue"},"type":"array"}},"required":["survivor","moved","unlinked"],"type":"object"},"OptionDefinitionValueMergeRequest":{"description":"Which value survives a merge.","properties":{"survivor_id":{"description":"A live value of the same library option.","format":"uuid","type":"string"}},"required":["survivor_id"],"type":"object"},"OptionDefinitionValueUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"aliases":{"description":"Replaces the list.","items":{"type":"string"},"type":["array","null"]},"archived":{"description":"True archives the value (linked product values keep it), false\nrestores it.","type":["boolean","null"]},"code":{"description":"SKUs already made keep the old code.","type":["string","null"]},"color_hex":{"description":"`null` removes it. A color is set on the linked values of color\noptions too.","type":["string","null"]},"position":{"format":"int32","type":["integer","null"]},"swatch_image_id":{"description":"`null` removes it.","format":"uuid","type":["string","null"]},"value":{"description":"Renaming rewrites the linked product values and the variant titles\nbuilt from them; SKUs stay.","type":["string","null"]}},"type":"object"},"OptionDefinitionValuesReorderRequest":{"description":"The new order of a library option's values.","properties":{"value_ids":{"description":"The option's value ids in order; values left out go after them.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["value_ids"],"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"},"OptionGroupLinkRequest":{"description":"The library option to link a product option to.","properties":{"definition_id":{"description":"`null` unlinks the option and its values.","format":"uuid","type":["string","null"]}},"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."},"OptionKind":{"description":"What a library option's values are. `color` and `size` decide what the\nfeeds and the Meta push send a value as (`g:color`/`color`,\n`g:size`/`size`); `text` and `material` are shown as they are.","enum":["color","size","text","material"],"type":"string"},"OptionLibraryBuild":{"description":"The state of the job that builds the library from the store's products.","properties":{"finished_at":{"format":"date-time","type":["string","null"]},"queued":{"description":"False when a build was already waiting or running.","type":"boolean"},"result":{"description":"Counts from the last finished build: library options and values,\nproduct options and values linked and not.","type":"object"},"started_at":{"format":"date-time","type":["string","null"]}},"required":["queued","result"],"type":"object"},"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"},"OptionValueLinkRequest":{"description":"The library value to link a product value to.","properties":{"definition_value_id":{"description":"A value of the library option the product option is linked to;\n`null` unlinks.","format":"uuid","type":["string","null"]}},"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 with everything its screen shows: items with images, customer\nand address, money, payment, fulfillment, shipments with tracking and\nrefunds.","properties":{"allowed_status_transitions":{"description":"What `PATCH .../status` accepts from the current status. Empty on\nterminal orders.","items":{"$ref":"#/components/schemas/OrderStatus"},"type":"array"},"attribution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderAttribution","description":"The visitor's first touch as the storefront recorded it (UTM tags,\nclick ids, an outside referrer, the landing page), carried from the\ncart at checkout. Null when there was none (a counter sale, an\nimport, a visitor without the cookie). Always sent (optional in the\nschema)."}]},"billing_address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BillingAddress","description":"Where the order is billed (its invoice's address), when the buyer\ngave one apart from the delivery address; null when billed there.\nAlways sent (optional in the schema for older clients)."}]},"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"]},"conversation_id":{"description":"The conversation the order was sold in (`GET .../conversation` has\nits contact and origin). Always sent (optional in the schema).","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"description":"ISO 4217 currency of every `*_cents` amount.","type":"string"},"customer_document":{"description":"CPF/CNPJ on the customer profile (digits).","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"]},"danfe_url":{"type":["string","null"]},"discount_cents":{"format":"int64","type":"integer"},"freight_external_order_code":{"type":["string","null"]},"freight_provider_code":{"type":["string","null"]},"freight_quote_id":{"format":"uuid","type":["string","null"]},"freight_snapshot_json":{"description":"The freight quote as selected at checkout (provider-specific).","type":["object","null"]},"freight_status":{"type":["string","null"]},"fulfillment_method":{"description":"`shipping` or `pickup`.","type":"string"},"fulfillment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderFulfillmentStatus"}]},"has_nfe":{"description":"The NFe XML is attached (the XML itself is never returned).","type":"boolean"},"has_pending_builds":{"description":"Some line is still being made.","type":"boolean"},"id":{"format":"uuid","type":"string"},"installment_interest_by":{"description":"Who charged `installment_interest_cents`: `store` (its own rate,\nincluded in `total_cents`) or `provider` (the gateway's, paid to the\ngateway and not in `total_cents`); null without interest.","type":["string","null"]},"installment_interest_cents":{"description":"Installment interest, apart from the goods (the NF-e leaves it out).\nAlways sent (optional in the schema for older clients).","format":"int64","type":"integer"},"installments":{"description":"The card's installments, when paid (or being paid) by card online.\nAlways sent (optional in the schema for older clients).","format":"int32","type":["integer","null"]},"is_test":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/OrderItem"},"type":"array"},"manual_refundable_cents":{"description":"What was recorded as paid by hand (`POST .../payments/manual`, a\ncounter sale) and not yet given back: `POST .../refunds/manual`\nrecords its refund. Always sent; optional in the schema only so\nclients generated before it existed keep decoding orders.","format":"int64","type":"integer"},"next_build_ready_at":{"description":"Earliest promised production date among the lines.","format":"date-time","type":["string","null"]},"nf_value_cents":{"format":"int64","type":["integer","null"]},"nfe_key":{"description":"Nota fiscal access key (44 digits).","type":["string","null"]},"nfe_number":{"type":["string","null"]},"notes":{"description":"Free text from the counter sale.","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\nminus what was received and kept and minus the store credit or gift\ncard balance held for it at checkout; 0 once paid (a refund does not\nmake it owed again). Exactly what `POST .../payments/manual` records.\nAlways sent (optional in the schema for older clients).","format":"int64","type":"integer"},"payer_document":{"description":"CPF/CNPJ the payer used (e.g. `CPF 12345678901`), from the latest\npayment. Use it for the nota fiscal; guests only have this one.","type":["string","null"]},"payment_card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CardDetail","description":"Credit or debit, and the installments, when that payment was taken on\nthe store's card machine and the seller said which."}]},"payment_expires_at":{"description":"When the latest payment attempt stops being payable (PIX codes).","format":"date-time","type":["string","null"]},"payment_intent_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentIntentStatus","description":"Status of the latest payment attempt."}]},"payment_method":{"description":"Method of the latest payment attempt: `pix`, `card`, `cash`,\n`bank_transfer` or `card_terminal`.","type":["string","null"]},"payment_provider_code":{"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"]},"pickup_location_snapshot_json":{"description":"The pickup point as it was when the order was placed.","type":["object","null"]},"placed_at":{"format":"date-time","type":["string","null"]},"placed_via":{"description":"How the order was placed: `storefront`, `inbox` (a quote sold in a\nconversation), `counter`, `marketplace`, `import`, `exchange`,\n`subscription`. Null on orders from before it was kept. Always sent\n(optional in the schema for older clients).","type":["string","null"]},"refundable_cents":{"description":"What `POST .../refund` can still return: the latest approved payment\nminus its refunds. 0 when nothing can be refunded online.","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_cents":{"format":"int64","type":"integer"},"shipping_contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingContact","description":"Delivery contact and address typed at checkout."}]},"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"},"store_id":{"format":"uuid","type":"string"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"timezone":{"description":"The store's IANA timezone (else its organization's, else\n`America/Sao_Paulo`): show the order's dates in it. Always sent\n(optional in the schema for older clients).","type":"string"},"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","store_id","status","allowed_status_transitions","is_test","currency","subtotal_cents","discount_cents","shipping_cents","tax_cents","total_cents","refunded_cents","refundable_cents","fulfillment_method","has_nfe","has_pending_builds","items","shipments","refunds","created_at","updated_at"],"type":"object"},"OrderAttribution":{"description":"Where a storefront visitor came from on their first touch (the\n`bod_attr` cookie, copied to the cart and then to the order). Every\nfield is as the storefront captured it; missing ones are null.","properties":{"captured_at":{"description":"When the first touch was recorded.","format":"date-time","type":["string","null"]},"fbclid":{"description":"Meta click id.","type":["string","null"]},"gbraid":{"description":"Google click ids of iOS app and web-to-app campaigns.","type":["string","null"]},"gclid":{"description":"Google Ads click id.","type":["string","null"]},"landing_page":{"description":"The store page the visit started on.","type":["string","null"]},"referrer":{"description":"The outside page the visitor came from.","type":["string","null"]},"ttclid":{"description":"TikTok click id.","type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_source":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"wbraid":{"type":["string","null"]}},"type":"object"},"OrderConversation":{"description":"The conversation an order was sold in.","properties":{"channel_kind":{"description":"`whatsapp`, `instagram`, `web`...","type":"string"},"contact_name":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"conversation_id":{"format":"uuid","type":"string"},"last_message_at":{"format":"date-time","type":["string","null"]},"linked_by":{"description":"`inbox` (sold from a quote of the conversation), `phone` (matched by\nthe customer's phone when paid) or `agent` (linked by the team).","type":["string","null"]},"origin_ad_id":{"description":"Click-to-WhatsApp: the ad's id.","type":["string","null"]},"origin_campaign":{"type":["string","null"]},"origin_channel":{"type":["string","null"]},"origin_set_by":{"description":"Who set the conversation's origin: `ad`, `link`, `visit`, `agent`.","type":["string","null"]},"origin_source":{"type":["string","null"]}},"required":["conversation_id","channel_kind"],"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"},"OrderCustomerEmail":{"description":"The payment confirmation the order's customer gets, rendered.","properties":{"html":{"description":"The e-mail's HTML, to show in a sandboxed frame.","type":"string"},"sent_at":{"description":"When it went out to `to` (the send log); `null` while it has not.","format":"date-time","type":["string","null"]},"subject":{"type":"string"},"to":{"description":"The customer's address it goes to.","type":"string"}},"required":["to","subject","html"],"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"},"OrderHit":{"properties":{"created_at":{"format":"date-time","type":"string"},"customer_email":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"number":{"type":["string","null"]},"status":{"type":"string"},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["id","status","created_at"],"type":"object"},"OrderImportColumn":{"properties":{"header":{"type":"string"},"index":{"minimum":0,"type":"integer"},"samples":{"description":"Up to three non-empty values from the column.","items":{"type":"string"},"type":"array"}},"required":["index","header","samples"],"type":"object"},"OrderImportField":{"description":"The order field a column fills. A sheet has one row per order line (as\nShopify and Nuvemshop export them): rows with the same number are one\norder, and its fields are read from the first row that has them.","enum":["ignore","number","placed_at","paid_at","cancelled_at","status","payment_status","fulfillment_status","currency","subtotal","discount","shipping","tax","total","customer_name","email","phone","document","street","address_number","complement","district","city","state","postal_code","notes","item_name","item_sku","item_quantity","item_price"],"type":"string"},"OrderImportMapping":{"properties":{"columns":{"description":"One field per column, in order.","items":{"$ref":"#/components/schemas/OrderImportField"},"type":"array"}},"required":["columns"],"type":"object"},"OrderImportUpload":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/OrderImportColumn"},"type":"array"},"filename":{"type":"string"},"id":{"format":"uuid","type":"string"},"layout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExportPlatform","description":"The platform whose export the sheet is, when its columns say so."}]},"row_count":{"minimum":0,"type":"integer"},"suggestion":{"$ref":"#/components/schemas/OrderImportMapping","description":"A field for every column, from its header."}},"required":["id","filename","row_count","columns","suggestion"],"type":"object"},"OrderImportUploadForm":{"description":"The multipart form of an orders spreadsheet upload.","properties":{"file":{"description":"CSV, XLSX, XLS or ODS; up to 10 MB and 10,000 rows. The first row is\nthe header; one row per order line.","format":"binary","type":"string"},"tab":{"description":"The workbook tab to import, by name (as the tab listing gives it);\nthe first tab without it. Several `file`s, each followed by its\n`tab`, with the same columns, are imported as one sheet.","type":["string","null"]}},"required":["file"],"type":"object"},"OrderInvoiceCorrectionTarget":{"properties":{"access_key":{"type":"string"},"central_do_frete_text":{"description":"With `carrier_name`: the carta that gives the note what Central do\nFrete requires (freight mode 2, that carrier, their text and the\nmodal); null when it already has it.","type":["string","null"]},"emitted_here":{"description":"Mobiari emitted the note (else it was attached from another system).","type":"boolean"},"environment":{"description":"Where the carta goes: the note's environment, not the store's\nemission setting (a note issued elsewhere is a production note).","type":"string"}},"required":["environment","access_key","emitted_here"],"type":"object"},"OrderInvoiceEdits":{"description":"Fields left out keep what the order maps to. For optional fields an\nempty string removes the value.","properties":{"additional_info":{"description":"Replaces the whole additional information (`infCpl`); empty leaves\nthe note without it.","type":["string","null"]},"items":{"description":"By order item; quantities and values are not editable.","items":{"$ref":"#/components/schemas/OrderInvoiceItemEdits"},"type":"array"},"nature":{"description":"Natureza da operação.","type":["string","null"]},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceRecipientEdits"}]},"transport":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceTransportEdits","description":"Replaces the whole transport group (modality, carrier, volumes)."}]}},"type":"object"},"OrderInvoiceItemEdits":{"properties":{"cest":{"type":["string","null"]},"cfop":{"type":["string","null"]},"code":{"type":["string","null"]},"csosn":{"type":["string","null"]},"description":{"type":["string","null"]},"gtin":{"type":["string","null"]},"info":{"description":"Item additional information (`infAdProd`).","type":["string","null"]},"ncm":{"type":["string","null"]},"order_item_id":{"description":"The order item, from the preview's `item_ids`.","format":"uuid","type":"string"},"origin":{"description":"Origem da mercadoria, 0 to 8.","format":"int32","minimum":0,"type":["integer","null"]},"tax_class_id":{"description":"Maps the item with this tax class (NCM, CFOP, CSOSN, unit…) before\nthe other fields apply.","format":"uuid","type":["string","null"]},"unit":{"type":["string","null"]}},"required":["order_item_id"],"type":"object"},"OrderInvoiceItemSource":{"description":"An order item as the note's item `i` comes from it.","properties":{"order_item_id":{"description":"What `edits.items[].order_item_id` names.","format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"tax_class_id":{"description":"The tax class the item maps with (edits applied); none when it has\nnone and the store has no default.","format":"uuid","type":["string","null"]},"title":{"type":"string"}},"required":["order_item_id","title","quantity"],"type":"object"},"OrderInvoicePreview":{"properties":{"can_emit":{"type":"boolean"},"draft":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeDraft"}]},"environment":{"description":"The environment the document would go to.","type":"string"},"issuer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceIssuer","description":"The issuer (CNPJ) the note would go out under, and why. Absent when\nthe store has no fiscal profile."}]},"issues":{"description":"Mapping problems and validation results together. Errors block\nemission.","items":{"$ref":"#/components/schemas/FiscalIssue"},"type":"array"},"items":{"description":"The order's items, in the draft's order (`draft.items[i]` comes\nfrom `items[i]`), also when they do not map yet. Empty for a remessa.","items":{"$ref":"#/components/schemas/OrderInvoiceItemSource"},"type":"array"},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceRecipientEdits","description":"The values the recipient comes from, edits applied, also when they\ndo not map yet. Absent for a remessa."}]},"st":{"description":"The ICMS-ST the note retains, per item: the rule it comes from, the\nMVA before and after adjustment, the values, and whether it is paid\nby GNRE before the goods leave.","items":{"$ref":"#/components/schemas/InvoiceStLine"},"type":"array"},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTotals"}]},"xml":{"description":"Unsigned XML.","type":["string","null"]}},"required":["issues","can_emit","environment","items"],"type":"object"},"OrderInvoiceRecipientEdits":{"description":"Also what the preview returns as `recipient`: the values the note's\nrecipient comes from, edits applied, to fill the form even when they do\nnot map yet.","properties":{"cep":{"type":["string","null"]},"city":{"type":["string","null"]},"complement":{"type":["string","null"]},"district":{"type":["string","null"]},"document":{"description":"CPF or CNPJ.","type":["string","null"]},"email":{"type":["string","null"]},"final_consumer":{"description":"`indFinal`; a non-contributor is always a final consumer.","type":["boolean","null"]},"ie":{"description":"Inscrição estadual, for a contributor.","type":["string","null"]},"ie_indicator":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeIeIndicator"}]},"name":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"street":{"type":["string","null"]},"uf":{"type":["string","null"]}},"type":"object"},"OrderInvoiceRequest":{"description":"Which NF-e of an order to emit.","properties":{"edits":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceEdits","description":"Changes made in the preview, for this note only. The emit request\nsends the same edits the last preview showed."}]},"issuer_id":{"description":"The issuer (CNPJ) to emit under, one of the store's fiscal issuers.\nOmitted: the issuer of the location the goods leave from, else the\nsales channel's, else the store's default (the preview's `issuer`\nsays which and why).","format":"uuid","type":["string","null"]},"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":{"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."}]},"save_recipient":{"description":"On emission, also update the customer's record with the recipient as\nedited (CPF/CNPJ, state registration and ICMS standing, the registered\nname of a company; the address is added to theirs). Without it, the\nrecord only gets what it lacks, and nothing when the note goes to\nanother CPF/CNPJ than the customer's. Needs `customers.edit` on that\ncustomer (403 before anything is emitted). Ignored by the preview.","type":["boolean","null"]}},"type":"object"},"OrderInvoiceTransportEdits":{"properties":{"carrier_document":{"description":"The carrier's CNPJ or CPF, optional.","type":["string","null"]},"carrier_name":{"description":"No carrier when empty.","type":["string","null"]},"mode":{"$ref":"#/components/schemas/NfeFreightMode"},"volumes":{"items":{"$ref":"#/components/schemas/NfeVolume"},"type":"array"}},"required":["mode"],"type":"object"},"OrderItem":{"description":"One line of an order.","properties":{"build_quantity":{"description":"Units being made to order.","format":"int32","type":["integer","null"]},"build_status":{"description":"Production state of the most advanced open batch: `queued`,\n`in_progress`, `ready` or `cancelled`. Null when nothing is built.","type":["string","null"]},"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"]},"order_id":{"format":"uuid","type":"string"},"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"},"reserved_quantity":{"description":"Units held from stock.","format":"int32","type":["integer","null"]},"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","order_id","product_id","variant_id","title","quantity","unit_price_cents","total_cents"],"type":"object"},"OrderItemAdjustment":{"description":"A note of money added to or taken off one order line (a repair, a\ncourtesy discount). Recorded for the team; it does not change the\norder's totals.","properties":{"adjustment_type":{"description":"Free-form kind, e.g. `discount` or `surcharge`.","type":"string"},"amount_cents":{"description":"Signed amount in cents.","format":"int64","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"order_item_id":{"format":"uuid","type":"string"}},"required":["id","order_item_id","adjustment_type","created_at"],"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"},"OrderMarketplace":{"description":"The marketplace an order came from, as the order's screen needs it: no\naccount, so whoever can read the order can read it.","properties":{"capabilities":{"$ref":"#/components/schemas/MarketplaceCapabilities","description":"What Mobiari does there; all off when this server has no adapter for it."},"code":{"$ref":"#/components/schemas/Provider","description":"The stored code (`mercado_livre`), the order's `source`."},"name":{"type":"string"},"slug":{"description":"The path segment (`mercado-livre`), the `{provider}` of the other operations.","type":"string"}},"required":["code","slug","name","capabilities"],"type":"object"},"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"},"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, gateway events and refunds.","properties":{"events":{"description":"Newest first, at most 100.","items":{"$ref":"#/components/schemas/PaymentEvent"},"type":"array"},"intents":{"description":"Newest first.","items":{"$ref":"#/components/schemas/PaymentIntent"},"type":"array"},"order_id":{"format":"uuid","type":"string"},"refunds":{"description":"Newest first.","items":{"$ref":"#/components/schemas/Refund"},"type":"array"}},"required":["order_id","intents","events","refunds"],"type":"object"},"OrderSheet":{"properties":{"import_id":{"description":"From `POST /stores/{store_id}/order-imports` (or `/from-url`).","format":"uuid","type":"string"},"mapping":{"$ref":"#/components/schemas/OrderImportMapping"}},"required":["import_id","mapping"],"type":"object"},"OrderShipmentLine":{"description":"One line of an order, with ordered vs shipped units: the shipments board\nshows which products left without fetching each order.","properties":{"quantity":{"description":"Units ordered.","format":"int32","type":"integer"},"shipped":{"description":"Units in shipments that have left (`ordered` through `delivered`).","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"title":{"type":"string"}},"required":["title","quantity","shipped"],"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":"One status change of an order.","properties":{"actor_name":{"type":["string","null"]},"actor_user_id":{"description":"The member who made it; null for the system (a payment gateway, the\npayment deadline, the shipments, a marketplace).","format":"uuid","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":["id","to_status","created_at"],"type":"object"},"OrderSummary":{"description":"An order as a list row: status, customer, totals, a thumbnail and unit\ncounts. Fetch the order for items, addresses, payments and shipments.","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"},"first_item_image":{"description":"Image of the first line: an absolute URL, or a path on the API host.","type":["string","null"]},"first_item_title":{"description":"Title of the first line, for a one-line description.","type":["string","null"]},"freight_provider_code":{"type":["string","null"]},"freight_status":{"type":["string","null"]},"fulfillment_method":{"description":"`shipping` or `pickup`.","type":"string"},"fulfillment_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderFulfillmentStatus"}]},"has_nfe":{"description":"A nota fiscal XML is attached.","type":"boolean"},"has_preorder":{"description":"Some line waits for a pre-sale collection (`preorder_available_on`\non its line). Always sent (optional in the schema).","type":"boolean"},"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_intent_status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaymentIntentStatus","description":"Status of the latest payment attempt. A `pending` order whose\nlatest attempt is `expired` will not be paid without a new charge."}]},"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"]},"shipment_items":{"description":"Per-line ordered vs shipped units.","items":{"$ref":"#/components/schemas/OrderShipmentLine"},"type":"array"},"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"},"store_id":{"format":"uuid","type":"string"},"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","store_id","status","currency","subtotal_cents","discount_cents","shipping_cents","tax_cents","total_cents","item_count","ordered_units","shipped_units","delivered_units","shipment_items","fulfillment_method","is_test","has_nfe","created_at","updated_at"],"type":"object"},"OrderTimeline":{"properties":{"active":{"description":"Draft, pending, cancelled and refunded orders have no timeline to\nfollow; their lines come back without stages.","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/TimelineLine"},"type":"array"},"order_id":{"format":"uuid","type":"string"}},"required":["order_id","active","lines"],"type":"object"},"OrdersTotal":{"properties":{"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"}},"required":["orders","revenue_cents"],"type":"object"},"OrganizationStage":{"description":"Where an unpaid organization stands (`good`, `restricted`, `closed`).","enum":["good","restricted","closed"],"type":"string"},"OtpSendRequest":{"properties":{"challenge":{"description":"`challenge` from `POST /auth/login`.","type":"string"}},"required":["challenge"],"type":"object"},"OtpSendResponse":{"properties":{"delivered_to":{"description":"The masked destination, e.g. `***4321`.","type":"string"},"expires_in_seconds":{"example":300,"format":"int64","type":"integer"}},"required":["delivered_to","expires_in_seconds"],"type":"object"},"OverviewDay":{"description":"One day, in the store's time zone.","properties":{"date":{"format":"date","type":"string"},"leads":{"format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"visitors":{"format":"int64","type":"integer"}},"required":["date","visitors","leads","orders","revenue_cents"],"type":"object"},"OverviewTotals":{"description":"The numbers of one window.","properties":{"attributed_orders":{"description":"Of `orders`, the ones credited to a channel other than direct, by the\nrequested touch (the same credit as `channels`).","format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"chat_orders":{"description":"Of `orders`, the ones sold in a conversation.","format":"int64","type":"integer"},"converted_leads":{"description":"Of `leads`, how many bought (see the module docs).","format":"int64","type":"integer"},"first_orders":{"description":"Of `orders`, a known customer's first paid order (guest orders are\nnot counted: nothing tells whether the buyer is new).","format":"int64","type":"integer"},"leads":{"description":"Conversations opened by people who had not bought yet.","format":"int64","type":"integer"},"orders":{"description":"Paid orders created in the window.","format":"int64","type":"integer"},"quoted_leads":{"description":"Of `leads`, how many got a cart link or a PIX.","format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"sessions":{"format":"int64","type":"integer"},"visitors":{"description":"Distinct storefront visitors (tracker cookie).","format":"int64","type":"integer"}},"required":["visitors","sessions","leads","quoted_leads","converted_leads","orders","revenue_cents","attributed_orders","attributed_revenue_cents","chat_orders","first_orders"],"type":"object"},"OwnGoodsAway":{"description":"The store's goods held by someone else, per counterparty, operation and\nitem.","properties":{"counterparty_name":{"type":["string","null"]},"counterparty_tax_id":{"type":["string","null"]},"goods_note_ids":{"description":"The goods notes that sent them.","items":{"format":"uuid","type":"string"},"type":"array"},"item_id":{"format":"uuid","type":["string","null"]},"last_moved_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"operation":{"description":"`consignment`, `repair` or `demonstration`.","type":"string"},"quantity":{"description":"Units still out there.","format":"double","type":"number"},"sku":{"type":["string","null"]},"value_cents":{"description":"Their cost as sent.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["operation","name","quantity","value_cents","goods_note_ids","last_moved_at"],"type":"object"},"OwnKind":{"description":"Records that have an owner a member can be held to.","enum":["customer","deal","conversation"],"type":"string"},"OwnerRow":{"description":"A team member's deals.","properties":{"avg_days_to_win":{"description":"Average days from creation to win; null when none won.","format":"double","type":["number","null"]},"lost":{"format":"int64","type":"integer"},"open":{"format":"int64","type":"integer"},"open_value_cents":{"format":"int64","type":"integer"},"owner_name":{"type":["string","null"]},"owner_user_id":{"format":"uuid","type":["string","null"]},"won":{"format":"int64","type":"integer"},"won_value_cents":{"format":"int64","type":"integer"}},"required":["open","open_value_cents","won","won_value_cents","lost"],"type":"object"},"PackBreakdown":{"description":"Stock read as whole packs plus what is left over, using the item's\nlargest pack that fits: 42 un with a 4-pack is 10 packs and 2 un.","properties":{"pack_id":{"format":"uuid","type":"string"},"pack_name":{"type":"string"},"packs":{"format":"int64","type":"integer"},"remainder":{"description":"Base units left over after the whole packs.","format":"double","type":"number"}},"required":["pack_id","pack_name","packs","remainder"],"type":"object"},"PackSize":{"description":"A pack's box: outer size in millimetres and gross weight in grams. On an\nupdate, omitted fields stay and 0 clears one.","properties":{"height_mm":{"format":"int32","type":["integer","null"]},"length_mm":{"format":"int32","type":["integer","null"]},"weight_g":{"format":"int32","type":["integer","null"]},"width_mm":{"format":"int32","type":["integer","null"]}},"type":"object"},"Page":{"description":"A built-in storefront page whose address a store can change.","type":"string","x-extensible-enum":["products","product","collections","collection","cart","search","wishlist","booking","account","account_login","account_orders","account_order","account_products","account_profile","account_wallet","order_placed","order_tracking"]},"Page_AccessAuditEntry":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AccessAuditEntry"},"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_AdAudience":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AdAudience"},"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_AssistantAction":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AssistantAction"},"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_AssistantConversation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AssistantConversation"},"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_AssistantLinkedPhone":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AssistantLinkedPhone"},"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_AuditEvent":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/AuditEvent"},"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_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_BomLine":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/BomLine"},"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_BuildJob":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/BuildJob"},"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_Call":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Call"},"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_CannedReply":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CannedReply"},"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_CartOffer":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CartOffer"},"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_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_CashShift":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CashShift"},"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_CmsCollection":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CmsCollection"},"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_CmsDocument":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CmsDocument"},"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_Component":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Component"},"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_ComponentCandidate":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ComponentCandidate"},"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_ComponentUsage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ComponentUsage"},"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_ConnectedProduct":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConnectedProduct"},"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_ConversationChannel":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversationChannel"},"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_ConversationDiscountApproval":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversationDiscountApproval"},"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_ConversationListItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversationListItem"},"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_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_ConversationVariantHit":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversationVariantHit"},"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_ConversionDelivery":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ConversionDelivery"},"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_CorreiosAccessKey":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CorreiosAccessKey"},"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_CustomerFact":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/CustomerFact"},"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_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_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_DeliveryZone":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DeliveryZone"},"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_DeviceSession":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DeviceSession"},"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_DocumentSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DocumentSummary"},"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_DomainOut":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DomainOut"},"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_DuplicateGroup":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/DuplicateGroup"},"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_EmailBroadcast":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailBroadcast"},"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_EmailDomain":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailDomain"},"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_EmailForm":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailForm"},"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_EmailProductCard":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailProductCard"},"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_EmailRecipient":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailRecipient"},"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_EmailSegment":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailSegment"},"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_EmailSegmentMember":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailSegmentMember"},"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_EmailSuppression":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailSuppression"},"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_EmailTemplate":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EmailTemplate"},"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_ErpProvider":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ErpProvider"},"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_ErpSyncLog":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ErpSyncLog"},"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_EventRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/EventRow"},"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_FiscalDocument":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/FiscalDocument"},"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_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_FreightCancelReason":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/FreightCancelReason"},"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_FreightProvider":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/FreightProvider"},"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_FreightVariantRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/FreightVariantRow"},"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_Invoice":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Invoice"},"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_ItemRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ItemRow"},"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_KbArticleSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/KbArticleSummary"},"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_Kit":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Kit"},"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_LeadItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/LeadItem"},"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_Listing":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Listing"},"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_MarketplaceClaim":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/MarketplaceClaim"},"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_MarketplaceOrder":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/MarketplaceOrder"},"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_MarketplacePublication":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/MarketplacePublication"},"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_McpRequest":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/McpRequest"},"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_MediaFile":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/MediaFile"},"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_NetworkAccessEntry":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NetworkAccessEntry"},"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_NetworkInvite":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NetworkInvite"},"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_NetworkMember":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NetworkMember"},"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_NetworkRole":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NetworkRole"},"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_Notification":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Notification"},"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_NotificationChannel":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NotificationChannel"},"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_NotificationLog":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/NotificationLog"},"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_OptionDefinition":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/OptionDefinition"},"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_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_OrderItemAdjustment":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/OrderItemAdjustment"},"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_PaymentProvider":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PaymentProvider"},"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_Prediction":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Prediction"},"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_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_ProductFeed":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductFeed"},"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_ProductFeedOverride":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductFeedOverride"},"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_ProductImageWithVariants":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductImageWithVariants"},"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_ProductListItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductListItem"},"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_ProductSlugRedirect":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductSlugRedirect"},"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_ProductSubscription":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductSubscription"},"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_ProductionOrderSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductionOrderSummary"},"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_ProductionRun":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ProductionRun"},"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_PushDevice":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/PushDevice"},"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_RecurringOrder":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/RecurringOrder"},"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_Reservation":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Reservation"},"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_ReturnRequest":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ReturnRequest"},"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_ReviewWithProduct":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ReviewWithProduct"},"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_SaleItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SaleItem"},"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_SecurityEvent":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SecurityEvent"},"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_ShippingBox":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ShippingBox"},"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_ShippingRule":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/ShippingRule"},"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_SignatureRequestSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SignatureRequestSummary"},"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_SocialComment":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SocialComment"},"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_SocialPost":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SocialPost"},"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_StockCount":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockCount"},"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_StockDriftFinding":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockDriftFinding"},"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_StockPartRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockPartRow"},"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_StockProductRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StockProductRow"},"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_Store":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Store"},"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_StoreForm":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreForm"},"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_StoreInvite":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreInvite"},"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_StoreMember":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreMember"},"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_StorePopup":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorePopup"},"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_StoreWorkflowRun":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StoreWorkflowRun"},"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_StorefrontDeployment":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontDeployment"},"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_StorefrontKey":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontKey"},"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_StorefrontPage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/StorefrontPage"},"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_String":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"type":"string"},"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_SuggestedProduct":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/SuggestedProduct"},"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_TaxonomyCategory":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TaxonomyCategory"},"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_Tenant":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/Tenant"},"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_TimelineEvent":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TimelineEvent"},"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_TopEvent":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TopEvent"},"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_TopPage":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TopPage"},"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_TopReferrer":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TopReferrer"},"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_TrackedEvent":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TrackedEvent"},"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_TransactionalEmailSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/TransactionalEmailSummary"},"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_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_User":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/User"},"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_VariantWithOptions":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/VariantWithOptions"},"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_VisitorSummary":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/VisitorSummary"},"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_WalletPass":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WalletPass"},"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_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"},"Page_WebhookEventRow":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WebhookEventRow"},"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_WorkflowListItem":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WorkflowListItem"},"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_WorkflowRun":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WorkflowRun"},"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_WorkflowSecret":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WorkflowSecret"},"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_WorkflowVersion":{"description":"A page of results.","properties":{"data":{"description":"The rows on this page, in the endpoint's documented order.","items":{"$ref":"#/components/schemas/WorkflowVersion"},"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"},"PairPosDevice":{"properties":{"app_version":{"description":"The terminal's app or kiosk version, shown in the device list.","type":["string","null"]},"code":{"description":"The code shown in the admin when the device was added.","type":"string"}},"required":["code"],"type":"object"},"ParsedAddress":{"description":"Normalized address, shape-agnostic so every admin form can map from it.","properties":{"city":{"type":"string"},"country":{"type":"string"},"formatted_address":{"type":"string"},"line1":{"description":"`\"{street}, {number}\"` for forms with a single address line.","type":"string"},"neighborhood":{"type":"string"},"number":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"street":{"type":"string"}},"required":["street","number","neighborhood","city","state","postal_code","country","line1","formatted_address"],"type":"object"},"PasskeyInfo":{"description":"A passkey registered on the account.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"last_used_at":{"description":"Null until it is first used to sign in.","format":"date-time","type":["string","null"]},"name":{"description":"What the user called it, e.g. \"MacBook (Touch ID)\".","type":"string"}},"required":["id","name","created_at"],"type":"object"},"PasskeyLoginFinish":{"properties":{"ceremony_id":{"format":"uuid","type":"string"},"credential":{"description":"What `navigator.credentials.get()` returned, as JSON (`credential.toJSON()`).","type":"object"},"device_name":{"description":"A name for this device, shown in the session list.","type":["string","null"]}},"required":["ceremony_id","credential"],"type":"object"},"PasskeyOptions":{"description":"The browser's options for a ceremony, to hand to\n`navigator.credentials.get()` or `.create()` as `publicKey`.","properties":{"ceremony_id":{"description":"Send it back with the browser's answer.","format":"uuid","type":"string"},"options":{"description":"The WebAuthn `PublicKeyCredential*Options` object, in the JSON form\nthe browser's `parseRequestOptionsFromJSON` / `parseCreationOptionsFromJSON`\naccept (binary values are base64url).","type":"object"}},"required":["ceremony_id","options"],"type":"object"},"PasskeyRegisterFinish":{"properties":{"ceremony_id":{"format":"uuid","type":"string"},"credential":{"description":"What `navigator.credentials.create()` returned, as JSON (`credential.toJSON()`).","type":"object"},"name":{"description":"A name for the passkey, up to 80 characters.","type":"string"}},"required":["ceremony_id","name","credential"],"type":"object"},"PasskeyStatus":{"description":"Whether this server offers passkeys","properties":{"enabled":{"description":"False until the server is configured for passkeys.","type":"boolean"}},"required":["enabled"],"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"},"PayablesSummary":{"description":"Totals for the payables screen.","properties":{"due_week_cents":{"description":"Open and due in the next 7 days (today included).","format":"int64","type":"integer"},"due_week_count":{"format":"int64","type":"integer"},"open_cents":{"description":"Every open installment.","format":"int64","type":"integer"},"open_count":{"format":"int64","type":"integer"},"overdue_cents":{"description":"Open and past due.","format":"int64","type":"integer"},"overdue_count":{"format":"int64","type":"integer"},"paid_month_cents":{"description":"Paid this calendar month.","format":"int64","type":"integer"}},"required":["overdue_cents","overdue_count","due_week_cents","due_week_count","open_cents","open_count","paid_month_cents"],"type":"object"},"PaymentAnchor":{"enum":["invoice","order","receipt"],"type":"string"},"PaymentEvent":{"description":"A webhook the gateway sent about one of the order's payments.","properties":{"created_at":{"format":"date-time","type":"string"},"error_message":{"type":["string","null"]},"event_type":{"type":"string"},"external_event_id":{"type":"string"},"id":{"format":"uuid","type":"string"},"payload_json":{"type":"object"},"processed_at":{"format":"date-time","type":["string","null"]},"provider_code":{"type":"string"},"success":{"type":"boolean"}},"required":["id","provider_code","event_type","external_event_id","payload_json","success","created_at"],"type":"object"},"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"},"PaymentIntent":{"description":"One attempt to pay for an order.","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_code":{"description":"`mercado_pago`, or `manual` for payments recorded at the counter.","type":"string"},"provider_snapshot_json":{"description":"The gateway's payment, sanitized (no card data or secrets). For PIX,\n`point_of_interaction.transaction_data` holds the QR code.","type":"object"},"status":{"$ref":"#/components/schemas/PaymentIntentStatus"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","order_id","provider_code","method","status","amount_cents","currency","provider_snapshot_json","created_at","updated_at"],"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"},"PaymentMethod":{"description":"A payment method a gateway can offer at checkout.","enum":["pix","card","boleto"],"type":"string"},"PaymentProvider":{"description":"A payment gateway connected to the store.","properties":{"code":{"description":"Gateway code from the catalog, e.g. `mercado_pago`.","type":"string"},"config_json":{"description":"Settings; secret ones come back masked.","type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_default":{"type":"boolean"},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","code","config_json","is_active","is_default","created_at","updated_at"],"type":"object"},"PaymentProviderHealth":{"description":"Whether a provider has every setting it needs.","properties":{"checks":{"description":"Per-setting presence, e.g. `{\"has_access_token\": true}`.","type":"object"},"healthy":{"description":"Every required setting is present.","type":"boolean"},"provider_code":{"type":"string"}},"required":["provider_code","healthy","checks"],"type":"object"},"PaymentProviderMeta":{"description":"A payment gateway the platform supports.","properties":{"available":{"description":"True once the gateway's backend implementation is wired. Gateways can be\nlisted as \"coming soon\" in the catalog before the impl lands.","type":"boolean"},"code":{"type":"string"},"connect":{"$ref":"#/components/schemas/ConnectKind"},"description":{"type":"string"},"fields":{"items":{"$ref":"#/components/schemas/ModuleField"},"type":"array"},"methods":{"description":"Payment methods this gateway can offer (pix / card / boleto). A\nboleto is offered once switched on in the gateway's settings.","items":{"$ref":"#/components/schemas/PaymentMethod"},"type":"array"},"name":{"type":"string"}},"required":["code","name","description","methods","connect","available","fields"],"type":"object"},"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"},"PermissionCatalog":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/PermissionCatalogGroup"},"type":"array"}},"required":["groups"],"type":"object"},"PermissionCatalogGroup":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"permissions":{"items":{"$ref":"#/components/schemas/PermissionDef"},"type":"array"}},"required":["key","label","permissions"],"type":"object"},"PermissionDef":{"properties":{"code":{"type":"string"},"description":{"type":"string"},"group":{"type":"string"},"label":{"description":"pt-BR label shown in the picker.","type":"string"},"level":{"$ref":"#/components/schemas/Level"}},"required":["code","group","level","label","description"],"type":"object"},"PermissionSetSummary":{"description":"A permission set reaching the user in a store, as a badge.","properties":{"color":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"managed":{"description":"One of the platform's sets (the same in every organization).","type":"boolean"},"name":{"type":"string"}},"required":["id","name","managed"],"type":"object"},"Person":{"description":"Someone who can be put in a group: an owner, a member of one of the\norganization's stores, or one of its service accounts.","properties":{"email":{"type":"string"},"kind":{"description":"`person` or `service`.","type":"string"},"name":{"type":["string","null"]},"store_ids":{"description":"Stores the person reaches (owned or through an attachment).","items":{"format":"uuid","type":"string"},"type":"array"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","email","kind","store_ids"],"type":"object"},"Pipeline":{"description":"A pipeline with its stages in order.","properties":{"archived":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"position":{"format":"int32","type":"integer"},"stages":{"items":{"$ref":"#/components/schemas/Stage"},"type":"array"}},"required":["id","name","position","archived","stages"],"type":"object"},"PipelineCreateRequest":{"description":"A new pipeline.","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"},"PipelineUpdateRequest":{"description":"Changes to a pipeline.","properties":{"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"},"PixAuthorization":{"description":"The organization's Pix Automático authorization at the bank, as the last\nwebhook or sweep read it.","properties":{"created_at":{"format":"date-time","type":"string"},"periodicity":{"description":"`MENSAL` or `ANUAL`. Only a monthly one can take monthly statements.","type":["string","null"]},"status":{"description":"Inter's state: `CRIADA` (offered, not yet approved), `APROVADA`,\n`REJEITADA`, `EXPIRADA` or `CANCELADA`.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["status","created_at","updated_at"],"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"},"PlaceRef":{"description":"A region or ZIP code to target, as `searchSocialAdLocations` returns it.\nA place replaces its own country in `countries`: Meta refuses\noverlapping locations.","properties":{"country":{"description":"The place's two-letter country code. Without it, every country is\nleft out once a place is targeted.","type":["string","null"]},"key":{"description":"Meta's key for the place.","type":"string"},"name":{"type":"string"}},"required":["key","name"],"type":"object"},"Plan":{"description":"A plan in the catalog.","properties":{"annual_price_cents":{"description":"Annual price in BRL cents, for the whole year.","format":"int64","type":"integer"},"code":{"description":"Stable id: `essencial`, `profissional`, `escala` or `parceiro`.","type":"string"},"limits":{"$ref":"#/components/schemas/PlanLimits"},"monthly_price_cents":{"description":"Monthly price in BRL cents.","format":"int64","type":"integer"},"name":{"description":"Display name. A proper noun, the same in every language.","type":"string"},"public":{"description":"Sold to new customers. Unlisted plans (`parceiro`) are assigned by\nMobiari only.","type":"boolean"}},"required":["code","name","monthly_price_cents","annual_price_cents","public","limits"],"type":"object"},"PlanCatalog":{"description":"Every plan on sale, in BRL.","properties":{"currency":{"description":"Always `BRL`.","example":"BRL","type":"string"},"plans":{"description":"Plans on sale, cheapest first.","items":{"$ref":"#/components/schemas/Plan"},"type":"array"},"trial_days":{"description":"Length of the free trial a new organization gets.","format":"int64","type":"integer"}},"required":["currency","trial_days","plans"],"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"},"PlanLimits":{"description":"A plan's size. `None` is unlimited.","properties":{"assistant_messages_per_store":{"description":"Assistant messages per store per calendar month, every channel.","format":"int64","type":"integer"},"emails_per_month":{"description":"Marketing and transactional e-mails per month across the\norganization. Informative: sending is paced by the daily\ndeliverability caps, not cut at this number.","format":"int64","type":["integer","null"]},"seats":{"description":"People with access to any of the organization's stores, pending\ninvites included.","format":"int64","type":["integer","null"]},"storage_gb":{"description":"File library size, in GB, across the organization.","format":"int64","type":"integer"},"stores":{"description":"Stores in the organization.","format":"int64","type":["integer","null"]}},"required":["assistant_messages_per_store","storage_gb"],"type":"object"},"PlanLineInput":{"description":"One line to pack.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"PlanRequest":{"description":"What the week is about.","properties":{"brief":{"description":"The theme or goal (\"Black Friday\", \"lançamento da coleção outono\").","type":"string"},"days":{"description":"Days ahead the plan covers, 1 to 31, starting tomorrow. Defaults to 7.","format":"int32","minimum":0,"type":["integer","null"]},"posts":{"description":"Posts to plan, 1 to 14. Defaults to 5.","format":"int32","minimum":0,"type":["integer","null"]},"product_ids":{"description":"Products to feature.","items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object"},"PlanResult":{"description":"The drafts created.","properties":{"posts":{"items":{"$ref":"#/components/schemas/SocialPost"},"type":"array"}},"required":["posts"],"type":"object"},"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"},"PlannedCredit":{"description":"What a credit would take off one installment.","properties":{"cents":{"format":"int64","type":"integer"},"due_on":{"format":"date","type":"string"},"label":{"type":["string","null"]},"payable_id":{"format":"uuid","type":"string"}},"required":["payable_id","due_on","cents"],"type":"object"},"PlannedStock":{"description":"What a line would take out of stock.","properties":{"item_name":{"type":["string","null"]},"line_number":{"format":"int32","type":"integer"},"note":{"description":"Why it would move nothing.","type":["string","null"]},"units":{"format":"double","type":"number"}},"required":["line_number","units"],"type":"object"},"PlatformDelivery":{"description":"One server-side event of an order beyond Meta's and Google's purchase.","properties":{"error":{"description":"The platform's message when it did not accept the event.","type":["string","null"]},"kind":{"description":"`purchase`, `refund` or `adjustment` (a correction of the value\nGoogle Ads was told).","type":"string"},"platform":{"description":"`tiktok`, `ga4` or `google`.","type":"string"},"sent_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/ConversionDeliveryStatus"}},"required":["platform","kind","status"],"type":"object"},"PlatformDocument":{"description":"A Mobiari document and where the store stands with it.","properties":{"in_force":{"description":"In force: it can be signed (and may be required). Otherwise a draft\nto read.","type":"boolean"},"key":{"type":"string"},"required_for":{"description":"What it unlocks, when required: `nfe_production`.","type":["string","null"]},"signed":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlatformSignature","description":"The latest signature, any version."}]},"summary":{"type":"string"},"title":{"type":"string"},"up_to_date":{"description":"Signed at the current version (or later).","type":"boolean"},"version":{"format":"int32","type":"integer"}},"required":["key","version","title","summary","in_force","up_to_date"],"type":"object"},"PlatformSignInput":{"properties":{"accept":{"description":"The signer read the document and signs on the store's behalf.","type":"boolean"},"signature_image":{"description":"The signature as a PNG, base64 (with or without a data: prefix).","type":"string"},"signature_kind":{"description":"`drawn` or `typed`.","type":"string"},"typed_name":{"type":["string","null"]},"version":{"description":"The version being signed (must be the current one).","format":"int32","type":"integer"}},"required":["version","signature_image","signature_kind","accept"],"type":"object"},"PlatformSignature":{"properties":{"document_id":{"format":"uuid","type":["string","null"]},"signed_at":{"format":"date-time","type":"string"},"signed_by":{"type":["string","null"]},"verification_code":{"type":["string","null"]},"version":{"format":"int32","type":"integer"}},"required":["version","signed_at"],"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"},"Policy":{"description":"A policy, as saved.","properties":{"attachment_count":{"format":"int64","type":"integer"},"cedar":{"description":"The Cedar text, for `cedar`; names its principal as `?principal`.","type":["string","null"]},"codes":{"description":"The codes of a permission set.","items":{"type":"string"},"type":"array"},"color":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"explanation":{"description":"Plain-language rendering shown to people. Required to attach a\nrule or free-form policy.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`permission_set`, `rule` or `cedar`.","type":"string"},"managed":{"description":"The platform's: the same everywhere, read-only.","type":"boolean"},"name":{"type":"string"},"rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Rule","description":"The structured rule, for `rule`."}]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","kind","name","codes","managed","attachment_count","created_at","updated_at"],"type":"object"},"PolicyBody":{"description":"What a policy says. Exactly one of `codes`, `rule` and `cedar`.","properties":{"cedar":{"type":["string","null"]},"codes":{"description":"Permission codes, for a permission set.","items":{"type":"string"},"type":["array","null"]},"rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Rule"}]}},"type":"object"},"PolicyDraft":{"description":"A draft the assistant wrote from a request in plain words.","properties":{"all_stores":{"description":"Where: every store of the organization, or these.","type":"boolean"},"cedar":{"type":["string","null"]},"cedar_rendered":{"description":"The Cedar the draft renders to.","items":{"type":"string"},"type":"array"},"codes":{"items":{"type":"string"},"type":["array","null"]},"dry_run":{"$ref":"#/components/schemas/DryRun"},"explanation":{"description":"Plain-language rendering, ready to save as the explanation.","type":"string"},"kind":{"description":"`permission_set`, `rule` or `cedar`.","type":"string"},"name":{"description":"A name for the policy.","type":"string"},"rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Rule"}]},"store_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"subject":{"$ref":"#/components/schemas/SubjectSpec","description":"Who to attach it to."},"warnings":{"description":"What the assistant could not express or had to assume.","items":{"type":"string"},"type":"array"}},"required":["kind","subject","all_stores","store_ids","name","explanation","cedar_rendered","dry_run","warnings"],"type":"object"},"PolicyValidation":{"description":"The policy's Cedar text as the engine sees it, and whether it is valid.","properties":{"cedar":{"description":"The Cedar the policy renders to (for a placeholder principal).","items":{"type":"string"},"type":"array"},"error":{"description":"Why not, when `valid` is false.","type":["string","null"]},"valid":{"type":"boolean"}},"required":["valid","cedar"],"type":"object"},"PosDevice":{"properties":{"app_version":{"type":["string","null"]},"channel_id":{"format":"uuid","type":"string"},"channel_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"mode":{"description":"`counter` or `kiosk`.","type":"string"},"name":{"type":"string"},"paired":{"description":"The terminal has used its pairing code.","type":"boolean"},"paired_at":{"format":"date-time","type":["string","null"]},"pairing_pending":{"description":"A pairing code is waiting (not yet used, not expired).","type":"boolean"},"revoked_at":{"format":"date-time","type":["string","null"]}},"required":["id","name","mode","channel_id","channel_name","paired","pairing_pending","created_at"],"type":"object"},"PosDeviceIdentity":{"properties":{"channel_id":{"format":"uuid","type":"string"},"channel_name":{"type":"string"},"device_id":{"format":"uuid","type":"string"},"mode":{"description":"`counter` or `kiosk`: what the terminal shows.","type":"string"},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"store_name":{"type":"string"},"store_slug":{"type":"string"}},"required":["device_id","name","mode","store_id","store_name","store_slug","channel_id","channel_name"],"type":"object"},"PosDeviceOperator":{"properties":{"name":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","name"],"type":"object"},"PosDevicePaired":{"properties":{"device":{"$ref":"#/components/schemas/PosDeviceIdentity"},"device_token":{"description":"The device credential. Shown once: the terminal keeps it.","type":"string"}},"required":["device_token","device"],"type":"object"},"PosDevicePairing":{"properties":{"device":{"$ref":"#/components/schemas/PosDevice"},"pairing_code":{"description":"Shown once: the terminal sends it to `POST /pos/devices/pair`.","type":"string"},"pairing_expires_at":{"format":"date-time","type":"string"}},"required":["device","pairing_code","pairing_expires_at"],"type":"object"},"PosDeviceSession":{"properties":{"access_token":{"description":"The operator's session token for this terminal: the member's own user\ntoken, limited to the POS scope and this POS, for one shift.","type":"string"},"expires_in":{"format":"int64","type":"integer"},"name":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["access_token","expires_in","user_id","name"],"type":"object"},"PosDeviceSignIn":{"properties":{"pin":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","pin"],"type":"object"},"PosFiscal":{"description":"`pos.use` on one POS: a member held to some sales channels by an access\nrule may only touch the registers of those.\nWhat the POS may offer beyond the sale itself.","properties":{"nfce":{"description":"The store has NFC-e on and this member may issue it: the receipt\noffers the fiscal receipt. A cashier cannot read the fiscal settings,\nso the POS asks here instead.","type":"boolean"}},"required":["nfce"],"type":"object"},"PosKioskSession":{"properties":{"access_token":{"description":"The kiosk's session token: limited to browsing, PIX sales and the\nreceipt, on this terminal's POS.","type":"string"},"expires_in":{"format":"int64","type":"integer"}},"required":["access_token","expires_in"],"type":"object"},"PosKioskSettings":{"properties":{"accent":{"description":"The brand colour, `#rrggbb`. Empty: the stock blue.","type":["string","null"]},"category_icons":{"additionalProperties":{"type":"string"},"description":"The icon of each category in the kiosk's rail: category id to one of\n`pizza, burger, fries, drink, beer, wine, coffee, cake, icecream, bread, salad, meat, apple, bag, shirt, gift, tag, star, heart, flame`.\nA category without one shows its first letter.","propertyNames":{"type":"string"},"type":"object"},"featured_product_ids":{"description":"Products shown first on the start screen, in this order (up to 12).","items":{"format":"uuid","type":"string"},"type":"array"},"headline_en":{"description":"The same in English. Empty: \"Order here\".","type":["string","null"]},"headline_pt":{"description":"The start screen's headline in Portuguese. Empty: \"Faça o seu pedido aqui\".","type":["string","null"]},"logo_url":{"description":"The store's logo, an `https://` image address. Empty: the store name.","type":["string","null"]},"slide_seconds":{"description":"Seconds each product stays on the start screen (2 to 60).","format":"int32","type":"integer"}},"required":["featured_product_ids","slide_seconds"],"type":"object"},"PosOperator":{"properties":{"email":{"type":"string"},"has_pin":{"type":"boolean"},"locked":{"description":"The PIN is locked after too many wrong tries.","type":"boolean"},"name":{"type":"string"},"user_id":{"format":"uuid","type":"string"}},"required":["user_id","name","email","has_pin","locked"],"type":"object"},"PosSale":{"description":"A sale at the point of sale, as every screen draws it.","properties":{"actions":{"description":"`add_line`, `edit_line`, `edit_sale` (discount, customer, delivery,\nnote), `take_payment`, `void_payment`, `pix_qr`, `finish`, `park`,\n`resume`, `cancel`, `cancel_pix`.","items":{"$ref":"#/components/schemas/SaleAction"},"type":"array"},"address_id":{"format":"uuid","type":["string","null"]},"billing_address_id":{"format":"uuid","type":["string","null"]},"cash_accounting":{"description":"Whether this point of sale needs an open drawer, and whether it has one.","type":"boolean"},"change_cents":{"format":"int64","type":"integer"},"customer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSaleCustomer"}]},"customer_credit_cents":{"description":"What the attached customer's wallet can pay now, in cents (0 without\na customer). Taken with `POST .../credit-payments`.","format":"int64","type":"integer"},"discount_bp":{"description":"The sale's discount: a percent in basis points and an amount.","format":"int32","type":"integer"},"discount_cents":{"format":"int64","type":"integer"},"discount_code":{"type":["string","null"]},"drawer_open":{"type":"boolean"},"freight":{"description":"Delivery or pickup chosen (as `POST .../orders/manual` takes `freight`).","type":["object","null"]},"gift_card_sale":{"description":"True when the sale sells gift cards (it holds nothing else).","type":"boolean"},"gift_cards":{"description":"The gift cards the sale issued, once it is done.","items":{"$ref":"#/components/schemas/PosSaleGiftCard"},"type":"array"},"id":{"format":"uuid","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/PosSaleLine"},"type":"array"},"loyalty":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSaleLoyalty","description":"What the sale earns the attached customer (points, cashback); empty\nwithout a customer, with the program off, or for gift cards."}]},"max_discount_percent":{"description":"This point of sale's ceiling on discounts given by hand, in percent.","format":"int32","type":["integer","null"]},"no_contact":{"type":"boolean"},"note":{"type":["string","null"]},"order":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSaleOrder"}]},"paid_cents":{"format":"int64","type":"integer"},"parked_at":{"format":"date-time","type":["string","null"]},"payment_methods":{"description":"The payment methods this point of sale takes.","items":{"type":"string"},"type":"array"},"payments":{"items":{"$ref":"#/components/schemas/PosSalePayment"},"type":"array"},"pix":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSalePix"}]},"problems":{"description":"What stops the sale being charged now.","items":{"$ref":"#/components/schemas/PosSaleProblem"},"type":"array"},"quote_id":{"format":"uuid","type":["string","null"]},"receipt_document":{"type":["string","null"]},"remaining_cents":{"description":"What is still to be taken.","format":"int64","type":"integer"},"sales_channel_id":{"format":"uuid","type":"string"},"stage":{"description":"`sell` (no payment yet), `pay` (payments taken, more to take),\n`awaiting_pix`, `done`, `parked` or `cancelled`.","type":"string"},"status":{"description":"`open`, `parked`, `awaiting_pix`, `done` or `cancelled`.","type":"string"},"totals":{"$ref":"#/components/schemas/PosSaleTotals"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","stage","sales_channel_id","lines","no_contact","discount_bp","discount_cents","totals","payments","paid_cents","remaining_cents","change_cents","problems","customer_credit_cents","gift_card_sale","gift_cards","payment_methods","cash_accounting","drawer_open","actions","updated_at"],"type":"object"},"PosSaleCreate":{"description":"Start a sale at a point of sale.","properties":{"quote_id":{"description":"A saved quote to be paid here: its lines at the quoted prices, its\ndiscount and its customer.","format":"uuid","type":["string","null"]},"sales_channel_id":{"description":"The point of sale; a paired terminal's own when left out there.","format":"uuid","type":["string","null"]}},"type":"object"},"PosSaleCreditAccount":{"description":"The credit account a `store_credit` payment spent.","properties":{"account_id":{"format":"uuid","type":"string"},"code_hint":{"description":"\"••••-••••-••••-PQRS\" for a gift card.","type":["string","null"]},"kind":{"description":"`wallet` or `gift_card`.","type":"string"}},"required":["account_id","kind"],"type":"object"},"PosSaleCreditPaymentCreate":{"description":"Store credit or a gift card to pay with.","properties":{"amount_cents":{"description":"What this payment covers; left out: as much as the account holds, up to what is left.","format":"int64","type":["integer","null"]},"client_key":{"description":"One key per payment (a UUID): sent again after a lost answer, it returns the sale instead of spending twice.","type":["string","null"]},"gift_card_code":{"description":"Or spend a gift card, by its code (case, spaces and dashes do not matter).","type":["string","null"]},"wallet":{"description":"Spend the attached customer's wallet.","type":"boolean"}},"type":"object"},"PosSaleCustomer":{"description":"The sale's customer, as the screen shows them.","properties":{"document":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id"],"type":"object"},"PosSaleGiftCard":{"description":"A gift card this sale sold, to print on the receipt or show the customer.","properties":{"account_id":{"format":"uuid","type":"string"},"amount_cents":{"format":"int64","type":"integer"},"code":{"description":"The whole code: it is the card. Shown only on the sale that sold it.","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]}},"required":["account_id","code","amount_cents"],"type":"object"},"PosSaleLine":{"description":"A line of the sale.","properties":{"discount_bp":{"description":"Percent off this line, in basis points (1000 = 10%).","format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"list_cents":{"description":"The unit price shown when the item went in.","format":"int64","type":"integer"},"price_cents":{"description":"A unit price agreed for this sale, in place of the list price and the percent.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"title":{"type":"string"},"total_cents":{"description":"What the line is sold for.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"type":["string","null"]}},"required":["id","variant_id","product_id","title","list_cents","quantity","discount_bp","total_cents"],"type":"object"},"PosSaleLineCreate":{"description":"An item to add.","properties":{"quantity":{"description":"1 when left out.","format":"int32","type":["integer","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"type":"object"},"PosSaleLineUpdate":{"description":"Changes to a line; fields left out are kept.","properties":{"discount_bp":{"description":"Percent off, in basis points (0 to 10000).","format":"int32","type":["integer","null"]},"price_cents":{"description":"A unit price agreed for this sale; `null` goes back to the list price.","format":"int64","type":["integer","null"]},"quantity":{"format":"int32","type":["integer","null"]}},"type":"object"},"PosSaleLoyalty":{"description":"What the sale earns its customer in the loyalty program, at their tier.","properties":{"cashback_cents":{"format":"int64","type":"integer"},"pending_days":{"description":"Days after the sale before it counts.","format":"int32","type":"integer"},"points":{"format":"int64","type":"integer"},"tier":{"description":"The customer's tier.","type":["string","null"]}},"required":["points","cashback_cents","pending_days"],"type":"object"},"PosSaleOrder":{"description":"The order the sale became.","properties":{"id":{"format":"uuid","type":"string"},"number":{"type":"string"},"payment_status":{"type":"string"},"status":{"type":"string"}},"required":["id","number","status","payment_status"],"type":"object"},"PosSalePayment":{"description":"A payment taken for the sale.","properties":{"amount_cents":{"format":"int64","type":"integer"},"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CardDetail"}]},"change_cents":{"description":"Cash: what goes back.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"credit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSaleCreditAccount","description":"A `store_credit` payment: the wallet or gift card it spent."}]},"id":{"format":"uuid","type":"string"},"method":{"description":"`cash`, `pix`, `bank_transfer` or `card_terminal`.","type":"string"},"received_cents":{"description":"Cash: what was handed over.","format":"int64","type":["integer","null"]}},"required":["id","method","amount_cents","change_cents","created_at"],"type":"object"},"PosSalePaymentCreate":{"description":"A payment taken at the counter.","properties":{"amount_cents":{"description":"What this payment covers; what is left when left out.","format":"int64","type":["integer","null"]},"card":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CardDetail","description":"Card machine: credit or debit and the installments."}]},"client_key":{"description":"One key per payment the seller takes (a UUID): sent again after an\nanswer that never came, it returns the sale with that payment instead\nof taking it twice.","type":["string","null"]},"method":{"$ref":"#/components/schemas/ManualPaymentMethod","description":"`cash`, `pix` (a key or transfer shown to the customer), `bank_transfer`\nor `card_terminal`. A Pix charged through the gateway is `POST .../pix`."},"received_cents":{"description":"Cash: what was handed over (the part covered is at most what is left;\nthe rest is change).","format":"int64","type":["integer","null"]}},"required":["method"],"type":"object"},"PosSalePix":{"description":"The Pix charge the sale's order waits for.","properties":{"expires_at":{"format":"date-time","type":["string","null"]},"qr_code":{"type":["string","null"]},"qr_code_base64":{"type":["string","null"]},"status":{"type":"string"}},"required":["status"],"type":"object"},"PosSaleProblem":{"description":"Something in the sale that stops it being charged, as the server would\nrefuse it at the end: `discount_over_limit`, `invalid_discount_code`,\n`invalid_manual_discount`, `contact_required`, `invalid_shipping`…","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"PosSaleSummary":{"description":"A parked or open sale in a list.","properties":{"count":{"format":"int32","type":"integer"},"customer_name":{"type":["string","null"]},"gross_cents":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"parked_at":{"format":"date-time","type":["string","null"]},"quote_id":{"format":"uuid","type":["string","null"]},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","count","gross_cents","updated_at"],"type":"object"},"PosSaleTotals":{"description":"The sale's money, worked out by the server.","properties":{"count":{"description":"Units.","format":"int32","type":"integer"},"coupon_cents":{"description":"The discount code's part.","format":"int64","type":"integer"},"discount_cents":{"description":"Everything taken off.","format":"int64","type":"integer"},"gross_cents":{"description":"The lines at list prices (or a price agreed above it).","format":"int64","type":"integer"},"line_discount_cents":{"description":"Taken off single lines.","format":"int64","type":"integer"},"manual_cents":{"description":"Everything given by hand: line discounts and the sale's.","format":"int64","type":"integer"},"sale_discount_cents":{"description":"The sale's own discount (percent and amount).","format":"int64","type":"integer"},"shipping_cents":{"format":"int64","type":"integer"},"total_cents":{"format":"int64","type":"integer"}},"required":["count","gross_cents","line_discount_cents","sale_discount_cents","manual_cents","coupon_cents","discount_cents","shipping_cents","total_cents"],"type":"object"},"PosSaleUpdate":{"description":"Changes to the sale; fields left out are kept, `null` clears.","properties":{"address_id":{"format":"uuid","type":["string","null"]},"billing_address_id":{"format":"uuid","type":["string","null"]},"customer_id":{"description":"The sale's customer. A customer whose group has a price list pays it:\nthe lines without a price agreed by hand are priced at the list.","format":"uuid","type":["string","null"]},"discount_bp":{"description":"The sale's discount: percent in basis points.","format":"int32","type":["integer","null"]},"discount_cents":{"description":"The sale's discount: an amount.","format":"int64","type":["integer","null"]},"discount_code":{"type":["string","null"]},"freight":{"description":"Delivery or pickup, as `POST .../orders/manual` takes `freight`;\n`null` when the customer takes it now.","type":["object","null"]},"no_contact":{"type":["boolean","null"]},"note":{"type":["string","null"]},"receipt_document":{"description":"A CPF or CNPJ for the receipt when no customer is attached.","type":["string","null"]}},"type":"object"},"PosSettings":{"description":"Rules of one point of sale. Every field is optional: empty means no rule.","properties":{"max_discount_percent":{"description":"The largest negotiated discount, as a percent of the sale's items\n(0 to 100). Omitted means no ceiling.","format":"int32","type":["integer","null"]},"payment_methods":{"description":"The payment methods this POS takes. Omitted means all of them.","items":{"$ref":"#/components/schemas/ManualPaymentMethod"},"type":["array","null"]},"receipt_header":{"description":"Text printed at the top of the receipt (the site's name, address and\nCNPJ, say).","type":["string","null"]}},"type":"object"},"PosStockSources":{"description":"The stock a point of sale sells from.","properties":{"location_ids":{"description":"Inventory locations in selling order. Empty means every location, by\npriority.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["location_ids"],"type":"object"},"PositionRow":{"description":"One line of the position: an item and whose it is.","properties":{"code":{"description":"`COD_ITEM`: the SKU, else the start of the id (as the store's notes\nwrite the product code).","type":"string"},"description":{"type":"string"},"item_id":{"format":"uuid","type":["string","null"]},"owner_name":{"type":["string","null"]},"owner_tax_id":{"description":"`COD_PART`: the owner's CNPJ or CPF, for ownership 2.","type":["string","null"]},"ownership":{"description":"`IND_PROP`: 0 the store's own goods in its possession, 2 someone\nelse's goods in the store's possession.","format":"int32","type":"integer"},"quantity":{"description":"`QTD`, in base units.","format":"double","type":"number"},"total_cents":{"description":"`VL_ITEM`: quantity × unit cost, rounded to the cent.","format":"int64","type":"integer"},"unit":{"description":"`UNID`.","type":"string"},"unit_cost_cents":{"description":"`VL_UNIT`: the moving average cost now; for someone else's goods, the\nvalue per unit on their notes.","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["code","description","unit","quantity","unit_cost_cents","total_cents","ownership"],"type":"object"},"PostInsights":{"description":"One post's numbers.","properties":{"account_id":{"format":"uuid","type":"string"},"caption":{"type":["string","null"]},"comments":{"format":"int64","type":["integer","null"]},"interactions":{"format":"int64","type":["integer","null"]},"likes":{"format":"int64","type":["integer","null"]},"media_external_id":{"type":"string"},"media_type":{"description":"`image`, `video`, `carousel_album`, `reels`, `story` or `post`.","type":["string","null"]},"network":{"type":"string"},"permalink":{"type":["string","null"]},"posted_at":{"format":"date-time","type":["string","null"]},"reach":{"format":"int64","type":["integer","null"]},"saves":{"format":"int64","type":["integer","null"]},"shares":{"format":"int64","type":["integer","null"]},"social_post_id":{"description":"The Mobiari post, when it was published from here.","format":"uuid","type":["string","null"]},"views":{"format":"int64","type":["integer","null"]}},"required":["media_external_id","network","account_id"],"type":"object"},"PostMedia":{"description":"A library file as the post shows it.","properties":{"file_id":{"format":"uuid","type":"string"},"filename":{"type":"string"},"height":{"format":"int32","type":["integer","null"]},"mime_type":{"type":"string"},"name":{"type":"string"},"tenant_id":{"format":"uuid","type":"string"},"width":{"format":"int32","type":["integer","null"]}},"required":["file_id","tenant_id","name","filename","mime_type"],"type":"object"},"PostProblem":{"description":"Something that stops a post from being sent for review or scheduled.","properties":{"account_id":{"format":"uuid","type":["string","null"]},"code":{"description":"`no_accounts`, `account_unavailable`, `account_cannot_publish`,\n`media_count`, `media_type`, `reel_needs_video`,\n`carousel_video_facebook`, `aspect_ratio`, `caption_too_long`,\n`too_many_hashtags`. The set may grow.","type":"string"},"file_id":{"format":"uuid","type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"PostStatus":{"description":"Where a post is in its life.","enum":["draft","in_review","scheduled","publishing","published","partial","failed","cancelled"],"type":"string"},"PostTarget":{"description":"One account a post goes to.","properties":{"account_id":{"format":"uuid","type":"string"},"account_name":{"type":"string"},"can_manage_published":{"description":"A Facebook feed post supported by the remote edit/delete controls.","type":"boolean"},"deleted_at":{"description":"Confirmed deletion of the Facebook copy; the history is retained.","format":"date-time","type":["string","null"]},"error":{"description":"Why it failed (Meta's message).","type":["string","null"]},"id":{"format":"uuid","type":"string"},"network":{"$ref":"#/components/schemas/Network"},"permalink":{"description":"The published post on Instagram or Facebook.","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"published_caption":{"description":"Caption last saved to this destination, separate from the original draft.","type":["string","null"]},"status":{"$ref":"#/components/schemas/TargetStatus"}},"required":["can_manage_published","id","network","account_id","account_name","status"],"type":"object"},"PostalCodeAddress":{"description":"What a CEP resolves to.","properties":{"city":{"type":"string"},"city_code":{"description":"The city's IBGE code.","type":["string","null"]},"neighborhood":{"description":"Empty for a CEP that covers a whole town.","type":"string"},"postal_code":{"description":"The CEP, 8 digits.","type":"string"},"state":{"description":"Two-letter state (UF).","type":"string"},"street":{"description":"Empty for a CEP that covers a whole town.","type":"string"}},"required":["postal_code","street","neighborhood","city","state"],"type":"object"},"Prediction":{"description":"An address suggestion.","properties":{"description":{"type":"string"},"place_id":{"description":"Pass to `GET /places/details/{place_id}`.","type":"string"}},"required":["place_id","description"],"type":"object"},"PreflightCheck":{"description":"One line of the checklist.","properties":{"fix_in_app":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FixIn","description":"Where in Mobiari to fix it."}]},"fix_url":{"description":"The Meta page to fix it on.","type":["string","null"]},"id":{"$ref":"#/components/schemas/CheckId"},"message":{"description":"What to say: a message key (`account_no_payment`, `whatsapp_not_linked`, `could_not_verify`...).","type":"string"},"params":{"additionalProperties":{"type":"string"},"description":"Values for the message (`days`, `count`, `number`, `reason`...).","propertyNames":{"type":"string"},"type":"object"},"status":{"$ref":"#/components/schemas/CheckStatus"}},"required":["id","status","message","params"],"type":"object"},"PresetInfo":{"properties":{"features":{"items":{"type":"string"},"type":"array"},"id":{"description":"`store`, `appointments` or `support`.","type":"string"}},"required":["id","features"],"type":"object"},"PreviewEmailSegmentRequest":{"properties":{"conditions":{"$ref":"#/components/schemas/EmailSegmentConditions"}},"required":["conditions"],"type":"object"},"PreviewGrant":{"description":"A preview-session token for one store.","properties":{"expires_at":{"format":"date-time","type":"string"},"preview_suffix":{"description":"The trusted host suffix `return_url` was validated against. The UI\nchecks the destination again before navigating so the grant is never\nsent to an untrusted origin.","type":["string","null"]},"token":{"description":"POST it as the `token` form field to `/__preview/grant` on the\npreview host (never in a URL); the host turns it into a session\ncookie and redirects to the same-origin `return_url` path.","type":"string"}},"required":["token","expires_at"],"type":"object"},"PreviewGrantRequest":{"description":"Which store to preview: `store_id` or `store_slug`.","properties":{"return_url":{"description":"The destination the admin UI will append the grant to. Keep the\nalias so clients can use the query-parameter name `return`.","type":["string","null"]},"store_id":{"description":"The store's id. Wins over `store_slug` when both are sent.","format":"uuid","type":["string","null"]},"store_slug":{"description":"The store's slug, which is what the preview hostname carries.","type":["string","null"]}},"type":"object"},"PreviewTransactionalEmailRequest":{"description":"A template to render, as it is on screen (unsaved edits included).","properties":{"blocks":{"type":["object","null"]},"design":{"type":["object","null"]},"html":{"type":["string","null"]},"mode":{"$ref":"#/components/schemas/TransactionalEmailMode"},"preview_text":{"type":["string","null"]},"subject":{"type":"string"}},"required":["subject","mode"],"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"},"PriceListImport":{"description":"A CSV to import.","properties":{"csv":{"description":"The file's text, as exported (`;` or `,`, with or without the BOM). Columns are found by their header: the\nvariant by `ID da variante` or else `SKU`, the price by `Preço da lista`, the quantity by `A partir de (peças)`\n(1 when absent or empty).","type":"string"}},"required":["csv"],"type":"object"},"PriceListImportError":{"description":"A line the import could not take.","properties":{"line":{"description":"The line in the file (the header is line 1).","format":"int64","type":"integer"},"message":{"type":"string"}},"required":["line","message"],"type":"object"},"PriceListImportResult":{"description":"What an import did.","properties":{"errors":{"items":{"$ref":"#/components/schemas/PriceListImportError"},"type":"array"},"removed":{"description":"Prices removed: each variant in the file keeps only the prices the file gives it.","format":"int64","type":"integer"},"saved":{"description":"Prices written.","format":"int64","type":"integer"},"variants":{"description":"Variants in the file, changed or not.","format":"int64","type":"integer"}},"required":["saved","removed","variants","errors"],"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"},"PriceQuote":{"description":"One amount as checkout charges it, for showing prices outside a cart\n(ad creatives, previews).","properties":{"amount_cents":{"format":"int64","type":"integer"},"card_cents":{"description":"Paid by card (after any store rule that applies to every method).","format":"int64","type":"integer"},"installment_cents":{"description":"Each installment, rounded up (to whole reais when the store rounds\nprices).","format":"int64","type":"integer"},"installments":{"description":"Interest-free installments allowed (the store's maximum and minimum\ninstallment).","format":"int32","type":"integer"},"pix_cents":{"description":"Paid by PIX, with the store's PIX rule (its minimum and the store's\nprice rounding).","format":"int64","type":"integer"}},"required":["amount_cents","card_cents","pix_cents","installments","installment_cents"],"type":"object"},"PriceQuoteRequest":{"description":"Amounts to price, in cents (at most 200).","properties":{"amounts_cents":{"items":{"format":"int64","type":"integer"},"type":"array"}},"required":["amounts_cents"],"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"},"PricedCart":{"description":"A priced cart: totals before the payment method is chosen, then the\ntotal for each method.","properties":{"currency":{"type":"string"},"discounts":{"description":"Discounts that apply whatever the payment method.","items":{"$ref":"#/components/schemas/PricedDiscount"},"type":"array"},"methods":{"items":{"$ref":"#/components/schemas/MethodPrice"},"type":"array"},"shipping_cents":{"format":"int64","type":"integer"},"subtotal_cents":{"format":"int64","type":"integer"},"tax_cents":{"format":"int64","type":"integer"},"total_cents":{"description":"Before any payment-method discount.","format":"int64","type":"integer"}},"required":["currency","subtotal_cents","discounts","shipping_cents","tax_cents","total_cents","methods"],"type":"object"},"PricedDiscount":{"description":"A discount applied to the cart, with where it came from.","properties":{"amount_cents":{"format":"int64","type":"integer"},"id":{"description":"The automatic discount or the code it came from; null for a\nnegotiated discount.","format":"uuid","type":["string","null"]},"kind":{"description":"An automatic discount's kind: `percent_off`, `fixed_off`,\n`buy_x_get_y` or `tiered`.","type":["string","null"]},"name":{"type":"string"},"source":{"description":"`promotion` (an automatic promotion: buy X get Y, a tier), `code` (a\ndiscount code the shopper typed), `quote` (negotiated) or `automatic`\n(a payment-method rule, e.g. PIX).","type":"string"}},"required":["source","name","amount_cents"],"type":"object"},"PrivacyRequest":{"description":"One request.","properties":{"contact_email":{"description":"The customer's e-mail when they asked (kept after an erasure, to answer them).","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"details":{"type":["string","null"]},"due_at":{"description":"When the answer is due (15 days after the request).","format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`access`, `deletion`, `correction` or `other`.","type":"string"},"resolution":{"description":"What the store did, or why it refused.","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`open`, `done` or `rejected`.","type":"string"}},"required":["id","kind","status","due_at","created_at"],"type":"object"},"PrivacyRequestUpdate":{"properties":{"resolution":{"description":"What was done, or why it was refused (e.g. invoices kept for 5 years by tax law).","type":["string","null"]},"status":{"description":"`done`, `rejected` or `open`.","type":"string"}},"required":["status"],"type":"object"},"Product":{"description":"A product with its merchandising and feed fields.","properties":{"additional_image_links":{"type":["string","null"]},"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"},"assembly_cost_cents":{"format":"int64","type":"integer"},"availability":{"description":"Resolved from the variants' stock: `in_stock`, `preorder` or\n`out_of_stock`.","type":["string","null"]},"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"condition":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_label_0":{"type":["string","null"]},"custom_label_1":{"type":["string","null"]},"custom_label_2":{"type":["string","null"]},"custom_label_3":{"type":["string","null"]},"custom_label_4":{"type":["string","null"]},"custom_number_0":{"format":"int32","type":["integer","null"]},"custom_number_1":{"format":"int32","type":["integer","null"]},"custom_number_2":{"format":"int32","type":["integer","null"]},"custom_number_3":{"format":"int32","type":["integer","null"]},"custom_number_4":{"format":"int32","type":["integer","null"]},"description":{"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"]},"fiscal_tax_class_id":{"description":"Tax class (NCM, CSOSN, CFOP...) the NF-e uses for this product. A\nvariant may override it; without either, the store default applies.","format":"uuid","type":["string","null"]},"google_age_group":{"type":["string","null"]},"google_availability":{"type":["string","null"]},"google_brand":{"type":["string","null"]},"google_category":{"type":["string","null"]},"google_color":{"type":["string","null"]},"google_condition":{"type":["string","null"]},"google_custom_label_0":{"type":["string","null"]},"google_custom_label_1":{"type":["string","null"]},"google_custom_label_2":{"type":["string","null"]},"google_custom_label_3":{"type":["string","null"]},"google_custom_label_4":{"type":["string","null"]},"google_gender":{"type":["string","null"]},"google_gtin":{"type":["string","null"]},"google_material":{"type":["string","null"]},"google_mpn":{"type":["string","null"]},"google_pattern":{"type":["string","null"]},"google_size":{"type":["string","null"]},"highlight_video_poster_url":{"type":["string","null"]},"highlight_video_provider":{"type":["string","null"]},"highlight_video_url":{"type":["string","null"]},"highlights":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"internal_label":{"description":"Staff-only note, never shown to shoppers.","type":["string","null"]},"is_gift_card":{"description":"The product sells gift cards (`PUT .../gift-card`): each variant is a\nface value, and selling one issues a card instead of moving stock.","type":"boolean"},"is_launch":{"type":"boolean"},"is_physical":{"type":["boolean","null"]},"isbn":{"type":["string","null"]},"item_group_id":{"type":["string","null"]},"meta_age_group":{"type":["string","null"]},"meta_availability":{"type":["string","null"]},"meta_brand":{"type":["string","null"]},"meta_category":{"type":["string","null"]},"meta_color":{"type":["string","null"]},"meta_condition":{"type":["string","null"]},"meta_description":{"type":["string","null"]},"meta_gender":{"type":["string","null"]},"meta_material":{"type":["string","null"]},"meta_pattern":{"type":["string","null"]},"meta_size":{"type":["string","null"]},"meta_title":{"type":["string","null"]},"model_placement":{"type":["string","null"]},"model_source_url":{"description":"The model the 3D studio replaced (the original export), when\n`model_url` is the studio's output.","type":["string","null"]},"model_studio":{"description":"The 3D studio's settings for this model (finish per material).","type":["object","null"]},"model_url":{"description":"3D model (glb/gltf/usdz) URL for the storefront viewer.","type":["string","null"]},"price":{"description":"Legacy free text, no longer written or read by feeds. Prices live on\nthe variants.","type":["string","null"]},"priority":{"description":"Sort weight; lower first.","format":"int32","type":"integer"},"product_type":{"$ref":"#/components/schemas/ProductType"},"quantity_to_sell_on_facebook":{"format":"int32","type":["integer","null"]},"rich_text_description":{"description":"HTML description the storefront renders.","type":["string","null"]},"sale_price":{"type":["string","null"]},"sale_price_effective_date":{"type":["string","null"]},"shipping":{"type":["string","null"]},"shipping_weight":{"type":["string","null"]},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"slug":{"description":"The storefront URL segment. Change it with `PATCH .../slug`, which\nkeeps the old URL as a redirect.","type":"string"},"status":{"$ref":"#/components/schemas/ProductStatus"},"store_id":{"format":"uuid","type":"string"},"title":{"type":"string"},"upc":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"video_urls":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]}},"required":["id","store_id","title","slug","status","product_type","highlights","priority","assembly_cost_cents","is_launch","allow_backorder","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"},"ProductBundleSettings":{"description":"A product's compre junto: the products offered with it and their discount.","properties":{"companions":{"description":"The merchant's companions, in order. Empty: the store offers `suggested`.","items":{"$ref":"#/components/schemas/UpsellProduct"},"type":"array"},"discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BundleDiscount","description":"The discount on the set; null for none. Only with companions."}]},"product_id":{"format":"uuid","type":"string"},"promotion_id":{"description":"The `bundle` automatic discount that applies it.","format":"uuid","type":["string","null"]},"suggested":{"description":"What is bought with the product most often (paid orders), shown when\nit has no companions of its own.","items":{"$ref":"#/components/schemas/UpsellProduct"},"type":"array"}},"required":["product_id","companions","suggested"],"type":"object"},"ProductBundleUpdate":{"description":"A product's compre junto, replaced.","properties":{"companion_ids":{"description":"Up to 3 other products of the store, in order. Empty: offer what is\nbought with the product.","items":{"format":"uuid","type":"string"},"type":"array"},"discount":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BundleDiscount","description":"A discount on the product with its companions; null for none."}]}},"required":["companion_ids"],"type":"object"},"ProductCategoryRequest":{"description":"A product and a category of the same store.","properties":{"category_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"}},"required":["product_id","category_id"],"type":"object"},"ProductCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ProductFields"},{"properties":{"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"]},"title":{"type":"string"}},"required":["title"],"type":"object"}],"description":"A new product."},"ProductDetail":{"allOf":[{"$ref":"#/components/schemas/Product"},{"properties":{"custom_fields":{"description":"The values of the store's product fields (`/custom-fields`), by key.","type":"object"},"images":{"description":"The active gallery (images and videos), as `GET .../images` lists it.","items":{"$ref":"#/components/schemas/ProductImageWithVariants"},"type":"array"},"option_groups":{"items":{"$ref":"#/components/schemas/OptionGroupWithValues"},"type":"array"},"variants":{"description":"Every variant, active or not, in display order.","items":{"$ref":"#/components/schemas/ProductVariantDetail"},"type":"array"}},"required":["variants","option_groups","images","custom_fields"],"type":"object"}],"description":"A product with everything a detail screen needs: its variants (with\noptions and stock per location), its option groups and its gallery."},"ProductDropshipVariant":{"properties":{"sku":{"type":["string","null"]},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":["string","null"]},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","title"],"type":"object"},"ProductFeed":{"description":"A product feed.","properties":{"channel":{"$ref":"#/components/schemas/ProductFeedChannel"},"config_json":{"type":["object","null"]},"content":{"description":"The last generated content, for `generated` feeds.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"endpoint_url":{"description":"The public URL to give the marketplace.","type":["string","null"]},"feed_type":{"description":"`generated` (serves the content stored by the last generate) or\n`realtime` (built on every fetch).","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Inactive feeds answer 404 at their public URL.","type":"boolean"},"last_generated_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","channel","name","feed_type","is_active","created_at","updated_at"],"type":"object"},"ProductFeedChannel":{"description":"Where a feed goes, which also fixes its format.","enum":["meta","google","custom","omnifeed"],"type":"string"},"ProductFeedCreateRequest":{"description":"A new feed.","properties":{"channel":{"$ref":"#/components/schemas/ProductFeedChannel"},"config_json":{"type":["object","null"]},"feed_type":{"description":"`generated` (default) or `realtime`.","type":["string","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"name":{"type":"string"}},"required":["channel","name"],"type":"object"},"ProductFeedOverride":{"description":"Per-product data a feed uses instead of the product's own fields.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"metadata_json":{"description":"Feed field names to values, e.g. `{\"title\": \"...\"}`.","type":["object","null"]},"product_feed_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"}},"required":["id","product_feed_id","product_id","created_at"],"type":"object"},"ProductFeedOverrideCreateRequest":{"description":"A new override.","properties":{"metadata_json":{"type":["object","null"]},"product_id":{"description":"A product of the same store.","format":"uuid","type":"string"}},"required":["product_id"],"type":"object"},"ProductFeedOverrideUpdateRequest":{"description":"The new override data.","properties":{"metadata_json":{"type":["object","null"]}},"type":"object"},"ProductFeedUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"config_json":{"type":["object","null"]},"endpoint_url":{"description":"Overrides the public URL; `null` resets it to the default.","type":["string","null"]},"feed_type":{"description":"`generated` or `realtime`.","type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]}},"type":"object"},"ProductFields":{"description":"Product fields shared by create and update. Omitted fields are left\nalone (on create, they take their defaults).","properties":{"additional_image_links":{"type":["string","null"]},"allow_backorder":{"type":["boolean","null"]},"assembly_cost_cents":{"description":"Negative values are stored as 0.","format":"int64","type":["integer","null"]},"availability":{"description":"Sets `google_availability` (the shopper-facing availability is\ncomputed from stock).","type":["string","null"]},"brand":{"description":"An empty string clears it.","type":["string","null"]},"category":{"description":"Sets `google_category` (unless `google_category` is also sent).","type":["string","null"]},"condition":{"description":"Sets `condition` and `google_condition`.","type":["string","null"]},"custom_label_0":{"type":["string","null"]},"custom_label_1":{"type":["string","null"]},"custom_label_2":{"type":["string","null"]},"custom_label_3":{"type":["string","null"]},"custom_label_4":{"type":["string","null"]},"custom_number_0":{"format":"int32","type":["integer","null"]},"custom_number_1":{"format":"int32","type":["integer","null"]},"custom_number_2":{"format":"int32","type":["integer","null"]},"custom_number_3":{"format":"int32","type":["integer","null"]},"custom_number_4":{"format":"int32","type":["integer","null"]},"description":{"type":["string","null"]},"ean":{"type":["string","null"]},"fiscal_tax_class_id":{"description":"NF-e tax class of the store (`GET .../fiscal/tax-classes`); `null`\nremoves it, so the store default applies.","format":"uuid","type":["string","null"]},"google_age_group":{"type":["string","null"]},"google_availability":{"type":["string","null"]},"google_brand":{"description":"An empty string clears it.","type":["string","null"]},"google_category":{"type":["string","null"]},"google_color":{"type":["string","null"]},"google_condition":{"type":["string","null"]},"google_custom_label_0":{"type":["string","null"]},"google_custom_label_1":{"type":["string","null"]},"google_custom_label_2":{"type":["string","null"]},"google_custom_label_3":{"type":["string","null"]},"google_custom_label_4":{"type":["string","null"]},"google_gender":{"type":["string","null"]},"google_gtin":{"type":["string","null"]},"google_material":{"type":["string","null"]},"google_mpn":{"type":["string","null"]},"google_pattern":{"type":["string","null"]},"google_size":{"type":["string","null"]},"highlight_video_poster_url":{"type":["string","null"]},"highlight_video_provider":{"type":["string","null"]},"highlight_video_url":{"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"]},"item_group_id":{"type":["string","null"]},"meta_age_group":{"type":["string","null"]},"meta_availability":{"type":["string","null"]},"meta_brand":{"description":"An empty string clears it.","type":["string","null"]},"meta_category":{"type":["string","null"]},"meta_color":{"type":["string","null"]},"meta_condition":{"type":["string","null"]},"meta_description":{"type":["string","null"]},"meta_gender":{"type":["string","null"]},"meta_material":{"type":["string","null"]},"meta_pattern":{"type":["string","null"]},"meta_size":{"type":["string","null"]},"meta_title":{"type":["string","null"]},"model_placement":{"type":["string","null"]},"model_url":{"type":["string","null"]},"price":{"deprecated":true,"description":"Deprecated and ignored: prices live on the variants\n(`price_cents`). Still accepted so older clients keep working; it is\nnot stored.","type":["string","null"]},"priority":{"format":"int32","type":["integer","null"]},"product_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductType"}]},"quantity_to_sell_on_facebook":{"format":"int32","type":["integer","null"]},"rich_text_description":{"description":"HTML description the storefront renders.","type":["string","null"]},"sale_price":{"type":["string","null"]},"sale_price_effective_date":{"type":["string","null"]},"shipping":{"type":["string","null"]},"shipping_weight":{"type":["string","null"]},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductStatus"}]},"upc":{"description":"Sets `upc` and `google_gtin` (unless `google_gtin` is also sent).","type":["string","null"]},"video_urls":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]}},"type":"object"},"ProductHit":{"properties":{"id":{"format":"uuid","type":"string"},"image_url":{"type":["string","null"]},"sku":{"description":"The matching variant SKU, when the match was on a SKU.","type":["string","null"]},"slug":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"required":["id","title","slug","status"],"type":"object"},"ProductImage":{"description":"A product gallery entry: an uploaded image (with resized renditions in\n`variants`) or a video (`media_type = video`, `cdn_url` is the playable\nURL and there are no renditions).","properties":{"alt_text":{"type":["string","null"]},"cdn_url":{"description":"Public URL of the original.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"extra_variant_ids":{"description":"Extra variants this image is shared with (besides\n`product_variant_id`).","items":{"format":"uuid","type":"string"},"type":"array"},"file_path":{"type":"string"},"file_size_bytes":{"format":"int32","type":"integer"},"filename":{"description":"Stored filename. `/images/{size}/{filename}` serves it, with `size`\none of `original`, `thumbnail`, `small`, `medium`, `large`.","type":"string"},"height":{"format":"int32","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"image_kind":{"description":"`gallery` (default) or `measurement` (size charts, kept out of the\nstorefront gallery).","type":"string"},"image_size":{"type":"string"},"is_active":{"type":"boolean"},"is_primary":{"type":"boolean"},"media_type":{"description":"`image` (default) or `video`.","type":"string"},"mime_type":{"type":"string"},"original_filename":{"type":["string","null"]},"position":{"format":"int32","type":"integer"},"poster_url":{"description":"Poster image URL for video rows.","type":["string","null"]},"product_id":{"format":"uuid","type":"string"},"product_variant_id":{"description":"The variant this image belongs to; null for product-wide images.","format":"uuid","type":["string","null"]},"provider":{"description":"For videos: `upload`, `youtube`, `vimeo` or `external`. Null for\nimages.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"video_error":{"description":"Why the conversion failed, when `video_status` is `failed`.","type":["string","null"]},"video_status":{"description":"For a video from the file library: its web rendition's state\n(`pending`, `processing`, `ready` or `failed`, as the library file's\n`video_status`). Null for images and other videos.","type":["string","null"]},"width":{"format":"int32","type":["integer","null"]}},"required":["id","product_id","filename","file_path","image_size","mime_type","file_size_bytes","image_kind","position","is_primary","is_active","media_type","created_at","updated_at"],"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"},"ProductImageWithVariants":{"allOf":[{"$ref":"#/components/schemas/ProductImage"},{"properties":{"variants":{"items":{"$ref":"#/components/schemas/ImageVariant"},"type":"array"}},"required":["variants"],"type":"object"}],"description":"A gallery entry with its resized renditions."},"ProductImport":{"properties":{"created_at":{"format":"date-time","type":"string"},"error":{"type":["string","null"]},"filename":{"type":"string"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"progress_done":{"format":"int32","type":"integer"},"progress_total":{"format":"int32","type":"integer"},"result":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductImportResult"}]},"status":{"description":"`uploaded`, `applying`, `done` or `failed`.","type":"string"}},"required":["id","filename","status","progress_done","progress_total","created_at"],"type":"object"},"ProductImportAiFix":{"properties":{"after":{"type":"string"},"before":{"type":"string"},"column":{"type":"string"},"column_index":{"minimum":0,"type":"integer"},"reason":{"type":["string","null"]},"rows":{"description":"Every row (spreadsheet numbering) with this value in this column.","items":{"minimum":0,"type":"integer"},"type":"array"}},"required":["column_index","column","before","after","rows"],"type":"object"},"ProductImportAiFixRequest":{"properties":{"mapping":{"$ref":"#/components/schemas/ProductImportMapping"},"skip":{"description":"Values the model already left as they are (`unfixed` of earlier\nrounds): not sent again, so a round moves on to the next values.","items":{"$ref":"#/components/schemas/ProductImportAiUnfixed"},"type":"array"}},"required":["mapping"],"type":"object"},"ProductImportAiFixes":{"properties":{"considered":{"description":"Distinct values the model looked at.","minimum":0,"type":"integer"},"declined":{"description":"Distinct values it left as they are (no usable value in the cell, or\nan answer the import still could not read).","minimum":0,"type":"integer"},"fixes":{"items":{"$ref":"#/components/schemas/ProductImportAiFix"},"type":"array"},"remaining":{"description":"Distinct unreadable values beyond this round, for another one.","minimum":0,"type":"integer"},"unfixed":{"description":"Those values, so asking again can skip them.","items":{"$ref":"#/components/schemas/ProductImportAiUnfixed"},"type":"array"}},"required":["fixes","considered","declined","unfixed","remaining"],"type":"object"},"ProductImportAiMapping":{"properties":{"suggestions":{"description":"A target for every column, in order, with why for the columns the\nmodel answered.","items":{"$ref":"#/components/schemas/ProductImportAiSuggestion"},"type":"array"}},"required":["suggestions"],"type":"object"},"ProductImportAiSuggestion":{"properties":{"column":{"minimum":0,"type":"integer"},"confidence":{"$ref":"#/components/schemas/ProductImportConfidence"},"reason":{"description":"Why, in a short sentence.","type":["string","null"]},"target":{"$ref":"#/components/schemas/ProductImportTarget"}},"required":["column","target","confidence"],"type":"object"},"ProductImportAiUnfixed":{"description":"A value the model looked at and left as it is.","properties":{"column_index":{"minimum":0,"type":"integer"},"value":{"type":"string"}},"required":["column_index","value"],"type":"object"},"ProductImportCellEdit":{"properties":{"column":{"description":"The column's position (0-based).","minimum":0,"type":"integer"},"row":{"description":"The spreadsheet row (the header is row 1).","minimum":0,"type":"integer"},"value":{"type":"string"}},"required":["row","column","value"],"type":"object"},"ProductImportCellEdits":{"properties":{"edits":{"items":{"$ref":"#/components/schemas/ProductImportCellEdit"},"type":"array"}},"required":["edits"],"type":"object"},"ProductImportColumn":{"properties":{"header":{"type":"string"},"index":{"minimum":0,"type":"integer"},"samples":{"description":"Up to three non-empty values from the column.","items":{"type":"string"},"type":"array"}},"required":["index","header","samples"],"type":"object"},"ProductImportConfidence":{"enum":["high","medium","low"],"type":"string"},"ProductImportFailure":{"properties":{"message":{"type":"string"},"row":{"minimum":0,"type":"integer"},"title":{"type":["string","null"]}},"required":["row","message"],"type":"object"},"ProductImportField":{"enum":["ignore","group","product_name","description","status","brand","category","ncm","images","variant_image","sku","barcode","price","promo_price","compare_at_price","cost","stock","weight","length","width","height","fulfillment","lead_time","option","option_name","option_value","variations"],"type":"string"},"ProductImportIssue":{"properties":{"column":{"description":"The column's header, when the issue is about one cell.","type":["string","null"]},"column_index":{"description":"That column's position (0-based), to edit the cell.","minimum":0,"type":["integer","null"]},"fixable":{"description":"The value is written in a way the import cannot read (a price with\nwords, a weight with its unit): rewriting it may fix the issue.","type":"boolean"},"message":{"type":"string"},"row":{"description":"The spreadsheet row (the header is row 1).","minimum":0,"type":"integer"},"severity":{"$ref":"#/components/schemas/ProductImportSeverity"},"value":{"description":"The cell's value as the sheet has it.","type":["string","null"]}},"required":["row","severity","message","fixable"],"type":"object"},"ProductImportMapping":{"description":"The mapping a preview or a run uses: one target per column, in order.","properties":{"columns":{"items":{"$ref":"#/components/schemas/ProductImportTarget"},"type":"array"},"publish_new":{"description":"New products go live (`true`) or start as drafts.","type":"boolean"}},"required":["columns"],"type":"object"},"ProductImportPreview":{"properties":{"issues":{"description":"The first issues, by row.","items":{"$ref":"#/components/schemas/ProductImportIssue"},"type":"array"},"issues_total":{"minimum":0,"type":"integer"},"products":{"description":"The first products, in sheet order.","items":{"$ref":"#/components/schemas/ProductImportPreviewProduct"},"type":"array"},"summary":{"$ref":"#/components/schemas/ProductImportSummary"}},"required":["summary","products","issues","issues_total"],"type":"object"},"ProductImportPreviewProduct":{"properties":{"action":{"description":"`create`, `update` or `skip` (a row has an error).","type":"string"},"images":{"minimum":0,"type":"integer"},"row":{"description":"The product's first row.","minimum":0,"type":"integer"},"title":{"type":["string","null"]},"variants":{"minimum":0,"type":"integer"}},"required":["row","action","variants","images"],"type":"object"},"ProductImportResult":{"properties":{"failures":{"description":"Products that could not be written, with why.","items":{"$ref":"#/components/schemas/ProductImportFailure"},"type":"array"},"image_failures":{"description":"Images that could not be fetched, with why (`row` is the product's).","items":{"$ref":"#/components/schemas/ProductImportFailure"},"type":"array"},"images_added":{"minimum":0,"type":"integer"},"products_created":{"minimum":0,"type":"integer"},"products_skipped":{"minimum":0,"type":"integer"},"products_updated":{"minimum":0,"type":"integer"},"variants_created":{"minimum":0,"type":"integer"},"variants_updated":{"minimum":0,"type":"integer"}},"required":["products_created","products_updated","products_skipped","variants_created","variants_updated","images_added","failures","image_failures"],"type":"object"},"ProductImportSeverity":{"enum":["error","warning"],"type":"string"},"ProductImportSuggestion":{"properties":{"column":{"minimum":0,"type":"integer"},"confidence":{"$ref":"#/components/schemas/ProductImportConfidence"},"target":{"$ref":"#/components/schemas/ProductImportTarget"}},"required":["column","target","confidence"],"type":"object"},"ProductImportSummary":{"properties":{"errors":{"minimum":0,"type":"integer"},"images":{"minimum":0,"type":"integer"},"products_new":{"minimum":0,"type":"integer"},"products_skipped":{"description":"Products left out because a row has an error.","minimum":0,"type":"integer"},"products_updated":{"minimum":0,"type":"integer"},"variants_new":{"minimum":0,"type":"integer"},"variants_updated":{"minimum":0,"type":"integer"},"warnings":{"minimum":0,"type":"integer"}},"required":["products_new","products_updated","products_skipped","variants_new","variants_updated","images","errors","warnings"],"type":"object"},"ProductImportTarget":{"description":"The product field a column fills: `field`, plus `unit` for weight and\nsizes, `name` for an option column, `n` for numbered option columns.","properties":{"field":{"$ref":"#/components/schemas/ProductImportField"},"n":{"description":"For `option_name`/`option_value`: 1 to 3.","format":"int32","minimum":0,"type":["integer","null"]},"name":{"description":"For `option`: the option's name (Cor, Tamanho).","type":["string","null"]},"unit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductImportUnit","description":"For `weight` (`g`, `kg`) and `length`/`width`/`height` (`mm`, `cm`, `m`)."}]}},"required":["field"],"type":"object"},"ProductImportUnit":{"enum":["g","kg","lb","oz","mm","cm","m","in"],"type":"string"},"ProductImportUpload":{"properties":{"ai_available":{"description":"The model can map columns and fix values on this server.","type":"boolean"},"columns":{"items":{"$ref":"#/components/schemas/ProductImportColumn"},"type":"array"},"filename":{"type":"string"},"id":{"format":"uuid","type":"string"},"layout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExportPlatform","description":"The platform whose export the sheet is, when its columns say so."}]},"row_count":{"minimum":0,"type":"integer"},"saved_mapping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductImportMapping","description":"The mapping this store used the last time it imported a sheet with\nthese columns, to start from instead of the suggestion."}]},"suggestions":{"description":"A target for every column, with how sure the guess is.","items":{"$ref":"#/components/schemas/ProductImportSuggestion"},"type":"array"}},"required":["id","filename","row_count","columns","suggestions","ai_available"],"type":"object"},"ProductImportUploadForm":{"description":"The multipart form of a spreadsheet upload.","properties":{"file":{"description":"CSV (`;` or `,`), XLSX, XLS or ODS; up to 10 MB and 10,000 rows. The\nfirst row is the header.","format":"binary","type":"string"},"tab":{"description":"The workbook tab to import, by name (as the tab listing gives it);\nthe first tab without it. Several `file`s, each followed by its\n`tab`, with the same columns, are imported as one sheet.","type":["string","null"]}},"required":["file"],"type":"object"},"ProductListItem":{"description":"One row of the product list.","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"]},"fiscal_tax_class_id":{"description":"The product's own tax class for the NF-e (variants may override it).","format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_gift_card":{"description":"The product sells gift cards: each variant is a face value, and a\nsale issues a card instead of taking stock.","type":"boolean"},"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"]},"primary_image_filename":{"description":"Stored filename of the primary image (`/images/{size}/{filename}`).","type":["string","null"]},"primary_image_thumbnail_url":{"description":"URL of the primary image resized for lists (medium, about 600px).","type":["string","null"]},"primary_image_url":{"description":"URL of the primary image's original; null when the product has no\nimage.","type":["string","null"]},"priority":{"format":"int32","type":"integer"},"product_type":{"$ref":"#/components/schemas/ProductType"},"short_description":{"type":["string","null"]},"sku_prefix":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/ProductStatus"},"store_id":{"format":"uuid","type":"string"},"title":{"type":"string"},"total_stock":{"description":"Units on hand over the active variants and every location.","format":"int32","type":"integer"},"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/ProductVariant"},"type":"array"}},"required":["id","store_id","title","slug","status","product_type","priority","is_launch","availability","variant_count","total_stock","available_stock","variants","created_at","updated_at"],"type":"object"},"ProductMarketplacePublications":{"properties":{"publications":{"items":{"$ref":"#/components/schemas/MarketplacePublication"},"type":"array"}},"required":["publications"],"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"},"ProductRow":{"properties":{"available":{"description":"Available stock across all variants and locations.","format":"int64","type":"integer"},"cogs_cents":{"description":"Cost of the goods sold, at each variant's current cost.","format":"int64","type":"integer"},"lines_without_cost":{"description":"Lines whose variant has no cost: the cost is understated.","format":"int64","type":"integer"},"margin_bps":{"format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"profit_cents":{"format":"int64","type":"integer"},"return_rate_bps":{"description":"Returned units as basis points of the units sold.","format":"int64","type":["integer","null"]},"returned_units":{"description":"Units sent back in a return that was not rejected or cancelled.","format":"int64","type":"integer"},"revenue_cents":{"description":"What the lines sold for, before discounts on the whole order.","format":"int64","type":"integer"},"title":{"type":"string"},"units":{"format":"int64","type":"integer"}},"required":["product_id","title","units","revenue_cents","cogs_cents","lines_without_cost","returned_units","available","profit_cents"],"type":"object"},"ProductSet":{"description":"A group of the catalog's products.","properties":{"id":{"type":"string"},"name":{"type":"string"},"product_count":{"format":"int64","type":["integer","null"]}},"required":["id","name"],"type":"object"},"ProductSets":{"description":"The selected catalog's product sets.","properties":{"product_sets":{"items":{"$ref":"#/components/schemas/ProductSet"},"type":"array"}},"required":["product_sets"],"type":"object"},"ProductSheet":{"properties":{"import_id":{"description":"From `POST /stores/{store_id}/product-imports` (or `/from-url`).","format":"uuid","type":"string"},"mapping":{"$ref":"#/components/schemas/ProductImportMapping"}},"required":["import_id","mapping"],"type":"object"},"ProductSlugRedirect":{"description":"An old slug that redirects to the product.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"old_slug":{"type":"string"}},"required":["id","old_slug","created_at"],"type":"object"},"ProductSlugUpdate":{"description":"The slug after the change.","properties":{"redirect_created":{"description":"Whether the previous slug now redirects here.","type":"boolean"},"slug":{"type":"string"}},"required":["slug","redirect_created"],"type":"object"},"ProductSlugUpdateRequest":{"description":"The new slug.","properties":{"slug":{"description":"Normalized to lowercase letters, digits and single dashes.","type":"string"}},"required":["slug"],"type":"object"},"ProductSort":{"enum":["revenue","units","profit","return_rate"],"type":"string"},"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"},"ProductSpecsResponse":{"description":"A product's spec sheet: the global schema, the values set and the\nstore's collections for `collection_ref` fields.","properties":{"collections":{"items":{"$ref":"#/components/schemas/CollectionRef"},"type":"array"},"groups":{"items":{"$ref":"#/components/schemas/GroupWithFields"},"type":"array"},"taxonomies":{"items":{"$ref":"#/components/schemas/TaxonomyWithTerms"},"type":"array"},"values":{"items":{"$ref":"#/components/schemas/ProductSpecValue"},"type":"array"}},"required":["groups","taxonomies","values","collections"],"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"},"ProductStockComponentLine":{"description":"Component stock behind one kit component line.","properties":{"component":{"type":"string"},"component_id":{"description":"The component variant.","format":"uuid","type":"string"},"on_hand":{"format":"int32","type":"integer"},"required":{"description":"Units needed per kit.","format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"},"stock":{"description":"Units available (on hand minus reserved).","format":"int32","type":"integer"}},"required":["component_id","component","sku","stock","on_hand","reserved","required"],"type":"object"},"ProductStockResponse":{"description":"How many kits the components allow.","properties":{"available":{"description":"Kits that can be built from the components available now, summed\nover the product's active kit variants.","format":"int32","type":"integer"},"components":{"items":{"$ref":"#/components/schemas/ProductStockComponentLine"},"type":"array"},"product_id":{"format":"uuid","type":"string"}},"required":["product_id","available","components"],"type":"object"},"ProductSubscription":{"description":"A shopper's \"let me know\" on a product.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/ProductSubscriptionKind"},"notified_at":{"format":"date-time","type":["string","null"]},"price_at_subscription":{"description":"Lowest active price when they signed up.","format":"int32","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"status":{"description":"`active` (waiting) or `notified`.","type":"string"}},"required":["id","email","kind","status","product_id","product_title","created_at"],"type":"object"},"ProductSubscriptionKind":{"description":"What a shopper wants to hear about.","enum":["back_in_stock","price_drop"],"type":"string"},"ProductSubscriptionOptions":{"description":"The intervals a product is sold by subscription at.","properties":{"options":{"description":"Up to 6; empty means the product is not sold by subscription.","items":{"$ref":"#/components/schemas/SubscriptionOption"},"type":"array"}},"required":["options"],"type":"object"},"ProductSubscriptionSummary":{"description":"Counts of product subscriptions.","properties":{"back_in_stock":{"description":"Active back-in-stock sign-ups.","format":"int64","type":"integer"},"notified":{"description":"Sign-ups already notified.","format":"int64","type":"integer"},"price_drop":{"description":"Active price-drop sign-ups.","format":"int64","type":"integer"}},"required":["back_in_stock","price_drop","notified"],"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"},"ProductUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ProductFields"},{"properties":{"title":{"type":["string","null"]}},"type":"object"}],"description":"Fields to change; omitted fields keep their value."},"ProductVariant":{"description":"A sellable variant of a product, with its stock summed over every\nlocation. For a kit (a variant built from components) the stock figures\nare derived from its parts.","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"},"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"]},"fiscal_tax_class_id":{"description":"NF-e tax class overriding the product's, when this variant differs\n(e.g. another material, another NCM).","format":"uuid","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"]},"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"},"sku":{"description":"Unique within the store, ignoring case.","type":"string"},"stock_quantity":{"description":"Units on hand over every location.","format":"int32","type":"integer"},"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","fulfillment_mode","is_active","position","stock_quantity","available_quantity","reserved_quantity","backorderable","uses_components","created_at","updated_at"],"type":"object"},"ProductVariantDetail":{"allOf":[{"$ref":"#/components/schemas/ProductVariant"},{"properties":{"custom_fields":{"description":"The values of the store's variant fields (`/custom-fields`), by key.","type":"object"},"options":{"items":{"$ref":"#/components/schemas/VariantOptionValue"},"type":"array"},"stock_by_location":{"items":{"$ref":"#/components/schemas/VariantLocationStock"},"type":"array"}},"required":["options","stock_by_location","custom_fields"],"type":"object"}],"description":"A variant with its options and its stock per location. Kits hold no\nstock of their own, so their `stock_by_location` is empty and the totals\ncome from their components."},"ProductionMaterial":{"description":"One part across the OP's queued jobs.","properties":{"available":{"description":"Free on the shelf (every reservation excluded).","format":"int32","type":"integer"},"component_variant_id":{"format":"uuid","type":"string"},"incoming":{"description":"Ordered from suppliers and not yet received, store-wide.","format":"int32","type":"integer"},"incoming_expected_at":{"description":"Earliest expected date among those purchase orders.","format":"date","type":["string","null"]},"missing":{"description":"`required - reserved - available`, floored at zero.","format":"int32","type":"integer"},"name":{"type":["string","null"]},"required":{"format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"sku":{"type":["string","null"]}},"required":["component_variant_id","required","reserved","available","missing","incoming"],"type":"object"},"ProductionOrderCommentRequest":{"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"},"ProductionOrderDetail":{"allOf":[{"$ref":"#/components/schemas/ProductionOrderSummary"},{"properties":{"events":{"description":"Oldest first.","items":{"$ref":"#/components/schemas/ProductionOrderEvent"},"type":"array"},"jobs":{"items":{"$ref":"#/components/schemas/BuildJob"},"type":"array"},"materials":{"items":{"$ref":"#/components/schemas/ProductionMaterial"},"type":"array"}},"required":["jobs","materials","events"],"type":"object"}],"description":"An OP with its jobs, parts and feed."},"ProductionOrderEvent":{"description":"An entry of the OP's feed.","properties":{"actor_name":{"type":["string","null"]},"actor_user_id":{"format":"uuid","type":["string","null"]},"body":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"event_type":{"description":"For events: `job_queued`, `job_started`, `job_built`, `job_shipped`,\n`job_cancelled`, `job_requeued`, `target_changed`, `promise_changed`,\n`filled_from_stock`.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"kind":{"description":"`event` (a job change) or `comment`.","type":"string"},"meta":{"description":"Event details: `title`, `quantity`, `target_ready_at`,\n`previous_target_ready_at`, `promised_at`.","type":"object"}},"required":["id","kind","meta","created_at"],"type":"object"},"ProductionOrderItem":{"description":"One order line of an OP.","properties":{"order_item_id":{"format":"uuid","type":"string"},"quantity":{"description":"Units being built for the line (cancelled jobs excluded).","format":"int32","type":"integer"},"ready_quantity":{"description":"Units built or shipped.","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"stage":{"$ref":"#/components/schemas/ProductionStage"},"title":{"type":"string"},"variant_id":{"format":"uuid","type":"string"}},"required":["order_item_id","variant_id","title","quantity","ready_quantity","stage"],"type":"object"},"ProductionOrderSummary":{"description":"An OP as the board shows it.","properties":{"created_at":{"format":"date-time","type":"string"},"customer_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/ProductionOrderItem"},"type":"array"},"last_activity_at":{"format":"date-time","type":"string"},"late":{"description":"Past its promise and not yet built.","type":"boolean"},"missing_parts":{"description":"Parts short across its queued jobs.","format":"int32","type":"integer"},"number":{"description":"The order's number; the OP carries the same.","type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_status":{"type":"string"},"promise_set":{"description":"`promised_at` was set by hand rather than taken from the jobs.","type":"boolean"},"promised_at":{"description":"The promise: set by hand, or else the latest target of its open jobs.","format":"date-time","type":["string","null"]},"stage":{"$ref":"#/components/schemas/ProductionStage"},"units_ready":{"format":"int32","type":"integer"},"units_total":{"format":"int32","type":"integer"}},"required":["id","order_id","order_status","stage","promise_set","late","units_total","units_ready","missing_parts","items","created_at","last_activity_at"],"type":"object"},"ProductionOrderUpdateRequest":{"properties":{"promised_at":{"description":"The date promised for the whole OP. Null goes back to the latest job\ntarget.","format":"date-time","type":["string","null"]}},"type":"object"},"ProductionRun":{"description":"A production run: a quantity of a made item being made.","properties":{"base_unit":{"type":"string"},"cancelled_at":{"format":"date-time","type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"item_id":{"format":"uuid","type":"string"},"item_name":{"type":"string"},"item_sku":{"type":"string"},"location_id":{"format":"uuid","type":["string","null"]},"location_name":{"type":["string","null"]},"metadata_json":{"description":"What the run took from stock (`consumed`), what it made (`produced`)\nand what the shelf did not have (`shortfall`).","type":"object"},"notes":{"type":["string","null"]},"quantity":{"format":"double","type":"number"},"requested_at":{"format":"date-time","type":"string"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/RunStatus"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","item_id","item_sku","item_name","base_unit","quantity","status","metadata_json","requested_at","created_at","updated_at"],"type":"object"},"ProductionStage":{"description":"Where an OP, or one of its lines, stands. Ordered from least to most\nadvanced; `cancelled` sits outside that order.","enum":["waiting_parts","queued","in_progress","ready","shipped","cancelled"],"type":"string"},"ProductsReport":{"properties":{"channel_id":{"format":"uuid","type":["string","null"]},"collection_id":{"format":"uuid","type":["string","null"]},"range":{"$ref":"#/components/schemas/ReportRange"},"rows":{"items":{"$ref":"#/components/schemas/ProductRow"},"type":"array"},"sort":{"$ref":"#/components/schemas/ProductSort"},"total_products":{"description":"Products that sold in the range, before the limit.","format":"int64","type":"integer"}},"required":["range","sort","total_products","rows"],"type":"object"},"ProfileLevel":{"description":"Where a variant's shipping profile is set.","enum":["variant","product","automatic"],"type":"string"},"PromotionConfig":{"description":"What a promotion does (`automatic_discounts.config`): `buy_x_get_y`,\n`tiered` or `bundle` for that kind, all null for payment-method rules.","properties":{"bundle":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Bundle"}]},"buy_x_get_y":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuyXGetY"}]},"tiered":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Tiered"}]}},"type":"object"},"Provider":{"description":"A marketplace Mobiari can sell on.","type":"string","x-extensible-enum":["mercado_livre","shopee","tiktok_shop","amazon","magalu","shein","carrefour","leroy_merlin"]},"ProviderAvailability":{"properties":{"accounts":{"description":"Count of connected accounts of this provider.","format":"int64","type":"integer"},"available":{"description":"The server has the app credentials to connect this provider.","type":"boolean"},"capabilities":{"$ref":"#/components/schemas/Capabilities"},"configured":{"description":"The store already has credentials the adapter can read.","type":"boolean"},"provider":{"type":"string"},"reason":{"description":"Why it cannot be used, in words the screen can show.","type":["string","null"]}},"required":["provider","available","configured","capabilities","accounts"],"type":"object"},"ProviderTotals":{"properties":{"accounts":{"format":"int64","type":"integer"},"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"campaigns":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"currency":{"type":["string","null"]},"impressions":{"format":"int64","type":"integer"},"provider":{"type":"string"},"roas":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["provider","accounts","campaigns","spend_cents","impressions","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"PublishEditorRequest":{"description":"Optional details of a publish.","properties":{"label":{"description":"A name for this version in the history (\"Coleção de inverno\").","type":["string","null"]},"paths":{"description":"Publish only these documents' drafts; the others stay drafts.\nOmit to publish everything.","items":{"type":"string"},"type":["array","null"]}},"type":"object"},"PublishEditorResult":{"description":"The outcome of a publish.","properties":{"published":{"description":"Documents that went live.","items":{"type":"string"},"type":"array"}},"required":["published"],"type":"object"},"PublishWorkflowRequest":{"properties":{"confirm_operations":{"description":"Confirms the risky operations (destructive, money, external) the\ngraph runs; without it a graph that has any is refused with\n`risky_operations_unconfirmed` listing them.","type":"boolean"},"note":{"description":"What changed, kept with the version.","type":["string","null"]}},"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":"A purchase order with its totals.","properties":{"closed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"expected_at":{"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"},"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."}]},"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","shipping_cents","other_cents","created_at","line_count","total_ordered","total_received","goods_cents","units_ordered","units_received"],"type":"object"},"PurchaseOrderCreateRequest":{"properties":{"currency":{"description":"Defaults to `BRL`.","type":["string","null"]},"expected_at":{"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"},"PurchaseOrderDetail":{"allOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"properties":{"boxes":{"$ref":"#/components/schemas/PurchaseBoxes","description":"The supplier's boxes still to come."},"lines":{"items":{"$ref":"#/components/schemas/PurchaseOrderLine"},"type":"array"},"receipts":{"description":"Newest first.","items":{"$ref":"#/components/schemas/PurchaseReceipt"},"type":"array"}},"required":["lines","receipts","boxes"],"type":"object"}],"description":"A purchase order with its lines and receipts."},"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"},"PurchaseOrderUpdateRequest":{"properties":{"expected_at":{"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"},"PurchaseOutcome":{"description":"Where an order's purchase stands with one platform.","properties":{"answer":{"description":"The platform's last answer, trimmed, without tokens or URLs.","type":["string","null"]},"destination":{"description":"`pixel` or `messaging` for Meta; the platform otherwise.","type":"string"},"max_attempts":{"format":"int32","type":"integer"},"next_attempt_at":{"description":"When the next attempt runs, while retrying.","format":"date-time","type":["string","null"]},"platform":{"description":"`meta`, `google`, `tiktok` or `ga4`.","type":"string"},"reason":{"description":"Why: a rule (`no ads consent`, `no_gclid`, `config_incomplete`...),\na rejection (`token_expired`, `permission_missing`,\n`dataset_not_found`, `rejected`), or what left it unreported\n(`too_old`, `retries_exhausted`, `messaging_unavailable`).","type":["string","null"]},"rejections":{"description":"Rejections so far: attempt `rejections + 1` of `max_attempts` is next.","format":"int32","type":"integer"},"state":{"description":"`pending`, `retrying`, `delivered`, `skipped` or `unreported`.","type":"string"}},"required":["platform","destination","state","rejections","max_attempts"],"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"},"PurgeResult":{"description":"What a purge did (or would do, for a dry run).","properties":{"deleted":{"description":"Products deleted (or that would be).","format":"int64","type":"integer"},"dry_run":{"type":"boolean"},"examined":{"description":"Products considered.","format":"int64","type":"integer"},"skipped_due_to_orders":{"description":"Products kept because orders reference them, a variant is a part of\nanother kit, or units of it are held or in stock.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["dry_run","examined","deleted","skipped_due_to_orders"],"type":"object"},"PushDevice":{"description":"A phone or tablet registered for push.","properties":{"active":{"description":"Its session is still signed in. Devices of ended sessions get no\npushes (sign-out and revoking a session delete them outright).","type":"boolean"},"app_version":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"current":{"description":"Registered by the session making this request.","type":"boolean"},"device_name":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/PushEnvironment"},"id":{"format":"uuid","type":"string"},"last_push_at":{"description":"Last push the provider accepted for it.","format":"date-time","type":["string","null"]},"locale":{"description":"The device's language (BCP 47), which pushes are written in.","type":["string","null"]},"platform":{"$ref":"#/components/schemas/PushPlatform"},"token":{"description":"The APNs device token (hex), the FCM registration token, or a\nbrowser's `PushSubscription` (JSON).","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","platform","token","environment","current","active","created_at","updated_at"],"type":"object"},"PushEnvironment":{"description":"Which APNs gateway an iOS token belongs to. Debug builds from Xcode get\nsandbox tokens; TestFlight and App Store builds get production ones.\nIgnored for Android.","enum":["production","sandbox"],"type":"string"},"PushEvent":{"description":"The alerts the mobile apps' push settings screen knows, served by\n`/me/push-preferences`; the notification center's catalog\n([`NotificationKind`]) is the full set.","enum":["orders.created","orders.paid","orders.cancelled","inventory.low_stock","conversations.started","conversations.message_received","conversations.handed_over","conversations.assigned","conversations.sla_breached","conversations.ai_declined_return","conversations.discount_approval_requested","conversations.discount_decided","conversations.followup_due"],"type":"string"},"PushPlatform":{"description":"A registered device's OS.","enum":["ios","android","web"],"type":"string"},"PushPreferences":{"description":"Which alerts of one store push to my devices: the push column of my\nnotification grid (`/stores/{store_id}/me/notification-preferences`),\nlimited to the alerts the apps' settings screen knows.","properties":{"available_events":{"description":"Every alert I can receive in this store (my permissions decide), in\ndisplay order.","items":{"$ref":"#/components/schemas/PushEvent"},"type":"array"},"enabled_events":{"description":"Alerts that push. Conversation alerts only cover conversations\nassigned to me or to nobody.","items":{"$ref":"#/components/schemas/PushEvent"},"type":"array"},"is_default":{"description":"Nothing saved yet: the defaults (orders and conversations on, low\nstock off) apply.","type":"boolean"},"is_enabled":{"description":"Off: no pushes from this store at all (the chosen alerts are kept).","type":"boolean"},"store_id":{"format":"uuid","type":"string"}},"required":["store_id","is_enabled","enabled_events","available_events","is_default"],"type":"object"},"PushProvider":{"description":"Which provider took a push.","enum":["apns","fcm","web_push"],"type":"string"},"PushTestResult":{"description":"A test push the provider accepted.","properties":{"device_id":{"format":"uuid","type":"string"},"provider":{"$ref":"#/components/schemas/PushProvider"},"provider_message_id":{"description":"`apns-id` (APNs) or the message name (FCM).","type":["string","null"]}},"required":["device_id","provider"],"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"},"ReceivableCandidate":{"description":"A receivable (an approved payment) a credit could be.","properties":{"expected_on":{"format":"date","type":"string"},"method":{"type":"string"},"net_cents":{"description":"Paid less the estimated fee.","format":"int64","type":"integer"},"order_number":{"type":["string","null"]},"payment_id":{"format":"uuid","type":"string"}},"required":["payment_id","method","net_cents","expected_on"],"type":"object"},"ReceivablesSummary":{"description":"Totals for the receivables screen. Amounts are net of the estimated fee.","properties":{"fees_month_cents":{"description":"Estimated fees on payments made this month.","format":"int64","type":"integer"},"next_month_cents":{"description":"Expected in the next 30 days.","format":"int64","type":"integer"},"next_week_cents":{"description":"Expected in the next 7 days (tomorrow through day 7).","format":"int64","type":"integer"},"open_cents":{"description":"Expected after today.","format":"int64","type":"integer"},"open_count":{"format":"int64","type":"integer"},"received_month_cents":{"description":"Expected from the first of this month through today.","format":"int64","type":"integer"}},"required":["open_cents","open_count","next_week_cents","next_month_cents","received_month_cents","fees_month_cents"],"type":"object"},"ReceiveInput":{"properties":{"method":{"description":"Defaults to `pix`.","type":["string","null"]},"received_on":{"description":"The day the money arrived; today when omitted.","format":"date","type":["string","null"]}},"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"},"RecipeLine":{"description":"One line of a variant's recipe: an item and how much of it one unit needs.","properties":{"available":{"description":"Finished units of the item plus what its own recipe could make.","format":"double","type":"number"},"base_unit":{"type":"string"},"item_id":{"format":"uuid","type":"string"},"kind":{"description":"`purchased` or `made`.","type":"string"},"name":{"type":"string"},"on_hand":{"format":"double","type":"number"},"pack":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecipePackRef","description":"The pack the line was written in, when it still divides the quantity."}]},"packs":{"description":"`quantity` in that pack's units (2 boxes of 4 is quantity 8, packs 2).","format":"double","type":["number","null"]},"quantity":{"description":"Base units of the item in one unit of the variant.","format":"double","type":"number"},"reserved":{"format":"double","type":"number"},"sku":{"type":"string"},"source":{"description":"`variant` (the variant's own line) or `base` (shared by the product).","type":"string"},"supports_units":{"description":"Whole units of the variant this item alone could supply.","format":"int64","type":"integer"}},"required":["item_id","sku","name","base_unit","kind","source","quantity","on_hand","reserved","available","supports_units"],"type":"object"},"RecipeLineRequest":{"description":"How much of an item one unit of the variant needs: exactly one of\n`quantity` (base units) and `packs` (whole packs of `pack_id`).","properties":{"pack_id":{"format":"uuid","type":["string","null"]},"packs":{"format":"double","type":["number","null"]},"quantity":{"description":"Base units of the item per unit of the variant. Decimals are allowed\nfor a native item (fabric in metres); an item that mirrors a variant\ncounts whole units.","format":"double","type":["number","null"]}},"type":"object"},"RecipePackRef":{"description":"The pack a recipe line was written in.","properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"units_per_pack":{"format":"double","type":"number"}},"required":["id","name","units_per_pack"],"type":"object"},"RecipeVariant":{"description":"A product variant whose recipe can be bought as parts.","properties":{"product_id":{"format":"uuid","type":"string"},"product_status":{"description":"`active` or `draft`: a box of parts kept off the store is a draft.","type":"string"},"product_title":{"type":"string"},"recipe_lines":{"description":"Lines of its own recipe (nested recipes expand when bought).","format":"int64","type":"integer"},"sku":{"type":"string"},"variant_active":{"type":"boolean"},"variant_id":{"format":"uuid","type":"string"},"variant_title":{"description":"Empty for a product's only variant.","type":["string","null"]}},"required":["variant_id","product_id","product_title","sku","product_status","variant_active","recipe_lines"],"type":"object"},"RecomputeBoxesRequest":{"properties":{"apply":{"description":"Replace the boxes with the proposal (`boxes_state` back to `computed`).","type":"boolean"}},"type":"object"},"ReconciliationRunOrigin":{"description":"What started a run.","enum":["scheduled","manual"],"type":"string"},"ReconciliationRunStatus":{"description":"Where a run stands. `failed` means the checks could not be read or the\nrun was interrupted (`error` says which); the findings of the run before\nit stand.","enum":["running","completed","failed"],"type":"string"},"ReconciliationSettings":{"allOf":[{"$ref":"#/components/schemas/Thresholds"},{"properties":{"checks_start_on":{"description":"The day (São Paulo) the fiscal checks start: a shipment that left, a\nnote the store issued or a supplier's note issued before it is not\ncompared with the stock, because its goods moved (or were counted)\nwhile the stock was kept elsewhere. Set it to the day the stock\nstarted being counted here. `null`: no limit.","format":"date","type":["string","null"]}},"type":"object"}],"description":"The store's reconciliation settings: the thresholds and the day the\nfiscal checks start."},"ReconciliationSettingsUpdate":{"allOf":[{"$ref":"#/components/schemas/Thresholds"},{"properties":{"checks_start_on":{"description":"The day (São Paulo) the fiscal checks start, not after today. `null`\nremoves the limit; left out, it stays as it is.","format":"date","type":["string","null"]}},"type":"object"}],"description":"The settings as they are written: the six values, and the day the checks\nstart when it is sent."},"RecordField":{"description":"One field of a record type.","properties":{"kind":{"$ref":"#/components/schemas/RecordFieldKind"},"label":{"type":"string"},"label_en":{"type":"string"},"name":{"description":"Column name; also the key in `record.<name>` / `previous.<name>`.","type":"string"},"options":{"description":"Allowed values for `enum` fields.","items":{"type":"string"},"type":"array"}},"required":["name","label","label_en","kind","options"],"type":"object"},"RecordFieldKind":{"description":"What kind of value a field holds; pickers choose operators and inputs by it.","enum":["text","number","money","boolean","date","date_time","enum","id","tags"],"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"},"RecordType":{"description":"A business record automations can listen to.","properties":{"admin_path":{"description":"Admin page of one record, `{id}` replaced.","type":["string","null"]},"customer_field":{"description":"Field naming the record's customer, when it has one; a change binds\nthe automation run to that customer.","type":["string","null"]},"fields":{"items":{"$ref":"#/components/schemas/RecordField"},"type":"array"},"group":{"description":"Picker group.","type":"string"},"key":{"description":"Entity key, e.g. `order`, `stock_item`.","type":"string"},"label":{"type":"string"},"label_en":{"type":"string"},"title_field":{"description":"Field shown as the record's name (`#1042`, a product title...).","type":"string"}},"required":["key","label","label_en","group","title_field","fields"],"type":"object"},"RecordingSegment":{"description":"One stretch of a call's recording.","properties":{"created_at":{"format":"date-time","type":"string"},"duration_ms":{"format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"leg":{"description":"`customer` or `agent` (one side each, from the media relay), or `mixed`.","type":"string"},"offset_ms":{"description":"Milliseconds into the call where it starts.","format":"int32","type":"integer"},"seq":{"description":"The five-minute window of the call, from 0; both legs share it.","format":"int32","type":"integer"},"transcript":{"type":["string","null"]},"transcript_status":{"description":"`pending`, `done`, `failed` or `skipped` (no transcription service).","type":"string"},"url":{"description":"A playback link that works for an hour; `null` once the audio was\ndeleted (retention, erasure).","type":["string","null"]}},"required":["id","leg","seq","offset_ms","duration_ms","transcript_status","created_at"],"type":"object"},"RecordsCatalog":{"description":"Record types automations can listen to.","properties":{"records":{"description":"A fixed list that grows with releases; tolerate unknown keys.","items":{"$ref":"#/components/schemas/RecordType"},"type":"array"}},"required":["records"],"type":"object"},"RecurringExpense":{"description":"A recurring expense.","properties":{"active":{"type":"boolean"},"amount_cents":{"format":"int64","type":"integer"},"category":{"description":"One of `finance::EXPENSE_CATEGORIES`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"ends_on":{"format":"date","type":["string","null"]},"id":{"format":"uuid","type":"string"},"interval_months":{"format":"int32","type":"integer"},"next_due_on":{"description":"The due day of the next payable it will make.","format":"date","type":"string"},"notes":{"type":["string","null"]},"supplier_id":{"format":"uuid","type":["string","null"]}},"required":["id","description","category","amount_cents","interval_months","next_due_on","active","created_at"],"type":"object"},"RecurringExpenseCreate":{"description":"A new recurring expense.","properties":{"amount_cents":{"format":"int64","type":"integer"},"category":{"type":"string"},"description":{"type":"string"},"ends_on":{"description":"No payable is made for a due day after this one.","format":"date","type":["string","null"]},"first_due_on":{"description":"The due day of the first payable; later ones keep its day of the month.","format":"date","type":"string"},"interval_months":{"description":"Every how many months, 1 to 12. Defaults to 1.","format":"int32","type":["integer","null"]},"notes":{"type":["string","null"]},"supplier_id":{"format":"uuid","type":["string","null"]}},"required":["description","category","amount_cents","first_due_on"],"type":"object"},"RecurringExpenseUpdate":{"description":"Changes to a recurring expense. Each field is optional.","properties":{"active":{"type":["boolean","null"]},"amount_cents":{"format":"int64","type":["integer","null"]},"category":{"type":["string","null"]},"description":{"type":["string","null"]},"ends_on":{"description":"Send `null` to run without an end.","format":"date","type":["string","null"]},"notes":{"type":["string","null"]}},"type":"object"},"RecurringOrder":{"description":"A recurring order.","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 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"]},"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","customer_id","status","interval_unit","interval_count","next_run_at","cycles_placed","failures_in_a_row","items","created_at"],"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"},"RecurringOrderSummary":{"description":"The subscriptions in numbers.","properties":{"active":{"format":"int64","type":"integer"},"cancelled":{"format":"int64","type":"integer"},"cancelled_30d":{"format":"int64","type":"integer"},"cycles_failed_30d":{"format":"int64","type":"integer"},"monthly_recurring_cents":{"description":"What the active subscriptions bring in a month, in cents, at today's\nprices (a weekly one counts 52/12 cycles a month).","format":"int64","type":"integer"},"needs_attention":{"description":"Paused after failed cycles: the ones that need the team.","format":"int64","type":"integer"},"orders_placed_30d":{"description":"Orders placed and cycles that failed in the last 30 days.","format":"int64","type":"integer"},"paused":{"format":"int64","type":"integer"},"started_30d":{"description":"Started and cancelled in the last 30 days.","format":"int64","type":"integer"}},"required":["active","paused","needs_attention","cancelled","monthly_recurring_cents","started_30d","cancelled_30d","orders_placed_30d","cycles_failed_30d"],"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"},"RefreshRequest":{"properties":{"refresh_token":{"description":"The refresh token from the last sign-in or refresh.","type":"string"}},"required":["refresh_token"],"type":"object"},"Refund":{"description":"Money returned to the customer: through the payment provider, back to\nstore credit, or recorded by hand (`provider_code` `manual`) for a payment\nthe store took itself.","properties":{"amount_cents":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"description":"Who issued it; null when the user was removed.","format":"uuid","type":["string","null"]},"created_by_name":{"description":"Their name (else e-mail), for the order screen.","type":["string","null"]},"currency":{"type":"string"},"external_id":{"description":"The provider's refund id.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"order_id":{"format":"uuid","type":"string"},"payment_intent_id":{"description":"The payment attempt refunded.","format":"uuid","type":"string"},"provider_code":{"type":"string"},"reason":{"type":["string","null"]}},"required":["id","order_id","payment_intent_id","provider_code","amount_cents","currency","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"},"RegisterPushDeviceRequest":{"description":"Register this device for push.","properties":{"app_version":{"description":"App version, e.g. `1.4.0 (52)`. Up to 64 characters.","type":["string","null"]},"device_name":{"description":"A name the user recognizes, e.g. `iPhone de Ana`. Up to 255 characters.","type":["string","null"]},"environment":{"$ref":"#/components/schemas/PushEnvironment","description":"iOS only: `sandbox` for debug builds run from Xcode. Defaults to\n`production` (TestFlight, App Store)."},"locale":{"description":"The device's language (BCP 47, e.g. `pt-BR`). Pushes are written in\nPortuguese or English; without it, the user's profile language.","type":["string","null"]},"platform":{"$ref":"#/components/schemas/PushPlatform"},"token":{"description":"iOS: the APNs device token as hex (from\n`didRegisterForRemoteNotificationsWithDeviceToken`). Android: the FCM\nregistration token. Web: `JSON.stringify(pushSubscription)` (an\nendpoint of a browser push service and its `p256dh`/`auth` keys),\nsubscribed with the key from `GET /me/devices/web-push-config`.","type":"string"},"voip_token":{"description":"iOS only: the PushKit (VoIP) token as hex, which rings the phone for\nan incoming WhatsApp call while the app is closed. Optional; without\nit the device only rings while the app is open.","type":"string"}},"required":["platform","token"],"type":"object"},"RegisterRequest":{"properties":{"accept_terms":{"description":"The person accepted the terms of use and the privacy policy (their\ncurrent versions). Required.","type":"boolean"},"captcha_token":{"description":"The Turnstile token, required while `GET /auth/signup-config` returns\na `turnstile_site_key`.","type":["string","null"]},"email":{"example":"ana@example.com","type":"string"},"full_name":{"type":["string","null"]},"password":{"description":"At least 8 characters.","type":"string"}},"required":["email","password"],"type":"object"},"RejectReturnRequest":{"properties":{"reason":{"description":"Shown to the customer.","type":["string","null"]}},"type":"object"},"RelayAnswer":{"properties":{"sdp":{"description":"This device's WebRTC answer (SDP) to the relay's offer.","type":"string"}},"required":["sdp"],"type":"object"},"RelayLeg":{"description":"The agent's side of a relayed call.","properties":{"call_id":{"format":"uuid","type":"string"},"offer_sdp":{"description":"The relay's WebRTC offer for this device; answer it with\n`POST .../whatsapp-calls/{id}/relay-answer`.","type":"string"},"recorded":{"description":"The call is recorded on the server (the store records calls).","type":"boolean"}},"required":["call_id","offer_sdp","recorded"],"type":"object"},"RenameAssistantConversationRequest":{"properties":{"title":{"description":"1 to 120 characters.","type":"string"}},"required":["title"],"type":"object"},"RenderEditorRequest":{"description":"What to render.","properties":{"path":{"description":"The storefront path, `/` for the home page.","type":"string"}},"required":["path"],"type":"object"},"RenderEmailDesignRequest":{"properties":{"design":{"type":"object"},"kit":{"description":"Render with this kit instead of the saved one (brand page preview).","type":["object","null"]},"preview_text":{"type":["string","null"]},"subject":{"type":["string","null"]}},"required":["design"],"type":"object"},"RenderedEmailPreview":{"description":"A rendered e-mail.","properties":{"html":{"type":"string"},"subject":{"type":"string"}},"required":["subject","html"],"type":"object"},"ReorderDraftRequest":{"properties":{"location_id":{"description":"Destination for the order.","format":"uuid","type":["string","null"]},"stock_item_ids":{"description":"Restrict to these stock items (materials with no variant behind\nthem, bought by the metre, kilo and so on).","items":{"format":"uuid","type":"string"},"type":["array","null"]},"supplier_id":{"description":"Only what this supplier sells (the item's supplier, or who it was\nlast bought from); the order takes the supplier's terms.","format":"uuid","type":["string","null"]},"variant_ids":{"description":"Restrict to these variants. With neither this nor `stock_item_ids`,\neverything at or below its reorder point.","items":{"format":"uuid","type":"string"},"type":["array","null"]}},"type":"object"},"ReorderProductImagesRequest":{"additionalProperties":false,"properties":{"expected_image_ids":{"description":"The order returned by the latest gallery read; rejects stale approvals.","items":{"format":"uuid","type":"string"},"type":"array"},"image_ids":{"description":"All active gallery ids in the desired order. The order is product-wide:\na variant's photo may sit anywhere, and the variant's own pages show\nits photos in this same relative order.","items":{"format":"uuid","type":"string"},"type":"array"},"primary_image_id":{"description":"Optional cover image. Omission preserves the current cover.","format":"uuid","type":["string","null"]}},"required":["image_ids","expected_image_ids"],"type":"object"},"ReorderRequest":{"properties":{"document_ids":{"description":"Document ids in their new order; positions become 0, 1, 2, ...","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["document_ids"],"type":"object"},"ReorderSettings":{"description":"A variant's reorder settings. Both fields are replaced; null clears.","properties":{"reorder_point":{"description":"At or below this available quantity the variant counts as low stock.\nNull removes it from low-stock views.","format":"int32","minimum":0,"type":["integer","null"]},"reorder_quantity":{"description":"Quantity a reorder draft proposes. Null lets the draft fill up to the\nreorder point.","format":"int32","minimum":1,"type":["integer","null"]}},"type":"object"},"ReplaceProductImageFileRequest":{"additionalProperties":false,"properties":{"expected_filename":{"description":"Stored filename from the latest gallery read, to reject stale replacement.","type":"string"},"file_id":{"format":"uuid","type":"string"}},"required":["file_id","expected_filename"],"type":"object"},"ReportGroupBy":{"description":"What a report is grouped by.","enum":["campaign","ad_group","ad","provider"],"type":"string"},"ReportKind":{"enum":["sales","products","customers","inventory","wishlist","bookings"],"type":"string"},"ReportRange":{"description":"The period a report covers.","properties":{"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"}},"required":["from","to"],"type":"object"},"ReportSchedule":{"properties":{"created_at":{"format":"date-time","type":"string"},"enabled":{"type":"boolean"},"frequency":{"description":"`weekly` or `monthly`.","type":"string"},"id":{"format":"uuid","type":"string"},"lang":{"description":"`pt` or `en`: column names and number format of the file.","type":"string"},"last_error":{"description":"Why the last send failed; cleared by the next success.","type":["string","null"]},"last_sent_at":{"format":"date-time","type":["string","null"]},"next_run_at":{"format":"date-time","type":"string"},"recipients":{"items":{"type":"string"},"type":"array"},"report":{"type":"string"}},"required":["id","report","frequency","recipients","lang","enabled","next_run_at","created_at"],"type":"object"},"ReportTotals":{"properties":{"attributed_orders":{"format":"int64","type":"integer"},"attributed_revenue_cents":{"format":"int64","type":"integer"},"clicks":{"format":"int64","type":"integer"},"conversion_value_cents":{"format":"int64","type":"integer"},"conversions":{"format":"double","type":"number"},"cpc_cents":{"format":"int64","type":["integer","null"]},"ctr":{"format":"double","type":["number","null"]},"impressions":{"format":"int64","type":"integer"},"reach":{"format":"int64","type":"integer"},"roas":{"format":"double","type":["number","null"]},"spend_cents":{"format":"int64","type":"integer"}},"required":["spend_cents","impressions","reach","clicks","conversions","conversion_value_cents","attributed_orders","attributed_revenue_cents"],"type":"object"},"ReportView":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"params":{"additionalProperties":{"type":"string"},"description":"Filter name to value, as the report tab understands them.","propertyNames":{"type":"string"},"type":"object"},"report":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","report","name","params","created_at","updated_at"],"type":"object"},"RequestGrantRequest":{"properties":{"codes":{"description":"Permission codes beyond the member's ceiling (customers, finance,\nsettings may be asked here; the team and API keys never).","items":{"type":"string"},"type":"array"},"duration_hours":{"description":"How long it lasts once approved: 1 to 720 hours.","format":"int32","type":"integer"},"reason":{"description":"Why, shown to the member: 1 to 500 characters.","type":"string"}},"required":["codes","reason","duration_hours"],"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"},"ResendGiftCard":{"properties":{"recipient_email":{"description":"Send to this address instead (a typo to fix); it is kept on the card.","type":["string","null"]}},"type":"object"},"ResendResult":{"description":"What a resend did.","properties":{"sent":{"description":"How many items were e-mailed.","format":"int64","type":"integer"}},"required":["sent"],"type":"object"},"ResendUnopenedRequest":{"description":"Who a follow-up goes to, and with what subject.","properties":{"name":{"description":"Campaign name. Defaults to \"Reenvio para quem não abriu\".","type":["string","null"]},"send_now":{"description":"Send right away (default) or leave as a draft.","type":["boolean","null"]},"subject":{"description":"Subject of the follow-up.","type":"string"}},"required":["subject"],"type":"object"},"ResendUnreportedRequest":{"properties":{"platform":{"description":"Only this platform (`meta`, `google`, `tiktok`, `ga4`).","type":["string","null"]},"reason":{"description":"Only this cause (a `reason` of `listUnreportedConversions`).","type":["string","null"]}},"type":"object"},"ResendUnreportedResult":{"properties":{"queued":{"description":"Sales queued again.","format":"int64","type":"integer"}},"required":["queued"],"type":"object"},"Reservation":{"description":"Units of a variant held for an order line (or its build job).","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"location_id":{"format":"uuid","type":["string","null"]},"location_name":{"type":["string","null"]},"order_id":{"format":"uuid","type":["string","null"]},"order_item_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"quantity":{"format":"int32","type":"integer"},"sku":{"type":"string"},"status":{"$ref":"#/components/schemas/ReservationStatus"},"updated_at":{"format":"date-time","type":"string"},"variant_id":{"format":"uuid","type":"string"},"variant_name":{"type":"string"}},"required":["id","variant_id","sku","variant_name","quantity","status","created_at","updated_at"],"type":"object"},"ReservationCloseResult":{"description":"A closed reservation and the stock it touched.","properties":{"reservation":{"$ref":"#/components/schemas/Reservation"},"stock":{"$ref":"#/components/schemas/VariantStock","description":"The variant's stock after closing."}},"required":["reservation","stock"],"type":"object"},"ReservationStatus":{"description":"Where a reservation stands. `active` holds units; the others are closed.","enum":["active","released","consumed","expired","cancelled"],"type":"string"},"ResetPasswordRequest":{"properties":{"password":{"description":"At least 8 characters.","type":"string"},"token":{"description":"From the link in the e-mail.","type":"string"}},"required":["token","password"],"type":"object"},"RetriedEvents":{"description":"How many failed events were sent again.","properties":{"retried":{"format":"int64","type":"integer"}},"required":["retried"],"type":"object"},"ReturnCustomerNote":{"description":"A note issued to the store that names the original: the customer's own\nreturn note, once the DF-e distribution or an XML upload brought it in.","properties":{"access_key":{"type":"string"},"issued_at":{"format":"date-time","type":["string","null"]},"issuer_name":{"type":["string","null"]},"issuer_tax_id":{"type":["string","null"]},"total_cents":{"format":"int64","type":["integer","null"]}},"required":["access_key"],"type":"object"},"ReturnCustomerNoteRequest":{"properties":{"access_key":{"description":"The access key of the return note the customer issued; null removes it.","type":["string","null"]}},"type":"object"},"ReturnEvent":{"description":"A step in a return's life.","properties":{"actor_kind":{"description":"`team` or `customer`.","type":"string"},"actor_user_id":{"format":"uuid","type":["string","null"]},"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":["id","kind","actor_kind","created_at"],"type":"object"},"ReturnInvoicePickup":{"description":"A reverse pickup Central do Frete brokers, paid by the store.","properties":{"air":{"description":"By air; otherwise by road.","type":"boolean"},"carrier_cnpj":{"description":"The carrier's CNPJ, when the quote shows it.","type":["string","null"]},"carrier_name":{"description":"The carrier of the chosen quote, as Central do Frete names it.","type":"string"},"gross_weight_grams":{"description":"Gross weight of all the boxes, in grams. Left out: the returned\nproducts' own weight, when every one has it.","format":"int64","type":["integer","null"]},"volumes":{"description":"Boxes collected; 1 when left out.","format":"int32","minimum":0,"type":["integer","null"]}},"required":["carrier_name"],"type":"object"},"ReturnInvoiceRequest":{"description":"What the return note says beyond the original.","properties":{"pickup":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReturnInvoicePickup","description":"Central do Frete collects the goods at the customer's (their reverse\npickup): the note carries what their NF-e rules ask for. Without it,\nthe note says no transport (the customer brings the goods)."}]},"reason":{"description":"Printed after the reference to the original (`infCpl`).","type":["string","null"]},"recipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceRecipientEdits","description":"Who sends the goods back, as in the order's preview. Required when\nthe original is an NFC-e, which has no address: the order's customer\nfills it, and these edits complete or correct it."}]}},"type":"object"},"ReturnInvoiceState":{"description":"Where a return stands fiscally.","properties":{"blocked":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalIssue","description":"Why the store cannot issue the return note now."}]},"customer_note_candidates":{"description":"Notes issued to the store that reference the original: the customer's\nreturn note, to record with one click.","items":{"$ref":"#/components/schemas/ReturnCustomerNote"},"type":"array"},"customer_note_key":{"description":"The customer's own return note, once recorded.","type":["string","null"]},"customer_note_linked_at":{"format":"date-time","type":["string","null"]},"documents":{"description":"The store's return notes for this return, newest first.","items":{"$ref":"#/components/schemas/FiscalDocument"},"type":"array"},"issued_by":{"description":"`store`: the store issues the return note (the buyer pays no ICMS).\n`customer`: the buyer is an ICMS contributor and issues its own,\nwhich the store records (`customer_note_key`). `none`: there is no\nnote of Mobiari's to return (`blocked` says why).","type":"string"},"original":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReturnOriginalNote","description":"The order's authorized sale NF-e or NFC-e, when Mobiari issued it."}]},"pickup_suggestion":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReturnPickupSuggestion","description":"Set when the order shipped through Central do Frete, the store\nissues the note, and nothing stops it: the carrier to prefill the\npickup with."}]}},"required":["issued_by","documents","customer_note_candidates"],"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"},"ReturnOriginalNote":{"description":"The note the goods left with.","properties":{"access_key":{"type":"string"},"document_id":{"format":"uuid","type":"string"},"environment":{"type":"string"},"issued_at":{"format":"date-time","type":"string"},"issuer_id":{"format":"uuid","type":"string"},"model":{"description":"55 (NF-e) or 65 (NFC-e).","format":"int32","type":"integer"},"number":{"format":"int64","type":"integer"},"serie":{"format":"int32","type":"integer"}},"required":["document_id","issuer_id","access_key","model","serie","number","environment","issued_at"],"type":"object"},"ReturnPickupSuggestion":{"description":"The carrier the order went out with through Central do Frete: their\nreverse pickup is quoted from that freight order, and usually comes\nback with the same carrier.","properties":{"air":{"type":"boolean"},"carrier_cnpj":{"description":"14 digits, when the quote gave it.","type":["string","null"]},"carrier_name":{"type":"string"}},"required":["carrier_name","air"],"type":"object"},"ReturnPostRequest":{"description":"Why it goes back.","properties":{"note":{"description":"For the author: what to change.","type":["string","null"]}},"type":"object"},"ReturnRequest":{"description":"A return request.","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_deadline":{"description":"The last day to post it, when the carrier set one (a Correios\nreverse authorization).","format":"date","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"]},"return_reverse":{"description":"The Correios reverse authorization, when there is one: `object_code`,\n`service_code`, `service_name`, `valid_until`, `prepostagem_id`,\n`requested_at`, and `cancelled_at` once cancelled.","type":["object","null"]},"status":{"description":"`requested`, `approved`, `received`, `refunded`, `exchanged`, `rejected`, `cancelled`.","type":"string"}},"required":["id","number","code","order_id","status","reason","resolution","requested_by","refund_cents","discount_share_cents","refunded_cents","requested_at","items","exchange_items"],"type":"object"},"ReturnSettings":{"description":"Whether the store takes returns and for how long after delivery.","properties":{"default_instructions":{"description":"How to send goods back (address, carrier, packing), told to the\ncustomer on every approval unless the team writes something else.","type":["string","null"]},"enabled":{"description":"When false customers cannot ask; the team can still register returns.","type":"boolean"},"exchanges_enabled":{"description":"Customers can ask for other variants of what they return (another\nsize, another color) instead of their money back. Defaults to true.","type":"boolean"},"window_days":{"description":"Days after delivery a customer can ask. 7 is the CDC right of\nwithdrawal for purchases made at a distance.","format":"int32","type":"integer"}},"required":["enabled","window_days"],"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"},"ReversalAction":{"enum":["apply","dismiss"],"type":"string"},"ReversalShortfall":{"description":"Units a reversal could not take out: they were no longer on hand.","properties":{"item_id":{"description":"…or the native item.","format":"uuid","type":["string","null"]},"location_id":{"format":"uuid","type":["string","null"]},"received":{"description":"What the receipt brought in.","format":"double","type":"number"},"reversed":{"description":"What the reversal took out.","format":"double","type":"number"},"variant_id":{"description":"The variant, for stock kept on a variant…","format":"uuid","type":["string","null"]}},"required":["received","reversed"],"type":"object"},"Review":{"description":"A product review.","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"},"rating":{"description":"1 to 5.","format":"int32","type":"integer"},"status":{"$ref":"#/components/schemas/ReviewStatus"},"store_id":{"format":"uuid","type":"string"},"title":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","product_id","author_name","author_email","rating","body","status","is_verified_purchase","created_at","updated_at"],"type":"object"},"ReviewSettings":{"description":"The store's review settings.","properties":{"reviews_enabled":{"description":"Shoppers can submit reviews.","type":"boolean"},"reviews_require_approval":{"description":"New reviews wait as `pending` until approved; otherwise they are\n`approved` on submission.","type":"boolean"}},"required":["reviews_enabled","reviews_require_approval"],"type":"object"},"ReviewSettingsUpdateRequest":{"description":"Settings to change; omitted fields keep their value.","properties":{"reviews_enabled":{"type":["boolean","null"]},"reviews_require_approval":{"type":["boolean","null"]}},"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"},"ReviewWithProduct":{"allOf":[{"$ref":"#/components/schemas/Review"},{"properties":{"product_slug":{"type":"string"},"product_title":{"type":"string"}},"required":["product_title","product_slug"],"type":"object"}],"description":"A review with the product it is about."},"ReviseBrandSystemRequest":{"description":"An instruction for the assistant.","properties":{"prompt":{"description":"What to change, in plain words.","type":"string"},"system":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BrandSystem","description":"Unsaved edits to revise on top of; defaults to the saved system."}]}},"required":["prompt"],"type":"object"},"ReviseEmailBrandKitRequest":{"properties":{"kit":{"description":"Kit being edited (unsaved changes included); defaults to the saved one.","type":["object","null"]},"prompt":{"description":"The change wanted, in the merchant's words.","type":"string"}},"required":["prompt"],"type":"object"},"Rfm":{"description":"Where a customer stands against the store's other buyers, 1 (bottom\nfifth) to 5 (top fifth), on recency, frequency and spend.","properties":{"frequency":{"format":"int32","type":"integer"},"monetary":{"format":"int32","type":"integer"},"recency":{"format":"int32","type":"integer"},"segment":{"description":"`champions`, `loyal`, `promising`, `needs_attention`, `cant_lose`,\n`at_risk` or `hibernating`.","type":"string"}},"required":["recency","frequency","monetary","segment"],"type":"object"},"RingingCall":{"allOf":[{"$ref":"#/components/schemas/WhatsappCall"},{"properties":{"answer_sdp":{"description":"For a call the store started: Meta's SDP answer to the browser's offer, once it arrived.","type":["string","null"]},"offer_sdp":{"description":"The customer's WebRTC offer (SDP), to answer with the browser's peer connection.","type":["string","null"]}},"type":"object"}],"description":"A call that is ringing, with the customer's SDP offer."},"Rule":{"description":"A structured rule. Every kind takes access away from whoever the\npolicy is attached to.","oneOf":[{"description":"`action` only up to `max_cents` (a refund, a discount): the handler\npasses the amount in the context.","properties":{"action":{"type":"string"},"kind":{"enum":["limit"],"type":"string"},"max_cents":{"format":"int64","type":"integer"}},"required":["action","max_cents","kind"],"type":"object"},{"description":"`actions` only between `start_hour` (inclusive) and `end_hour`\n(exclusive), store time. `start_hour > end_hour` wraps past midnight.","properties":{"actions":{"items":{"type":"string"},"type":"array"},"end_hour":{"format":"int32","minimum":0,"type":"integer"},"kind":{"enum":["time_window"],"type":"string"},"start_hour":{"format":"int32","minimum":0,"type":"integer"}},"required":["actions","start_hour","end_hour","kind"],"type":"object"},{"description":"Only these records along a dimension, and only these dimension\nrecords themselves.","properties":{"dimension":{"$ref":"#/components/schemas/Dimension"},"ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"kind":{"enum":["scope"],"type":"string"}},"required":["dimension","ids","kind"],"type":"object"},{"description":"Only the records assigned to the person.","properties":{"kind":{"enum":["own_only"],"type":"string"},"resource":{"$ref":"#/components/schemas/OwnKind"}},"required":["resource","kind"],"type":"object"}]},"RuledShippingOption":{"allOf":[{"$ref":"#/components/schemas/FreightQuoteOption"},{"properties":{"base_shipping_cents":{"description":"What the carrier (or zone) quoted, before the rules. Equal to `shipping_cents` when no rule changed the price.","format":"int64","type":"integer"},"shipping_rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AppliedShippingRule","description":"The rule that changed this option; absent when none did."}]}},"required":["base_shipping_cents"],"type":"object"}],"description":"A quoted option after the store's shipping rules."},"RunCreateRequest":{"properties":{"force":{"description":"Write even though an ERP owns this store's stock.","type":"boolean"},"location_id":{"description":"Where the finished units land; defaults to the store's default\nlocation.","format":"uuid","type":["string","null"]},"notes":{"type":["string","null"]},"quantity":{"description":"Base units of the item to make.","format":"double","type":"number"},"start":{"description":"Start right away (take the components now).","type":"boolean"}},"required":["quantity"],"type":"object"},"RunIdsRequest":{"properties":{"run_ids":{"description":"Failed runs of the store (up to 500).","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["run_ids"],"type":"object"},"RunStatus":{"enum":["queued","in_progress","ready","cancelled"],"type":"string"},"RunUpdateRequest":{"properties":{"notes":{"type":["string","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RunStatus","description":"`in_progress` takes the components, `ready` puts the finished units\nin stock, `queued` or `cancelled` from the bench gives the components\nback, `cancelled` when ready leaves the units made."}]}},"type":"object"},"RunWithSteps":{"allOf":[{"$ref":"#/components/schemas/WorkflowRun"},{"properties":{"steps":{"items":{"$ref":"#/components/schemas/WorkflowRunStep"},"type":"array"}},"required":["steps"],"type":"object"}],"description":"A run with its steps, oldest step first."},"SaleAction":{"description":"Something that can be done to a sale, and whether it may be now.","properties":{"enabled":{"type":"boolean"},"kind":{"description":"What it is; each engine lists its own (`add_item`, `take_payment`…).","type":"string"},"missing":{"description":"With `missing`: what the sale still lacks.","items":{"type":"string"},"type":"array"},"reason":{"description":"Why not, when not (`converted`, `payments_taken`, `empty`…).","type":["string","null"]}},"required":["kind","enabled"],"type":"object"},"SaleItem":{"description":"A paid order and where it came from.","properties":{"ad_headline":{"type":["string","null"]},"ad_id":{"description":"Meta's ad id and headline of that lead conversation's click-to-chat\nad; null unless `via_lead`.","type":["string","null"]},"campaign":{"type":["string","null"]},"channel":{"description":"The credited touch's channel; `direct` when unknown.","type":"string"},"conversation_id":{"description":"The conversation it was sold in, if any.","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"customer_name":{"type":["string","null"]},"days_to_convert":{"description":"Days from the first recorded touch (or the lead conversation) to the\norder.","format":"int32","type":["integer","null"]},"first_order":{"description":"The customer's first paid order; null on a guest order (unknown).","type":["boolean","null"]},"lead_conversation_id":{"description":"That lead conversation; null unless `via_lead`.","format":"uuid","type":["string","null"]},"medium":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"other_channel":{"description":"The other touch's channel and source (first when `touch` is last).","type":["string","null"]},"other_source":{"type":["string","null"]},"source":{"type":["string","null"]},"total_cents":{"format":"int64","type":"integer"},"via_lead":{"description":"Credited to the origin of the lead conversation it converted, the\norder itself having no source (a sale closed in a chat).","type":"boolean"}},"required":["order_id","created_at","total_cents","channel","via_lead"],"type":"object"},"SalesChannel":{"description":"A sales channel.","properties":{"api_key_prefix":{"description":"First characters of the channel's API key (`msc_live_…`), empty when\nnone was generated. The key itself is shown once, at generation.","type":"string"},"cash_accounting":{"description":"A `pos` channel that keeps cash accounting needs an open shift to\nsell.","type":"boolean"},"channel_type":{"$ref":"#/components/schemas/SalesChannelType"},"config_json":{"description":"Channel-specific settings.","type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"issuer_id":{"description":"The fiscal issuer (CNPJ) that invoices this channel's sales; empty for\nthe store's default issuer. The issuer of the location the goods\nleave from comes first.","format":"uuid","type":["string","null"]},"location_id":{"description":"The store location a `pos` channel stands in; empty for the store as\na whole and for every other channel type.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"pos_settings":{"$ref":"#/components/schemas/PosSettings","description":"Rules of a `pos` channel; `{}` for no rule and for every other type."},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":["string","null"]}},"required":["id","store_id","name","channel_type","is_active","cash_accounting","pos_settings","api_key_prefix","created_at","updated_at"],"type":"object"},"SalesChannelApiKey":{"description":"A freshly generated channel API key.","properties":{"key":{"description":"The key. Shown only here; store it now.","type":"string"},"prefix":{"description":"What `api_key_prefix` will show from now on.","type":"string"}},"required":["key","prefix"],"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"},"SalesChannelCreateRequest":{"description":"A new sales channel.","properties":{"cash_accounting":{"description":"Cash accounting for a `pos` channel. Defaults to off.","type":["boolean","null"]},"channel_type":{"$ref":"#/components/schemas/SalesChannelType"},"config_json":{"type":["object","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"issuer_id":{"description":"The fiscal issuer (CNPJ) that invoices this channel's sales; omitted\nfor the store's default issuer.","format":"uuid","type":["string","null"]},"location_id":{"description":"The store location this `pos` channel stands in. Only `pos`\nchannels have one.","format":"uuid","type":["string","null"]},"name":{"type":"string"},"pos_settings":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSettings","description":"Rules of a `pos` channel."}]},"url":{"type":["string","null"]}},"required":["name","channel_type"],"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"},"SalesChannelUpdateRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"cash_accounting":{"description":"Cash accounting for a `pos` channel; omitted keeps it.","type":["boolean","null"]},"channel_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SalesChannelType"}]},"config_json":{"type":["object","null"]},"is_active":{"type":["boolean","null"]},"issuer_id":{"description":"The fiscal issuer (CNPJ) that invoices this channel's sales; `null`\ngoes back to the store's default issuer, omitted keeps it.","format":"uuid","type":["string","null"]},"location_id":{"description":"The store location of a `pos` channel; `null` takes it out, omitted\nkeeps it. Changing the type away from `pos` takes it out too.","format":"uuid","type":["string","null"]},"name":{"type":["string","null"]},"pos_settings":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PosSettings","description":"Replaces the rules of a `pos` channel; omitted keeps them, `{}`\nclears them."}]},"url":{"type":["string","null"]}},"type":"object"},"SalesFeeCollection":{"description":"How the store's statements will be collected, and when.","properties":{"authorization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PixAuthorization","description":"The authorization in use: the one the subscription points at, else the\nlatest offered. `None` when none was ever offered."}]},"can_debit":{"description":"Whether the authorization can take a monthly statement: approved,\nmonthly, and the organization is billed through Inter.","type":"boolean"},"next_close_at":{"description":"When the month now running closes and its statement is issued.","format":"date-time","type":"string"},"next_debit_taken":{"description":"Another automatic debit of the organization (an invoice or a store's\nstatement) already falls in the month the next statement is due:\nPix Automático takes one charge per period, so this statement would\ngo out as a plain Pix.","type":"boolean"},"next_due_at":{"description":"When that statement is due, hence debited if it can be.","format":"date-time","type":"string"}},"required":["can_debit","next_debit_taken","next_close_at","next_due_at"],"type":"object"},"SalesFeeEntry":{"description":"A ledger entry: the fee an order added, or a later correction.","properties":{"accrued_at":{"format":"date-time","type":"string"},"base_cents":{"description":"The order's fee base when the entry was written, in cents.","format":"int64","type":"integer"},"fee_cents":{"description":"Signed cents: negative entries give money back.","format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`charge` (the order's first entry), `adjustment` (a refund, a\ncancellation, a terms correction) or `collected` (withheld by Mercado\nPago at the source; negative).","type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"rate_bps":{"format":"int32","type":"integer"},"statement_id":{"format":"uuid","type":["string","null"]}},"required":["id","kind","base_cents","rate_bps","fee_cents","accrued_at"],"type":"object"},"SalesFeeStatement":{"description":"A monthly sales fee statement.","properties":{"amount_cents":{"description":"BRL cents.","format":"int64","type":"integer"},"auto_debit":{"description":"Debited by Pix Automático on the due date: nothing to pay by hand.","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"due_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"paid_at":{"format":"date-time","type":["string","null"]},"period_end":{"format":"date-time","type":"string"},"period_start":{"format":"date-time","type":"string"},"pix_copy_paste":{"description":"Pix \"copia e cola\" to pay it from any bank app.","type":["string","null"]},"status":{"description":"`open`, `paid` or `void`.","type":"string"},"store_id":{"format":"uuid","type":"string"}},"required":["id","store_id","period_start","period_end","amount_cents","status","due_at","auto_debit","created_at"],"type":"object"},"SalesFeeTerms":{"description":"One version of a store's sales fee terms.","properties":{"created_at":{"format":"date-time","type":"string"},"effective_from":{"description":"Orders paid from this moment on use these terms.","format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"include_shipping":{"description":"Whether the shipping the customer paid counts toward the base.","type":"boolean"},"notes":{"type":["string","null"]},"rate_bps":{"description":"Basis points: 300 is 3%. Zero ends the fee.","format":"int32","type":"integer"},"scope":{"description":"`all` or `online`.","type":"string"}},"required":["id","rate_bps","scope","include_shipping","effective_from","created_at"],"type":"object"},"SalesForecast":{"properties":{"change_bps":{"description":"Expected against the last period, in basis points (1000 = +10%); null without a base.","format":"int64","type":["integer","null"]},"days":{"items":{"$ref":"#/components/schemas/ForecastDay"},"type":"array"},"enough_history":{"description":"False when there are fewer than 14 selling days: the numbers are a rough guess.","type":"boolean"},"expected_cents":{"format":"int64","type":"integer"},"high_cents":{"format":"int64","type":"integer"},"history":{"$ref":"#/components/schemas/ReportRange","description":"The days the forecast learned from, ending yesterday."},"horizon_days":{"format":"int64","type":"integer"},"last_period_cents":{"description":"Net revenue of the same number of days right before today, to compare with.","format":"int64","type":"integer"},"low_cents":{"format":"int64","type":"integer"},"selling_days":{"description":"Days of the history with at least one sale.","format":"int64","type":"integer"}},"required":["history","horizon_days","days","expected_cents","low_cents","high_cents","last_period_cents","selling_days","enough_history"],"type":"object"},"SalesPoint":{"description":"One bucket of the series.","properties":{"period":{"description":"First day of the day, week (Monday) or month.","format":"date","type":"string"},"totals":{"$ref":"#/components/schemas/SalesTotals"}},"required":["period","totals"],"type":"object"},"SalesReport":{"properties":{"by_channel":{"items":{"$ref":"#/components/schemas/SalesSlice"},"type":"array"},"by_customer_type":{"items":{"$ref":"#/components/schemas/SalesSlice"},"type":"array"},"by_method":{"items":{"$ref":"#/components/schemas/SalesSlice"},"type":"array"},"channel_id":{"format":"uuid","type":["string","null"]},"interval":{"$ref":"#/components/schemas/Interval"},"previous":{"$ref":"#/components/schemas/SalesTotals"},"previous_range":{"$ref":"#/components/schemas/ReportRange","description":"The same number of days right before `range`."},"range":{"$ref":"#/components/schemas/ReportRange"},"series":{"description":"Every bucket of the range, empty ones included.","items":{"$ref":"#/components/schemas/SalesPoint"},"type":"array"},"totals":{"$ref":"#/components/schemas/SalesTotals"}},"required":["range","previous_range","interval","totals","previous","series","by_channel","by_method","by_customer_type"],"type":"object"},"SalesSlice":{"description":"One slice of the sales: a channel, a payment method, new or returning.","properties":{"key":{"description":"The channel id (`none` for orders without one), the payment method\n(`pix`, `card`, `cash`, `bank_transfer`, `card_terminal`, `store_credit`,\n`other`), or `new` / `returning`.","type":"string"},"label":{"description":"The channel's name; empty for the other splits.","type":"string"},"share_bps":{"description":"Share of the period's net revenue, in basis points.","format":"int64","type":["integer","null"]},"totals":{"$ref":"#/components/schemas/SalesTotals"}},"required":["key","label","totals"],"type":"object"},"SalesTotals":{"description":"Sales over a set of orders.","properties":{"avg_order_cents":{"description":"Net revenue per order.","format":"int64","type":"integer"},"cogs_cents":{"description":"Cost of the goods sold, at each variant's current cost.","format":"int64","type":"integer"},"discounts_cents":{"format":"int64","type":"integer"},"gross_cents":{"description":"Items at list price, before discounts.","format":"int64","type":"integer"},"lines_without_cost":{"description":"Order lines whose variant has no cost: the cost is understated.","format":"int64","type":"integer"},"margin_bps":{"description":"Profit as basis points of net revenue (1234 = 12.34%); null without revenue.","format":"int64","type":["integer","null"]},"net_cents":{"description":"Gross less discounts, plus shipping, less refunds (the DRE's revenue).","format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"},"profit_cents":{"description":"Net revenue less the cost of the goods.","format":"int64","type":"integer"},"refunds_cents":{"description":"Refunded on these orders, whenever the refund happened.","format":"int64","type":"integer"},"shipping_cents":{"description":"Shipping the customers paid.","format":"int64","type":"integer"},"units":{"description":"Items sold.","format":"int64","type":"integer"}},"required":["orders","units","gross_cents","discounts_cents","shipping_cents","refunds_cents","cogs_cents","lines_without_cost","net_cents","profit_cents","avg_order_cents"],"type":"object"},"SameTitleProduct":{"description":"A product of the store with a given title.","properties":{"id":{"format":"uuid","type":"string"},"status":{"$ref":"#/components/schemas/ProductStatus"},"title":{"type":"string"}},"required":["id","title","status"],"type":"object"},"SaveBrandSystemRequest":{"description":"A brand system to save.","properties":{"summary":{"description":"What changed, for the version list. Defaults to \"Edição manual\".","type":["string","null"]},"system":{"$ref":"#/components/schemas/BrandSystem","description":"The whole system. Lenient: missing fields take defaults, numbers\nmay come as strings (`\"16px\"`), unknown fields are dropped."}},"required":["system"],"type":"object"},"SaveEditorDocumentRequest":{"description":"A draft to save.","properties":{"base_revision":{"description":"The revision the change was made on (from the editor state or the\nlast save). When the document changed since, the save is refused\nwith `edit_conflict`. Omit to overwrite.","format":"int64","type":["integer","null"]},"content":{"type":"object"},"path":{"description":"An editable path: `/templates/<type>.json`, `/sections/<group>.json`\nor `/config/settings_data.json`.","type":"string"}},"required":["path","content"],"type":"object"},"SaveTransactionalEmailRequest":{"description":"A transactional e-mail's content.","properties":{"blocks":{"type":["object","null"]},"design":{"description":"Block document; wins over `blocks`.","type":["object","null"]},"html":{"description":"Required (not blank) in `html` mode.","type":["string","null"]},"is_enabled":{"description":"Defaults to true.","type":["boolean","null"]},"mode":{"$ref":"#/components/schemas/TransactionalEmailMode"},"preview_text":{"type":["string","null"]},"subject":{"description":"Not empty.","type":"string"}},"required":["subject","mode"],"type":"object"},"SaveView":{"properties":{"name":{"description":"1 to 60 characters. Saving a name that exists replaces its filters.","type":"string"},"params":{"additionalProperties":{"type":"string"},"description":"Filter name to value (at most 20).","propertyNames":{"type":"string"},"type":"object"},"report":{"$ref":"#/components/schemas/ReportKind"}},"required":["report","name","params"],"type":"object"},"SavedShipmentQuote":{"description":"A quote kept on the 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":["options","destination_postal_code","declared_value_cents","box_count","quoted_at"],"type":"object"},"SavedView":{"description":"A saved view.","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"filters":{"description":"The list's filter values, as the list reads them.","type":"object"},"id":{"format":"uuid","type":"string"},"list_id":{"type":"string"},"name":{"type":"string"},"shared":{"description":"Shared with the whole team (else only its creator sees it).","type":"boolean"}},"required":["id","list_id","name","filters","shared","created_at"],"type":"object"},"SavedViewCreateRequest":{"description":"A new view.","properties":{"filters":{"type":"object"},"list":{"type":"string"},"name":{"description":"1 to 80 characters.","type":"string"},"shared":{"description":"Share with the whole team. Defaults to false.","type":["boolean","null"]}},"required":["list","name","filters"],"type":"object"},"ScheduleEditorPublishRequest":{"description":"When to publish.","properties":{"run_at":{"description":"In the future, within a year. The drafts as they are then go live.","format":"date-time","type":"string"}},"required":["run_at"],"type":"object"},"SchedulePostRequest":{"description":"When to publish.","properties":{"scheduled_at":{"description":"Omit (or a time already past) to publish right away.","format":"date-time","type":["string","null"]}},"type":"object"},"ScopeSpec":{"description":"What an attachment reaches.","properties":{"scope_kind":{"description":"`tenant` or `store`.","type":"string"},"store_ids":{"description":"The stores, for `store`.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["scope_kind"],"type":"object"},"SearchResults":{"description":"Hits per kind of record. A group the caller may not read is empty.","properties":{"campaigns":{"items":{"$ref":"#/components/schemas/CampaignHit"},"type":"array"},"conversations":{"items":{"$ref":"#/components/schemas/ConversationHit"},"type":"array"},"customers":{"items":{"$ref":"#/components/schemas/CustomerHit"},"type":"array"},"orders":{"items":{"$ref":"#/components/schemas/OrderHit"},"type":"array"},"products":{"items":{"$ref":"#/components/schemas/ProductHit"},"type":"array"}},"required":["orders","customers","products","campaigns","conversations"],"type":"object"},"SecurityEvent":{"description":"One security event of the signed-in person.","properties":{"action":{"description":"Dotted action, e.g. `login.succeeded`, `login.failed`, `mfa.totp_enabled`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"ip":{"type":["string","null"]},"meta":{"type":"object"},"user_agent":{"type":["string","null"]}},"required":["id","action","meta","created_at"],"type":"object"},"SefazRegistrationCheck":{"properties":{"checked_at":{"format":"date-time","type":"string"},"entry":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SefazRegistryEntry","description":"The entry used (the one with the profile's IE, else the active one)."}]},"message":{"type":"string"},"mismatches":{"description":"Differences between the profile and SEFAZ's registry (IE, regime).","items":{"type":"string"},"type":"array"},"ok":{"description":"Active in SEFAZ's registry and accredited to issue NF-e.","type":"boolean"},"status_code":{"format":"int32","minimum":0,"type":["integer","null"]}},"required":["ok","message","mismatches","checked_at"],"type":"object"},"SefazRegistryEntry":{"description":"One `infCad` of `retConsCad`.","properties":{"active":{"description":"`cSit` = 1: enabled.","type":"boolean"},"cnae":{"type":["string","null"]},"cnpj":{"type":["string","null"]},"ie":{"type":"string"},"name":{"type":"string"},"nfe_accreditation":{"description":"`indCredNFe`: 0 not accredited, 1 accredited, 2 accredited and\nrequired for all operations, 3 accredited for some, 4 the state does\nnot say.","format":"int32","minimum":0,"type":"integer"},"regime":{"description":"`xRegApur`, e.g. \"SIMPLES NACIONAL\", \"NORMAL - REGIME PERIÓDICO DE APURAÇÃO\".","type":["string","null"]},"trade_name":{"type":["string","null"]},"uf":{"type":"string"}},"required":["ie","uf","active","nfe_accreditation","name"],"type":"object"},"SefazStatus":{"properties":{"elapsed_ms":{"format":"int64","minimum":0,"type":"integer"},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"message":{"type":"string"},"ok":{"type":"boolean"},"status_code":{"format":"int32","minimum":0,"type":["integer","null"]}},"required":["environment","ok","message","elapsed_ms"],"type":"object"},"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"},"SelectCatalogRequest":{"description":"The catalog to use.","properties":{"account_id":{"format":"uuid","type":"string"},"catalog_id":{"description":"One of the ids `listSocialAdCatalogs` returned.","type":"string"}},"required":["account_id","catalog_id"],"type":"object"},"SelectQuoteRequest":{"properties":{"option_id":{"description":"An `option_id` of the shipment's saved quote.","type":"string"}},"required":["option_id"],"type":"object"},"SelectionMode":{"enum":["single","multiple"],"type":"string"},"SendTestEmailRequest":{"properties":{"to":{"description":"Inbox to send the test to.","type":"string"}},"required":["to"],"type":"object"},"SeparateOrderRequest":{"description":"The order to take out.","properties":{"order_id":{"description":"An order of this shipment; its lines go to a draft shipment of their own.","format":"uuid","type":"string"},"reset_boxes":{"description":"See `CombineShipmentsRequest.reset_boxes`.","type":"boolean"}},"required":["order_id"],"type":"object"},"ServiceAccount":{"properties":{"active_keys":{"description":"Keys that work now (not revoked, not expired).","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"disabled_at":{"description":"Set while the account is switched off: its keys are refused.","format":"date-time","type":["string","null"]},"id":{"description":"Also the user id the account acts as (keys, audit, assignments).","format":"uuid","type":"string"},"name":{"type":"string"},"permission_sets":{"description":"Permission sets attached to the account over this store. What it\nmay do is their union.","items":{"$ref":"#/components/schemas/AccessBadge"},"type":"array"}},"required":["id","name","created_at","permission_sets","active_keys"],"type":"object"},"SesAccountQuota":{"description":"The platform's SES sending quota (shared by every store).","properties":{"max_24h":{"format":"double","type":"number"},"max_rate":{"format":"double","type":"number"},"production":{"type":"boolean"},"sent_24h":{"format":"double","type":"number"}},"required":["max_24h","max_rate","sent_24h","production"],"type":"object"},"Session":{"description":"A signed-in session: an access token, the refresh token that renews it,\nand the user.","properties":{"expires_in":{"description":"Seconds until `token` expires.","example":86400,"format":"int64","type":"integer"},"refresh_token":{"description":"Opaque refresh token (`mobi_rt_…`). Store it securely and trade it at\n`POST /auth/refresh` for a new pair before or after `token` expires.\nEach refresh token works once.","type":"string"},"refresh_token_expires_in":{"description":"Seconds until `refresh_token` expires if it is not used.","example":2592000,"format":"int64","type":"integer"},"session_id":{"description":"The session id, as listed by `GET /me/sessions`.","format":"uuid","type":"string"},"token":{"description":"Access token (a JWT). Send it as `Authorization: Bearer <token>`.","type":"string"},"token_type":{"$ref":"#/components/schemas/TokenType","description":"Always `Bearer`."},"user":{"$ref":"#/components/schemas/User"}},"required":["token","token_type","expires_in","refresh_token","refresh_token_expires_in","session_id","user"],"type":"object"},"SetDigitalDelivery":{"description":"A delivery to set.","properties":{"instructions":{"type":["string","null"]},"title":{"type":"string"},"url":{"type":["string","null"]}},"required":["title"],"type":"object"},"SetDropship":{"properties":{"supplier_id":{"description":"The supplier that ships this variant, or null to ship it yourself.","format":"uuid","type":["string","null"]}},"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"},"SetGiftCardProduct":{"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"]},"enabled":{"type":"boolean"}},"required":["enabled"],"type":"object"},"SetGroup":{"properties":{"group_id":{"description":"The group, or null to take the customer out of theirs.","format":"uuid","type":["string","null"]}},"type":"object"},"SetGroupMembersRequest":{"properties":{"user_ids":{"description":"The group's members after the call; each must already be in the\norganization.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["user_ids"],"type":"object"},"SetInventoryModeRequest":{"properties":{"module":{"description":"An inventory module code from the registry: `mobi` (native) or\n`tiny` (the ERP owns stock).","example":"mobi","type":"string"}},"required":["module"],"type":"object"},"SetOrderTestRequest":{"properties":{"is_test":{"description":"`true` to archive the order as test data, `false` to restore it.","type":"boolean"}},"required":["is_test"],"type":"object"},"SetPosPin":{"properties":{"pin":{"description":"4 to 8 digits.","type":"string"}},"required":["pin"],"type":"object"},"SetShipmentBoxesRequest":{"properties":{"boxes":{"items":{"$ref":"#/components/schemas/ShipmentBoxInput"},"type":"array"}},"required":["boxes"],"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"},"SetShippingAddressRequest":{"description":"The delivery address to set on an order.","properties":{"additional_info":{"description":"Apartment, block, floor... (`complement` is accepted too, the public API's name).","type":["string","null"]},"city":{"type":"string"},"neighborhood":{"type":["string","null"]},"number":{"type":"string"},"state":{"description":"Two-letter state (UF).","type":"string"},"street":{"type":"string"},"zip_code":{"description":"CEP, digits or with a dash (`postal_code` is accepted too, the public API's name).","type":"string"}},"required":["zip_code","street","number","city","state"],"type":"object"},"SetSyncStreams":{"properties":{"entities":{"description":"Record types to mirror; the others stop (their tables stay).","items":{"type":"string"},"type":"array"}},"required":["entities"],"type":"object"},"Settings":{"description":"The store's choices for one account (`marketplace_accounts.settings`).","properties":{"import_orders":{"type":"boolean"},"price_markup_bp":{"description":"Basis points added to the Mobiari price on the marketplace, to cover\nits commission (1000 = +10%).","format":"int32","type":"integer"},"stock_buffer":{"description":"Units kept back from the listing, so two channels do not sell the\nlast one together.","format":"int32","type":"integer"},"sync_price":{"type":"boolean"},"sync_stock":{"type":"boolean"}},"required":["sync_stock","sync_price","import_orders","stock_buffer","price_markup_bp"],"type":"object"},"SettingsPatch":{"properties":{"import_orders":{"type":["boolean","null"]},"price_markup_bp":{"format":"int32","type":["integer","null"]},"stock_buffer":{"format":"int32","type":["integer","null"]},"sync_price":{"type":["boolean","null"]},"sync_stock":{"type":["boolean","null"]}},"type":"object"},"Severity":{"description":"How much a finding matters, for the merchant: `high` is goods and papers\nthat disagree (a, b, d of the fiscal checks), `medium` a number of the\nstock book that is wrong now or a supplier's note waiting, `low` old data,\nhousekeeping and goods of others held long.","enum":["high","medium","low"],"type":"string"},"SheetLinkRequest":{"description":"The body of the `…/from-url` import endpoints.","properties":{"more":{"description":"More tabs, of this or other links, with the same columns: their rows\nfollow this one's in the same import.","items":{"$ref":"#/components/schemas/SheetPart"},"type":"array"},"tab":{"description":"The tab to import, by its name (as the tab listing gives it);\ntakes precedence over the link's `#gid=`.","type":["string","null"]},"url":{"description":"The sheet's link (`https://docs.google.com/spreadsheets/d/…`), shared\nas \"Anyone with the link\". A link with `#gid=` imports that tab;\nwithout it, the first tab.","type":"string"}},"required":["url"],"type":"object"},"SheetPart":{"description":"Another tab for the same import.","properties":{"tab":{"type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"Shipment":{"description":"A box on its way: what is in it, who carries it 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"},"box_problems":{"description":"What is wrong with the boxes (see `BoxProblem`): an empty box,\nsomething the shipment ships in no box, contents it does not ship\n(errors: confirming, quoting, booking and the NF-e refuse them), a\nbox lighter than its contents (a warning). Checked when one shipment\nis read or an order's shipments are listed (`order_id`); null when\nnot checked (store-wide lists, cancelled shipments).","items":{"$ref":"#/components/schemas/BoxProblem"},"type":["array","null"]},"boxes":{"description":"The boxes (volumes) it ships as, with what is in each.","items":{"$ref":"#/components/schemas/ShipmentBox"},"type":"array"},"boxes_state":{"$ref":"#/components/schemas/BoxesState","description":"See `BoxesState`."},"carrier_name":{"type":["string","null"]},"cdf_price_id":{"format":"int64","type":["integer","null"]},"cdf_quotation_code":{"type":["string","null"]},"cost_cents":{"description":"What the freight cost the store.","format":"int64","type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"cubed_weight_g":{"description":"What carriers bill the volume as: `volume_mm3` at the factor, in grams.","format":"int64","type":"integer"},"cubing_factor_kg_m3":{"description":"The store's cubing factor, kg per cubic metre.","format":"int32","type":"integer"},"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"]},"estimated":{"description":"Some box is an estimate.","type":"boolean"},"freight_external_order_code":{"description":"The carrier's order code.","type":["string","null"]},"freight_payer":{"description":"`CIF` (store pays) or `FOB` (recipient pays).","type":["string","null"]},"freight_provider_code":{"description":"`central_do_frete`, `melhor_envio` or `correios` (lifecycle driven\nthrough the carrier API), `local_delivery`, `other_carrier` or\n`pickup` (managed by hand).","type":["string","null"]},"future_delivery":{"description":"The order was sold for future delivery (it has a simples\nfaturamento): this shipment needs its own remessa NF-e.","type":"boolean"},"gross_weight_g":{"format":"int64","type":"integer"},"id":{"format":"uuid","type":"string"},"invoice_by_shipment":{"description":"The order is invoiced per shipment, or can be: it has no note of the\nwhole order (Mobiari's or one attached from another system) and\neither a shipment already has its own sale note or the order leaves\nin more than one shipment. This shipment's sale note\nis issued from it (`POST /shipments/{id}/invoice` with `purpose`\n`sale`).","type":"boolean"},"invoice_key":{"description":"The shipment's remessa NF-e once authorized in production.","type":["string","null"]},"invoice_number":{"type":["string","null"]},"invoice_value_cents":{"format":"int64","type":["integer","null"]},"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"},"quote":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SavedShipmentQuote","description":"The last carrier quote, with the chosen option."}]},"quote_expires_at":{"format":"date-time","type":["string","null"]},"shipped_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"store_id":{"format":"uuid","type":"string"},"tracking_code":{"type":["string","null"]},"tracking_events":{"description":"Tracking events from the carrier, oldest first.","items":{"$ref":"#/components/schemas/TrackingEvent"},"type":"array"},"tracking_json":{"description":"The carrier's last order detail, as received.","type":["object","null"]},"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","store_id","status","tracking_events","created_at","updated_at","boxes_state","auto_created","items","boxes","orders","box_count","gross_weight_g","net_weight_g","volume_mm3","estimated","cubing_factor_kg_m3","cubed_weight_g"],"type":"object"},"ShipmentBox":{"description":"One box (volume) of a shipment.","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"]},"measures_corrected_by":{"format":"uuid","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":["id","seq","name","length_mm","width_mm","height_mm","gross_weight_g","net_weight_g","source","estimated","contents"],"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"},"ShipmentBoxContentInput":{"description":"Something inside a box, as sent.","properties":{"inside":{"type":"boolean"},"name":{"type":"string"},"order_item_id":{"format":"uuid","type":"string"},"part_variant_id":{"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"],"type":"object"},"ShipmentBoxInput":{"description":"One box, as sent.","properties":{"catalog_box_id":{"format":"uuid","type":["string","null"]},"contents":{"items":{"$ref":"#/components/schemas/ShipmentBoxContentInput"},"type":"array"},"gross_weight_g":{"format":"int32","type":"integer"},"height_mm":{"format":"int32","type":"integer"},"length_mm":{"format":"int32","type":"integer"},"measured":{"description":"Size and weight were measured on the real box.","type":"boolean"},"name":{"type":"string"},"net_weight_g":{"description":"Goods only; defaults to the gross weight less the catalog box's.","format":"int32","type":["integer","null"]},"tracking_code":{"description":"The carrier's tracking code for this box, when it has one per box.","type":["string","null"]},"width_mm":{"format":"int32","type":"integer"}},"required":["name","length_mm","width_mm","height_mm","gross_weight_g"],"type":"object"},"ShipmentBoxesProposal":{"description":"The engine's proposal for a shipment's boxes.","properties":{"applied":{"description":"The proposal was applied.","type":"boolean"},"box_count":{"format":"int32","type":"integer"},"gross_weight_g":{"format":"int64","type":"integer"},"proposal":{"$ref":"#/components/schemas/ShippingPlan"},"shipment":{"$ref":"#/components/schemas/Shipment"}},"required":["proposal","box_count","gross_weight_g","applied","shipment"],"type":"object"},"ShipmentInvoiceCheck":{"description":"The shipment against the order's NF-e, before booking at Central do\nFrete: who the note names, what it lacks, and what the customer chose.","properties":{"checkout_carrier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreightCarrier","description":"The carrier the customer picked at checkout and the freight the\norder charged."}]},"checkout_shipping_cents":{"format":"int64","type":["integer","null"]},"chosen_carrier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreightCarrier","description":"The carrier of the option chosen on the shipment's quote."}]},"correction_registered":{"description":"A carta de correção is registered for the note: booking accepts it.","type":"boolean"},"future_delivery":{"description":"The order was sold for future delivery (it has a simples\nfaturamento): this shipment travels with its own remessa NF-e\n(`POST /shipments/{id}/invoice`), which the fields above describe.","type":"boolean"},"has_nfe":{"description":"The order has the NF-e XML (booking needs it).","type":"boolean"},"nfe_carrier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreightCarrier","description":"The transporter the NF-e names."}]},"nfe_key":{"type":["string","null"]},"nfe_number":{"type":["string","null"]},"nfe_production":{"description":"The NF-e was authorized in production. Melhor Envio sends a label\nwith its key; without one (or with a homologação note) it goes with a\ncontent declaration.","type":"boolean"},"nfe_value_cents":{"format":"int64","type":["integer","null"]},"problems":{"description":"What the NF-e lacks for this freight, in words; empty when it is\nfine or there is no NF-e yet.","items":{"type":"string"},"type":"array"},"suggested_correction":{"description":"The text of a carta de correção that fixes `problems`.","type":["string","null"]}},"required":["has_nfe","problems","correction_registered"],"type":"object"},"ShipmentInvoiceRequest":{"description":"Which NF-e of a shipment to emit.","properties":{"edits":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceEdits","description":"Changes made in the preview, for this note only (`sale` only). The\nemit request sends the same edits the last preview showed."}]},"issuer_id":{"description":"The issuer (CNPJ) to emit a `sale` note under. Omitted: the one the\norder's note would go out under (the preview's `issuer` says which).","format":"uuid","type":["string","null"]},"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalDocumentPurpose","description":"`future_delivery` (default): the remessa of an order sold for future\ndelivery, after its simples faturamento. `sale`: the sale NF-e of\nwhat this shipment carries, for an order invoiced per shipment (each\nshipment its own sale note, never together with a note of the whole\norder): its lines at their share of the sale, with their share of the\ndiscount and freight, the order's payment for that amount, and the\nshipment's carrier and boxes."}]}},"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"},"ShipmentQuoteOption":{"description":"One carrier 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_code":{"type":"string"},"quotation_code":{"type":["string","null"]},"raw":{"description":"The carrier's option as received.","type":"object"},"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"},"ShippingBox":{"description":"A box size the store ships in.","properties":{"cost_cents":{"format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"item_id":{"description":"The warehouse item this carton is stocked as: every box that leaves\nin it uses one up.","format":"uuid","type":["string","null"]},"length_cm":{"description":"Outer dimensions in centimetres.","format":"double","type":["number","null"]},"max_weight_grams":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"weight_grams":{"description":"Weight of the empty box.","format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["id","store_id","name","cost_cents","is_active","created_at","updated_at"],"type":"object"},"ShippingBoxCreateRequest":{"properties":{"cost_cents":{"description":"Defaults to 0.","format":"int64","type":["integer","null"]},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"item_id":{"description":"A warehouse item of the store this carton is stocked as.","format":"uuid","type":["string","null"]},"length_cm":{"format":"double","type":["number","null"]},"max_weight_grams":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"required":["name"],"type":"object"},"ShippingBoxUpdateRequest":{"description":"Fields to change; omitted ones stay.","properties":{"cost_cents":{"format":"int64","type":["integer","null"]},"description":{"type":["string","null"]},"height_cm":{"format":"double","type":["number","null"]},"is_active":{"type":["boolean","null"]},"item_id":{"description":"A warehouse item of the store this carton is stocked as; null unlinks.","format":"uuid","type":["string","null"]},"length_cm":{"format":"double","type":["number","null"]},"max_weight_grams":{"format":"int32","type":["integer","null"]},"name":{"type":["string","null"]},"weight_grams":{"format":"int32","type":["integer","null"]},"width_cm":{"format":"double","type":["number","null"]}},"type":"object"},"ShippingContact":{"description":"Contact and delivery address typed at checkout.","properties":{"additional_info":{"type":["string","null"]},"city":{"type":["string","null"]},"document":{"description":"CPF/CNPJ typed at checkout.","type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"state":{"description":"Two-letter state (UF).","type":["string","null"]},"street":{"type":["string","null"]},"zip_code":{"type":["string","null"]}},"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"},"ShippingPlanRequest":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/PlanLineInput"},"type":"array"}},"required":["lines"],"type":"object"},"ShippingPlanView":{"allOf":[{"$ref":"#/components/schemas/ShippingPlan"},{"properties":{"box_count":{"format":"int32","type":"integer"},"gross_weight_g":{"format":"int64","type":"integer"},"net_weight_g":{"format":"int64","type":"integer"},"volume_mm3":{"description":"Sum of the boxes' outer volumes, in cubic millimetres.","format":"int64","type":"integer"}},"required":["box_count","gross_weight_g","net_weight_g","volume_mm3"],"type":"object"}],"description":"Lines packed into boxes, with totals."},"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"},"ShippingRule":{"description":"A store's shipping rule.","properties":{"action":{"$ref":"#/components/schemas/ShippingRuleAction"},"conditions":{"$ref":"#/components/schemas/ShippingRuleConditions"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"name":{"description":"The team's name for it; shoppers do not see it.","type":"string"},"position":{"description":"Rules run in this order, lowest first.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","position","is_active","conditions","action","created_at","updated_at"],"type":"object"},"ShippingRuleAction":{"description":"What a rule does to the services it touches.","oneOf":[{"description":"Free shipping: on the cheapest service it touches (`cheapest_only`), or on every one.","properties":{"cheapest_only":{"type":"boolean"},"kind":{"enum":["free_shipping"],"type":"string"}},"required":["kind"],"type":"object"},{"description":"This price instead of the quoted one.","properties":{"amount_cents":{"format":"int64","type":"integer"},"kind":{"enum":["fixed_price"],"type":"string"}},"required":["amount_cents","kind"],"type":"object"},{"description":"A percentage off the quoted price, in basis points (1000 = 10%).","properties":{"kind":{"enum":["discount_percent"],"type":"string"},"percent_bp":{"format":"int64","type":"integer"}},"required":["percent_bp","kind"],"type":"object"},{"description":"An amount off the quoted price, never below zero.","properties":{"amount_cents":{"format":"int64","type":"integer"},"kind":{"enum":["discount_amount"],"type":"string"}},"required":["amount_cents","kind"],"type":"object"},{"description":"A percentage on top of the quoted price, in basis points.","properties":{"kind":{"enum":["markup_percent"],"type":"string"},"percent_bp":{"format":"int64","type":"integer"}},"required":["percent_bp","kind"],"type":"object"},{"description":"An amount on top of the quoted price.","properties":{"amount_cents":{"format":"int64","type":"integer"},"kind":{"enum":["markup_amount"],"type":"string"}},"required":["amount_cents","kind"],"type":"object"},{"description":"Days added to the delivery time (handling).","properties":{"days":{"format":"int32","type":"integer"},"kind":{"enum":["extra_days"],"type":"string"}},"required":["days","kind"],"type":"object"},{"description":"The services are not offered.","properties":{"kind":{"enum":["hide"],"type":"string"}},"required":["kind"],"type":"object"}]},"ShippingRuleChannel":{"description":"Where a sale is made, for rules limited to some of them.","enum":["storefront","pos","quotes","conversations"],"type":"string"},"ShippingRuleConditions":{"description":"When a rule applies. Every condition given must hold; an empty list or a\nnull value is no condition.","properties":{"channels":{"description":"Where the sale is made. Empty: everywhere.","items":{"$ref":"#/components/schemas/ShippingRuleChannel"},"type":"array"},"customer_group_ids":{"description":"The customer is in one of these groups. A guest is in none.","items":{"format":"uuid","type":"string"},"type":"array"},"ends_at":{"description":"Until this instant.","format":"date-time","type":["string","null"]},"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingRuleItems","description":"Products, collections or categories in the cart."}]},"postal_ranges":{"description":"Destination CEP ranges.","items":{"$ref":"#/components/schemas/ShippingRulePostalRange"},"type":"array"},"services":{"description":"The services the rule touches. Empty: every carrier service and local delivery, not pickup.","items":{"$ref":"#/components/schemas/ShippingRuleService"},"type":"array"},"starts_at":{"description":"From this instant.","format":"date-time","type":["string","null"]},"states":{"description":"Destination states (UF, such as `SP`). With `postal_ranges` too, either one matching is enough.","items":{"type":"string"},"type":"array"},"subtotal_max_cents":{"description":"The same subtotal, at most this.","format":"int64","type":["integer","null"]},"subtotal_min_cents":{"description":"The cart's subtotal after its discounts (coupon, negotiated discount) and before freight, at least this.\nDiscounts that depend on the payment method are not taken off.","format":"int64","type":["integer","null"]},"weight_max_g":{"description":"The packed weight, at most this.","format":"int64","type":["integer","null"]},"weight_min_g":{"description":"The packed weight carriers are quoted (boxes included), in grams, at least this.","format":"int64","type":["integer","null"]}},"type":"object"},"ShippingRuleItems":{"description":"Products in the cart a rule asks for.","properties":{"category_ids":{"description":"The product's own categories; a parent category does not include its children.","items":{"format":"uuid","type":"string"},"type":"array"},"collection_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"match":{"$ref":"#/components/schemas/ShippingRuleItemsMatch"},"product_ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"type":"object"},"ShippingRuleItemsMatch":{"description":"Whether every line or any line must be among the listed products.","enum":["any","all"],"type":"string"},"ShippingRuleOutcome":{"allOf":[{"$ref":"#/components/schemas/RuledShippingOption"},{"properties":{"base_delivery_days":{"description":"Delivery days before the rules.","format":"int32","type":["integer","null"]},"hidden":{"description":"A rule hides it: shoppers are not offered it.","type":"boolean"}},"required":["hidden"],"type":"object"}],"description":"One option as the rules left it, hidden ones included (the admin's test panel shows them)."},"ShippingRulePostalRange":{"description":"A CEP range, both ends included, 8 digits each.","properties":{"from":{"description":"First CEP, 8 digits (`01000000`).","type":"string"},"to":{"description":"Last CEP, 8 digits, at least `from`.","type":"string"}},"required":["from","to"],"type":"object"},"ShippingRuleReorderRequest":{"description":"The order rules run in.","properties":{"rule_ids":{"description":"Every rule of the store, first to run first.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["rule_ids"],"type":"object"},"ShippingRuleRequest":{"description":"A rule to create, or what replaces one.","properties":{"action":{"$ref":"#/components/schemas/ShippingRuleAction"},"conditions":{"$ref":"#/components/schemas/ShippingRuleConditions"},"is_active":{"description":"Defaults to true.","type":["boolean","null"]},"name":{"description":"The team's name for it, up to 120 characters; shoppers do not see it.","type":"string"}},"required":["name","action"],"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"},"ShippingRuleSimulation":{"description":"What each service would cost under the rules, and which rule fired.","properties":{"destination_postal_code":{"description":"CEP, digits only.","type":"string"},"free_shipping":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FreeShippingProgress","description":"What the cart still needs for free shipping; null when no free-shipping rule can apply."}]},"options":{"description":"Every option, cheapest first; hidden ones last, with `hidden` true.","items":{"$ref":"#/components/schemas/ShippingRuleOutcome"},"type":"array"},"state":{"description":"The state (UF) the CEP is in, when known.","type":["string","null"]},"subtotal_cents":{"description":"The subtotal the rules saw.","format":"int64","type":"integer"},"weight_g":{"description":"The packed weight the carriers were quoted, in grams.","format":"int64","type":["integer","null"]}},"required":["destination_postal_code","subtotal_cents","options"],"type":"object"},"ShippingRuleSimulationItem":{"description":"A variant and how many of it.","properties":{"quantity":{"format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","quantity"],"type":"object"},"ShippingRuleSimulationRequest":{"description":"A cart to try the rules on.","properties":{"at":{"description":"The instant to evaluate at; now when omitted.","format":"date-time","type":["string","null"]},"channel":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShippingRuleChannel","description":"Defaults to `storefront`."}]},"customer_group_id":{"description":"The customer's group; none (a guest) when omitted.","format":"uuid","type":["string","null"]},"destination_postal_code":{"description":"CEP, 8 digits (formatting ignored).","type":"string"},"items":{"description":"What is shipped; the carriers quote these.","items":{"$ref":"#/components/schemas/ShippingRuleSimulationItem"},"type":"array"},"subtotal_cents":{"description":"The subtotal after discounts the rules see; the items' prices when omitted.","format":"int64","type":["integer","null"]}},"required":["destination_postal_code","items"],"type":"object"},"ShippingSettings":{"description":"Where shipments leave from and how they are measured.","properties":{"cubing_factor_kg_m3":{"description":"Kilograms per cubic metre carriers bill volume at (300 is the usual\nroad-freight factor).","format":"int32","type":"integer"},"default_alone_box_id":{"description":"A carton of the catalog (`/shipping-boxes`).","format":"uuid","type":["string","null"]},"origin_city":{"type":["string","null"]},"origin_complement":{"type":["string","null"]},"origin_district":{"type":["string","null"]},"origin_from_company":{"description":"Shipments leave from the company profile's address (\"Dados da\nempresa\"); the `origin_*` fields below are kept but not used. When\nomitted on save: on unless an origin is typed.","type":["boolean","null"]},"origin_number":{"type":["string","null"]},"origin_postal_code":{"description":"CEP, 8 digits.","type":["string","null"]},"origin_state":{"description":"UF, two letters.","type":["string","null"]},"origin_street":{"type":["string","null"]}},"required":["cubing_factor_kg_m3"],"type":"object"},"SignatureCapabilities":{"description":"What signing can use in this store.","properties":{"store_seal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StoreSealInfo","description":"The store's A1 certificate seals the signed copy (ICP-Brasil)."}]},"whatsapp_codes":{"description":"Codes can go by WhatsApp (the platform's number is set up).","type":"boolean"}},"required":["whatsapp_codes"],"type":"object"},"SignatureEvent":{"description":"An entry in a request's evidence trail.","properties":{"action":{"description":"`created`, `sent`, `viewed`, `code_sent`, `code_verified`, `signed`,\n`declined`, `reminded`, `cancelled`, `completed`, `sealed`,\n`link_renewed`, `expired`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"type":"object"},"id":{"format":"uuid","type":"string"},"ip":{"type":["string","null"]},"signer_id":{"format":"uuid","type":["string","null"]},"signer_name":{"type":["string","null"]},"user_agent":{"type":["string","null"]}},"required":["id","action","detail","created_at"],"type":"object"},"SignatureRequestCreate":{"properties":{"expires_in_days":{"description":"Days the links stay valid, 1 to 180 (default 30).","format":"int64","type":["integer","null"]},"message":{"description":"Shown to signers with the invitation.","type":["string","null"]},"sequential":{"description":"Signers sign one after the other, in the order given.","type":"boolean"},"signers":{"items":{"$ref":"#/components/schemas/SignerInput"},"type":"array"},"store_seal":{"description":"Seal the signed copy with the store's A1 certificate. Defaults to\non when the store has one.","type":["boolean","null"]},"title":{"description":"Defaults to the document's title.","type":["string","null"]}},"required":["signers"],"type":"object"},"SignatureRequestCreated":{"properties":{"detail":{"$ref":"#/components/schemas/SignatureRequestDetail"},"links":{"description":"Each signer's link, to share by other means (e.g. WhatsApp). Only\nshown now.","items":{"$ref":"#/components/schemas/SignerLink"},"type":"array"}},"required":["detail","links"],"type":"object"},"SignatureRequestDetail":{"description":"A signature request with its signers and evidence trail.","properties":{"events":{"items":{"$ref":"#/components/schemas/SignatureEvent"},"type":"array"},"final_sha256":{"type":["string","null"]},"finish_error":{"description":"Why the signed copy could not be made yet (it is retried).","type":["string","null"]},"message":{"type":["string","null"]},"original_sha256":{"type":"string"},"request":{"$ref":"#/components/schemas/SignatureRequestSummary"},"sealed_by":{"description":"Subject of the A1 certificate that sealed the signed copy.","type":["string","null"]},"signed_version_id":{"format":"uuid","type":["string","null"]},"signers":{"items":{"$ref":"#/components/schemas/Signer"},"type":"array"}},"required":["request","original_sha256","signers","events"],"type":"object"},"SignatureRequestSummary":{"description":"A signature request in a list.","properties":{"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_name":{"type":["string","null"]},"document_id":{"format":"uuid","type":"string"},"document_title":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"sequential":{"type":"boolean"},"signed_count":{"format":"int64","type":"integer"},"signer_count":{"format":"int64","type":"integer"},"status":{"description":"`sent`, `completed`, `declined`, `cancelled` or `expired`.","type":"string"},"store_seal":{"type":"boolean"},"title":{"type":"string"},"verification_code":{"type":"string"}},"required":["id","document_id","document_title","title","status","sequential","store_seal","verification_code","signer_count","signed_count","created_at","expires_at"],"type":"object"},"Signer":{"description":"A signer as the store sees them.","properties":{"auth_channel":{"description":"`email` or `whatsapp`: where the confirmation code goes.","type":"string"},"decline_reason":{"type":["string","null"]},"declined_at":{"format":"date-time","type":["string","null"]},"email":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"notified_at":{"format":"date-time","type":["string","null"]},"phone":{"type":["string","null"]},"position":{"format":"int32","type":"integer"},"require_tax_id":{"type":"boolean"},"role_label":{"type":["string","null"]},"signed_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`waiting` (not their turn yet), `pending`, `signed` or `declined`.","type":"string"},"tax_id":{"type":["string","null"]},"verified_destination":{"type":["string","null"]},"viewed_at":{"format":"date-time","type":["string","null"]}},"required":["id","position","name","require_tax_id","auth_channel","status"],"type":"object"},"SignerInput":{"properties":{"auth_channel":{"description":"`email` or `whatsapp`; defaults to e-mail when there is one.","type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":"string"},"phone":{"description":"A Brazilian mobile (with DDD) or an international number.","type":["string","null"]},"require_tax_id":{"description":"Ask the signer for their CPF/CNPJ before signing.","type":"boolean"},"role_label":{"description":"What they sign as (\"Contratante\", \"Testemunha\").","type":["string","null"]},"tax_id":{"description":"CPF or CNPJ, when already known.","type":["string","null"]}},"required":["name"],"type":"object"},"SignerLink":{"description":"A signer's private link, shown once (only its hash is kept).","properties":{"emailed":{"description":"The invitation went out by e-mail.","type":"boolean"},"name":{"type":"string"},"signer_id":{"format":"uuid","type":"string"},"url":{"type":"string"}},"required":["signer_id","name","url","emailed"],"type":"object"},"SignupConfig":{"description":"What the sign-up screen needs to know before it is shown.","properties":{"turnstile_site_key":{"description":"The Turnstile site key to render the captcha with; absent while the\ncaptcha is off. When present, `POST /auth/register` needs\n`captcha_token`.","type":["string","null"]}},"type":"object"},"SiteFunnel":{"description":"Distinct visitors reaching each storefront step in the window.","properties":{"added_to_cart":{"format":"int64","type":"integer"},"began_checkout":{"format":"int64","type":"integer"},"purchased":{"description":"Of `visitors`, the ones with a paid order in the window.","format":"int64","type":"integer"},"viewed_product":{"format":"int64","type":"integer"},"visitors":{"format":"int64","type":"integer"}},"required":["visitors","viewed_product","added_to_cart","began_checkout","purchased"],"type":"object"},"SkippedCombination":{"description":"A combination left alone.","properties":{"option_value_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"reason":{"description":"`exists`: `variant_id` already has it.","type":"string"},"title":{"type":"string"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["title","option_value_ids","reason"],"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"},"SocialAbilities":{"description":"What the current member may do with posts.","properties":{"publish":{"description":"Approve, schedule and publish (`marketing.publish`).","type":"boolean"},"write":{"description":"Write drafts and send them for review (`marketing.write`).","type":"boolean"}},"required":["write","publish"],"type":"object"},"SocialAccount":{"description":"An account posts can be published on.","properties":{"can_publish":{"description":"Connected with the permissions publishing needs. An Instagram account\nconnected for the inbox only must be connected again from Marketing.","type":"boolean"},"connected_at":{"format":"date-time","type":"string"},"id":{"description":"The Instagram inbox channel's id, or the Facebook Page's.","format":"uuid","type":"string"},"missing_permissions":{"description":"Permissions still to grant (connect again to give them).","items":{"type":"string"},"type":"array"},"name":{"description":"`@username` or the Page's name.","type":"string"},"needs_reconnect":{"description":"The token stopped working: connect again.","type":"boolean"},"network":{"$ref":"#/components/schemas/Network"},"picture_url":{"description":"The profile picture as a `data:` URL (copied when the account connected).","type":["string","null"]}},"required":["id","network","name","can_publish","missing_permissions","needs_reconnect","connected_at"],"type":"object"},"SocialAccounts":{"description":"The store's accounts and which logins this server offers.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/SocialAccount"},"type":"array"},"facebook_available":{"description":"The server has a Meta app for Facebook Login.","type":"boolean"},"instagram_available":{"description":"The server has a Meta app for Instagram Business Login.","type":"boolean"}},"required":["accounts","instagram_available","facebook_available"],"type":"object"},"SocialAiStatus":{"description":"Which AI helpers this server offers.","properties":{"images":{"description":"Image generation (a Gemini key is configured).","type":"boolean"},"text":{"description":"Captions and plans (the AI assistant is configured).","type":"boolean"}},"required":["text","images"],"type":"object"},"SocialAuthorizeUrl":{"description":"Where to send the browser to log in.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"SocialComment":{"description":"A comment (or a reply in its thread).","properties":{"account_id":{"description":"The account it was made on (`SocialAccount.id`).","format":"uuid","type":"string"},"account_name":{"type":"string"},"author_name":{"type":["string","null"]},"author_username":{"type":["string","null"]},"commented_at":{"format":"date-time","type":"string"},"from_us":{"description":"Written by the store's own account.","type":"boolean"},"hidden":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"is_ad":{"description":"Made on an ad (a Facebook ad post or Instagram ad media).","type":"boolean"},"media_caption":{"description":"The post: its caption and link, and the Mobiari post when it was\npublished from here.","type":["string","null"]},"media_permalink":{"type":["string","null"]},"network":{"$ref":"#/components/schemas/Network"},"replied_at":{"format":"date-time","type":["string","null"]},"replies":{"description":"Replies in the thread, oldest first.","items":{"$ref":"#/components/schemas/CommentReply"},"type":"array"},"social_post_id":{"format":"uuid","type":["string","null"]},"status":{"$ref":"#/components/schemas/CommentStatus"},"text":{"type":"string"}},"required":["id","network","account_id","account_name","text","from_us","hidden","status","commented_at","is_ad","replies"],"type":"object"},"SocialInsights":{"description":"How the store's social accounts performed.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/AccountInsights"},"type":"array"},"daily":{"items":{"$ref":"#/components/schemas/InsightsDay"},"type":"array"},"days":{"format":"int64","type":"integer"},"sales":{"items":{"$ref":"#/components/schemas/SocialSales"},"type":"array"},"top_posts":{"description":"The window's posts, most interactions first (up to 30).","items":{"$ref":"#/components/schemas/PostInsights"},"type":"array"},"totals":{"$ref":"#/components/schemas/InsightsTotals"},"updated_at":{"description":"When Meta was last asked; null before the first refresh.","format":"date-time","type":["string","null"]}},"required":["days","accounts","totals","daily","top_posts","sales"],"type":"object"},"SocialPost":{"description":"A post.","properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by":{"format":"uuid","type":["string","null"]},"approved_by_name":{"type":["string","null"]},"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"created_by_name":{"type":["string","null"]},"first_comment":{"description":"Posted as the first comment on Instagram.","type":["string","null"]},"format":{"$ref":"#/components/schemas/Format"},"id":{"format":"uuid","type":"string"},"media":{"items":{"$ref":"#/components/schemas/PostMedia"},"type":"array"},"notes":{"description":"For the team, never published (the image the AI planner suggests).","type":["string","null"]},"problems":{"description":"What must be fixed before it can be sent for review or scheduled.","items":{"$ref":"#/components/schemas/PostProblem"},"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"review_note":{"description":"Left by the reviewer when sending it back to draft.","type":["string","null"]},"scheduled_at":{"description":"When it goes out. Null on a scheduled post: as soon as possible.","format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/PostStatus"},"store_id":{"format":"uuid","type":"string"},"targets":{"items":{"$ref":"#/components/schemas/PostTarget"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","format","caption","media","status","targets","problems","created_at","updated_at"],"type":"object"},"SocialSales":{"description":"Orders our attribution credits to a network.","properties":{"channel":{"description":"`organic_social` (bio, posts, stories) or `paid_social` (ads).","type":"string"},"orders":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"source":{"description":"`instagram` or `facebook`.","type":"string"}},"required":["source","channel","orders","revenue_cents"],"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"},"SourceCount":{"description":"Opt-ins and opt-outs by where they came from.","properties":{"channel":{"type":"string"},"granted":{"format":"int64","type":"integer"},"revoked":{"format":"int64","type":"integer"},"source":{"type":"string"}},"required":["channel","source","granted","revoked"],"type":"object"},"SpecField":{"properties":{"allow_freeform":{"type":"boolean"},"display_as_link":{"type":"boolean"},"external_mapping":{"description":"How the field maps to marketplace attributes.","type":"object"},"group_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`text`, `longtext`, `number`, `dimension`, `weight`, `boolean`,\n`taxonomy`, `collection_ref`, ... More may be added.","type":"string"},"multiple":{"type":"boolean"},"name":{"type":"string"},"name_translations":{"type":"object"},"slug":{"type":"string"},"sort_order":{"format":"int32","type":"integer"},"taxonomy_id":{"format":"uuid","type":["string","null"]},"unit":{"type":["string","null"]}},"required":["id","group_id","name","name_translations","slug","kind","multiple","display_as_link","external_mapping","sort_order","allow_freeform"],"type":"object"},"SpecGroup":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"name_translations":{"description":"`{ \"en-US\": \"...\", ... }`","type":"object"},"slug":{"type":"string"},"sort_order":{"format":"int32","type":"integer"}},"required":["id","name","name_translations","slug","sort_order"],"type":"object"},"SplitShipmentRequest":{"description":"Which boxes wait for another shipment.","properties":{"box_ids":{"description":"Boxes of this shipment that do not go now. They leave it, with what\nthey hold, for a new draft shipment; at least one box must stay.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["box_ids"],"type":"object"},"SplitShipmentResult":{"description":"The shipment after the split and the new one with the boxes that wait.","properties":{"new_shipment":{"$ref":"#/components/schemas/Shipment"},"shipment":{"$ref":"#/components/schemas/Shipment"}},"required":["shipment","new_shipment"],"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"},"StageKey":{"enum":["ordered","parts","production","shipped","delivered"],"type":"string"},"StageState":{"enum":["done","current","blocked","upcoming"],"type":"string"},"StartAssistantPhoneVerificationRequest":{"description":"A phone to link to the assistant on WhatsApp.","properties":{"phone_e164":{"description":"With country code (`+55 11 98765-4321`); spaces, dashes and `+` are\nignored.","type":"string"}},"required":["phone_e164"],"type":"object"},"StartCall":{"properties":{"sdp_offer":{"description":"The browser's WebRTC offer (SDP), with its microphone.","type":"string"}},"required":["sdp_offer"],"type":"object"},"StartTestRequest":{"properties":{"sample_id":{"description":"A sample id from the samples list; empty tests with the trigger's\nsample data (or nothing).","type":["string","null"]}},"type":"object"},"StartWhatsappSetupRequest":{"properties":{"phone":{"description":"Phone with country and area code; formatting is ignored.","example":"+55 11 91234-5678","type":"string"}},"required":["phone"],"type":"object"},"StartedCall":{"properties":{"call_id":{"format":"uuid","type":"string"}},"required":["call_id"],"type":"object"},"StartedTest":{"properties":{"run":{"$ref":"#/components/schemas/WorkflowRun"},"trigger_matches":{"description":"Whether the sample passes the trigger's conditions: a real change like\nit would have started the automation.","type":"boolean"}},"required":["run","trigger_matches"],"type":"object"},"StockAdjustRequest":{"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"]}},"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"},"StockCount":{"description":"A count sheet for one location.","properties":{"counted_count":{"description":"Lines somebody has entered a number for.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"created_by_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"item_count":{"description":"Lines on the sheet.","format":"int64","type":"integer"},"location_id":{"format":"uuid","type":"string"},"location_name":{"type":["string","null"]},"name":{"type":["string","null"]},"note":{"type":["string","null"]},"posted_at":{"format":"date-time","type":["string","null"]},"posted_by":{"format":"uuid","type":["string","null"]},"status":{"$ref":"#/components/schemas/StockCountStatus"},"store_id":{"format":"uuid","type":"string"},"variance_count":{"description":"Counted lines that disagree with the book.","format":"int64","type":"integer"}},"required":["id","store_id","location_id","status","created_at","item_count","counted_count","variance_count"],"type":"object"},"StockCountCreateRequest":{"properties":{"location_id":{"description":"Defaults to the store's default location.","format":"uuid","type":["string","null"]},"name":{"type":["string","null"]},"note":{"type":["string","null"]},"search":{"description":"Restrict the sheet to variants matching a SKU or name fragment.\nOmitted draws every active variant, which a full inventory needs.","type":["string","null"]}},"type":"object"},"StockCountDetail":{"allOf":[{"$ref":"#/components/schemas/StockCount"},{"properties":{"items":{"description":"Up to 2000 lines matching the filters, by name.","items":{"$ref":"#/components/schemas/StockCountItem"},"type":"array"}},"required":["items"],"type":"object"}],"description":"A count sheet with its lines."},"StockCountImportResult":{"properties":{"applied":{"description":"Lines filled from the file.","minimum":0,"type":"integer"},"invalid":{"description":"SKUs whose quantity could not be read (or was negative).","items":{"type":"string"},"type":"array"},"unmatched":{"description":"SKUs in the file that are not on the sheet.","items":{"type":"string"},"type":"array"}},"required":["applied","unmatched","invalid"],"type":"object"},"StockCountItem":{"description":"One line of a count sheet.","properties":{"barcode":{"type":["string","null"]},"counted_qty":{"description":"What was counted; null until entered (\"not counted\" is not 0).","format":"int32","type":["integer","null"]},"current_qty":{"description":"On hand at the location right now, to warn when stock moved since\nthe sheet was drawn.","format":"int32","type":"integer"},"expected_qty":{"description":"On hand at the location when the sheet was drawn.","format":"int32","type":"integer"},"id":{"description":"The line id.","format":"uuid","type":"string"},"item_id":{"description":"The variant id.","format":"uuid","type":"string"},"name":{"type":"string"},"sku":{"type":"string"}},"required":["id","item_id","sku","name","expected_qty","current_qty"],"type":"object"},"StockCountLineUpdate":{"properties":{"counted_qty":{"description":"Units counted. Null clears the entry back to \"not counted\", which is\nnot the same as 0.","format":"int32","minimum":0,"type":["integer","null"]}},"type":"object"},"StockCountPostRequest":{"properties":{"force":{"description":"Post even though an ERP owns this store's stock.","type":"boolean"},"treat_uncounted_as_zero":{"description":"Treat lines nobody counted as zero, and record them on the sheet as\ncounted 0 at the time of posting. Off by default because \"I did not\nget to that shelf\" and \"there are none\" are different statements, and\nconflating them silently writes stock off.","type":"boolean"}},"type":"object"},"StockCountPostResult":{"properties":{"applied":{"description":"Lines whose difference was written to the ledger.","format":"int64","type":"integer"},"count":{"$ref":"#/components/schemas/StockCount","description":"The count, now `posted`."},"levels":{"description":"The new level of every variant the count changed: its on-hand, or\nonly its reserved quantity (holds let go because more was reserved\nthan the shelf has; `movement_id` is null then).","items":{"$ref":"#/components/schemas/StockLevelChange"},"type":"array"},"net_delta":{"description":"Sum of the differences written over the applied lines.","format":"int64","type":"integer"},"skipped_uncounted":{"description":"Uncounted lines left alone.","format":"int64","type":"integer"},"superseded":{"description":"Counted lines left alone because a count made later than them was\nalready posted for the same variant and location: the newer look at\nthe shelf stands.","format":"int64","type":"integer"}},"required":["count","applied","skipped_uncounted","superseded","net_delta","levels"],"type":"object"},"StockCountStatus":{"description":"Where a count stands. `draft` and `counting` accept entries; `posted`\nand `cancelled` are closed.","enum":["draft","counting","posted","cancelled"],"type":"string"},"StockDriftFinding":{"description":"One subject that broke one stock check.","properties":{"action":{"description":"What a person can do about it (`issue_note`, `check_shipment`,\n`review_inbound_note`, ...; see `inventory::goods_reconciliation::action`).","type":"string"},"actual":{"description":"What the row under suspicion holds.","format":"double","type":["number","null"]},"check":{"$ref":"#/components/schemas/DriftCheck"},"class":{"$ref":"#/components/schemas/DriftClass"},"details":{"description":"The rest of what the check saw; its keys depend on the check.","type":"object"},"expected":{"description":"What the other side of the comparison says the number should be.","format":"double","type":["number","null"]},"first_seen_at":{"format":"date-time","type":"string"},"fiscal_document_id":{"description":"A note the store issued.","format":"uuid","type":["string","null"]},"fiscal_document_model":{"description":"55 (NF-e) or 65 (NFC-e).","format":"int32","type":["integer","null"]},"fiscal_document_number":{"format":"int64","type":["integer","null"]},"id":{"format":"uuid","type":"string"},"ignore_reason":{"type":["string","null"]},"ignored_at":{"format":"date-time","type":["string","null"]},"item_id":{"format":"uuid","type":["string","null"]},"item_name":{"type":["string","null"]},"last_seen_at":{"format":"date-time","type":"string"},"location_id":{"description":"`null` for a finding about a variant across all its locations.","format":"uuid","type":["string","null"]},"location_name":{"type":["string","null"]},"message":{"description":"What the finding says, in Portuguese.","type":"string"},"order_id":{"format":"uuid","type":["string","null"]},"order_number":{"type":["string","null"]},"product_id":{"format":"uuid","type":["string","null"]},"product_name":{"type":["string","null"]},"resolved_at":{"description":"When a run stopped seeing it, or a member marked it resolved. `null`\nwhile it is open or ignored.","format":"date-time","type":["string","null"]},"resolved_by":{"description":"Set when a member marked it resolved (`null` when a run closed it).","format":"uuid","type":["string","null"]},"severity":{"$ref":"#/components/schemas/Severity"},"shipment_id":{"format":"uuid","type":["string","null"]},"sku":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/FindingState","description":"`open`, `ignored` (by a member, still seen by the runs) or `resolved`\n(no longer seen, or marked resolved by a member)."},"supplier_invoice_id":{"description":"A supplier's note.","format":"uuid","type":["string","null"]},"supplier_invoice_number":{"format":"int32","type":["integer","null"]},"supplier_name":{"type":["string","null"]},"variant_id":{"format":"uuid","type":["string","null"]},"variant_name":{"type":["string","null"]}},"required":["id","check","class","severity","status","message","action","details","first_seen_at","last_seen_at"],"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":"One entry of the stock ledger: a quantity that moved, and why.","properties":{"actor_name":{"description":"Their name, else their e-mail.","type":["string","null"]},"actor_user_id":{"description":"Who made a manual movement; null for automatic ones.","format":"uuid","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"},"fiscal_document_id":{"description":"The note the store issued that this movement belongs to (the sale or\nremessa its goods left with, a return note, a devolução de compra).","format":"uuid","type":["string","null"]},"fiscal_document_model":{"format":"int32","type":["integer","null"]},"fiscal_document_number":{"description":"That note's number and model (55 NF-e, 65 NFC-e).","format":"int64","type":["integer","null"]},"fiscal_document_purpose":{"description":"The note's purpose (`sale`, `future_delivery`, `gift`, `return`,\n`supplier_return`).","type":["string","null"]},"id":{"format":"uuid","type":"string"},"location_id":{"format":"uuid","type":["string","null"]},"location_name":{"type":["string","null"]},"name":{"type":["string","null"]},"nfe_access_key":{"description":"A third party's note (a supplier's, a customer company's return note)\nthis movement belongs to: its 44-digit key.","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"]},"supplier_invoice_id":{"description":"The supplier invoice with that key, when the store imported it.","format":"uuid","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":["id","event_type","quantity_delta","created_at"],"type":"object"},"StockOverview":{"description":"The numbers the stock landing page leads with.","properties":{"active_reservations":{"format":"int64","type":"integer"},"counts_in_progress":{"format":"int64","type":"integer"},"low_stock":{"description":"Active variants with something available but at or below their\nreorder point.","format":"int64","type":"integer"},"open_purchase_orders":{"format":"int64","type":"integer"},"out_of_stock":{"description":"Active variants with nothing available.","format":"int64","type":"integer"},"overdue_purchase_orders":{"description":"Open purchase orders past their expected date.","format":"int64","type":"integer"},"stock_owner":{"description":"Code of the ERP that owns the store's stock, null when Mobiari does.","type":["string","null"]},"stock_owner_name":{"type":["string","null"]},"stock_sync":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockSyncStatus","description":"How fresh the ERP's figures are: the last successful sync and whether\nthe numbers count as stale. Null when Mobiari owns the stock."}]},"stock_value_cents":{"description":"On-hand units valued at cost.","format":"int64","type":"integer"},"total_logical":{"description":"Sum of available units.","format":"int64","type":"integer"},"total_on_hand":{"format":"int64","type":"integer"},"total_reserved":{"format":"int64","type":"integer"},"tracked_items":{"format":"int64","type":"integer"}},"required":["out_of_stock","low_stock","tracked_items","total_on_hand","total_reserved","total_logical","active_reservations","stock_value_cents","open_purchase_orders","overdue_purchase_orders","counts_in_progress"],"type":"object"},"StockPartLine":{"description":"One part of a variant's bill of materials, with its stock and demand.","properties":{"available":{"description":"`on_hand - reserved`, floored at zero.","format":"int32","type":"integer"},"component_variant_id":{"format":"uuid","type":"string"},"demand":{"description":"Units the queued builds of paid orders still need, store-wide.","format":"int32","type":"integer"},"incoming":{"description":"On ordered, not yet received purchase orders.","format":"int32","type":"integer"},"incoming_expected_at":{"description":"Earliest expected date among those purchase orders.","format":"date","type":["string","null"]},"missing":{"description":"`demand` not covered by what those builds hold or the free shelf.","format":"int32","type":"integer"},"name":{"type":"string"},"on_hand":{"format":"int32","type":"integer"},"quantity_required":{"description":"Units one unit of the variant needs.","format":"int32","type":"integer"},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"}},"required":["component_variant_id","name","sku","quantity_required","on_hand","reserved","available","demand","missing","incoming"],"type":"object"},"StockPartRow":{"description":"A part in the parts list.","properties":{"available":{"format":"int32","type":"integer"},"component_variant_id":{"format":"uuid","type":"string"},"cost_cents":{"format":"int64","type":["integer","null"]},"demand":{"format":"int32","type":"integer"},"incoming":{"format":"int32","type":"integer"},"incoming_expected_at":{"format":"date","type":["string","null"]},"is_active":{"type":"boolean"},"missing":{"format":"int32","type":"integer"},"name":{"description":"The part's variant title, or its product's title.","type":"string"},"on_hand":{"format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"},"used_in":{"description":"Titles of the products built from it.","items":{"type":"string"},"type":"array"}},"required":["component_variant_id","product_id","name","product_title","sku","is_active","on_hand","reserved","available","demand","missing","incoming","used_in"],"type":"object"},"StockProductRow":{"description":"A product in the stock list, with totals over its variants.","properties":{"available":{"format":"int32","type":"integer"},"buildable":{"description":"Sum of `buildable` over its variants built from parts. Parts shared\nbetween variants count for each of them.","format":"int32","type":["integer","null"]},"image_url":{"description":"First gallery image: an absolute URL, or a path on the API host.","type":["string","null"]},"incoming":{"format":"int32","type":"integer"},"is_part":{"description":"Some variant goes into another product as a part.","type":"boolean"},"limiting_part":{"description":"The part most in the way: the most missing, else the one capping\nwhat can be built.","type":["string","null"]},"low_stock":{"description":"Some stocked variant is at or below its reorder point (and above\nzero).","type":"boolean"},"made_to_order":{"description":"Some variant is made to order.","type":"boolean"},"missing_parts":{"description":"Distinct parts short for paid orders.","format":"int32","type":"integer"},"on_hand":{"format":"int32","type":"integer"},"open_units":{"format":"int32","type":"integer"},"product_id":{"format":"uuid","type":"string"},"reserved":{"format":"int32","type":"integer"},"title":{"type":"string"},"uses_bom":{"description":"Some variant is built from parts.","type":"boolean"},"variants":{"items":{"$ref":"#/components/schemas/StockProductVariant"},"type":"array"}},"required":["product_id","title","made_to_order","uses_bom","is_part","on_hand","reserved","available","incoming","open_units","missing_parts","low_stock","variants"],"type":"object"},"StockProductVariant":{"description":"A variant of a product in the stock list.","properties":{"available":{"format":"int32","type":"integer"},"buildable":{"description":"For variants built from parts: whole units that can be sold now, the\nones already built plus what the free parts can build.","format":"int32","type":["integer","null"]},"cost_cents":{"format":"int64","type":["integer","null"]},"incoming":{"format":"int32","type":"integer"},"is_active":{"type":"boolean"},"is_component":{"description":"True when some kit is built from this variant.","type":"boolean"},"limiting_part":{"description":"The part that caps `buildable`.","type":["string","null"]},"made_to_order":{"description":"Made to order (`on_demand` or `stocked_or_on_demand`).","type":"boolean"},"on_hand":{"format":"int32","type":"integer"},"open_units":{"description":"Units of paid orders waiting on production (queued or in progress).","format":"int32","type":"integer"},"parts":{"description":"Its bill of materials; empty for a simple product.","items":{"$ref":"#/components/schemas/StockPartLine"},"type":"array"},"reorder_point":{"format":"int32","type":["integer","null"]},"reorder_quantity":{"format":"int32","type":["integer","null"]},"reserved":{"format":"int32","type":"integer"},"sku":{"type":"string"},"title":{"description":"The variant's own title (\"Freijó\"); null for a default variant.","type":["string","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","sku","is_active","made_to_order","is_component","on_hand","reserved","available","incoming","open_units","parts"],"type":"object"},"StockReconciliation":{"description":"The stock checks of a store: the last finished run, the one in progress\nand what is open.","properties":{"current_run":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockReconciliationRun","description":"The run in progress, if any. Ask again in a few seconds: when it is\n`null` the run is `latest_run`."}]},"ignored_findings":{"description":"Findings a member ignored that runs still see.","format":"int64","type":"integer"},"latest_run":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockReconciliationRun","description":"The last run that finished, completed or failed. `null` until the\nstore has been checked once."}]},"open_by_check":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Open findings per check. A check with none is absent.","propertyNames":{"type":"string"},"type":"object"},"open_by_severity":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Open findings per severity (`high`, `medium`, `low`), each present.","propertyNames":{"type":"string"},"type":"object"},"open_findings":{"description":"Open findings of class `drift` (ignored ones are not open).","format":"int64","type":"integer"},"open_informational":{"description":"Open findings of class `informational`.","format":"int64","type":"integer"},"stock_owner":{"description":"The module that owns this store's stock (`tiny`, ...), `null` when\nMobi does. Such a store takes no holds, so any hold there is a finding.","type":["string","null"]}},"required":["open_findings","open_informational","open_by_severity","open_by_check","ignored_findings"],"type":"object"},"StockReconciliationRun":{"description":"One pass of the stock checks over a store.","properties":{"check_counts":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Findings per check. A check with none is absent.","propertyNames":{"type":"string"},"type":"object"},"drift_findings_count":{"description":"The part of `findings_count` that is drift, not informational.","format":"int32","type":"integer"},"error":{"type":["string","null"]},"findings_count":{"description":"Everything the run found, open before it or not, of both classes.","format":"int32","type":"integer"},"finished_at":{"format":"date-time","type":["string","null"]},"high_new_findings_count":{"description":"The part of `new_findings_count` of severity `high`: the team was told.","format":"int32","type":"integer"},"id":{"format":"uuid","type":"string"},"new_findings_count":{"description":"Findings that were not open before this run.","format":"int32","type":"integer"},"origin":{"$ref":"#/components/schemas/ReconciliationRunOrigin"},"resolved_findings_count":{"description":"Findings open before this run that it no longer saw.","format":"int32","type":"integer"},"started_at":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ReconciliationRunStatus"}},"required":["id","origin","status","started_at","findings_count","drift_findings_count","new_findings_count","resolved_findings_count","high_new_findings_count","check_counts"],"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"},"StockStatus":{"enum":["ok","slow","low","out_of_stock"],"type":"string"},"StockSyncStatus":{"description":"How fresh the stock an ERP owns is, for the screens where the merchant\nreads the numbers.","properties":{"interval_minutes":{"description":"Minutes between scheduled syncs. Null when the scheduled sync is\nswitched off for the connection.","format":"int64","type":["integer","null"]},"last_attempt_all_refreshed":{"description":"Whether that run left every variant of the store with a fresh\nfigure. False when an item failed, when stock could not be read or\nconfirmed, or when the store has variants the ERP never mentioned.\nProducts that exist only in the ERP do not make it false: no number\nhere is stale because of them.","type":["boolean","null"]},"last_attempt_applied":{"description":"Stock figures that run wrote.","format":"int64","type":["integer","null"]},"last_attempt_at":{"description":"When the latest sync run (manual or scheduled) that has ended was\nstarted, successful or not.","format":"date-time","type":["string","null"]},"last_attempt_status":{"description":"How that run ended: `ok`, `warnings`, `partial` or `failed`.","type":["string","null"]},"last_attempt_successful":{"description":"Whether that run counts as a successful sync. False when it failed\nor wrote little or nothing: the numbers on screen are then older\nthan the latest run suggests.","type":["boolean","null"]},"last_error":{"type":["string","null"]},"last_success_at":{"description":"When the last successful sync finished: a run that reached the end\nand applied the ERP's figures to (nearly) every item it set out to.\nA run that failed, or finished having written little or nothing,\ndoes not move it. Null when there has been none.","format":"date-time","type":["string","null"]},"last_sync_status":{"description":"Outcome of the latest run as kept on the provider: `ok`, `partial`\n(some items failed) or `error` (the run failed).","type":["string","null"]},"needs_reauth":{"description":"The ERP refuses the stored authorization: nothing syncs until the\nmerchant connects again.","type":"boolean"},"provider_id":{"description":"The ERP connection the figures come from. Null when the store says an\nERP owns its stock and no active connection exists.","format":"uuid","type":["string","null"]},"stale":{"description":"`last_success_at` is older than `stale_after_minutes`, or missing.","type":"boolean"},"stale_after_minutes":{"description":"Age of `last_success_at` past which the figures count as stale: three\nintervals, and never less than three hours.","format":"int64","type":"integer"}},"required":["needs_reauth","stale_after_minutes","stale"],"type":"object"},"StockTransferRequest":{"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"}},"required":["from_location_id","to_location_id","quantity"],"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"},"StorageSummary":{"description":"Storage use of the tenant.","properties":{"file_count":{"format":"int64","type":"integer"},"folder_count":{"format":"int64","type":"integer"},"limit_bytes":{"format":"int64","type":"integer"},"used_bytes":{"format":"int64","type":"integer"}},"required":["used_bytes","limit_bytes","file_count","folder_count"],"type":"object"},"Store":{"description":"A store: one catalog, storefront and order book inside a tenant.","properties":{"created_at":{"format":"date-time","type":"string"},"default_currency":{"description":"ISO 4217 code its prices are in, e.g. `BRL`.","type":["string","null"]},"default_locale":{"description":"The language its storefront and messages default to, e.g. `pt-BR`.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_sandbox":{"description":"A test store: what it does stays inside (no e-mail outside its team,\nno payment, freight, channel or marketplace connection, no production\nfiscal documents, every order a test order). One per tenant, made with\n`POST /tenants/{tenant_id}/sandbox`. Always sent (optional in the\nschema so clients built before it keep decoding).","type":"boolean"},"kind":{"$ref":"#/components/schemas/StoreKind"},"name":{"type":"string"},"owner_id":{"format":"uuid","type":"string"},"slug":{"description":"URL-safe name, used in storefront URLs.","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"timezone":{"description":"IANA time zone its days, reports and schedules follow, e.g. `America/Sao_Paulo`.","type":["string","null"]}},"required":["id","tenant_id","owner_id","name","slug","is_active","kind","created_at"],"type":"object"},"StoreAccess":{"description":"One store the user can reach, and what they may do there.","properties":{"currency":{"description":"ISO 4217 currency the store sells in (the store's setting, else its\ntenant's).","example":"BRL","type":["string","null"]},"features":{"description":"What the workspace uses: the areas of the admin it shows (`catalog`,\n`sales`, `bookings`, `support`…), from `GET /stores/{store_id}/features`.\nHide what is not in it; the API answers either way.","items":{"type":"string"},"type":"array"},"is_owner":{"description":"Owner of the store or of its tenant: may do everything.","type":"boolean"},"is_sandbox":{"description":"The tenant's test store (`POST /tenants/{tenant_id}/sandbox`): show it\napart, so nobody mistakes it for the real one. Always sent (optional in\nthe schema so clients built before it keep decoding).","type":"boolean"},"kind":{"$ref":"#/components/schemas/StoreKind","description":"`store` or `service` (a workspace without catalog or storefront):\nwhich modules the admin shows."},"logo_url":{"description":"The store's logo from its brand system, if it has one. Absolute URL\nas uploaded.","type":["string","null"]},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NetworkStoreAccess","description":"The store's franchise network, when it is in one: the brand's own\nstore (`brand`), a member store of the user's own organization\n(`member`), or another company's store the user reaches only through\nnetwork access (`network_access`): say so in a store switcher, since\nit is someone else's company and `permissions` is what its owner\naccepted to share."}]},"permission_sets":{"description":"The permission sets reaching the user here, directly or through a\ngroup; empty for an owner.","items":{"$ref":"#/components/schemas/PermissionSetSummary"},"type":"array"},"permissions":{"description":"Effective permission codes; `[\"*\"]` for owners. Codes are listed in\n`GET /permissions/catalog`.","items":{"type":"string"},"type":"array"},"segment":{"description":"The segment the features equal (`store`, `appointments`, `support`) or\n`custom`.","type":"string"},"store_id":{"format":"uuid","type":"string"},"store_name":{"type":"string"},"store_slug":{"description":"The store's URL-safe name.","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"tenant_name":{"description":"Name of the tenant (organization) the store belongs to.","type":"string"},"timezone":{"description":"IANA time zone the store reports in (the store's setting, else its\ntenant's). Dashboards count days in this zone.","example":"America/Sao_Paulo","type":["string","null"]}},"required":["store_id","tenant_id","store_name","store_slug","kind","features","segment","tenant_name","is_owner","permissions","permission_sets"],"type":"object"},"StoreCapabilities":{"description":"The capability registry with the store's current choices.","properties":{"capabilities":{"description":"Every capability and its modules. A fixed registry that changes\nonly with releases.","items":{"$ref":"#/components/schemas/Capability"},"type":"array"},"selections":{"$ref":"#/components/schemas/CapabilitySelections"}},"required":["capabilities","selections"],"type":"object"},"StoreForm":{"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"},"store_id":{"format":"uuid","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","store_id","slug","name","fields","notify_emails","save_customer","customer_tags","is_active","submissions_count","created_at","updated_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"},"StoreFulfillmentSettings":{"description":"Operational settings: stock reservation, dispatch time, scheduled\norders, cart recovery and review requests.","properties":{"abandoned_cart_builtin_message":{"description":"The platform sends its own recovery reminder. Off when an automation\non `carts.abandoned` sends it instead (abandoned carts are still\ndetected and announced).","type":"boolean"},"abandoned_cart_delay_minutes":{"description":"Minutes after abandonment before the recovery message, 1 to 10080.","format":"int32","type":"integer"},"abandoned_cart_recovery_enabled":{"type":"boolean"},"cart_reservation_minutes":{"description":"How long a cart holds stock, 1 to 1440 minutes.","format":"int32","type":"integer"},"dispatch_days":{"description":"Business days to dispatch an order, 0 to 365; added to freight quotes.","format":"int32","type":"integer"},"id":{"description":"The store id.","format":"uuid","type":"string"},"installment_interest":{"description":"How installments past `interest_free_installments` are priced:\n`none` (every installment up to the maximum is interest-free),\n`monthly_rate` (the store's `installment_rate_bp` a month, Price\ntable, charged in the amount and recorded on the order apart) or\n`provider` (the card gateway's own rates, added by the gateway:\nMercado Pago only).","type":"string"},"installment_rate_bp":{"description":"The store's monthly installment rate in basis points, 0 to 1000\n(199 is 1,99% a month), for `monthly_rate`.","format":"int32","type":"integer"},"interest_free_installments":{"description":"Interest-free installments, 1 to 12 (with `installment_interest`\nother than `none`).","format":"int32","type":"integer"},"max_installments":{"description":"Most card installments, 1 to 12.","format":"int32","type":"integer"},"min_installment_cents":{"description":"Smallest installment, in cents (R$ 5 to R$ 100.000).","format":"int64","type":"integer"},"price_rounding_cents":{"description":"Price rounding step in cents: 0 (off), 100, 500 or 1000. Percentage\ndiscounts (PIX, codes) leave prices on the step, rounded down;\ninstallments are shown in whole reais and whole amounts without\n\",00\".","format":"int64","type":"integer"},"review_request_delay_days":{"description":"Days after delivery before asking for a review, 0 to 90.","format":"int32","type":"integer"},"review_request_enabled":{"type":"boolean"},"saved_cards_enabled":{"description":"Signed-in shoppers may save their card at checkout and pay with it\nlater (Mercado Pago or Asaas). Off by default.","type":"boolean"},"scheduled_lead_days":{"description":"The fewest days ahead a shopper may schedule, 0 (today) to 180.","format":"int32","type":"integer"},"scheduled_orders_enabled":{"description":"The storefront lets the shopper pick the day the order is sent (a\nscheduled order). Off by default.","type":"boolean"}},"required":["id","cart_reservation_minutes","dispatch_days","abandoned_cart_recovery_enabled","abandoned_cart_delay_minutes","abandoned_cart_builtin_message","review_request_enabled","review_request_delay_days","max_installments","min_installment_cents","installment_interest","interest_free_installments","installment_rate_bp","saved_cards_enabled","price_rounding_cents","scheduled_orders_enabled","scheduled_lead_days"],"type":"object"},"StoreInvite":{"description":"An invitation to join a store with permission sets. Its acceptance token\nis never part of this: it is delivered only to the invited e-mail.","properties":{"accept_link":{"description":"Only when `email_sent` is false: the acceptance link, for the inviter\nto pass on by hand. An account created from it is not marked as\nconfirmed; it gets the usual confirmation e-mail.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"email_sent":{"description":"Only when the invite was just created or resent: whether the e-mail\nwith the acceptance link was handed to the mail provider.","type":["boolean","null"]},"expires_at":{"format":"date-time","type":"string"},"group_ids":{"description":"Groups the invitee joins on acceptance.","items":{"format":"uuid","type":"string"},"type":"array"},"group_names":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"invited_by":{"format":"uuid","type":"string"},"invited_by_name":{"type":["string","null"]},"policy_ids":{"description":"Permission sets attached to the invitee on acceptance, over this\nstore.","items":{"format":"uuid","type":"string"},"type":"array"},"policy_names":{"items":{"type":"string"},"type":"array"},"status":{"$ref":"#/components/schemas/InviteStatus"},"store_id":{"format":"uuid","type":"string"}},"required":["id","store_id","invited_by","email","policy_ids","policy_names","group_ids","group_names","status","expires_at","created_at"],"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"},"StoreLegalInfo":{"description":"The store's company profile: its legal identity, contact and tax data.","properties":{"city":{"type":"string"},"city_code":{"description":"IBGE code of `city`, set on save (ignored when sent).","type":["string","null"]},"cnae":{"description":"Main CNAE, 7 digits.","type":["string","null"]},"complement":{"type":["string","null"]},"district":{"type":["string","null"]},"document":{"description":"CPF (11 digits) or CNPJ (14 characters), without punctuation.","type":"string"},"email":{"description":"Contact for customers, also the LGPD request channel.","type":["string","null"]},"legal_name":{"description":"Razão social, or the person's full name for a CPF seller.","type":"string"},"municipal_registration":{"description":"Inscrição municipal.","type":["string","null"]},"number":{"type":["string","null"]},"phone":{"type":["string","null"]},"postal_code":{"description":"CEP, 8 digits.","type":["string","null"]},"return_days":{"description":"Days to cancel after receiving the order: 7 (the law) to 365.","format":"int32","type":"integer"},"state":{"description":"UF, two letters.","type":"string"},"state_registration":{"description":"Inscrição estadual (digits) or `ISENTO`. Issuing NF-e needs digits: `ISENTO` is not accepted for the issuer.","type":["string","null"]},"street":{"type":"string"},"tax_regime":{"description":"`simples_nacional`, `mei`, `simples_excesso_sublimite` or\n`regime_normal`.","type":["string","null"]},"trade_name":{"description":"Nome fantasia.","type":["string","null"]}},"required":["legal_name","document","street","city","state","return_days"],"type":"object"},"StoreLegalInfoView":{"properties":{"complete":{"description":"Every required field is filled: the storefront shows the footer\nline and serves the pages.","type":"boolean"},"info":{"$ref":"#/components/schemas/StoreLegalInfo"},"missing":{"description":"The required fields still empty: `legal_name`, `document`,\n`street`, `city`, `state`, `contact` (an e-mail or a phone).","items":{"type":"string"},"type":"array"},"pages":{"items":{"$ref":"#/components/schemas/LegalPage"},"type":"array"},"source":{"$ref":"#/components/schemas/LegalInfoSource"}},"required":["info","source","complete","missing","pages"],"type":"object"},"StoreLocation":{"description":"A physical location of the store.","properties":{"amenities_json":{"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_json":{"description":"Opening hours, as the admin editor writes them.","type":"object"},"id":{"format":"uuid","type":"string"},"inventory_location_id":{"description":"The stock pool (inventory location) goods leave from here.","format":"uuid","type":["string","null"]},"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"},"issuer_id":{"description":"The fiscal issuer (a branch's CNPJ) that invoices what leaves from\nhere: pickups here, and orders reserved from this location's stock.\nEmpty: no branch of its own.","format":"uuid","type":["string","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_json":{"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"]},"store_id":{"format":"uuid","type":"string"},"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":["id","store_id","slug","name","country","timezone","hours_json","photos_json","amenities_json","is_pickup_enabled","pickup_lead_minutes","pickup_fee_cents","is_locator_visible","is_active","position","created_at","updated_at"],"type":"object"},"StoreLocationPhoto":{"description":"A photo of a location.","properties":{"alt":{"type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"StoreLocationRequest":{"description":"A location to create.","properties":{"amenities_json":{"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_json":{"type":["object","null"]},"inventory_location_id":{"description":"The stock pool (inventory location) goods leave from here.","format":"uuid","type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_locator_visible":{"type":["boolean","null"]},"is_pickup_enabled":{"type":["boolean","null"]},"issuer_id":{"description":"The fiscal issuer (a branch's CNPJ) that invoices what leaves from here.","format":"uuid","type":["string","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_json":{"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"},"StoreLocationUpdateRequest":{"description":"New values for a location. Omitted fields keep their value; send `null`\nto clear a nullable one.","properties":{"amenities_json":{"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_json":{"type":["object","null"]},"inventory_location_id":{"description":"The stock pool goods leave from here; `null` clears it.","format":"uuid","type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_locator_visible":{"type":["boolean","null"]},"is_pickup_enabled":{"type":["boolean","null"]},"issuer_id":{"description":"The fiscal issuer that invoices what leaves from here; `null` clears it.","format":"uuid","type":["string","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_json":{"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"},"StoreMailbox":{"description":"A connected mailbox. The password is never returned.","properties":{"address":{"description":"The address customers write to and replies leave from.","type":"string"},"channel_id":{"description":"The e-mail channel its conversations belong to.","format":"uuid","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"display_name":{"description":"Shown as the sender's name on replies.","type":["string","null"]},"enabled":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"last_error":{"type":["string","null"]},"last_polled_at":{"format":"date-time","type":["string","null"]},"server_url":{"description":"JMAP server, e.g. `https://mail.example.com`.","type":"string"},"signature":{"description":"Appended to every reply sent from this mailbox.","type":["string","null"]},"status":{"description":"`ok`, or `error` when the last check could not read the mailbox.","type":"string"},"username":{"type":"string"}},"required":["id","address","server_url","username","enabled","status","created_at"],"type":"object"},"StoreMailboxCreateRequest":{"properties":{"address":{"description":"The mailbox address (`contato@loja.com.br`).","type":"string"},"display_name":{"type":["string","null"]},"password":{"type":"string"},"server_url":{"description":"JMAP server. `https://` is assumed when the scheme is left out.","type":"string"},"signature":{"type":["string","null"]},"username":{"description":"Login; defaults to the address.","type":["string","null"]}},"required":["address","server_url","password"],"type":"object"},"StoreMailboxTestResult":{"properties":{"error":{"description":"Why it could not connect, in plain words.","type":["string","null"]},"ok":{"type":"boolean"},"unread":{"description":"Unread messages in the inbox when it connected.","format":"int64","type":["integer","null"]}},"required":["ok"],"type":"object"},"StoreMailboxUpdateRequest":{"properties":{"display_name":{"type":["string","null"]},"enabled":{"type":["boolean","null"]},"password":{"description":"A new password replaces the stored one; leave it out to keep it.","type":["string","null"]},"server_url":{"type":["string","null"]},"signature":{"type":["string","null"]},"username":{"type":["string","null"]}},"type":"object"},"StoreMember":{"properties":{"email":{"type":"string"},"full_name":{"type":["string","null"]},"groups":{"description":"Groups the member is in that reach this store.","items":{"$ref":"#/components/schemas/AccessBadge"},"type":"array"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"is_owner":{"type":"boolean"},"permission_sets":{"description":"Permission sets reaching the member here (empty for an owner\nwithout one): the names shown as badges.","items":{"$ref":"#/components/schemas/AccessBadge"},"type":"array"}},"required":["id","email","is_active","is_owner","permission_sets","groups"],"type":"object"},"StorePopup":{"description":"A storefront popup.","properties":{"batch_id":{"description":"The batch its coupons are kept in (`/discount-code-batches`).","format":"uuid","type":["string","null"]},"body":{"type":"string"},"button_label":{"description":"The submit button's label.","type":"string"},"capture":{"description":"`email`, `whatsapp` or `either`.","type":"string"},"consent_text":{"description":"The consent box's words (LGPD), kept with each signup's consent.","type":"string"},"created_at":{"format":"date-time","type":"string"},"frequency_days":{"description":"Days before a visitor who closed it sees it again (0: next page).","format":"int32","type":"integer"},"headline":{"type":"string"},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Shown on the store's pages.","type":"boolean"},"name":{"description":"The team's name for it.","type":"string"},"new_visitors_only":{"description":"Only visitors on their first visit see it.","type":"boolean"},"pages":{"description":"Page types it shows on; empty: every page.","items":{"type":"string"},"type":"array"},"stats":{"$ref":"#/components/schemas/StorePopupStats"},"store_id":{"format":"uuid","type":"string"},"success_text":{"description":"What shows above the coupon after a signup.","type":"string"},"template_code_id":{"description":"The code each visitor's coupon copies (value, conditions, dates);\nnull: the popup only captures.","format":"uuid","type":["string","null"]},"trigger":{"description":"`delay`, `scroll` or `exit`.","type":"string"},"trigger_value":{"description":"Seconds for `delay`, percent of the page for `scroll`.","format":"int32","type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","name","is_active","headline","body","button_label","success_text","capture","consent_text","trigger","trigger_value","frequency_days","pages","new_visitors_only","stats","created_at","updated_at"],"type":"object"},"StorePopupInput":{"description":"A popup's settings, all of them (a replace).","properties":{"body":{"type":"string"},"button_label":{"type":"string"},"capture":{"description":"`email` (default), `whatsapp` or `either`.","type":["string","null"]},"consent_text":{"description":"Required: the words next to the consent box.","type":"string"},"frequency_days":{"description":"0 to 365 (default 7).","format":"int32","type":["integer","null"]},"headline":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"new_visitors_only":{"type":"boolean"},"pages":{"items":{"type":"string"},"type":"array"},"success_text":{"type":"string"},"template_code_id":{"description":"A code of this store, not one generated in a batch.","format":"uuid","type":["string","null"]},"trigger":{"description":"`delay` (default), `scroll` or `exit`.","type":["string","null"]},"trigger_value":{"description":"0 to 600 seconds for `delay` (default 5), 1 to 100 percent for `scroll` (default 50).","format":"int32","type":["integer","null"]}},"required":["name"],"type":"object"},"StorePopupStats":{"description":"How a popup did.","properties":{"codes_used":{"description":"Its coupons used in an order.","format":"int64","type":"integer"},"revenue_cents":{"description":"Paid orders with one of its coupons (cancelled ones left out), in cents.","format":"int64","type":"integer"},"signups":{"description":"People who left an e-mail or a phone.","format":"int64","type":"integer"},"views":{"description":"Times it opened on a page.","format":"int64","type":"integer"}},"required":["views","signups","codes_used","revenue_cents"],"type":"object"},"StoreSalesFee":{"description":"A store's sales fee: terms, what has accrued and the statements.","properties":{"collected_month_to_date_cents":{"description":"Of that, withheld by Mercado Pago at the source, in cents.","format":"int64","type":"integer"},"collection":{"$ref":"#/components/schemas/SalesFeeCollection"},"current":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SalesFeeTerms","description":"The terms in force now, if any."}]},"history":{"description":"Every version, newest first (future-dated ones included).","items":{"$ref":"#/components/schemas/SalesFeeTerms"},"type":"array"},"month_to_date_cents":{"description":"Accrued in the current month (São Paulo time), in cents.","format":"int64","type":"integer"},"recent_entries":{"description":"The latest entries, newest first.","items":{"$ref":"#/components/schemas/SalesFeeEntry"},"type":"array"},"statements":{"items":{"$ref":"#/components/schemas/SalesFeeStatement"},"type":"array"},"store_id":{"format":"uuid","type":"string"},"store_name":{"type":"string"},"unbilled_cents":{"description":"Accrued and not yet on a statement, net of what was collected at\nthe source, in cents.","format":"int64","type":"integer"}},"required":["store_id","store_name","history","month_to_date_cents","collected_month_to_date_cents","unbilled_cents","statements","recent_entries","collection"],"type":"object"},"StoreSealInfo":{"properties":{"cnpj":{"type":["string","null"]},"not_after":{"format":"date-time","type":"string"},"subject":{"type":"string"}},"required":["subject","not_after"],"type":"object"},"StoreUsage":{"description":"Metered usage of the store.","properties":{"days":{"format":"int64","type":"integer"},"email_caps":{"$ref":"#/components/schemas/EmailSendCap"},"month":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Per metric this calendar month.","propertyNames":{"type":"string"},"type":"object"},"series":{"description":"Per day and metric, oldest first.","items":{"$ref":"#/components/schemas/StoreUsagePoint"},"type":"array"},"totals":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Per metric over `days`.","propertyNames":{"type":"string"},"type":"object"}},"required":["days","series","totals","month","email_caps"],"type":"object"},"StoreUsagePoint":{"description":"One metric on one day.","properties":{"day":{"format":"date","type":"string"},"metric":{"description":"e.g. `emails_sent`, `assistant_tokens`.","type":"string"},"value":{"format":"int64","type":"integer"}},"required":["day","metric","value"],"type":"object"},"StoreWorkflowRun":{"description":"A run with its workflow's name, for the store-wide runs page.","properties":{"attempt":{"format":"int32","type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_node_id":{"type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"dry_run":{"type":"boolean"},"error_message":{"type":["string","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"next_run_at":{"format":"date-time","type":["string","null"]},"started_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/WorkflowRunStatus"},"workflow_id":{"format":"uuid","type":"string"},"workflow_name":{"type":"string"}},"required":["id","workflow_id","workflow_name","status","dry_run","attempt","created_at"],"type":"object"},"StoredEvent":{"description":"An outbox row as the dispatcher and the admin read it.","properties":{"attempts":{"description":"Dispatch attempts so far.","format":"int32","type":"integer"},"completed_subscribers":{"description":"Subscribers (workflows, webhooks, alerts) that already handled it.","items":{"type":"string"},"type":"array"},"customer_id":{"format":"uuid","type":["string","null"]},"dispatched_at":{"format":"date-time","type":["string","null"]},"entity_id":{"format":"uuid","type":["string","null"]},"entity_type":{"description":"`order`, `customer`, `product`, ...","type":"string"},"id":{"format":"uuid","type":"string"},"last_error":{"type":["string","null"]},"name":{"description":"Event name, e.g. `orders.paid` (see `GET /events/catalog`).","type":"string"},"occurred_at":{"format":"date-time","type":"string"},"payload":{"description":"The event payload, as delivered to webhooks and workflows.","type":"object"},"store_id":{"format":"uuid","type":["string","null"]}},"required":["id","name","entity_type","payload","occurred_at","attempts","completed_subscribers"],"type":"object"},"StorefrontChannel":{"properties":{"account":{"description":"Has a storefront login.","type":"boolean"},"chats":{"description":"Storefront chat conversations.","format":"int64","type":"integer"},"last_seen_at":{"format":"date-time","type":["string","null"]},"sessions":{"format":"int64","type":"integer"}},"required":["account","chats","sessions"],"type":"object"},"StorefrontDeployment":{"description":"One build of the store's theme repository.","properties":{"branch_slug":{"description":"Branch, slugified as used in preview hostnames.","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by":{"description":"The team member who made it; empty for older deployments and system ones.","format":"uuid","type":["string","null"]},"created_by_name":{"description":"Display name of `created_by`, when it has one.","type":["string","null"]},"error_summary":{"description":"First lines of the build error, when `status` is `failed`.","type":["string","null"]},"git_sha":{"description":"Commit the deployment was built from.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"description":"Whether this deployment is the one the production storefront serves.","type":"boolean"},"message":{"description":"Why the deployment exists, in the words of whoever (or whatever) made it.","type":["string","null"]},"parent_deployment_id":{"description":"The live deployment a draft started from. Promoting a draft whose parent is no longer\nlive is refused (`stale_base`), so two drafts of one base cannot overwrite each other.","format":"uuid","type":["string","null"]},"pr_number":{"format":"int32","type":["integer","null"]},"promoted_at":{"description":"When it was last promoted to production.","format":"date-time","type":["string","null"]},"ready_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/StorefrontDeploymentStatus"},"triggered_by":{"$ref":"#/components/schemas/StorefrontDeploymentTrigger"}},"required":["id","status","triggered_by","created_at","is_active"],"type":"object"},"StorefrontDeploymentStatus":{"description":"Where a deployment is in its life.\n\nNew values are added as deployment kinds grow (`draft` arrived with\nAI-authored themes); clients must tolerate unknown values.","type":"string","x-extensible-enum":["building","draft","ready","failed","archived"]},"StorefrontDeploymentTrigger":{"description":"What started a deployment.\n\nNew values are added as authoring paths grow; clients must tolerate\nunknown values.","type":"string","x-extensible-enum":["github","manual","migration","ai"]},"StorefrontKey":{"description":"A publishable storefront key.","properties":{"allowed_origins":{"description":"Browser origins allowed to use the key, such as\n`https://loja.example.com` or `https://*.example.com`. Empty accepts\nany origin. Requests without an `Origin` header (servers) always pass.","items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"key":{"description":"The key itself (`pk_live_…`). Safe to ship in browser code: it can\nonly do what a shopper can.","type":"string"},"name":{"type":"string"}},"required":["id","name","key","allowed_origins","created_at"],"type":"object"},"StorefrontKeyCreate":{"properties":{"allowed_origins":{"items":{"type":"string"},"type":"array"},"name":{"description":"A label for the app or environment that uses the key.","type":"string"}},"required":["name"],"type":"object"},"StorefrontKeyUpdate":{"properties":{"allowed_origins":{"description":"Replaces the allowlist; send `[]` to accept any origin.","items":{"type":"string"},"type":["array","null"]},"name":{"type":["string","null"]}},"type":"object"},"StorefrontPage":{"description":"A content page of the storefront.","properties":{"content":{"description":"Page body (HTML).","type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"published":{"description":"Only published pages render on the storefront.","type":"boolean"},"slug":{"description":"URL segment: the page renders at `/pages/{slug}`. Unique per store.","type":"string"},"store_id":{"format":"uuid","type":"string"},"template":{"description":"Theme template to render with (`page` when unset).","type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","store_id","title","slug","published"],"type":"object"},"StorefrontPreviewSettings":{"description":"Where the store's preview deployments are served.","properties":{"admin_base_url":{"description":"Base URL of the admin app, where preview visitors sign in.","type":["string","null"]},"preview_suffix":{"description":"Host suffix of preview deployments: a deployment is served at\n`<ref>--<store slug>.<preview_suffix>`, `<ref>` being `pr-<n>`, a\nshort commit sha or a branch slug. Null when previews are off.","type":["string","null"]}},"type":"object"},"StorefrontRoute":{"description":"One built-in page and its address.","properties":{"customized":{"type":"boolean"},"default_pattern":{"description":"What the platform uses when the store changes nothing.","type":"string"},"page":{"$ref":"#/components/schemas/Page"},"pattern":{"description":"The address in force. `{handle}`, `{number}` or `{id}` stands for the\nproduct, category, order number or order id.","type":"string"},"placeholder":{"description":"The placeholder the address of this page must end with, if any.","type":["string","null"]}},"required":["page","default_pattern","pattern","customized"],"type":"object"},"StorefrontRoutes":{"description":"The addresses of every built-in page.","properties":{"data":{"items":{"$ref":"#/components/schemas/StorefrontRoute"},"type":"array"}},"required":["data"],"type":"object"},"StorefrontRoutesUpdate":{"description":"New addresses.","properties":{"patterns":{"additionalProperties":{"type":["string","null"]},"description":"By page (`product`, `cart`, ...). A string sets the address; `null`\ngoes back to the default; a page left out is not touched.","propertyNames":{"type":"string"},"type":"object"}},"required":["patterns"],"type":"object"},"StorefrontSignInProvider":{"description":"One sign-in provider of the store. The secret is never sent back:\n`has_secret` says whether one is kept.","properties":{"client_id":{"description":"Google: the OAuth client id. Apple: the Services ID.","type":["string","null"]},"configured":{"description":"Saved with a client id and a secret (for Apple also the team and key ids).","type":"boolean"},"enabled":{"description":"Shown on the sign-in page. Only a configured provider can be on.","type":"boolean"},"has_secret":{"description":"A client secret (Google) or private key (Apple) is kept.","type":"boolean"},"key_id":{"description":"Apple: the id of the Sign in with Apple key.","type":["string","null"]},"provider":{"$ref":"#/components/schemas/StorefrontSignInProviderKey"},"redirect_uris":{"description":"The return addresses to register with the provider, one per address of the store.","items":{"type":"string"},"type":"array"},"team_id":{"description":"Apple: the developer team id.","type":["string","null"]},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["provider","configured","enabled","has_secret","redirect_uris"],"type":"object"},"StorefrontSignInProviderKey":{"description":"A sign-in provider.","enum":["google","apple"],"type":"string"},"StorefrontSignInProviderUpdate":{"description":"A provider's settings. Leave `client_secret` (Google) or `private_key`\n(Apple) out to keep the one saved.","properties":{"client_id":{"description":"Google: the OAuth client id (`….apps.googleusercontent.com`). Apple: the Services ID.","type":"string"},"client_secret":{"description":"Google only.","type":["string","null"]},"enabled":{"type":"boolean"},"key_id":{"description":"Apple only: 10 characters.","type":["string","null"]},"private_key":{"description":"Apple only: the `.p8` file's content (`-----BEGIN PRIVATE KEY-----…`).","type":["string","null"]},"team_id":{"description":"Apple only: 10 characters.","type":["string","null"]}},"required":["enabled","client_id"],"type":"object"},"StorefrontSignInProviders":{"description":"Google and Apple sign-in for the store's shoppers.","properties":{"data":{"items":{"$ref":"#/components/schemas/StorefrontSignInProvider"},"type":"array"},"hosts":{"description":"The store's web addresses (Apple asks for them as \"Domains and Subdomains\").","items":{"type":"string"},"type":"array"}},"required":["data","hosts"],"type":"object"},"SubjectSpec":{"description":"A subject for validation and dry runs: a group or a person.","properties":{"group_id":{"format":"uuid","type":["string","null"]},"user_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"Subscribers":{"description":"Who listens to an event in a store.","properties":{"team_alerts":{"description":"Active members who turned e-mail or WhatsApp on for it in their\nnotification preferences (explicit choices; a kind whose e-mail is\non by default reaches more members than this counts).","format":"int64","type":"integer"},"webhooks":{"description":"Active webhooks subscribed to it.","format":"int64","type":"integer"},"workflows":{"description":"Active workflows triggered by it.","format":"int64","type":"integer"}},"required":["workflows","webhooks","team_alerts"],"type":"object"},"Subscription":{"description":"The organization's subscription.","properties":{"auto_debit":{"description":"The organization authorized Pix Automático: invoices are debited on\ntheir due date.","type":"boolean"},"billed_to":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BilledTo","description":"Who the invoices are issued to; null until a CPF or CNPJ is known."}]},"billing_cycle":{"$ref":"#/components/schemas/BillingCycle"},"cancel_at_period_end":{"description":"The subscription ends with the current period (or trial).","type":"boolean"},"covered_by_network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NetworkCoverage","description":"The organization is a franchise whose brand pays Mobiari for it\n(`billed_to` `network`): it is not invoiced and its standing is the\nbrand's. Null otherwise."}]},"current_period_end":{"format":"date-time","type":["string","null"]},"current_period_start":{"description":"The latest paid period.","format":"date-time","type":["string","null"]},"grace_ends_at":{"description":"When a `past_due` subscription is suspended unless paid.","format":"date-time","type":["string","null"]},"open_invoice":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Invoice","description":"The invoice waiting for payment, if any."}]},"pending_plan":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Plan","description":"A downgrade that takes effect at the next renewal."}]},"plan":{"$ref":"#/components/schemas/Plan","description":"The plan, with the limits that apply to this organization (Mobiari\nmay raise or lower one for it)."},"price_cents":{"description":"What the next period costs, in BRL cents: the catalog price, or the\nprice locked for this organization.","format":"int64","type":"integer"},"provider":{"description":"Who collects: `manual` (static Pix code, settled by an operator) or\n`inter` (Mobiari's Banco Inter account: Pix confirmed on its own).","type":"string"},"stage":{"$ref":"#/components/schemas/OrganizationStage","description":"What the organization may do (`common::standing`): `good`;\n`restricted` (suspended or canceled: the admin is read-only except\nbilling and incoming orders, AI replies, campaigns and automations\nstop, the storefront still sells); `closed` (restricted for 30 days:\nthe storefront is closed too). One payment brings it back to `good`."},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"store_closes_at":{"description":"When the storefront closes (`restricted`) or closed (`closed`).","format":"date-time","type":["string","null"]},"storefront_awaiting_verification":{"description":"The owner has not verified their e-mail: the stores' storefronts are\nnot open to the public yet (\"Loja em preparação\").","type":"boolean"},"tenant_id":{"format":"uuid","type":"string"},"trial_days_left":{"description":"Whole days left in the trial, while `trialing`.","format":"int64","type":["integer","null"]},"trial_ends_at":{"format":"date-time","type":["string","null"]},"usage":{"$ref":"#/components/schemas/SubscriptionUsage"}},"required":["tenant_id","plan","status","billing_cycle","price_cents","cancel_at_period_end","provider","auto_debit","usage","stage","storefront_awaiting_verification"],"type":"object"},"SubscriptionOption":{"description":"One interval a product is offered at.","properties":{"count":{"description":"Every how many, 1 to 52.","format":"int32","type":"integer"},"unit":{"description":"`week` or `month`.","type":"string"}},"required":["unit","count"],"type":"object"},"SubscriptionStatus":{"description":"Where a subscription stands.\n\n`trialing` and `active` work normally. `past_due` still works (an\ninvoice is open past its due date, inside the grace period).\n`suspended` (grace period over) and `canceled` keep the data readable\nbut refuse growth: new stores, invites and assistant messages.","enum":["trialing","active","past_due","suspended","canceled"],"type":"string"},"SubscriptionUsage":{"description":"What the organization uses against its plan's limits.","properties":{"assistant_messages":{"description":"Assistant messages this month in the organization's busiest store\n(the limit is per store).","format":"int64","type":"integer"},"seats":{"description":"People with access, pending invites included.","format":"int64","type":"integer"},"storage_bytes":{"description":"File library size.","format":"int64","type":"integer"},"stores":{"format":"int64","type":"integer"}},"required":["stores","seats","storage_bytes","assistant_messages"],"type":"object"},"SuggestedCommentReply":{"description":"A reply drafted by the AI.","properties":{"text":{"type":"string"}},"required":["text"],"type":"object"},"SuggestedProduct":{"description":"A product suggested alongside another (\"you may also like\").","properties":{"position":{"format":"int32","type":"integer"},"primary_image_url":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/ProductStatus"},"suggested_product_id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["suggested_product_id","title","slug","status","position"],"type":"object"},"SuggestedProductsSetRequest":{"description":"The suggested products, in order.","properties":{"suggested_product_ids":{"description":"Products of the same store; others, and the product itself, are\nignored.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["suggested_product_ids"],"type":"object"},"Supplier":{"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"]},"store_id":{"format":"uuid","type":"string"},"tax_id":{"description":"CNPJ or CPF.","type":["string","null"]}},"required":["id","store_id","name","is_active","created_at","open_orders","freight_terms"],"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"},"SupplierInvoiceManifest":{"properties":{"event":{"$ref":"#/components/schemas/ManifestKind"},"justification":{"description":"Required for `not_performed`: 15 to 255 characters.","type":["string","null"]}},"required":["event"],"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"},"SupplierInvoiceReversal":{"properties":{"action":{"$ref":"#/components/schemas/ReversalAction"},"force":{"description":"Apply even though an ERP owns this store's stock.","type":"boolean"}},"required":["action"],"type":"object"},"SupplierInvoiceReversalResult":{"properties":{"cancelled_payables":{"description":"Open installments cancelled.","format":"int64","type":"integer"},"invoice":{"$ref":"#/components/schemas/SupplierInvoiceDetail"},"paid_payables":{"description":"Installments already paid, left as they are: the supplier owes them\nback.","items":{"format":"uuid","type":"string"},"type":"array"},"reversed_movements":{"description":"Stock movements reversed.","format":"int64","type":"integer"},"shortfalls":{"items":{"$ref":"#/components/schemas/ReversalShortfall"},"type":"array"}},"required":["invoice","reversed_movements","shortfalls","cancelled_payables","paid_payables"],"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"},"SupplierInvoicesNotGoods":{"description":"Supplier notes to mark as not goods for resale.","properties":{"invoice_ids":{"description":"The notes, 1 to 200. Only pending notes of the store are marked; the\nrest come back in `skipped`.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["invoice_ids"],"type":"object"},"SupplierInvoicesNotGoodsResult":{"description":"What marking did.","properties":{"marked":{"description":"How many notes were marked.","format":"int64","type":"integer"},"marked_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"skipped":{"items":{"$ref":"#/components/schemas/NotGoodsSkipped"},"type":"array"}},"required":["marked","marked_ids","skipped"],"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"},"SupplierReturn":{"description":"A return to the supplier.","properties":{"created_at":{"format":"date-time","type":"string"},"credit_payables":{"type":"boolean"},"credits":{"items":{"$ref":"#/components/schemas/SupplierReturnCredit"},"type":"array"},"document":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiscalDocument"}]},"error":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"items":{"items":{"$ref":"#/components/schemas/SupplierReturnItem"},"type":"array"},"purpose":{"type":"string"},"reason":{"type":["string","null"]},"reversed_at":{"description":"Booked effects undone (the note was cancelled).","format":"date-time","type":["string","null"]},"settled_at":{"description":"Stock and installments booked (the note was authorized in production).","format":"date-time","type":["string","null"]},"status":{"description":"`issuing`, `issued` (the document's own status says where it stands)\nor `failed` (`error` says why).","type":"string"},"supplier_invoice_id":{"format":"uuid","type":"string"},"total_cents":{"format":"int64","type":"integer"},"uncredited_cents":{"description":"What no open installment could take: the supplier owes it back.","format":"int64","type":"integer"}},"required":["id","supplier_invoice_id","status","purpose","credit_payables","total_cents","uncredited_cents","items","credits","created_at"],"type":"object"},"SupplierReturnCancel":{"properties":{"justification":{"description":"15 to 255 characters, sent to SEFAZ.","type":"string"}},"required":["justification"],"type":"object"},"SupplierReturnCredit":{"description":"What a settled return took off one installment.","properties":{"cents":{"format":"int64","type":"integer"},"closed":{"description":"The installment owed nothing more and was closed.","type":"boolean"},"due_on":{"format":"date","type":"string"},"label":{"type":["string","null"]},"payable_id":{"format":"uuid","type":"string"}},"required":["payable_id","due_on","cents","closed"],"type":"object"},"SupplierReturnInstallment":{"description":"An installment of the supplier's note.","properties":{"amount_cents":{"format":"int64","type":"integer"},"credited_cents":{"format":"int64","type":"integer"},"due_on":{"format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"label":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","due_on","amount_cents","credited_cents","status"],"type":"object"},"SupplierReturnItem":{"description":"One returned line, and what it did to stock.","properties":{"description":{"type":["string","null"]},"line_number":{"format":"int32","type":"integer"},"quantity":{"format":"double","type":"number"},"stock_note":{"description":"Why the line moved no stock.","type":["string","null"]},"stock_units":{"description":"Base units taken out of stock when settled.","format":"double","type":"number"}},"required":["line_number","quantity","stock_units"],"type":"object"},"SupplierReturnLineRequest":{"description":"One line of the supplier's note going back.","properties":{"line_number":{"description":"`nItem` of the supplier's note.","format":"int32","type":"integer"},"quantity":{"description":"In the supplier's unit, up to four decimals.","format":"double","type":"number"}},"required":["line_number","quantity"],"type":"object"},"SupplierReturnPreview":{"description":"The return note as it would go out, and what it would book.","properties":{"credits":{"items":{"$ref":"#/components/schemas/PlannedCredit"},"type":"array"},"environment":{"description":"`homologacao` or `producao`: only production moves stock and payables.","type":"string"},"issues":{"description":"Errors block emitting; warnings do not.","items":{"$ref":"#/components/schemas/FiscalIssue"},"type":"array"},"stock":{"items":{"$ref":"#/components/schemas/PlannedStock"},"type":"array"},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NfeTotals","description":"Absent when the note cannot be built."}]},"uncredited_cents":{"description":"What the installments cannot take.","format":"int64","type":"integer"}},"required":["issues","environment","credits","uncredited_cents","stock"],"type":"object"},"SupplierReturnRequest":{"description":"What to send back and how.","properties":{"credit_payables":{"description":"Take the note's value off the supplier note's open installments once\nauthorized. Defaults to true.","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/SupplierReturnLineRequest"},"type":"array"},"location_id":{"description":"Where the goods leave from; the store's first location by default.","format":"uuid","type":["string","null"]},"purpose":{"$ref":"#/components/schemas/SupplierReturnUse","description":"What the store bought the goods for; picks the CFOP. Defaults to resale."},"reason":{"description":"Printed on the note (\"Peças com defeito\").","type":["string","null"]},"transport":{"$ref":"#/components/schemas/SupplierReturnTransport"}},"required":["lines"],"type":"object"},"SupplierReturnState":{"description":"A supplier note's returns and what can still go back.","properties":{"blockers":{"description":"Why nothing of this note can be returned here (discarded, cancelled by\nthe supplier, issued to another company); empty when it can.","items":{"type":"string"},"type":"array"},"installments":{"items":{"$ref":"#/components/schemas/SupplierReturnInstallment"},"type":"array"},"lines":{"items":{"$ref":"#/components/schemas/SupplierReturnableLine"},"type":"array"},"moves_stock":{"description":"The note was received into stock: an authorized return takes its\nmatched lines out again.","type":"boolean"},"returns":{"items":{"$ref":"#/components/schemas/SupplierReturn"},"type":"array"},"supplier_invoice_id":{"format":"uuid","type":"string"},"transport":{"$ref":"#/components/schemas/SupplierReturnTransportHint","description":"The carrier the supplier's note named."}},"required":["transport","supplier_invoice_id","blockers","moves_stock","lines","installments","returns"],"type":"object"},"SupplierReturnTransport":{"description":"How the goods travel back.","properties":{"carrier_name":{"type":["string","null"]},"carrier_tax_id":{"description":"The carrier's CNPJ or CPF.","type":["string","null"]},"gross_weight_kg":{"format":"double","type":["number","null"]},"mode":{"$ref":"#/components/schemas/NfeFreightMode","description":"`modFrete`: `sender` (the store pays, CIF), `recipient` (the supplier\npays, FOB), `third_party`, `own_sender`, `own_recipient` or `none`."},"net_weight_kg":{"format":"double","type":["number","null"]},"species":{"description":"\"CAIXA\", \"VOLUME\".","type":["string","null"]},"volumes":{"format":"int32","minimum":0,"type":["integer","null"]}},"type":"object"},"SupplierReturnTransportHint":{"description":"How the supplier's goods came, to pre-fill how they go back: the same\ncarrier most of the time.","properties":{"carrier_name":{"type":["string","null"]},"carrier_tax_id":{"description":"CNPJ or CPF, digits only.","type":["string","null"]},"species":{"description":"`esp` of the note's volumes (\"CAIXA\").","type":["string","null"]}},"type":"object"},"SupplierReturnUse":{"description":"What the store bought the goods for: it picks the return CFOP.","enum":["resale","production","consumption","fixed_asset"],"type":"string"},"SupplierReturnableLine":{"description":"One line of the supplier's note, and how much of it can still go back.","properties":{"blocked":{"description":"Why the platform cannot return this line (ICMS-ST, a price with\nfractions of a cent); null when it can.","type":["string","null"]},"description":{"type":"string"},"goods_cents":{"format":"int64","type":"integer"},"icms_cents":{"format":"int64","type":"integer"},"ipi_cents":{"format":"int64","type":"integer"},"line_number":{"format":"int32","type":"integer"},"quantity":{"format":"double","type":"number"},"returnable":{"format":"double","type":"number"},"returned":{"description":"Taken by live returns (emitting, waiting for SEFAZ, or authorized).","format":"double","type":"number"},"stock_item_name":{"description":"The stock item the line was received as, when the note was received\nand the line matched.","type":["string","null"]},"supplier_code":{"type":"string"},"unit":{"type":"string"},"unit_value_cents":{"format":"double","type":"number"},"units_per_unit":{"description":"Base units in one of the supplier's units.","format":"double","type":"number"}},"required":["line_number","supplier_code","description","unit","quantity","returned","returnable","unit_value_cents","goods_cents","ipi_cents","icms_cents","units_per_unit"],"type":"object"},"Suppression":{"description":"An address the store does not message.","properties":{"address":{"description":"The e-mail, or the phone digits with country code.","type":"string"},"channel":{"description":"`email` or `whatsapp`.","type":"string"},"created_at":{"format":"date-time","type":"string"},"reason":{"description":"E-mail: `bounce`, `complaint`, `unsubscribe`, `manual`. Phone: `keyword`, `meta_opt_out`, `preferences`, `erase`, `manual`.","type":"string"},"removable":{"description":"A team block, which the team can lift (opt-outs are the person's to undo).","type":"boolean"},"scope":{"description":"`marketing` (offers and surveys stop, orders go on) or `all`.","type":"string"},"source":{"type":["string","null"]}},"required":["channel","address","scope","reason","created_at","removable"],"type":"object"},"SuppressionChange":{"properties":{"address":{"type":"string"},"channel":{"$ref":"#/components/schemas/Channel","description":"`email` or `whatsapp`."}},"required":["channel","address"],"type":"object"},"SyncConnection":{"description":"A destination the store's records are mirrored to.","properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`postgres`, `google_sheets` or `bigquery`.","type":"string"},"last_error":{"type":["string","null"]},"name":{"type":"string"},"settings":{"description":"Non-secret settings: `schema` (Postgres); `spreadsheet_id`,\n`spreadsheet_url`, `account_email` (Google Sheets); `project_id`,\n`dataset_id` (BigQuery).","type":"object"},"status":{"description":"`active`, `paused` or `error`.","type":"string"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","store_id","kind","name","settings","status","created_at","updated_at"],"type":"object"},"SyncConnectionDetail":{"allOf":[{"$ref":"#/components/schemas/SyncConnection"},{"properties":{"streams":{"items":{"$ref":"#/components/schemas/SyncStream"},"type":"array"}},"required":["streams"],"type":"object"}],"description":"A connection with its streams."},"SyncOrdersRequest":{"properties":{"days":{"description":"How many days back to look. Defaults to 7, at most 30.","format":"int64","type":["integer","null"]}},"type":"object"},"SyncOrdersResult":{"properties":{"failed":{"description":"Orders that could not be brought in this time (try again).","minimum":0,"type":"integer"},"released":{"description":"Held-back orders that became orders now.","minimum":0,"type":"integer"},"seen":{"description":"Orders the marketplace listed for the period.","minimum":0,"type":"integer"}},"required":["seen","released","failed"],"type":"object"},"SyncReport":{"description":"What a read of one store's statement found.","properties":{"charged":{"description":"Of those, the ones made into a charge on the spot (a known payer with an invoice wording).","minimum":0,"type":"integer"},"new_credits":{"description":"Credits not seen before.","minimum":0,"type":"integer"},"seen":{"description":"Credits on the statement in the window.","minimum":0,"type":"integer"}},"required":["seen","new_credits","charged"],"type":"object"},"SyncResult":{"properties":{"accounts":{"format":"int64","type":"integer"},"errors":{"items":{"type":"string"},"type":"array"},"failed":{"format":"int64","type":"integer"},"rows":{"format":"int64","type":"integer"}},"required":["accounts","rows","failed","errors"],"type":"object"},"SyncRunView":{"properties":{"account_id":{"format":"uuid","type":["string","null"]},"error":{"type":["string","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"provider":{"type":"string"},"rows":{"format":"int64","type":"integer"},"started_at":{"format":"date-time","type":"string"},"status":{"type":"string"}},"required":["id","provider","status","rows","started_at"],"type":"object"},"SyncStream":{"description":"One record type mirrored through a connection.","properties":{"backfilled_at":{"format":"date-time","type":["string","null"]},"backfilling":{"description":"The existing records are still being copied.","type":"boolean"},"connection_id":{"format":"uuid","type":"string"},"direction":{"description":"`push`.","type":"string"},"enabled":{"type":"boolean"},"entity":{"description":"Record type key (`order`, `product`, `stock_item`...).","type":"string"},"id":{"format":"uuid","type":"string"},"last_error":{"type":["string","null"]},"last_error_at":{"format":"date-time","type":["string","null"]},"last_synced_at":{"format":"date-time","type":["string","null"]},"store_id":{"format":"uuid","type":"string"},"synced_count":{"description":"Records written so far (backfill and changes).","format":"int64","type":"integer"},"target":{"description":"Table at the destination; empty means `mobiari_<entity>`.","type":"string"}},"required":["id","connection_id","store_id","entity","direction","target","enabled","backfilling","synced_count"],"type":"object"},"TargetStatus":{"description":"How one account's publication is going.","enum":["pending","processing","published","failed"],"type":"string"},"Task":{"description":"A task, with the names the list shows.","properties":{"assignee_name":{"type":["string","null"]},"assignee_user_id":{"format":"uuid","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"},"created_by":{"format":"uuid","type":["string","null"]},"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"},"TaskCreateRequest":{"description":"A new task.","properties":{"assignee_user_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"},"TaskUpdateRequest":{"description":"Changes to a task; a missing field stays, `null` clears it.","properties":{"assignee_user_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"},"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"}]},"TaxRegime":{"description":"`CRT`.","enum":["simples_nacional","simples_excesso_sublimite","regime_normal","mei"],"type":"string"},"Taxonomy":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"name_translations":{"type":"object"},"slug":{"type":"string"}},"required":["id","name","name_translations","slug"],"type":"object"},"TaxonomyCategory":{"description":"A marketplace category.","properties":{"label":{"description":"The full path, levels separated by ` › `.","type":"string"},"value":{"description":"The provider's category id (numeric for Google).","type":"string"}},"required":["value","label"],"type":"object"},"TaxonomyTerm":{"properties":{"external_values":{"type":"object"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"name_translations":{"type":"object"},"parent_id":{"format":"uuid","type":["string","null"]},"slug":{"type":"string"},"sort_order":{"format":"int32","type":"integer"},"taxonomy_id":{"format":"uuid","type":"string"}},"required":["id","taxonomy_id","name","name_translations","slug","sort_order","external_values"],"type":"object"},"TaxonomyWithTerms":{"allOf":[{"$ref":"#/components/schemas/Taxonomy"},{"properties":{"terms":{"items":{"$ref":"#/components/schemas/TaxonomyTerm"},"type":"array"}},"required":["terms"],"type":"object"}]},"TemplateContact":{"description":"Who a generated document would naturally go to for signature.","properties":{"email":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]}},"required":["name"],"type":"object"},"TemplateField":{"description":"A field a template can use.","properties":{"group":{"description":"`loja`, `hoje`, or the record's group.","type":"string"},"key":{"description":"What goes between braces: `{{fornecedor.razao_social}}`.","type":"string"},"label":{"type":"string"}},"required":["key","label","group"],"type":"object"},"TemplateFillInput":{"properties":{"allow_missing":{"description":"Generate even with fields left empty (they show as `[campo]`).","type":"boolean"},"also_link":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DocumentLinkRef","description":"Also link the new document to this record (generating a template\nwith no record type from a record's page)."}]},"body":{"description":"Preview an unsaved body instead of the saved one.","type":["object","null"]},"entity_id":{"description":"The record to fill from (of the template's type).","format":"uuid","type":["string","null"]},"title":{"description":"The new document's title (generate); defaults to the template's\nname and the record.","type":["string","null"]},"values":{"additionalProperties":{"type":"string"},"description":"Free fields: `{\"livre.prazo\": \"30 dias\"}`.","propertyNames":{"type":"string"},"type":"object"}},"type":"object"},"TemplateGenerated":{"properties":{"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TemplateContact","description":"The record's contact, to prefill the signature request."}]},"document":{"$ref":"#/components/schemas/DocumentDetail"}},"required":["document"],"type":"object"},"Tenant":{"description":"An organization: owns stores, sets their defaults and holds billing and\nlegal details.","properties":{"contact_email":{"type":["string","null"]},"contact_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"default_currency":{"description":"`BRL` or `USD`; new stores start with it.","example":"BRL","type":"string"},"default_locale":{"description":"`pt-BR` or `en-US`.","example":"pt-BR","type":"string"},"feature_flags":{"description":"Feature switches, `{ \"flag.name\": true }`.","type":"object"},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"legal_name":{"type":["string","null"]},"name":{"type":"string"},"owner_id":{"format":"uuid","type":"string"},"require_mfa":{"description":"Everyone who works in the organization must have a second factor\n(authenticator app, WhatsApp code or passkey) to use the admin.","type":"boolean"},"slug":{"type":"string"},"tax_id":{"description":"CNPJ/CPF or other tax id.","type":["string","null"]},"timezone":{"description":"IANA time zone, e.g. `America/Sao_Paulo`.","type":"string"}},"required":["id","owner_id","name","slug","is_active","default_currency","default_locale","timezone","feature_flags","require_mfa","created_at"],"type":"object"},"TestAiActionRequest":{"properties":{"input":{"description":"The parameters, as the AI would send them.","type":"object"}},"type":"object"},"TestEmailTemplateRequest":{"properties":{"to":{"description":"Inbox to send the test to.","type":"string"}},"required":["to"],"type":"object"},"TestSample":{"description":"Something real the draft can be tested with.","properties":{"at":{"format":"date-time","type":["string","null"]},"detail":{"description":"A status or similar value, raw (the editor names it).","type":["string","null"]},"id":{"description":"Record or event id; pass it back to start the test.","type":"string"},"label":{"description":"The record's name (`#1042`, a product title) or the event's customer.","type":"string"}},"required":["id","label"],"type":"object"},"TestSamples":{"properties":{"kind":{"description":"`record`, `event` or `none` (manual, schedule and webhook triggers\ntest with the trigger's sample data).","type":"string"},"samples":{"items":{"$ref":"#/components/schemas/TestSample"},"type":"array"},"source":{"description":"The record type or event name the samples are of.","type":["string","null"]}},"required":["kind","samples"],"type":"object"},"TestTransactionalEmailRequest":{"description":"Where `to` is set, the rendered template is sent there.","properties":{"blocks":{"type":["object","null"]},"design":{"type":["object","null"]},"html":{"type":["string","null"]},"mode":{"$ref":"#/components/schemas/TransactionalEmailMode"},"preview_text":{"type":["string","null"]},"subject":{"type":"string"},"to":{"description":"Inbox to send the test to.","type":"string"}},"required":["to","subject","mode"],"type":"object"},"TestWorkflowNodeRequest":{"description":"A step to try, and the data to try it with.","properties":{"customer_id":{"description":"Customer of the store to run it for.","format":"uuid","type":["string","null"]},"input_only":{"description":"Only what the step would read (`available`) and its filled-in\nconfig; the step does not run (the editor's data panel and previews).","type":"boolean"},"node":{"$ref":"#/components/schemas/WorkflowNode"},"run_id":{"description":"Take trigger payload and context from this run of the workflow\n(defaults to its latest run).","format":"uuid","type":["string","null"]},"trigger_payload":{"description":"Or provide the trigger payload directly (e.g. the trigger's sample).","type":["object","null"]}},"required":["node"],"type":"object"},"ThemeGalleryMetadata":{"description":"Discovery information shipped alongside the theme's compositions.","properties":{"author":{"type":"string"},"category":{"type":"string"},"style":{"type":"string"},"translations":{"additionalProperties":{"$ref":"#/components/schemas/ThemeTranslation"},"propertyNames":{"type":"string"},"type":"object"},"version":{"type":"string"}},"required":["version","category","style","author","translations"],"type":"object"},"ThemeImportForm":{"description":"The multipart form of a theme zip import.","properties":{"file":{"description":"The `.zip` file (theme files at any nesting depth, up to 20 MiB).","format":"binary","type":"string"},"message":{"description":"What this import is (500 characters at most).","type":["string","null"]}},"required":["file"],"type":"object"},"ThemePageLink":{"properties":{"slug":{"type":"string"},"title":{"type":"string"}},"required":["title","slug"],"type":"object"},"ThemeTranslation":{"properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"ThirdPartyStockBalance":{"description":"Goods the store holds but does not own (received in consignment, for\nrepair or for demonstration): what is still here per owner and item.\nNever part of the store's stock, so nothing sells them.","properties":{"item_id":{"description":"The stock item it is, when the note's line was matched to one.","format":"uuid","type":["string","null"]},"last_moved_at":{"format":"date-time","type":"string"},"name":{"description":"The item's name, else the line as the note named it.","type":"string"},"operation":{"description":"`consignment`, `repair` or `demonstration`.","type":"string"},"owner_name":{"type":["string","null"]},"owner_tax_id":{"type":["string","null"]},"quantity":{"format":"double","type":"number"},"sku":{"type":["string","null"]},"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_invoice_ids":{"description":"The supplier invoices that brought them.","items":{"format":"uuid","type":"string"},"type":"array"},"unit":{"description":"The note's unit, for a line not matched to an item (else base units).","type":["string","null"]},"value_cents":{"description":"The notes' value for these goods (not a cost: they are not the store's).","format":"int64","type":"integer"},"variant_id":{"format":"uuid","type":["string","null"]}},"required":["operation","name","quantity","value_cents","supplier_invoice_ids","last_moved_at"],"type":"object"},"Thresholds":{"description":"Days before a divergence is a finding, per store\n(`goods_reconciliation_settings`; a store without a row has these\ndefaults).","properties":{"consignment_days":{"description":"Goods received in consignment held this long (180).","format":"int32","type":"integer"},"demonstration_days":{"description":"Goods received for demonstration held this long (60).","format":"int32","type":"integer"},"goods_without_note_days":{"description":"A shipment gone this long with no authorized note (2).","format":"int32","type":"integer"},"inbound_pending_days":{"description":"A supplier's note still pending this long after it arrived (3).","format":"int32","type":"integer"},"note_without_stock_days":{"description":"An authorized note whose goods have not moved after this long (5).","format":"int32","type":"integer"},"repair_days":{"description":"Goods received for repair held this long (180).","format":"int32","type":"integer"}},"required":["goods_without_note_days","note_without_stock_days","inbound_pending_days","demonstration_days","repair_days","consignment_days"],"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"},"TicketField":{"description":"A field the workspace fills in on its tickets.","properties":{"key":{"description":"Letters, digits and `_`, unique in the workspace.","type":"string"},"kind":{"description":"`text`, `number`, `select`, `date` (YYYY-MM-DD) or `checkbox`.","type":"string"},"label":{"type":"string"},"options":{"description":"The choices of a `select`.","items":{"type":"string"},"type":"array"}},"required":["key","label","kind","options"],"type":"object"},"TicketMode":{"description":"When a workspace opens tickets.","enum":["off","manual","all"],"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"},"TicketSettings":{"description":"A workspace's tickets: when they open and how soon a first reply is due.","properties":{"high_hours":{"description":"Hours to the first reply on a high-priority ticket.","format":"int32","type":"integer"},"low_days":{"description":"Business days to the first reply on a low-priority ticket.","format":"int32","type":"integer"},"mode":{"$ref":"#/components/schemas/TicketMode"},"normal_days":{"description":"Business days to the first reply on a normal ticket.","format":"int32","type":"integer"},"urgent_hours":{"description":"Hours to the first reply on an urgent ticket.","format":"int32","type":"integer"}},"required":["mode","urgent_hours","high_hours","normal_days","low_days"],"type":"object"},"TicketSla":{"description":"Where a ticket stands against its reply deadline.","enum":["none","on_track","at_risk","breached"],"type":"string"},"TicketSummary":{"description":"The desk's numbers.","properties":{"average_rating":{"description":"Average rating, last 30 days.","format":"double","type":["number","null"]},"breached":{"format":"int64","type":"integer"},"first_reply_on_time":{"description":"Share of first replies within the deadline, 0 to 1, last 30 days.","format":"double","type":["number","null"]},"median_first_reply_minutes":{"description":"Median minutes to the first reply, last 30 days.","format":"double","type":["number","null"]},"mine":{"format":"int64","type":"integer"},"open":{"description":"Open tickets per view, right now.","format":"int64","type":"integer"},"opened_30d":{"description":"Tickets opened in the last 30 days.","format":"int64","type":"integer"},"ratings_30d":{"format":"int64","type":"integer"},"total":{"description":"Tickets ever opened in the workspace.","format":"int64","type":"integer"},"unassigned":{"format":"int64","type":"integer"},"waiting_customer":{"format":"int64","type":"integer"},"waiting_us":{"format":"int64","type":"integer"}},"required":["open","waiting_us","breached","mine","unassigned","waiting_customer","opened_30d","total","ratings_30d"],"type":"object"},"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"},"TierCount":{"description":"How many customers a tier holds.","properties":{"customers":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["name","customers"],"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"},"TimelineEvent":{"description":"One thing that happened to a customer, in any module.","properties":{"at":{"format":"date-time","type":"string"},"detail":{"description":"More of the record: the order's items, the tracking code, the order\nnumber of an NF-e, the conversation status.","type":["string","null"]},"kind":{"description":"Module-specific event kind, e.g. `order_paid`, `email_open`, `visit`,\n`cart_abandoned`, `note_call`.","type":"string"},"meta":{"description":"Ids and figures for linking to the source record (`order_id`,\n`conversation_id`, `product_id`, `cart_id`, `email_message_id`, ...).","type":["object","null"]},"module":{"description":"`order`, `shipment`, `invoice`, `conversation`, `email`, `storefront`,\n`product_view`, `cart`, `review`, `form`, `subscription`, `note`,\n`consent`, `journey`, `signal` (stage changes, birthdays, reorder\ndates), `nps` or `call`.","type":"string"},"title":{"description":"The record's own words, not a sentence: the order number (orders,\nshipments), the NF-e number, the product, the message preview, the\ne-mail subject, the note title, the visit's source. Clients phrase the\nevent from `kind` and `meta` in their language.","type":["string","null"]}},"required":["module","kind","at"],"type":"object"},"TimelineJob":{"properties":{"completed_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"quantity":{"format":"int32","type":"integer"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`queued`, `in_progress` or `ready` (built). Cancelled jobs are left out.","type":"string"},"target_ready_at":{"format":"date-time","type":["string","null"]}},"required":["id","quantity","status"],"type":"object"},"TimelineLine":{"properties":{"current":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StageKey","description":"The first stage not done; null once delivered."}]},"delivered":{"format":"int32","type":"integer"},"jobs":{"items":{"$ref":"#/components/schemas/TimelineJob"},"type":"array"},"order_item_id":{"format":"uuid","type":"string"},"owed":{"description":"Units still to go out.","format":"int32","type":"integer"},"parts":{"items":{"$ref":"#/components/schemas/TimelinePart"},"type":"array"},"quantity":{"format":"int32","type":"integer"},"shipped":{"description":"Units gone out (all of them once the order is marked fulfilled).","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"stages":{"items":{"$ref":"#/components/schemas/TimelineStage"},"type":"array"},"stock_available":{"description":"Free units of this product in stock right now.","format":"int32","type":"integer"},"stock_can_cover":{"description":"Queued units that free stock could cover instead of being built:\nwhat `useStockForOrderItem` would take. For a product built from\nparts this is its finished units on the shelf, not its parts.","format":"int32","type":"integer"},"title":{"type":"string"},"to_build":{"description":"Units made to order (jobs not cancelled); the rest come from stock.","format":"int32","type":"integer"},"variant_id":{"format":"uuid","type":"string"}},"required":["order_item_id","variant_id","title","quantity","shipped","delivered","owed","to_build","stock_available","stock_can_cover","jobs","parts","stages"],"type":"object"},"TimelinePart":{"description":"A part the line's queued builds need.","properties":{"available":{"description":"Free units in stock this line can count on, after older orders'\nqueued builds and this order's earlier lines have taken theirs.","format":"int32","type":"integer"},"incoming":{"description":"Units of open purchase orders set aside for this line's missing\nones, soonest first, after older orders and earlier lines.","items":{"$ref":"#/components/schemas/IncomingPurchase"},"type":"array"},"missing":{"description":"`required - reserved - available`, floored at zero.","format":"int32","type":"integer"},"name":{"type":"string"},"required":{"description":"Units the queued builds of this line need.","format":"int32","type":"integer"},"reserved":{"description":"Units already held for this line.","format":"int32","type":"integer"},"sku":{"type":["string","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id","name","required","reserved","available","missing","incoming"],"type":"object"},"TimelineStage":{"properties":{"at":{"description":"When it happened, for done stages that know.","format":"date-time","type":["string","null"]},"done_quantity":{"description":"Units through this stage so far, for stages that can be partial\n(production, shipped, delivered).","format":"int32","type":["integer","null"]},"expected_at":{"description":"When it is expected: the promised build date, or the date purchase\norders bring the missing parts.","format":"date-time","type":["string","null"]},"key":{"$ref":"#/components/schemas/StageKey"},"late":{"description":"Expected date already past and the stage not done.","type":"boolean"},"state":{"$ref":"#/components/schemas/StageState"}},"required":["key","state","late"],"type":"object"},"TinyAuthorizeUrl":{"properties":{"authorize_url":{"description":"Send the merchant here to authorize; Tiny redirects back to the\nprovider's `oauth_redirect_uri` with a `code`.","type":"string"}},"required":["authorize_url"],"type":"object"},"TinyLinkItem":{"description":"One variant in the Tiny link report.","properties":{"fulfillment_mode":{"type":"string"},"is_active":{"type":"boolean"},"linked":{"type":"boolean"},"product_id":{"format":"uuid","type":"string"},"product_status":{"type":["string","null"]},"product_title":{"type":"string"},"sku":{"type":"string"},"stock_mobi":{"description":"Units on hand in Mobiari over every location.","format":"int64","type":"integer"},"tiny_product_id":{"description":"Stamped by a sync once the SKU matched a Tiny product.","type":["string","null"]}},"required":["product_id","product_title","sku","linked","fulfillment_mode","is_active","stock_mobi"],"type":"object"},"TinyLinkReport":{"description":"Every variant of the store with its Tiny link.","properties":{"items":{"description":"Unlinked variants first, then by product and SKU.","items":{"$ref":"#/components/schemas/TinyLinkItem"},"type":"array"},"linked":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"},"unlinked":{"minimum":0,"type":"integer"}},"required":["total","linked","unlinked","items"],"type":"object"},"TinyOauthResult":{"properties":{"connected":{"type":"boolean"},"has_access_token":{"type":"boolean"},"has_refresh_token":{"type":"boolean"},"token_expires_at":{"type":["string","null"]}},"required":["connected","has_access_token","has_refresh_token"],"type":"object"},"TinyOauthTokenRequest":{"properties":{"code":{"description":"The `code` Tiny's redirect carried.","type":"string"},"redirect_uri":{"description":"Defaults to the provider's `oauth_redirect_uri`.","type":["string","null"]}},"required":["code"],"type":"object"},"TokenType":{"description":"How to present the access token.","enum":["Bearer"],"type":"string"},"TopCustomer":{"properties":{"customer_id":{"format":"uuid","type":"string"},"email":{"type":["string","null"]},"last_order_at":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"net_cents":{"format":"int64","type":"integer"},"orders":{"format":"int64","type":"integer"}},"required":["customer_id","orders","net_cents","last_order_at"],"type":"object"},"TopEvent":{"description":"A tracked event name and how often it fired.","properties":{"count":{"format":"int64","type":"integer"},"event_name":{"type":"string"},"unique_visitors":{"format":"int64","type":"integer"}},"required":["event_name","count","unique_visitors"],"type":"object"},"TopPage":{"description":"A page and how often it was viewed.","properties":{"page_title":{"description":"The most recent title seen for the URL.","type":["string","null"]},"page_url":{"type":["string","null"]},"unique_visitors":{"format":"int64","type":"integer"},"views":{"format":"int64","type":"integer"}},"required":["views","unique_visitors"],"type":"object"},"TopReferrer":{"description":"A referring site and the traffic it sent.","properties":{"referrer_host":{"description":"Host of the referrer (`google.com`), without scheme or path.","type":["string","null"]},"unique_visitors":{"format":"int64","type":"integer"},"views":{"format":"int64","type":"integer"}},"required":["views","unique_visitors"],"type":"object"},"TotpSetupResponse":{"properties":{"qr_code_url":{"description":"`otpauth://` URL; render it as a QR code.","type":"string"},"secret":{"description":"Base32 secret, for typing into the authenticator app.","type":"string"}},"required":["secret","qr_code_url"],"type":"object"},"TrackedEvent":{"description":"One event the storefront tracker recorded.","properties":{"cart_id":{"format":"uuid","type":["string","null"]},"customer_id":{"description":"The customer, once the visitor was identified.","format":"uuid","type":["string","null"]},"event_name":{"description":"`pageview`, `identify`, or a custom name the theme sends\n(`add_to_cart`, `begin_checkout`...).","type":"string"},"fbclid":{"description":"Meta click id.","type":["string","null"]},"gclid":{"description":"Google Ads click id.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"occurred_at":{"format":"date-time","type":"string"},"page_title":{"type":["string","null"]},"page_url":{"type":["string","null"]},"properties":{"description":"Free-form properties sent with the event.","type":"object"},"referrer":{"type":["string","null"]},"session_id":{"format":"uuid","type":"string"},"utm_campaign":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_source":{"type":["string","null"]},"visitor_id":{"format":"uuid","type":"string"}},"required":["id","visitor_id","session_id","event_name","properties","occurred_at"],"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"},"TransactionalEmailDetail":{"description":"A transactional e-mail with what the editor needs around it.","properties":{"blocks_catalog":{"description":"Block types the transactional editor offers.","type":"object"},"default_blocks":{"type":"object"},"default_design":{"type":"object"},"default_subject":{"description":"What \"reset\" would restore.","type":"string"},"description":{"type":"string"},"event":{"type":"string"},"label":{"type":"string"},"template":{"$ref":"#/components/schemas/TransactionalEmailTemplate"},"trigger":{"type":"string"},"variables":{"items":{"$ref":"#/components/schemas/TransactionalEmailVariable"},"type":"array"}},"required":["event","label","description","trigger","template","default_subject","default_blocks","default_design","blocks_catalog","variables"],"type":"object"},"TransactionalEmailMode":{"description":"How a transactional e-mail's body is written.","enum":["blocks","html"],"type":"string"},"TransactionalEmailSummary":{"description":"One transactional e-mail as the store sends it today.","properties":{"description":{"type":"string"},"event":{"description":"Event that sends it, e.g. `order.paid`.","type":"string"},"is_customized":{"description":"The store changed it (false: the shipped default).","type":"boolean"},"is_enabled":{"description":"Disabled e-mails are not sent.","type":"boolean"},"label":{"type":"string"},"subject":{"type":"string"},"trigger":{"description":"When it goes out, in words.","type":"string"}},"required":["event","label","description","trigger","subject","is_customized","is_enabled"],"type":"object"},"TransactionalEmailTemplate":{"description":"The effective template: the store's version, or the shipped default.","properties":{"blocks":{"description":"Friendly-mode fields (legacy form of `design`).","type":"object"},"design":{"description":"Block document, the same format marketing templates use.","type":"object"},"event":{"type":"string"},"html":{"description":"Body in `html` mode.","type":["string","null"]},"is_customized":{"description":"False when this is the shipped default rather than a stored version.","type":"boolean"},"is_enabled":{"type":"boolean"},"mode":{"$ref":"#/components/schemas/TransactionalEmailMode"},"preview_text":{"type":["string","null"]},"subject":{"type":"string"}},"required":["event","subject","mode","blocks","design","is_enabled","is_customized"],"type":"object"},"TransactionalEmailVariable":{"description":"A merge variable the editor offers for an event.","properties":{"label":{"type":"string"},"sample":{"description":"What it renders to in previews.","type":"string"},"token":{"description":"What to type, e.g. `{{order.number}}`.","type":"string"}},"required":["token","label","sample"],"type":"object"},"TransferOwnershipRequest":{"properties":{"user_id":{"description":"The member who becomes the store owner.","format":"uuid","type":"string"}},"required":["user_id"],"type":"object"},"TransferRoute":{"description":"How goods move between two locations.","properties":{"needs_note":{"description":"The locations belong to different issuers (CNPJs): the move is a\ntransfer goods note, not an instant transfer.","type":"boolean"}},"required":["needs_note"],"type":"object"},"TrialEligibility":{"description":"Whether the caller would get a free trial on a new organization.","properties":{"eligible":{"description":"False when the account already had a trial on another organization:\na new one starts paying at once (first invoice due on creation).","type":"boolean"},"trial_days":{"description":"Days of the trial when eligible.","format":"int64","type":"integer"}},"required":["eligible","trial_days"],"type":"object"},"TwoFactorChallenge":{"description":"The password was right; finish signing in with a second factor.","properties":{"challenge":{"description":"Pass to the verify endpoint of one of `methods`.","type":"string"},"expires_in":{"description":"Seconds the challenge stays valid.","example":300,"format":"int64","type":"integer"},"methods":{"description":"Second factors enabled on the account. More may be added; ignore\nunknown values.","items":{"$ref":"#/components/schemas/TwoFactorMethod"},"type":"array"}},"required":["challenge","methods","expires_in"],"type":"object"},"TwoFactorMethod":{"description":"A second factor the account accepts.","enum":["totp","whatsapp"],"type":"string"},"UnlinkedProductValue":{"description":"A product value a merge left unlinked: its option already has a value\nthat is (or reads as) the survivor. Merge the two in the product.","properties":{"option_value_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"value":{"type":"string"}},"required":["option_value_id","product_id","value"],"type":"object"},"UnreportedGroup":{"description":"Unreported sales of one platform and cause.","properties":{"answer":{"description":"The newest platform answer of the group, trimmed.","type":["string","null"]},"count":{"format":"int64","type":"integer"},"platform":{"description":"`meta`, `google`, `tiktok` or `ga4`.","type":"string"},"reason":{"description":"`token_expired`, `permission_missing`, `dataset_not_found`,\n`rejected`, `too_old`, `retries_exhausted`, `messaging_unavailable`.","type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["platform","reason","count","total_cents"],"type":"object"},"UnreportedSale":{"description":"One unreported sale.","properties":{"answer":{"description":"The platform's last answer, trimmed, without tokens or URLs.","type":["string","null"]},"currency":{"type":["string","null"]},"destination":{"description":"`pixel` or `messaging` for Meta; the platform otherwise.","type":"string"},"http_status":{"format":"int32","type":["integer","null"]},"number":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"paid_at":{"format":"date-time","type":"string"},"platform":{"type":"string"},"reason":{"type":"string"},"total_cents":{"format":"int64","type":"integer"},"unreported_at":{"format":"date-time","type":["string","null"]}},"required":["order_id","platform","destination","reason","total_cents","paid_at"],"type":"object"},"UnreportedSales":{"description":"The store's sales that did not reach an ad platform.","properties":{"count":{"description":"Orders with at least one platform unreported.","format":"int64","type":"integer"},"groups":{"description":"By platform and cause.","items":{"$ref":"#/components/schemas/UnreportedGroup"},"type":"array"},"sales":{"description":"The newest 200, one row per order and platform.","items":{"$ref":"#/components/schemas/UnreportedSale"},"type":"array"},"total_cents":{"format":"int64","type":"integer"}},"required":["count","total_cents","groups","sales"],"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"},"UpdateAdRequest":{"description":"Changes to an ad; omitted fields stay.","properties":{"account_id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]},"status":{"description":"`active` or `paused`.","type":["string","null"]}},"required":["account_id"],"type":"object"},"UpdateAdSetRequest":{"description":"Changes to an ad set; omitted fields stay.","properties":{"account_id":{"description":"The ad account it belongs to (`AdAccount.id`).","format":"uuid","type":"string"},"audience":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AudienceEdit","description":"New audience facets; the ones left out stay."}]},"clear_end":{"description":"Remove the end date: it runs until stopped.","type":"boolean"},"daily_budget_cents":{"description":"New daily budget, in cents.","format":"int64","type":["integer","null"]},"ends_at":{"description":"New end. At most one year from now.","format":"date-time","type":["string","null"]},"name":{"type":["string","null"]},"status":{"description":"`active` or `paused`.","type":["string","null"]}},"required":["account_id"],"type":"object"},"UpdateApiTokenRequest":{"properties":{"mcp_approval":{"$ref":"#/components/schemas/McpApproval","description":"Which writes an MCP client using this key may make without a\nperson approving them in the app."}},"required":["mcp_approval"],"type":"object"},"UpdateAssistantPreferencesRequest":{"properties":{"system_prompt_extra":{"description":"Null or absent clears it.","type":["string","null"]}},"type":"object"},"UpdateAttachmentRequest":{"properties":{"expires_at":{"description":"`null` clears the end; omit to keep it.","format":"date-time","type":["string","null"]},"reason":{"type":["string","null"]},"scope":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ScopeSpec","description":"A new scope; omit to keep it."}]}},"type":"object"},"UpdateCampaignRequest":{"description":"Changes to a campaign; omitted fields stay.","properties":{"account_id":{"description":"The ad account it belongs to (`AdAccount.id`).","format":"uuid","type":"string"},"daily_budget_cents":{"description":"New daily budget, in cents of the account's currency.","format":"int64","type":["integer","null"]},"status":{"description":"`active`, `paused` or `archived` (archiving takes it off the list for good).","type":["string","null"]}},"required":["account_id"],"type":"object"},"UpdateCollectionRequest":{"description":"Collection update request.","properties":{"is_archived":{"type":["boolean","null"]},"name":{"type":["string","null"]},"schema_json":{"description":"Replaces the whole schema when present.","type":["object","null"]}},"type":"object"},"UpdateCollectionResult":{"allOf":[{"$ref":"#/components/schemas/CmsCollection"},{"properties":{"nonconforming_documents":{"description":"Existing documents failing the new schema (unchanged by this call).","format":"int64","type":"integer"}},"required":["nonconforming_documents"],"type":"object"}]},"UpdateCommentRequest":{"description":"Changes to a comment.","properties":{"hidden":{"description":"Hide it from everyone but its author (or show it again).","type":["boolean","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CommentStatus","description":"Triage: `done` takes it off the open list."}]}},"type":"object"},"UpdateConversationRequest":{"description":"Fields to change; leave out what should stay.","properties":{"assignee_user_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"]},"bot_active":{"description":"False stops the bot (and hands the conversation over to the team);\ntrue hands it back to the bot, as `POST .../handback` does.","type":["boolean","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"]},"lead_stage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LeadStage","description":"Move the lead along, or null when the contact is not a lead."}]},"origin":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationOrigin","description":"How the contact found the store, as the team tells it. Null drops a\nchoice made in the inbox; the origin is then read again from the\ncontact's storefront visits."}]},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConversationPriority"}]},"snoozed_until":{"description":"With `status` `snoozed`: when it wakes up. Must be in the future.","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 removes the assignee, the same as `assignee_user_id: null`.\nCannot be combined with a non-null `assignee_user_id`. False or\nabsent changes nothing.","type":["boolean","null"]}},"type":"object"},"UpdateCorreiosKeyRequest":{"description":"Fields to change; omitted ones keep their value. A new `api_key` is\nchecked again.","properties":{"api_key":{"type":["string","null"]},"contract_number":{"type":["string","null"]},"dr":{"format":"int32","type":["integer","null"]},"expires_on":{"format":"date","type":["string","null"]},"kind":{"type":["string","null"]},"label":{"type":["string","null"]},"posting_card":{"type":["string","null"]}},"type":"object"},"UpdateDocumentRequest":{"properties":{"data":{"description":"Replaces the whole `data` object.","type":["object","null"]},"is_active":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]},"publish_at":{"description":"`null` clears the schedule; omit to leave it.","format":"date-time","type":["string","null"]},"slug":{"description":"`null` clears the slug; omit to leave it.","type":["string","null"]},"unpublish_at":{"description":"`null` clears the end; omit to leave it.","format":"date-time","type":["string","null"]}},"type":"object"},"UpdateEmailBrandKitRequest":{"properties":{"kit":{"description":"The whole kit; unknown fields are dropped, missing ones take defaults.","type":"object"}},"required":["kit"],"type":"object"},"UpdateEmailBroadcastRequest":{"description":"Fields to change; absent ones stay. Only drafts and scheduled campaigns\ncan change. Setting `scheduled_at` schedules the campaign.","properties":{"ab_test":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmailAbTest"}]},"audience":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmailAudienceFilter"}]},"html_override":{"type":["string","null"]},"name":{"type":["string","null"]},"optimize_send_time":{"type":["boolean","null"]},"reply_to":{"type":["string","null"]},"scheduled_at":{"format":"date-time","type":["string","null"]},"subject_override":{"type":["string","null"]},"template_id":{"format":"uuid","type":["string","null"]},"text_override":{"type":["string","null"]}},"type":"object"},"UpdateEmailSettingsRequest":{"description":"Fields to change; absent ones stay. An empty string clears a text field.","properties":{"from_email":{"type":["string","null"]},"from_name":{"type":["string","null"]},"inbox_mode":{"$ref":"#/components/schemas/EmailInboxMode"},"provider":{"$ref":"#/components/schemas/EmailProvider"},"reply_to":{"type":["string","null"]},"resend_api_key":{"description":"Write-only. An empty string removes the stored key.","type":["string","null"]},"topics":{"description":"Replaces the whole list; blank entries are dropped.","items":{"type":"string"},"type":["array","null"]}},"type":"object"},"UpdateEmailTemplateRequest":{"description":"Fields to change; absent ones stay. A `design` recompiles `html`; an\n`html` without a `design` switches the template to raw HTML.","properties":{"design":{"type":["object","null"]},"html":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"name":{"type":["string","null"]},"preview_text":{"type":["string","null"]},"reply_to":{"type":["string","null"]},"subject":{"type":["string","null"]},"text_body":{"type":["string","null"]}},"type":"object"},"UpdateFeaturesRequest":{"properties":{"features":{"description":"The whole set: what is left out is off. Each feature's requirements\nmust be in it.","items":{"type":"string"},"type":"array"}},"required":["features"],"type":"object"},"UpdateGroupRequest":{"properties":{"color":{"type":["string","null"]},"description":{"description":"An empty string clears it.","type":["string","null"]},"name":{"type":["string","null"]}},"type":"object"},"UpdateImportConnection":{"properties":{"credentials":{"additionalProperties":{"type":"string"},"description":"Replaces the stored credentials.","propertyNames":{"type":"string"},"type":"object"}},"required":["credentials"],"type":"object"},"UpdateKbArticleRequest":{"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"]},"public":{"type":["boolean","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/KbArticleStatus"}]},"title":{"type":["string","null"]}},"type":"object"},"UpdateMarketingConfigRequest":{"description":"Changes to the tracking configuration. Only fields sent are written:\n`\"\"` clears a field, null or absent leaves it as is.","properties":{"ga4_api_secret":{"description":"Write-only.","type":["string","null"]},"ga4_measurement_id":{"type":["string","null"]},"google_ads_conversion_action_id":{"type":["string","null"]},"google_ads_conversion_id":{"type":["string","null"]},"google_ads_conversion_label":{"type":["string","null"]},"google_ads_customer_id":{"type":["string","null"]},"google_ads_developer_token":{"description":"Write-only.","type":["string","null"]},"google_ads_enhanced_conversions":{"description":"Turn enhanced conversions on or off.","type":["boolean","null"]},"google_ads_lead_action_id":{"description":"Conversion action for WhatsApp leads from the storefront button.","type":["string","null"]},"google_ads_login_customer_id":{"description":"Manager (MCC) account the API calls go through, when there is one.","type":["string","null"]},"google_ads_oauth_client_id":{"type":["string","null"]},"google_ads_oauth_client_secret":{"description":"Write-only.","type":["string","null"]},"google_ads_oauth_refresh_token":{"description":"Write-only.","type":["string","null"]},"gtm_container_id":{"description":"Google Tag Manager container (`GTM-…`).","type":["string","null"]},"meta_ad_account_id":{"type":["string","null"]},"meta_ads_access_token":{"description":"Write-only.","type":["string","null"]},"meta_capi_access_token":{"description":"Write-only.","type":["string","null"]},"meta_catalog_access_token":{"description":"Write-only.","type":["string","null"]},"meta_catalog_id":{"type":["string","null"]},"meta_pixel_id":{"type":["string","null"]},"meta_test_event_code":{"type":["string","null"]},"tiktok_access_token":{"description":"Write-only.","type":["string","null"]},"tiktok_pixel_code":{"type":["string","null"]},"tiktok_test_event_code":{"type":["string","null"]}},"type":"object"},"UpdateMeRequest":{"properties":{"full_name":{"description":"1 to 255 characters.","type":["string","null"]},"locale":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Locale","description":"Preferred language for the admin and alerts."}]},"phone":{"description":"Profile phone (WhatsApp), reused for 2FA setup and store alerts.\nFormatting is stripped; an empty string clears it. Omit to leave it\nunchanged.","type":["string","null"]}},"type":"object"},"UpdateMembershipRequest":{"properties":{"access_ceiling":{"description":"A new ceiling: what the brand may do here from now on.","items":{"type":"string"},"type":["array","null"]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MemberStatus","description":"`suspended` stops the brand's access until `active` again; the\nbrand is told by e-mail."}]}},"type":"object"},"UpdateNetworkRequest":{"properties":{"billed_to":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NetworkBilledTo","description":"Who pays Mobiari for the member stores, from now on."}]},"default_ceiling":{"description":"What new invites propose. Members keep what they accepted.","items":{"type":"string"},"type":["array","null"]},"name":{"type":["string","null"]}},"type":"object"},"UpdateNotificationChannelRequest":{"description":"Fields to change; absent ones stay. `config_json` replaces the whole\nconfig (masked secrets are kept).","properties":{"channel_type":{"$ref":"#/components/schemas/NotificationChannelType"},"config_json":{"type":["object","null"]},"enabled_events":{"items":{"type":"string"},"type":["array","null"]},"is_enabled":{"type":["boolean","null"]},"locale":{"type":["string","null"]},"name":{"type":["string","null"]}},"type":"object"},"UpdateNotificationPreferencesRequest":{"properties":{"kinds":{"description":"Kinds I cannot receive and channels a kind cannot use are ignored.","items":{"$ref":"#/components/schemas/NotificationKindUpdate"},"type":"array"}},"required":["kinds"],"type":"object"},"UpdateOnboardingState":{"properties":{"answers":{"description":"Merged into the saved answers; a key set to null is removed.","type":["object","null"]},"completed":{"description":"True marks the wizard finished; false reopens it.","type":["boolean","null"]},"dismissed":{"description":"True hides the dashboard guide; false shows it again (and clears a snooze).","type":["boolean","null"]},"snooze_days":{"description":"Hide the guide for this many days, 1 to 30; 0 clears the snooze.","format":"int32","type":["integer","null"]},"wizard_step":{"description":"The wizard screen to resume on (at most 40 characters).","type":["string","null"]}},"type":"object"},"UpdateOrderNotesRequest":{"description":"The order's notes for the team.","properties":{"notes":{"description":"Up to 5,000 characters; empty or null clears them, and leaving the\nfield out keeps them.","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"]}},"type":"object"},"UpdateOrderStatusRequest":{"properties":{"note":{"description":"Kept in the order's history with the change; not sent to the customer.","type":["string","null"]},"status":{"$ref":"#/components/schemas/OrderStatus"}},"required":["status"],"type":"object"},"UpdatePaymentProviderRequest":{"description":"Changes to a gateway. Omitted fields are kept.","properties":{"config_json":{"description":"Merged into the stored settings; masked secrets are ignored.","type":["object","null"]},"is_active":{"type":["boolean","null"]},"is_default":{"type":["boolean","null"]},"name":{"type":["string","null"]}},"type":"object"},"UpdatePolicyRequest":{"properties":{"cedar":{"type":["string","null"]},"codes":{"description":"New codes, rule or Cedar, validated like a new policy. The kind\ncannot change.","items":{"type":"string"},"type":["array","null"]},"color":{"type":["string","null"]},"description":{"type":["string","null"]},"explanation":{"type":["string","null"]},"name":{"type":["string","null"]},"rule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Rule"}]}},"type":"object"},"UpdatePostRequest":{"description":"Changes to a post; omitted fields stay.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/AccountRef"},"type":["array","null"]},"caption":{"type":["string","null"]},"clear_scheduled_at":{"description":"Remove `scheduled_at` (as soon as possible once scheduled).","type":"boolean"},"first_comment":{"description":"An empty string removes it.","type":["string","null"]},"format":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Format"}]},"media":{"items":{"$ref":"#/components/schemas/MediaRef"},"type":["array","null"]},"notes":{"description":"A note for the team; an empty string removes it.","type":["string","null"]},"scheduled_at":{"format":"date-time","type":["string","null"]}},"type":"object"},"UpdateProductImageRequest":{"description":"Fields to change; omitted fields keep their value.","properties":{"alt_text":{"type":["string","null"]},"extra_variant_ids":{"description":"When present, replaces the set of extra variants this image is\nshared with. An empty array clears them.","items":{"format":"uuid","type":"string"},"type":["array","null"]},"image_kind":{"description":"`gallery` or `measurement`.","type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_primary":{"type":["boolean","null"]},"position":{"format":"int32","type":["integer","null"]},"poster_url":{"type":["string","null"]},"product_variant_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"UpdatePublishedPostRequest":{"properties":{"caption":{"description":"New text for this Facebook copy only. An empty string clears it.","type":"string"}},"required":["caption"],"type":"object"},"UpdatePushPreferencesRequest":{"description":"Replace my push preferences for a store.","properties":{"enabled_events":{"description":"Alerts that should push. Ones I cannot receive are dropped.","items":{"$ref":"#/components/schemas/PushEvent"},"type":"array"},"is_enabled":{"description":"Defaults to true.","type":["boolean","null"]}},"required":["enabled_events"],"type":"object"},"UpdateRecurringOrder":{"description":"Changes to a subscription. Each field is optional.","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"},"UpdateSchedule":{"properties":{"enabled":{"type":["boolean","null"]},"frequency":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Frequency"}]},"lang":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Lang"}]},"recipients":{"items":{"type":"string"},"type":["array","null"]}},"type":"object"},"UpdateServiceAccountRequest":{"properties":{"description":{"description":"An empty string clears it.","type":["string","null"]},"disabled":{"description":"`true` switches the account off (its keys are refused at once),\n`false` switches it back on.","type":["boolean","null"]},"name":{"type":["string","null"]},"policy_ids":{"description":"Replaces the permission sets attached over this store.","items":{"format":"uuid","type":"string"},"type":["array","null"]}},"type":"object"},"UpdateShipmentRequest":{"description":"Changes to a shipment. Omitted (or null) fields keep their value.","properties":{"carrier_name":{"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_external_order_code":{"type":["string","null"]},"freight_payer":{"description":"`CIF` or `FOB`.","type":["string","null"]},"freight_provider_code":{"type":["string","null"]},"notes":{"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"},"UpdateStoreFulfillmentSettingsRequest":{"properties":{"abandoned_cart_builtin_message":{"type":["boolean","null"]},"abandoned_cart_delay_minutes":{"format":"int32","type":["integer","null"]},"abandoned_cart_recovery_enabled":{"type":["boolean","null"]},"cart_reservation_minutes":{"format":"int32","type":["integer","null"]},"dispatch_days":{"format":"int32","type":["integer","null"]},"installment_interest":{"description":"`none`, `monthly_rate` or `provider`.","type":["string","null"]},"installment_rate_bp":{"description":"0 to 1000 (basis points a month).","format":"int32","type":["integer","null"]},"interest_free_installments":{"description":"1 to 12.","format":"int32","type":["integer","null"]},"max_installments":{"format":"int32","type":["integer","null"]},"min_installment_cents":{"format":"int64","type":["integer","null"]},"price_rounding_cents":{"description":"0 (off), 100, 500 or 1000.","format":"int64","type":["integer","null"]},"review_request_delay_days":{"format":"int32","type":["integer","null"]},"review_request_enabled":{"type":["boolean","null"]},"saved_cards_enabled":{"type":["boolean","null"]},"scheduled_lead_days":{"description":"0 to 180.","format":"int32","type":["integer","null"]},"scheduled_orders_enabled":{"type":["boolean","null"]}},"type":"object"},"UpdateStoreRequest":{"properties":{"kind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StoreKind","description":"`store` or `service`. Turning a store into a service workspace hides\nits store modules and takes its storefront offline; nothing is\ndeleted, and turning it back restores both."}]},"name":{"description":"Display name, 1 to 255 characters.","type":["string","null"]},"slug":{"description":"The free address (`<slug>.<suffix>`) and storefront URLs: lower-case\nletters, digits and single hyphens, 3 to 48 characters. Only until the\nstore's first order.","type":["string","null"]}},"type":"object"},"UpdateStorefrontPageRequest":{"description":"Fields to change; absent (or null) fields keep their value.","properties":{"content":{"type":["string","null"]},"published":{"type":["boolean","null"]},"slug":{"type":["string","null"]},"template":{"type":["string","null"]},"title":{"type":["string","null"]}},"type":"object"},"UpdateSyncConnection":{"properties":{"credentials":{"description":"Replaces the credentials (tested first).","type":["object","null"]},"name":{"type":["string","null"]},"settings":{"type":["object","null"]},"status":{"description":"`active` or `paused`.","type":["string","null"]}},"type":"object"},"UpdateTenantRequest":{"properties":{"contact_email":{"description":"Empty clears it.","type":["string","null"]},"contact_phone":{"description":"Empty clears it.","type":["string","null"]},"default_currency":{"description":"`BRL` or `USD` (case-insensitive).","type":["string","null"]},"default_locale":{"description":"`pt-BR` or `en-US`.","type":["string","null"]},"feature_flags":{"description":"Replaces the flags: keys `[a-z0-9_.-]`, boolean values.","type":["object","null"]},"legal_name":{"description":"Who Mobiari bills, when not the company profile of the\norganization's first store (\"Dados da empresa\"). An empty string\nclears it, so billing follows the company profile again.","type":["string","null"]},"name":{"type":["string","null"]},"require_mfa":{"description":"Require every person in the organization to have a second factor.\nTurning it on needs one on the caller's own account first.","type":["boolean","null"]},"tax_id":{"description":"CPF or CNPJ billed; empty clears it, like `legal_name`.","type":["string","null"]},"timezone":{"type":["string","null"]}},"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"},"UpdateWebhookRequest":{"properties":{"is_active":{"type":["boolean","null"]},"secret":{"type":["string","null"]},"url":{"type":["string","null"]}},"type":"object"},"UpdateWorkflowRequest":{"description":"Fields to change; absent ones stay. `graph` and `trigger` change the\ndraft only; publish to make them fire.","properties":{"description":{"type":["string","null"]},"graph":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowGraph"}]},"name":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/WorkflowSettableStatus"},"trigger":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowTrigger"}]}},"type":"object"},"UploadedBrandAsset":{"description":"An uploaded brand asset.","properties":{"kind":{"$ref":"#/components/schemas/BrandAssetKind"},"name":{"description":"The uploaded file name.","type":"string"},"url":{"description":"Public URL to put in the brand system.","type":"string"}},"required":["url","name","kind"],"type":"object"},"UpsellProduct":{"description":"A product as the upsell settings show it.","properties":{"image_url":{"type":["string","null"]},"price_cents":{"description":"The cheapest active variant's price, in cents.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"slug":{"type":"string"},"status":{"description":"`active`, `draft` or `archived`; only active products show on the store.","type":"string"},"title":{"type":"string"}},"required":["product_id","title","slug","status"],"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"},"UpsertWorkflowSecretRequest":{"properties":{"name":{"description":"Letters, digits and underscores, not starting with a digit; stored\nupper-case.","type":"string"},"value":{"description":"1 to 8192 bytes. Write-only.","type":"string"}},"required":["name","value"],"type":"object"},"UseStockRequest":{"properties":{"quantity":{"description":"Units to take from stock. Omitted takes as many as the line's\n`stock_can_cover`.","format":"int32","minimum":1,"type":["integer","null"]}},"type":"object"},"User":{"description":"A person with a Mobiari account.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":"string"},"email_verified":{"description":"The e-mail address was confirmed through a link sent to it.","type":"boolean"},"full_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":"boolean"},"locale":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Locale","description":"Preferred language: `pt-BR` or `en-US`. Tolerate other values: older\naccounts may hold one."}]},"phone":{"description":"Profile phone (digits only), used for WhatsApp 2FA setup and store\nalerts.","type":["string","null"]},"totp_enabled":{"description":"An authenticator app is required at sign-in.","type":"boolean"},"whatsapp_2fa_enabled":{"description":"A WhatsApp code is accepted at sign-in.","type":"boolean"}},"required":["id","email","is_active","totp_enabled","whatsapp_2fa_enabled","created_at"],"type":"object"},"VariantBulkItem":{"description":"One variant's changes in a bulk edit. Omitted fields keep their value;\nfor the nullable ones an explicit `null` clears them.","properties":{"barcode":{"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"]},"id":{"format":"uuid","type":"string"},"is_active":{"type":["boolean","null"]},"price_cents":{"format":"int64","type":["integer","null"]},"sku":{"type":["string","null"]}},"required":["id"],"type":"object"},"VariantBulkUpdateRequest":{"description":"Changes to several variants of one product, applied together.","properties":{"variants":{"items":{"$ref":"#/components/schemas/VariantBulkItem"},"type":"array"}},"required":["variants"],"type":"object"},"VariantCreateRequest":{"description":"A new variant of the product in the path.","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"},"VariantDropship":{"properties":{"supplier_id":{"format":"uuid","type":["string","null"]},"supplier_name":{"type":["string","null"]},"variant_id":{"format":"uuid","type":"string"}},"required":["variant_id"],"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"},"VariantLookup":{"description":"The variant a code identifies, and its product.","properties":{"match_count":{"description":"How many variants of the store match the code the same way. Above 1\nthe barcode is shared; `variant` is the first active one.","format":"int64","type":"integer"},"matched_on":{"$ref":"#/components/schemas/LookupMatch"},"matches":{"description":"Every match, best first (active variants of active products\nfirst), at most 50; the first is `variant` / `product`. For\n`product_gtin`, one entry per matching product with its preferred\nvariant.","items":{"$ref":"#/components/schemas/VariantLookupMatch"},"type":"array"},"product":{"$ref":"#/components/schemas/ProductListItem"},"variant":{"$ref":"#/components/schemas/ProductVariantDetail"}},"required":["matched_on","match_count","variant","product","matches"],"type":"object"},"VariantLookupMatch":{"description":"One variant a code matches, with its product.","properties":{"product":{"$ref":"#/components/schemas/ProductListItem"},"variant":{"$ref":"#/components/schemas/ProductVariantDetail"}},"required":["variant","product"],"type":"object"},"VariantOptionAssignRequest":{"description":"An option value to give the variant. It must belong to one of the\nproduct's option groups.","properties":{"option_value_id":{"format":"uuid","type":"string"}},"required":["option_value_id"],"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"},"VariantOptionsSetRequest":{"description":"The full set of option values a variant carries.","properties":{"option_value_ids":{"description":"Exactly one value of each of the product's options.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["option_value_ids"],"type":"object"},"VariantReorderRequest":{"description":"The new order of a product's variants.","properties":{"variant_ids":{"description":"Every variant id of the product, in display order. Ids of other\nproducts are ignored.","items":{"format":"uuid","type":"string"},"type":"array"}},"required":["variant_ids"],"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"},"VariantUpdateRequest":{"description":"Fields to change. Omitted fields keep their value; for the nullable ones\nan explicit `null` clears them.","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"]},"fiscal_tax_class_id":{"description":"NF-e tax class overriding the product's; `null` removes the\noverride.","format":"uuid","type":["string","null"]},"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"]},"sku":{"type":["string","null"]},"title":{"type":["string","null"]}},"type":"object"},"VariantWithOptions":{"description":"A variant and the options it carries.","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"},"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"]},"fiscal_tax_class_id":{"description":"NF-e tax class overriding the product's, when this variant differs\n(e.g. another material, another NCM).","format":"uuid","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"},"sku":{"description":"Unique within the store, ignoring case.","type":"string"},"stock_quantity":{"description":"Units on hand over every location.","format":"int32","type":"integer"},"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","fulfillment_mode","is_active","position","stock_quantity","available_quantity","reserved_quantity","backorderable","uses_components","created_at","updated_at","options"],"type":"object"},"VerifyEmailRequest":{"properties":{"token":{"description":"From the link in the e-mail.","type":"string"}},"required":["token"],"type":"object"},"VerifyOtpRequest":{"properties":{"challenge":{"description":"`challenge` from `POST /auth/login`.","type":"string"},"code":{"description":"The 6-digit code received over WhatsApp.","example":"123456","type":"string"},"device_name":{"description":"See `LoginRequest.device_name`.","type":["string","null"]}},"required":["challenge","code"],"type":"object"},"VerifyTotpRequest":{"properties":{"challenge":{"description":"`challenge` from `POST /auth/login`.","type":"string"},"device_name":{"description":"See `LoginRequest.device_name`.","type":["string","null"]},"totp_code":{"description":"The 6-digit code from the authenticator app.","example":"123456","type":"string"}},"required":["challenge","totp_code"],"type":"object"},"VisitorDetail":{"description":"A visitor's identity, visits, events and attributed orders.","properties":{"customer_id":{"description":"The customer, once the visitor was identified.","format":"uuid","type":["string","null"]},"email":{"type":["string","null"]},"events":{"description":"The 200 most recent events, newest first.","items":{"$ref":"#/components/schemas/TrackedEvent"},"type":"array"},"first_name":{"type":["string","null"]},"first_seen":{"description":"Oldest of the events returned.","format":"date-time","type":["string","null"]},"last_name":{"type":["string","null"]},"last_seen":{"description":"Newest event.","format":"date-time","type":["string","null"]},"orders":{"description":"The 50 most recent attributed orders, newest first.","items":{"$ref":"#/components/schemas/VisitorOrder"},"type":"array"},"sessions":{"description":"The 200 most recent visits, newest first.","items":{"$ref":"#/components/schemas/VisitorSession"},"type":"array"},"visitor_id":{"format":"uuid","type":"string"}},"required":["visitor_id","sessions","events","orders"],"type":"object"},"VisitorOrder":{"description":"An order attributed to a visitor.","properties":{"created_at":{"format":"date-time","type":"string"},"last_campaign":{"type":["string","null"]},"last_channel":{"type":["string","null"]},"last_medium":{"type":["string","null"]},"last_source":{"type":["string","null"]},"order_id":{"format":"uuid","type":"string"},"order_number":{"type":["string","null"]},"status":{"description":"Order status (`pending`, `paid`, `fulfilled`, `cancelled`...).","type":"string"},"total_cents":{"format":"int64","type":"integer"}},"required":["order_id","status","total_cents","created_at"],"type":"object"},"VisitorPrices":{"description":"What a visitor who is not signed in sees.","enum":["show","sign_in_hint","hidden"],"type":"string"},"VisitorSession":{"description":"One visit (session) of a visitor.","properties":{"channel":{"type":["string","null"]},"landing_referrer":{"type":["string","null"]},"landing_url":{"type":["string","null"]},"last_event_at":{"format":"date-time","type":"string"},"medium":{"type":["string","null"]},"page_count":{"format":"int32","type":"integer"},"session_id":{"format":"uuid","type":"string"},"source":{"description":"Where the visit came from, as the attribution report reads it\n(see `AttributionRow`); null when direct.","type":["string","null"]},"started_at":{"format":"date-time","type":"string"},"user_agent":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_source":{"type":["string","null"]}},"required":["session_id","started_at","last_event_at","page_count"],"type":"object"},"VisitorSummary":{"description":"A visitor active in the window, with their activity and attributed orders.","properties":{"customer_id":{"description":"The customer, once the visitor was identified.","format":"uuid","type":["string","null"]},"email":{"type":["string","null"]},"events":{"format":"int64","type":"integer"},"first_name":{"type":["string","null"]},"first_seen":{"description":"First event in the window.","format":"date-time","type":"string"},"last_name":{"type":["string","null"]},"last_seen":{"description":"Last event in the window.","format":"date-time","type":"string"},"orders":{"description":"Paid or fulfilled orders attributed to the visitor in the window.","format":"int64","type":"integer"},"pageviews":{"format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"sessions":{"format":"int64","type":"integer"},"visitor_id":{"format":"uuid","type":"string"}},"required":["visitor_id","first_seen","last_seen","sessions","pageviews","events","orders","revenue_cents"],"type":"object"},"WaitlistEntry":{"description":"Someone waiting for a time.","properties":{"client_email":{"type":["string","null"]},"client_name":{"type":"string"},"client_phone":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"day":{"description":"The day wanted, in the provider's zone.","format":"date","type":"string"},"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"}},"required":["id","service_id","service_name","day","client_name","status","created_at"],"type":"object"},"WalletOverview":{"description":"The store's wallet settings and what Mobiari can issue.","properties":{"apple_available":{"description":"Mobiari can add passes to Apple Wallet.","type":"boolean"},"google_available":{"description":"Mobiari can add passes to Google Wallet.","type":"boolean"},"kinds_available":{"description":"The kinds of pass this server can render.","items":{"type":"string"},"type":"array"},"passes":{"description":"Passes handed out, not withdrawn.","format":"int64","type":"integer"},"passes_in_apple":{"description":"Of those, the ones in at least one Apple Wallet.","format":"int64","type":"integer"},"passes_in_google":{"description":"Of those, the ones in a Google Wallet.","format":"int64","type":"integer"},"passes_with_errors":{"description":"Passes whose last update a wallet refused (see `last_error` on each).","format":"int64","type":"integer"},"settings":{"$ref":"#/components/schemas/WalletSettings"}},"required":["settings","google_available","apple_available","kinds_available","passes","passes_in_google","passes_in_apple","passes_with_errors"],"type":"object"},"WalletPass":{"description":"A pass and the customer's link to it.","properties":{"apple_devices":{"description":"How many Apple devices hold it.","format":"int64","type":"integer"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"format":"uuid","type":["string","null"]},"id":{"format":"uuid","type":"string"},"in_google":{"type":"boolean"},"kind":{"description":"`loyalty`, `gift_card`, `booking`.","type":"string"},"last_error":{"description":"The last refusal from Google or Apple when sending it an update.","type":["string","null"]},"source_id":{"description":"The record the pass shows: the customer (loyalty), the credit account\n(gift card), the booking.","format":"uuid","type":"string"},"title":{"description":"What the card says now, as last drawn.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"url":{"description":"The page where the customer adds the pass to Google Wallet or Apple\nWallet. Anyone with it can add the pass: send it only to the customer.","type":"string"},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","kind","source_id","url","in_google","apple_devices","created_at","updated_at"],"type":"object"},"WalletSettings":{"description":"A store's wallet settings.","properties":{"background_color":{"description":"`#RRGGBB`; empty takes the brand's main colour.","type":["string","null"]},"enabled":{"description":"Customers are offered passes.","type":"boolean"},"foreground_color":{"description":"`#RRGGBB`; empty takes the brand's button text colour.","type":["string","null"]},"kinds":{"description":"The kinds of pass offered (`loyalty`, `gift_card`, `booking`).","items":{"type":"string"},"type":"array"}},"required":["enabled","kinds"],"type":"object"},"WalletSettingsUpdate":{"description":"New wallet settings; what is left out stays.","properties":{"background_color":{"description":"`#RRGGBB`; an empty string goes back to the brand's colour.","type":["string","null"]},"enabled":{"type":["boolean","null"]},"foreground_color":{"description":"`#RRGGBB`; an empty string goes back to the brand's colour.","type":["string","null"]},"kinds":{"description":"The kinds of pass offered (`loyalty`, `gift_card`, `booking`).","items":{"type":"string"},"type":["array","null"]}},"type":"object"},"WebPushKey":{"description":"What a browser needs to subscribe to Web Push.","properties":{"enabled":{"description":"Web Push is set up on this server.","type":"boolean"},"public_key":{"description":"The VAPID public key (uncompressed P-256, base64url): pass it to\n`pushManager.subscribe` as `applicationServerKey`. When it changes,\nsubscribe again (old subscriptions stop working).","type":["string","null"]}},"required":["enabled"],"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"},"store_id":{"format":"uuid","type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","store_id","url","secret","is_active","events","created_at","updated_at"],"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_json":{"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":["id","webhook_id","payload_json","attempted_at","success"],"type":"object"},"WebhookEventRow":{"properties":{"event":{"description":"Event name, e.g. `orders.paid`.","type":"string"},"webhook_id":{"format":"uuid","type":"string"}},"required":["webhook_id","event"],"type":"object"},"WhatsappBackupBatch":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/BackupContact"},"type":"array"},"threads":{"items":{"$ref":"#/components/schemas/BackupThread"},"type":"array"}},"type":"object"},"WhatsappBackupResult":{"properties":{"customers_matched":{"description":"Chats whose number matched a customer of the store.","minimum":0,"type":"integer"},"messages_new":{"description":"Messages that were not there before.","format":"int64","type":"integer"},"tagged":{"description":"Chats that took labels as tags.","minimum":0,"type":"integer"},"threads":{"description":"Chats imported in this batch.","minimum":0,"type":"integer"}},"required":["threads","messages_new","customers_matched","tagged"],"type":"object"},"WhatsappCall":{"properties":{"answered_at":{"format":"date-time","type":["string","null"]},"contact_name":{"description":"The customer's name, when the conversation has one.","type":["string","null"]},"contact_phone":{"description":"The customer's number, digits only.","type":"string"},"conversation_id":{"format":"uuid","type":["string","null"]},"direction":{"description":"`user_initiated`: the customer called.","type":"string"},"duration_secs":{"description":"Seconds of talk, once it ended after being answered.","format":"int32","type":["integer","null"]},"ended_at":{"format":"date-time","type":["string","null"]},"error":{"description":"Why Meta failed the call.","type":["string","null"]},"id":{"format":"uuid","type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"description":"`ringing`, `answered`, `completed`, `missed`, `rejected` or `failed`.","type":"string"}},"required":["id","direction","contact_phone","status","started_at"],"type":"object"},"WhatsappCallTarget":{"description":"A WhatsApp conversation the store can call the customer from.","properties":{"channel_id":{"format":"uuid","type":"string"},"conversation_id":{"format":"uuid","type":"string"}},"required":["conversation_id","channel_id"],"type":"object"},"WhatsappChannel":{"properties":{"conversations":{"description":"WhatsApp conversations with this customer.","format":"int64","type":"integer"},"opt_in":{"type":"boolean"},"phone":{"type":["string","null"]},"reachable":{"description":"Has a usable phone number and WhatsApp consent.","type":"boolean"}},"required":["reachable","opt_in","conversations"],"type":"object"},"WhatsappChannelStatus":{"description":"Health of a connected WhatsApp channel.","properties":{"approved_templates":{"description":"Approved templates synced for this number.","format":"int64","type":"integer"},"error":{"description":"Why it is not ok.","type":["string","null"]},"history_sync":{"description":"Coexistence: how the import of the Business app's chats is going\n(`status`: `requested`, `importing`, `done`, `declined`, `failed`;\n`phase`, `progress`).","type":["object","null"]},"number":{"description":"The number as Meta reports it: `display_phone_number`,\n`verified_name`, `quality_rating`, `platform_type`, `status`,\n`name_status`, `messaging_limit_tier`, `is_on_biz_app`,\n`code_verification_status`.","type":["object","null"]},"ok":{"description":"The token works and Meta answered.","type":"boolean"}},"required":["ok","approved_templates"],"type":"object"},"WhatsappConnectRequest":{"description":"What Meta's Embedded Signup dialog returned.","properties":{"channel_id":{"description":"Update this channel instead of creating one.","format":"uuid","type":["string","null"]},"code":{"type":"string"},"mode":{"description":"`coexistence` (number stays in the Business app, the default) or `cloud`.","type":["string","null"]},"phone_number_id":{"type":["string","null"]},"waba_id":{"type":["string","null"]}},"required":["code"],"type":"object"},"WhatsappConnectResult":{"description":"The connected channel.","properties":{"channel_id":{"format":"uuid","type":"string"},"display_phone":{"type":"string"},"mode":{"type":"string"},"verified_name":{"type":"string"},"warnings":{"description":"Steps that did not complete (number registration, webhook\nsubscription), in Portuguese, for the admin to act on.","items":{"type":"string"},"type":"array"},"webhook_url":{"description":"Where Meta now delivers this number's messages.","type":"string"}},"required":["channel_id","display_phone","verified_name","mode","webhook_url","warnings"],"type":"object"},"WhatsappFunnel":{"description":"The storefront WhatsApp button, step by step, over a window.","properties":{"conversations":{"description":"Handoffs matched to a WhatsApp conversation.","format":"int64","type":"integer"},"numbers_given":{"description":"Handoffs with a number typed (`whatsapp_number`, given).","format":"int64","type":"integer"},"opted_in":{"description":"Of the numbers given, how many ticked the offers box.","format":"int64","type":"integer"},"revenue_cents":{"format":"int64","type":"integer"},"sales":{"description":"Paid orders of those handoffs' customers or conversations, placed\nafter the handoff.","format":"int64","type":"integer"},"skipped":{"description":"Handoffs where the visitor chose \"Pular\".","format":"int64","type":"integer"},"taps":{"description":"Taps on the button (`whatsapp_click` events from the tracker).","format":"int64","type":"integer"}},"required":["taps","numbers_given","skipped","opted_in","conversations","sales","revenue_cents"],"type":"object"},"WhatsappSignupConfig":{"description":"What the client needs to open Meta's Embedded Signup dialog.","properties":{"app_id":{"type":["string","null"]},"config_id":{"type":["string","null"]},"enabled":{"description":"Embedded Signup is set up on this server.","type":"boolean"},"es_version":{"description":"Embedded Signup SDK options (`v4` by default; `META_ES_VERSION`).\nThe configured Meta login must also be migrated to v4.","type":"string"},"graph_version":{"type":["string","null"]},"review_pending":{"description":"Meta has not approved the app yet (`META_APP_REVIEWED` unset): only\npeople with a role on the app can finish the signup.","type":"boolean"}},"required":["enabled","es_version","review_pending"],"type":"object"},"WhatsappTemplate":{"description":"A template of the channel's WhatsApp Business Account, as Meta last\nreported it.","properties":{"category":{"description":"`MARKETING`, `UTILITY` or `AUTHENTICATION`.","type":"string"},"channel_id":{"format":"uuid","type":"string"},"components":{"description":"Meta's components (`HEADER`, `BODY`, `FOOTER`, `BUTTONS`) as is.","items":{"type":"object"},"type":"array"},"id":{"format":"uuid","type":"string"},"inputs":{"$ref":"#/components/schemas/WhatsappTemplateInputs","description":"What sending it asks for."},"language":{"description":"Language code, e.g. `pt_BR`.","type":"string"},"meta_id":{"description":"Meta's template id.","type":["string","null"]},"name":{"description":"Lowercase name, unique per language in the account.","type":"string"},"rejected_reason":{"type":["string","null"]},"status":{"description":"Meta's review status: `APPROVED`, `PENDING`, `REJECTED`, `PAUSED`,\n`DISABLED`… Only `APPROVED` templates can be sent.","type":"string"},"synced_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"used_by":{"description":"The automations and notification channels that send it, those the\ncaller may see (filled in by the list).","items":{"$ref":"#/components/schemas/WhatsappTemplateUse"},"type":"array"}},"required":["id","channel_id","name","language","category","status","components","inputs","used_by","synced_at","updated_at"],"type":"object"},"WhatsappTemplateButton":{"description":"A button of a new template.","properties":{"kind":{"description":"`quick_reply`, `url` or `phone_number`.","type":"string"},"phone_number":{"description":"`phone_number` buttons, in international format (`+5511…`).","type":["string","null"]},"text":{"description":"Label, up to 25 characters.","type":"string"},"url":{"description":"`url` buttons: an https link; may end in `{{1}}` for a per-send suffix.","type":["string","null"]},"url_example":{"description":"`url` buttons ending in `{{1}}`: an example suffix for Meta's review.","type":["string","null"]}},"required":["kind","text"],"type":"object"},"WhatsappTemplateCreateRequest":{"description":"A new template, submitted to Meta for review.","properties":{"body":{"description":"The message, up to 1024 characters, with `{{1}}`, `{{2}}`… in order.","type":"string"},"body_examples":{"description":"One example value per body variable, in order (Meta reviews them).","items":{"type":"string"},"type":"array"},"buttons":{"description":"Up to 10 buttons.","items":{"$ref":"#/components/schemas/WhatsappTemplateButton"},"type":"array"},"category":{"description":"`MARKETING` or `UTILITY`.","type":"string"},"footer":{"description":"Optional footer, up to 60 characters, no variables.","type":["string","null"]},"header":{"description":"Optional text header, up to 60 characters, at most one `{{1}}`.","type":["string","null"]},"header_example":{"description":"Example value for the header's `{{1}}`.","type":["string","null"]},"language":{"description":"Language code; default `pt_BR`.","type":["string","null"]},"name":{"description":"Lowercase letters, digits and underscores, up to 512 characters.","type":"string"}},"required":["name","category","body"],"type":"object"},"WhatsappTemplateInputs":{"description":"The values a send must provide, read from the components.","properties":{"body_vars":{"description":"Body variables in send order.","items":{"type":"string"},"type":"array"},"header_format":{"description":"`text`, `image`, `video`, `document` or `location`; null without a\nheader.","type":["string","null"]},"header_vars":{"description":"Variables of a text header (at most one), by name (`1` or a named\nparameter).","items":{"type":"string"},"type":"array"},"sendable":{"description":"Whether the inbox can send it: approved, not an authentication\n(one-time code) template, and without a location header.","type":"boolean"},"url_button_indexes":{"description":"Indexes (in the BUTTONS component) of URL buttons whose link ends in\na variable; each needs one value.","items":{"minimum":0,"type":"integer"},"type":"array"}},"required":["header_vars","body_vars","url_button_indexes","sendable"],"type":"object"},"WhatsappTemplatePreset":{"description":"A ready-made template.","properties":{"automation_values":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WhatsappTemplateValues","description":"How an automation step fills them, when that differs from `values`\n(an automation reads the event under `trigger`)."}]},"description":{"type":"string"},"event":{"description":"The notification event it is made for (`cart.abandoned`...), when it\nis sent by one; others are for automations.","type":["string","null"]},"id":{"description":"Stable id, e.g. `cart_recovery`.","type":"string"},"template":{"$ref":"#/components/schemas/WhatsappTemplateCreateRequest","description":"The template as it would be submitted (the editor opens with it)."},"title":{"description":"What it is, for the list.","type":"string"},"values":{"$ref":"#/components/schemas/WhatsappTemplateValues","description":"How a notification for `event` fills the variables (for a preset\nwithout an event: how an automation does)."}},"required":["id","title","description","template","values"],"type":"object"},"WhatsappTemplateUpdateRequest":{"description":"New content for a submitted template. The name and language stay: they\nidentify it at Meta.","properties":{"body":{"type":"string"},"body_examples":{"items":{"type":"string"},"type":"array"},"buttons":{"items":{"$ref":"#/components/schemas/WhatsappTemplateButton"},"type":"array"},"category":{"description":"`MARKETING` or `UTILITY`. Meta only changes the category of a\ntemplate that is not approved; it is ignored otherwise.","type":["string","null"]},"footer":{"type":["string","null"]},"header":{"type":["string","null"]},"header_example":{"type":["string","null"]}},"required":["body"],"type":"object"},"WhatsappTemplateUse":{"description":"Something that sends a template.","properties":{"id":{"format":"uuid","type":"string"},"kind":{"description":"`automation` or `notification`.","type":"string"},"name":{"type":"string"}},"required":["kind","id","name"],"type":"object"},"WhatsappTemplateValues":{"description":"How a template's variables are filled when Mobiari sends it: one text per\nvariable, each with `{{ path }}` expressions (the automation syntax) over\nthe data of the message (`customer.first_name`, `cart.token`...).","properties":{"body":{"description":"One per body variable, in order.","items":{"type":"string"},"type":"array"},"buttons":{"description":"One per link button ending in `{{1}}`, in order.","items":{"type":"string"},"type":"array"},"header":{"description":"The text header's variable.","type":["string","null"]}},"required":["body","buttons"],"type":"object"},"WhatsappTestRequest":{"description":"Where to send the test message.","properties":{"to":{"description":"A phone number in international format (`+5511…`).","type":"string"}},"required":["to"],"type":"object"},"WhatsappTestResult":{"properties":{"message_id":{"type":["string","null"]},"template":{"description":"The template that was sent.","type":"string"}},"required":["template"],"type":"object"},"WholesaleSettings":{"description":"The store's reseller settings.","properties":{"applications_open":{"description":"The storefront takes \"Seja um revendedor\" requests.","type":"boolean"},"default_group_id":{"description":"The group an approval proposes.","format":"uuid","type":["string","null"]},"updated_at":{"format":"date-time","type":["string","null"]},"visitor_prices":{"$ref":"#/components/schemas/VisitorPrices"}},"required":["visitor_prices","applications_open"],"type":"object"},"WholesaleSettingsUpdate":{"description":"Changes to the reseller settings; fields left out keep their value.","properties":{"applications_open":{"type":["boolean","null"]},"default_group_id":{"description":"`null` clears it.","format":"uuid","type":["string","null"]},"visitor_prices":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitorPrices"}]}},"type":"object"},"WishlistReport":{"properties":{"days":{"format":"int32","type":"integer"},"rows":{"items":{"$ref":"#/components/schemas/WishlistRow"},"type":"array"},"summary":{"$ref":"#/components/schemas/WishlistSummary"},"total_products":{"description":"Matching products, before the limit.","format":"int64","type":"integer"}},"required":["days","summary","total_products","rows"],"type":"object"},"WishlistRow":{"properties":{"alerts_waiting":{"description":"E-mail alerts the lists have waiting (back in stock, price drop).","format":"int64","type":"integer"},"available":{"description":"Stock on hand less reserved, over the active variants.","format":"int64","type":"integer"},"bought_after_saving":{"description":"Signed-in saves where the customer paid for the product afterwards.","format":"int64","type":"integer"},"customer_saves":{"description":"Saves by signed-in customers.","format":"int64","type":"integer"},"price_cents":{"description":"The lowest price a shopper pays now, in cents.","format":"int64","type":["integer","null"]},"product_id":{"format":"uuid","type":"string"},"product_title":{"type":"string"},"recent_saves":{"description":"Of those, saved in the last `days` days.","format":"int64","type":"integer"},"saves":{"description":"Lists that hold the product.","format":"int64","type":"integer"},"sold_out":{"description":"Nothing to buy: no variant in stock and none made to order.","type":"boolean"},"visitor_saves":{"description":"Saves by visitors who had not signed in.","format":"int64","type":"integer"}},"required":["product_id","product_title","saves","recent_saves","customer_saves","visitor_saves","bought_after_saving","available","sold_out","alerts_waiting"],"type":"object"},"WishlistSummary":{"properties":{"alerts_sent":{"description":"Alerts the lists sent in the last `days` days.","format":"int64","type":"integer"},"alerts_waiting":{"format":"int64","type":"integer"},"bought_after_saving":{"format":"int64","type":"integer"},"customer_lists":{"format":"int64","type":"integer"},"customers_alerts_off":{"description":"Customers who turned the alerts off.","format":"int64","type":"integer"},"lists":{"description":"Lists with at least one product.","format":"int64","type":"integer"},"products":{"description":"Different products saved.","format":"int64","type":"integer"},"recent_saves":{"description":"Saves in the last `days` days.","format":"int64","type":"integer"},"sold_out_products":{"description":"Of those, with nothing to sell.","format":"int64","type":"integer"},"visitor_lists":{"format":"int64","type":"integer"}},"required":["lists","customer_lists","visitor_lists","products","sold_out_products","recent_saves","bought_after_saving","alerts_waiting","alerts_sent","customers_alerts_off"],"type":"object"},"Workflow":{"description":"An automation: a graph of steps started by a trigger. `graph` and\n`trigger` are the draft being edited; `published_*` is what fires.","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"format":"uuid","type":["string","null"]},"description":{"type":["string","null"]},"graph":{"$ref":"#/components/schemas/WorkflowGraph"},"id":{"format":"uuid","type":"string"},"kind":{"$ref":"#/components/schemas/WorkflowKind"},"last_run_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"next_fire_at":{"description":"Next scheduled fire (schedule triggers).","format":"date-time","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"published_graph":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowGraph","description":"What actually fires. `graph`/`trigger` are the draft being edited."}]},"published_trigger":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/WorkflowTrigger"}]},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"store_id":{"format":"uuid","type":"string"},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"updated_at":{"format":"date-time","type":"string"},"version":{"description":"Published version number; 0 before the first publish.","format":"int32","type":"integer"}},"required":["id","store_id","kind","name","status","graph","trigger","created_at","updated_at","version"],"type":"object"},"WorkflowApprovalRequest":{"properties":{"approve":{"description":"True to approve, false to reject.","type":"boolean"}},"required":["approve"],"type":"object"},"WorkflowEdge":{"description":"A connection from one step's port to the next step.","properties":{"branch":{"description":"For `flow.branch` the same `from` node has two outgoing edges:\n`branch: \"true\"` and `branch: \"false\"`. Other nodes leave it\nblank and we follow whichever single edge exists.","type":["string","null"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"WorkflowFailureGroup":{"description":"Failed runs of one automation that share an error.","properties":{"count":{"format":"int64","type":"integer"},"error":{"description":"The error, its first line (identical errors group together).","type":"string"},"first_at":{"format":"date-time","type":"string"},"last_at":{"format":"date-time","type":"string"},"run_ids":{"description":"Up to 200 of the runs, newest first, for \"retry all\" and \"dismiss\".","items":{"format":"uuid","type":"string"},"type":"array"},"workflow_id":{"format":"uuid","type":"string"},"workflow_name":{"type":"string"}},"required":["workflow_id","workflow_name","error","count","first_at","last_at","run_ids"],"type":"object"},"WorkflowGraph":{"description":"Concrete graph deserialised out of `workflows.graph`. We keep it\nloose: nodes carry a free-form `config` because each node type owns\nits own config schema, and we don't want to stamp a Rust struct for\nevery node variant.\nSteps and the connections between them.","properties":{"edges":{"items":{"$ref":"#/components/schemas/WorkflowEdge"},"type":"array"},"nodes":{"items":{"$ref":"#/components/schemas/WorkflowNode"},"type":"array"}},"type":"object"},"WorkflowIssues":{"properties":{"failures":{"items":{"$ref":"#/components/schemas/WorkflowFailureGroup"},"type":"array"},"notices":{"items":{"$ref":"#/components/schemas/WorkflowNotice"},"type":"array"}},"required":["failures","notices"],"type":"object"},"WorkflowKind":{"description":"Which editor a workflow belongs to.","enum":["journey","workflow"],"type":"string"},"WorkflowListItem":{"allOf":[{"$ref":"#/components/schemas/Workflow"},{"properties":{"active_runs":{"description":"Runs pending, running, waiting or awaiting approval now.","format":"int64","type":"integer"},"failed_7d":{"description":"Of those, failed and not dismissed from the problems list.","format":"int64","type":"integer"},"last_run_started_at":{"format":"date-time","type":["string","null"]},"last_run_status":{"type":["string","null"]},"runs_7d":{"description":"Runs started in the last 7 days.","format":"int64","type":"integer"}},"required":["runs_7d","failed_7d","active_runs"],"type":"object"}],"description":"A workflow with its recent health (test runs left out)."},"WorkflowNode":{"description":"A step. Its `type` and `config` keys come from the node catalog.","properties":{"config":{"type":"object"},"id":{"type":"string"},"position":{"$ref":"#/components/schemas/WorkflowNodePosition"},"type":{"description":"e.g. \"trigger.manual\", \"action.send_email\", \"flow.branch\".","type":"string"}},"required":["id","type"],"type":"object"},"WorkflowNodePosition":{"description":"Where the step sits on the editor canvas.","properties":{"x":{"format":"double","type":"number"},"y":{"format":"double","type":"number"}},"type":"object"},"WorkflowNodeTestOutcome":{"description":"How a tested step would go on.","enum":["continue","wait","await_approval","stop","error"],"type":"string"},"WorkflowNodeTestResult":{"description":"What a tested step did, without side effects.","properties":{"available":{"description":"What expressions could read at this step (secrets masked).","type":"object"},"branch":{"type":["string","null"]},"context_from_run":{"description":"The run the data came from.","format":"uuid","type":["string","null"]},"error":{"type":["string","null"]},"outcome":{"$ref":"#/components/schemas/WorkflowNodeTestOutcome"},"output":{"type":["object","null"]},"rendered_config":{"description":"The step's config with expressions filled in (secrets masked).","type":"object"}},"required":["outcome","rendered_config","available"],"type":"object"},"WorkflowNotice":{"description":"A run the engine refused to start.","properties":{"created_at":{"format":"date-time","type":"string"},"detail":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"`loop_guard`.","type":"string"},"record_id":{"format":"uuid","type":["string","null"]},"workflow_id":{"format":"uuid","type":"string"},"workflow_name":{"type":"string"}},"required":["id","workflow_id","workflow_name","kind","detail","created_at"],"type":"object"},"WorkflowOperation":{"description":"One operation as the editor and validation see it.","properties":{"body":{"description":"JSON Schema of the body, when it takes one.","type":["object","null"]},"id":{"description":"`domain.verb_noun`, e.g. `orders.cancel`.","type":"string"},"method":{"type":"string"},"path":{"type":"string"},"path_params":{"description":"Path parameters to fill (the store is filled by the platform).","items":{"type":"string"},"type":"array"},"permission":{"description":"Any of these permission codes allows it.","items":{"type":"string"},"type":"array"},"query":{"description":"JSON Schema of the query string, when it takes one.","type":["object","null"]},"risky":{"description":"Destructive, moves money or reaches outside the store: publishing\nan automation that uses it asks for confirmation.","type":"boolean"},"summary":{"type":"string"},"write":{"description":"Changes something (a test run only describes it).","type":"boolean"}},"required":["id","method","path","summary","write","risky","permission","path_params"],"type":"object"},"WorkflowProblem":{"description":"Something wrong (or worth a look) in a workflow's draft.","properties":{"level":{"$ref":"#/components/schemas/WorkflowProblemLevel","description":"`error` blocks publishing; `warning` does not."},"message":{"type":"string"},"node_id":{"type":["string","null"]}},"required":["level","message"],"type":"object"},"WorkflowProblemLevel":{"description":"How serious a problem is.","enum":["error","warning"],"type":"string"},"WorkflowPublishResult":{"description":"A published workflow and the warnings its draft had.","properties":{"problems":{"description":"Warnings only (errors block publishing).","items":{"$ref":"#/components/schemas/WorkflowProblem"},"type":"array"},"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["workflow","problems"],"type":"object"},"WorkflowRun":{"description":"One execution of a workflow.","properties":{"attempt":{"description":"Consecutive failures of the current node (reset when a node succeeds).","format":"int32","type":"integer"},"cancelled_at":{"format":"date-time","type":["string","null"]},"context":{"description":"Step outputs and variables so far.","type":"object"},"created_at":{"format":"date-time","type":"string"},"current_node_id":{"description":"The step it is on (or stopped at).","type":["string","null"]},"customer_id":{"format":"uuid","type":["string","null"]},"dry_run":{"description":"Test run: nodes with side effects only describe what they would do.","type":"boolean"},"error_message":{"type":["string","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"next_run_at":{"description":"When a waiting run resumes.","format":"date-time","type":["string","null"]},"retry_of":{"description":"The run this one retries.","format":"uuid","type":["string","null"]},"started_at":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/WorkflowRunStatus"},"store_id":{"format":"uuid","type":"string"},"trigger_payload":{"description":"What started it: the event, webhook request or manual payload.","type":"object"},"updated_at":{"format":"date-time","type":"string"},"version":{"description":"Workflow version it runs (null for test runs of the draft).","format":"int32","type":["integer","null"]},"workflow_id":{"format":"uuid","type":"string"}},"required":["id","workflow_id","store_id","status","trigger_payload","context","created_at","updated_at","attempt","dry_run"],"type":"object"},"WorkflowRunStatus":{"description":"State of a run. Documented set; tolerate new values.","enum":["pending","running","waiting","awaiting_approval","completed","failed","cancelled"],"type":"string"},"WorkflowRunStep":{"description":"One executed step of a run.","properties":{"attempt":{"format":"int32","type":"integer"},"error_message":{"type":["string","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"node_id":{"type":"string"},"node_type":{"type":"string"},"output":{"type":["object","null"]},"run_id":{"format":"uuid","type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"description":"`running`, `completed`, `failed`, `waiting`, `skipped`...","type":"string"}},"required":["id","run_id","node_id","node_type","status","started_at","attempt"],"type":"object"},"WorkflowSecret":{"description":"A stored credential. Its value is never returned.","properties":{"created_by_name":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"description":"Referenced as `{{secrets.NAME}}`.","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","updated_at"],"type":"object"},"WorkflowSettableStatus":{"description":"Status a workflow can be set to directly (publishing activates it).","enum":["draft","paused"],"type":"string"},"WorkflowStatus":{"description":"Lifecycle of a workflow. Documented set; tolerate new values.","enum":["draft","active","paused"],"type":"string"},"WorkflowTrigger":{"description":"What starts a workflow.","oneOf":[{"description":"Manual: only fires when an admin clicks \"Run\".","properties":{"type":{"enum":["manual"],"type":"string"}},"required":["type"],"type":"object"},{"description":"Customer event from the existing customer_interactions stream\n(or any in-process event we choose to publish). Produces one run\nper matched customer when the source emits that event type.","properties":{"conditions":{"description":"Conditions on the event's fields (`trigger.*`), like\n`flow.branch`; the run starts only when they hold. Checked after\n`filter`.","type":"object"},"event":{"type":"string"},"filter":{"type":"object"},"match":{"description":"`all` (default) or `any` of the conditions.","type":["string","null"]},"one_at_a_time":{"description":"Skip the event while this customer already has a live run of the\nsame workflow (no duplicate journeys when two orders land close).","type":"boolean"},"type":{"enum":["customer_event"],"type":"string"}},"required":["event","type"],"type":"object"},{"description":"Webhook: external HTTP POST hits a public URL with a token. One\nrun per request.","properties":{"token":{"description":"Secret part of the URL `/hooks/workflows/{workflow_id}/{token}`.","type":["string","null"]},"type":{"enum":["webhook"],"type":"string"}},"required":["type"],"type":"object"},{"description":"Schedule: every N minutes, or daily at a time on given weekdays\n(1 = Monday … 7 = Sunday). Times are UTC for now.","properties":{"at_hour":{"format":"int32","type":["integer","null"]},"at_minute":{"format":"int32","type":["integer","null"]},"every_minutes":{"format":"int32","type":["integer","null"]},"type":{"enum":["schedule"],"type":"string"},"weekdays":{"items":{"format":"int32","type":"integer"},"type":"array"}},"required":["type"],"type":"object"},{"description":"A business record (`bus::records`: order, product, stock item,\ncustomer, NF-e...) was created, updated or deleted, by any path: the\ndatabase captures every write. One run per matching change. The run\nreads `record` (the row now), `previous` (the row before),\n`changes` (`[{field, from, to}]`) and `change` (op, source, actor).","properties":{"conditions":{"description":"Conditions on `record.*`, `previous.*`, `changes`, like\n`flow.branch` (`[{field, op, value}]`).","type":"object"},"entity":{"description":"Record type key from the records catalog.","type":"string"},"fields":{"description":"For updates: fire only when one of these fields changed; empty\nmeans any field.","items":{"type":"string"},"type":"array"},"include_imports":{"description":"Also fire for changes made by imports (off by default).","type":"boolean"},"match":{"description":"`all` (default) or `any` of the conditions.","type":["string","null"]},"ops":{"description":"`created`, `updated`, `deleted`; empty means all three.","items":{"type":"string"},"type":"array"},"type":{"enum":["record_change"],"type":"string"}},"required":["entity","type"],"type":"object"},{"description":"A date on a business record comes due: \"48h after `paid_at`\",\n\"2 days before `due_on`\". One run per record and date (a date that\nmoves comes due again), for records that match `filters`, and only\nfor moments after the automation was published (no backlog). The run\nreads `record` and `schedule.due_at`.","properties":{"date_field":{"description":"A date or date-time field of the record.","type":"string"},"entity":{"type":"string"},"filters":{"description":"`[{field, op, value}]` on record fields, like \"Buscar registros\".","type":"object"},"match":{"description":"`all` (default) or `any` of the filters.","type":["string","null"]},"offset_minutes":{"description":"Minutes after (positive) or before (negative) the date.","format":"int64","type":"integer"},"type":{"enum":["record_schedule"],"type":"string"}},"required":["entity","date_field","type"],"type":"object"}]},"WorkflowValidation":{"description":"Problems in a workflow's draft.","properties":{"ok":{"description":"No `error`-level problems: the draft can be published.","type":"boolean"},"problems":{"items":{"$ref":"#/components/schemas/WorkflowProblem"},"type":"array"}},"required":["problems","ok"],"type":"object"},"WorkflowVersion":{"description":"A published version of a workflow.","properties":{"graph":{"$ref":"#/components/schemas/WorkflowGraph"},"id":{"format":"uuid","type":"string"},"note":{"type":["string","null"]},"published_at":{"format":"date-time","type":"string"},"published_by_name":{"type":["string","null"]},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"version":{"format":"int32","type":"integer"}},"required":["id","version","graph","trigger","published_at"],"type":"object"},"WorkspaceFeatures":{"description":"What a workspace uses.","properties":{"catalog":{"description":"Every feature there is.","items":{"$ref":"#/components/schemas/FeatureInfo"},"type":"array"},"features":{"description":"The enabled features, in catalog order.","items":{"type":"string"},"type":"array"},"presets":{"description":"The segments offered at sign-up.","items":{"$ref":"#/components/schemas/PresetInfo"},"type":"array"},"segment":{"description":"The preset the features equal, or `custom`.","type":"string"}},"required":["segment","features","catalog","presets"],"type":"object"}},"securitySchemes":{"bearer_auth":{"bearerFormat":"session token or mobi_sa_ service account key","description":"`Authorization: Bearer <token>`. Either a session access token from `POST /auth/login` (refresh it with `POST /auth/refresh`) or a service account key (`mobi_sa_…`). A key works only for the store of its account, and can do at most what the account's permission sets allow there, narrowed to the scopes it was issued with.","scheme":"bearer","type":"http"}}},"info":{"description":"The API behind the Mobiari admin and mobile apps: everything they can do, at `/app`. It changes with the apps, without notice. For an integration, use the Mobiari API (`/v1`, https://docs.mobiari.com/docs/api), which is the part of this one that keeps its shape. Authenticate with `Authorization: Bearer <token>`: a session token from `POST /auth/login` or a service account key (`mobi_sa_…`), which works only for the store of its account.\n\nConventions that hold for every endpoint (errors, pagination, idempotency, rate limits, versioning) are described at https://docs.mobiari.com/docs/api-conventions.","license":{"name":""},"title":"Mobiari Admin API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/assistant/conversations/{conversation_id}":{"delete":{"description":"Stops a running turn and deletes the conversation with its messages and\npending proposals. Actions already applied stay (and stay undoable).","operationId":"deleteAssistantConversation","parameters":[{"description":"Assistant conversation id","in":"path","name":"conversation_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 conversation of yours"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 conversation","tags":["Assistant"]},"patch":{"operationId":"renameAssistantConversation","parameters":[{"description":"Assistant conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameAssistantConversationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantConversation"}}},"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 of yours"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty or longer than 120 characters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 conversation","tags":["Assistant"]}},"/assistant/conversations/{conversation_id}/messages":{"get":{"description":"The full transcript, lossless (tool calls and results included), and the\nproposals still waiting for a decision.","operationId":"getAssistantConversationMessages","parameters":[{"description":"Assistant conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantConversationMessages"}}},"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 of yours"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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's messages","tags":["Assistant"]}},"/assistant/conversations/{conversation_id}/stop":{"post":{"description":"Asks the turn running in the conversation to stop; what it generated so\nfar is kept and its stream ends with `stopped` and `done`. Nothing\nhappens when no turn is running.","operationId":"stopAssistant","parameters":[{"description":"Assistant 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":{"204":{"description":"Stop requested (or nothing was running)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 of yours"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Stop the assistant","tags":["Assistant"]}},"/assistant/proposals/{proposal_id}/approve":{"post":{"description":"Applies the write the assistant proposed (with the permission the write\nneeds, checked now), records it as an undoable action, and streams the\nassistant's follow-up turn. The first event after `conversation` is the\n`tool_result` saying whether it was applied. Proposals expire after an\nhour. Server-sent events as in `chatWithAssistant`.","operationId":"approveAssistantProposal","parameters":[{"description":"Proposal id (from a `proposal` event)","in":"path","name":"proposal_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The admin ticked the confirmation of a destructive / money /\nexternal change. Without it such proposals answer 428.","in":"query","name":"confirmed","required":false,"schema":{"type":"boolean"}},{"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":{"text/event-stream":{"schema":{"type":"string"}}},"description":"The follow-up turn, as server-sent events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission`: the caller lacks the permission the write needs"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such pending proposal in your conversations"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_busy`: a turn is already running in this conversation"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`confirmation_required`: a destructive, money or external change; approve again with `confirmed=true`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Approve a proposal","tags":["Assistant"]}},"/assistant/proposals/{proposal_id}/decline":{"post":{"description":"Nothing is applied; the assistant is told and its follow-up turn is\nstreamed as in `chatWithAssistant`.","operationId":"declineAssistantProposal","parameters":[{"description":"Proposal id (from a `proposal` event)","in":"path","name":"proposal_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":{"text/event-stream":{"schema":{"type":"string"}}},"description":"The follow-up turn, as server-sent events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 pending proposal in your conversations"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Decline a proposal","tags":["Assistant"]}},"/auth/2fa/totp/verify":{"post":{"description":"Exchanges the challenge from `POST /auth/login` and a current TOTP\ncode for a session.","operationId":"verifyTotp","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/VerifyTotpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`totp_not_enabled`: the account has no authenticator app"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_challenge`: challenge invalid, expired or already used, sign in again. `invalid_code`: wrong code"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts; a challenge allows 5","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Finish signing in with an authenticator code","tags":["Auth"]}},"/auth/email/change/cancel":{"post":{"description":"With the link in the notice sent to the old address by `POST /me/email`:\nthe link that would move the account to the new address stops working,\nand the account keeps its address.","operationId":"cancelEmailChange","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/VerifyEmailRequest"}}},"required":true},"responses":{"204":{"description":"Called off"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_token`: the link is invalid, used or expired (the change was confirmed or called off already)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Call off a change of e-mail","tags":["Auth"]}},"/auth/email/verify":{"post":{"description":"With the link sent at sign-up (or by `POST /me/email/verification`), or\nthe one `POST /me/email` sent to a new address: that one also moves the\naccount to the new address.","operationId":"verifyEmail","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/VerifyEmailRequest"}}},"required":true},"responses":{"204":{"description":"Confirmed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_token`: the link is invalid, used or expired"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_taken`: another account took the new address meanwhile"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Confirm the e-mail address","tags":["Auth"]}},"/auth/login":{"post":{"description":"Checks e-mail and password. Without two-factor authentication the\nresponse has `status: \"authenticated\"` and a session (access token,\nrefresh token, user). With it, `status: \"two_factor_required\"` and a\nchallenge valid for 5 minutes: finish with\n`POST /auth/2fa/totp/verify` or `POST /auth/otp/send` +\n`POST /auth/otp/verify`, depending on `methods`.","operationId":"login","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/LoginRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_credentials`: unknown e-mail or wrong password"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`: the account was deactivated"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts from this address or for this account","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Sign in","tags":["Auth"]}},"/auth/logout":{"post":{"description":"Revokes the session the refresh token belongs to: its refresh tokens\nstop working and so do access tokens issued for it. Succeeds for\nunknown or already revoked tokens, so it is safe to retry.","operationId":"logout","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/LogoutRequest"}}},"required":true},"responses":{"204":{"description":"Signed out"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Sign out","tags":["Auth"]}},"/auth/otp/send":{"post":{"description":"Sends a 6-digit code, valid for 5 minutes, to the WhatsApp number\nregistered for two-factor sign-in. Requesting again sends a new code;\nonly the newest one is accepted.","operationId":"sendLoginOtp","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/OtpSendRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_2fa_not_enabled`: the account has no WhatsApp number for sign-in"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_challenge`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many codes requested","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`otp_delivery_failed`: WhatsApp did not accept the message"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Send a sign-in code over WhatsApp","tags":["Auth"]}},"/auth/otp/verify":{"post":{"description":"Exchanges the challenge from `POST /auth/login` and the code from\n`POST /auth/otp/send` for a session. The code must have been sent for\nthis challenge. After 5 wrong attempts the code is burned and a new one\nmust be requested.","operationId":"verifyLoginOtp","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/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_pending_code`: request a code first. `too_many_attempts`: request a new code. `whatsapp_2fa_not_enabled`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_challenge`: challenge invalid, expired or already used. `invalid_code`: wrong or expired code"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts; a challenge allows 5","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Finish signing in with a WhatsApp code","tags":["Auth"]}},"/auth/passkey/finish":{"post":{"description":"Checks the browser's signed answer and starts a session. A passkey\nsign-in does not ask for a second factor: the passkey is one.","operationId":"finishPasskeyLogin","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/PasskeyLoginFinish"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_ceremony`: expired or already used, start again"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`passkey_rejected`: the passkey is unknown or the signature does not check"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`passkeys_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Finish a passkey sign-in","tags":["Auth"]}},"/auth/passkey/start":{"post":{"description":"Answers with the options for `navigator.credentials.get()`; no e-mail\nis needed, the browser offers the passkeys it holds for this site.","operationId":"startPasskeyLogin","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyOptions"}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`passkeys_unavailable`: the server is not configured for passkeys"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Start a passkey sign-in","tags":["Auth"]}},"/auth/passkey/status":{"get":{"description":"Lets a sign-in screen decide whether to offer \"Sign in with a passkey\".","operationId":"getPasskeyStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyStatus"}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Are passkeys available","tags":["Auth"]}},"/auth/password/forgot":{"post":{"description":"Sends a link valid for 1 hour to the account with this e-mail, if there\nis one. The answer is the same either way, so it cannot be used to find\nout who has an account.","operationId":"forgotPassword","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/ForgotPasswordRequest"}}},"required":true},"responses":{"204":{"description":"Sent, if the account exists"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Ask for a password reset link","tags":["Auth"]}},"/auth/password/reset":{"post":{"description":"Sets a new password with the link from `POST /auth/password/forgot`.\nEvery session of the account is signed out and a pending change of\naddress is called off; sign in with the new password. The link also\nconfirms the e-mail address.","operationId":"resetPassword","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/ResetPasswordRequest"}}},"required":true},"responses":{"204":{"description":"Password changed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_token`: the link is invalid, used or expired"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: the password is too short"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Reset the password","tags":["Auth"]}},"/auth/refresh":{"post":{"description":"Trades a refresh token for a new access token and a new refresh token.\nThe presented refresh token stops working (rotation), so keep only the\nnewest one and do not send two refreshes with the same token.\n\nIf the response to a refresh is lost, retrying with the same token\nwithin 30 seconds is safe: a fresh pair is issued and the one the client\nnever received is retired. Otherwise, presenting a refresh token that was\nalready used signs the whole session out on every device holding it\n(`refresh_token_reused`). A token whose session ended (sign-out, device\nrevoked, password changed) or expired is `invalid_refresh_token`. Both\nmean: sign in again.","operationId":"refreshSession","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/RefreshRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_refresh_token`: unknown, expired, or its session was ended. `refresh_token_reused`: already used outside the retry window; the session was signed out"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Refresh a session","tags":["Auth"]}},"/auth/register":{"post":{"description":"Registers a user with e-mail and password, who must accept the terms\nof use and privacy policy (`accept_terms`). A link to confirm the\naddress is e-mailed (the account works meanwhile; `email_verified` tells\nwhether it was confirmed). The account starts without stores; create a tenant (`POST /tenants`) and a store (`POST /stores`)\nnext, or accept an invite. Emits the `user.created` webhook. Does not\nsign in: call `POST /auth/login` afterwards.","operationId":"register","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/RegisterRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Created"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_taken`: an account with this e-mail exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: invalid e-mail, password too short or terms not accepted (`details.accept_terms`); `captcha_required` / `captcha_failed` while the captcha is on (see `GET /auth/signup-config`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many registrations from this address or for this e-mail","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Create an account","tags":["Auth"]}},"/auth/signup-config":{"get":{"description":"Lets the sign-up screen decide whether to show a captcha.","operationId":"getSignupConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupConfig"}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Sign-up settings","tags":["Auth"]}},"/billing/plans":{"get":{"description":"The plans on sale with their monthly and annual prices and limits. Every\nplan includes every module; they differ in size. Public, for pricing\npages.","operationId":"listPlans","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCatalog"}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"List plans","tags":["Billing"]}},"/docs/ask":{"post":{"description":"Answers a question about Mobiari from its documentation, streamed. Public\n(the docs site and the admin's help panel call it); limited to 20\nquestions per hour per visitor and a daily total. The response is the AI\nSDK UI message stream (`text/event-stream`, header\n`x-vercel-ai-ui-message-stream: v1`): `data:` lines carrying JSON objects\nwith `type` `start`, `text-start`, `text-delta` {id, delta}, `text-end`,\n`source-url` {sourceId, url, title} for each documentation page the\nanswer cites, then `finish` or `error` {errorText}, and a final\n`data: [DONE]`.","operationId":"askDocs","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/DocsAskRequest"}}},"required":true},"responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"The answer, as an AI SDK UI message stream (see the description)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no question, or the last message is not the user's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`: no model configured, or the docs could not be loaded"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Ask the documentation","tags":["Help"]}},"/events/catalog":{"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":"getEventCatalog","parameters":[{"description":"Also count this store's subscribers per event.","in":"query","name":"store_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}},"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"]}},"/invites/accept":{"post":{"description":"Creates the account for an invited e-mail that has none (`full_name`,\n`password`, `accept_terms`), joins the store with the invited permission sets and\nsigns in. If the e-mail already has an account, `password` must be that\naccount's password; signed-in users accept with\n`POST /me/invites/accept` instead.","operationId":"acceptInvite","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/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`: unknown, used, cancelled or expired token"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_credentials`: the e-mail has an account and the password is not its password"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: for a new account, password too short or terms not accepted"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Accept an invite","tags":["Team"]}},"/invites/lookup":{"post":{"description":"What the acceptance link is for: the store, who invited, the permission sets, and\nwhether the invited e-mail already has an account, so the page asks\nonly for what is missing. The token is sent in the body, not the URL.","operationId":"lookupInvite","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/InviteLookupRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePreview"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`: unknown, used, cancelled or expired token"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Look an invite up","tags":["Team"]}},"/me":{"get":{"description":"The signed-in user. Stores and permissions are at `GET /me/access`.","operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"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 my profile","tags":["Me"]},"patch":{"description":"Changes the caller's name, phone or language. Fields left out stay as\nthey are.","operationId":"updateMe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"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`: a field is 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 my profile","tags":["Me"]}},"/me/2fa/totp/disable":{"post":{"description":"Requires the current password or a current code from the app. A fresh\nsecret is generated, so turning it on again needs a new QR code.","operationId":"disableTotp","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/Disable2FARequest"}}},"required":true},"responses":{"204":{"description":"Authenticator app disabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reauthentication_required`: no valid password or code was given"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: too many attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 off the authenticator app","tags":["Me"]}},"/me/2fa/totp/enable":{"post":{"description":"Requires a current code from the app set up with\n`GET /me/2fa/totp/setup`. From then on, sign-in asks for a code.","operationId":"enableTotp","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/EnableTotpRequest"}}},"required":true},"responses":{"204":{"description":"Authenticator app enabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_code`: the code does not match"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`totp_already_enabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 on the authenticator app","tags":["Me"]}},"/me/2fa/totp/setup":{"get":{"description":"Returns the secret and an `otpauth://` URL to show as a QR code. Confirm\nwith `POST /me/2fa/totp/enable` and a code from the app.","operationId":"getTotpSetup","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpSetupResponse"}}},"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":"`totp_already_enabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start setting up an authenticator app","tags":["Me"]}},"/me/2fa/whatsapp/confirm-setup":{"post":{"description":"Confirms the code sent by `start-setup`; the phone becomes the account's\nWhatsApp second factor.","operationId":"confirmWhatsapp2faSetup","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/ConfirmWhatsappSetupRequest"}}},"required":true},"responses":{"204":{"description":"WhatsApp sign-in enabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_pending_code`, `too_many_attempts` (request a new code) or `invalid_code`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: too many attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 on WhatsApp sign-in codes","tags":["Me"]}},"/me/2fa/whatsapp/disable":{"post":{"operationId":"disableWhatsapp2fa","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/Disable2FARequest"}}},"required":true},"responses":{"204":{"description":"WhatsApp sign-in disabled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reauthentication_required`: no valid password or code was given"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: too many attempts","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 off WhatsApp sign-in codes","tags":["Me"]}},"/me/2fa/whatsapp/start-setup":{"post":{"description":"Sends a 6-digit code to `phone`. Confirm with\n`POST /me/2fa/whatsapp/confirm-setup`.","operationId":"startWhatsapp2faSetup","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/StartWhatsappSetupRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendResponse"}}},"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`: the phone needs 10 to 20 digits"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: too many codes requested","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`otp_delivery_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start setting up WhatsApp sign-in codes","tags":["Me"]}},"/me/access":{"get":{"description":"Every store the caller can reach (as owner of the store or its tenant,\nor through an attachment), with the tenant it belongs to, the\npermission sets reaching the caller there and the effective permission\ncodes. Load it once per session to\nbuild a store switcher and to hide what the user cannot do; the server\nenforces the same permissions on every call.","operationId":"getMyAccess","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyAccess"}}},"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 my stores and permissions","tags":["Me"]}},"/me/change-password":{"post":{"description":"Requires the current password. Every other session of the account is\nsigned out; the one making the request stays signed in.","operationId":"changePassword","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/ChangePasswordRequest"}}},"required":true},"responses":{"204":{"description":"Password changed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`incorrect_password`: the current password is wrong"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: the new password is too short"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my password","tags":["Me"]}},"/me/devices":{"get":{"description":"Devices registered for push by the signed-in user, most recently\nregistered first. `current` marks the one registered by this session.","operationId":"listPushDevices","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_PushDevice"}}},"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 my devices","tags":["Push Notifications"]},"post":{"description":"Call after every sign-in, whenever the OS hands the app a new token\n(APNs `didRegisterForRemoteNotificationsWithDeviceToken`, FCM\n`onNewToken`), and on app start if the token or the language changed.\nUpserts by `(platform, token)` and binds the device to the calling user\nand session: a token registered by another account moves to this one,\nand an earlier token of this session on the same platform is dropped\n(token rotation). Pushes stop when the session ends: sign-out or\n`DELETE /me/sessions/{id}` deletes its devices.\n\nNeeds a session access token (`sid`); store API tokens cannot\nregister devices.","operationId":"registerPushDevice","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/RegisterPushDeviceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushDevice"}}},"description":"Already registered; updated"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushDevice"}}},"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":"`session_required`: called with a store API token or a token without a session"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: malformed token or a field 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":"Register a device for push","tags":["Push Notifications"]}},"/me/devices/web-push-config":{"get":{"description":"The key browsers subscribe with before registering their\n`PushSubscription` as a `web` device (`POST /me/devices`).","operationId":"getWebPushKey","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebPushKey"}}},"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":"Web Push key","tags":["Push Notifications"]}},"/me/devices/{device_id}":{"delete":{"description":"Stops pushes to it. Call before signing out, or when the user turns\nnotifications off in the app.","operationId":"deletePushDevice","parameters":[{"description":"Device id from `POST /me/devices`","in":"path","name":"device_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Unregistered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 device of yours"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Unregister a device","tags":["Push Notifications"]}},"/me/devices/{device_id}/test":{"post":{"description":"Sends \"Notifications are working on this device\" (in the device's\nlanguage) right away, not through the queue, and reports what the\nprovider said. Data: `{\"kind\": \"test\"}`. Accepted by the provider does\nnot guarantee display: the user may have notifications off.","operationId":"testPushDevice","parameters":[{"description":"Device id from `POST /me/devices`","in":"path","name":"device_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/PushTestResult"}}},"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 device of yours"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`push_token_invalid`: the provider rejected the token (app uninstalled, wrong app or environment); the device was deleted, register again"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`push_provider_error`: the provider refused or did not answer; `error` has its reason"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`push_not_configured`: push for this platform is not set up on the server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a test push","tags":["Push Notifications"]}},"/me/email":{"post":{"description":"Requires the current password. While the current address was never\nconfirmed (a typo at sign-up), the account moves to the new address\nright away and a confirmation link goes to it. Otherwise the change\nwaits: a link valid for 24 hours goes to the new address, the account\nkeeps the old one until it is used (`POST /auth/email/verify`), and the\nold address is told about the request.","operationId":"changeEmail","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/ChangeEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`incorrect_password`: the current password is wrong"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`email_taken`: another account uses the address"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `details.fields.new_email` is invalid or the account's current address"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: at most 5 per hour","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my e-mail","tags":["Me"]}},"/me/email/verification":{"post":{"description":"To the caller's address, unless it is already confirmed.","operationId":"resendEmailVerification","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"}}],"responses":{"204":{"description":"Sent (or already confirmed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: at most 3 per hour","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the confirmation e-mail again","tags":["Me"]}},"/me/invites/accept":{"post":{"description":"For someone who already has an account: signed in as the invited e-mail,\nthey join with the invited permission sets (or take the organization over, for an\nowner invite) without typing a password again.","operationId":"acceptMyInvite","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/AcceptMyInviteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptMyInviteResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`: unknown, used, cancelled or expired token"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invite_for_another_account`: the invite is for another e-mail (`details.email`); `session_required`: called with a store API token"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Accept an invite as the signed-in user","tags":["Team"]}},"/me/network-invites/accept":{"post":{"description":"Signed in as the invited e-mail: join with a store of an organization\nyou own (`store_id`), or open a new organization with one store\n(`store_name`). The brand's access starts at the ceiling the invite\nshowed.","operationId":"acceptMyNetworkInvite","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/AcceptMyNetworkInviteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptNetworkInviteResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`plan_limit_reached`, `subscription_inactive`: a new store does not fit"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invite_for_another_account` (`details.email`); `owner_only`: the store's organization is not yours; `session_required`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`already_in_network`; `own_network`"},"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":"Accept a network invite as the signed-in user","tags":["Network"]}},"/me/passkeys":{"get":{"operationId":"listMyPasskeys","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PasskeyInfo"},"type":"array"}}},"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 my passkeys","tags":["Me"]}},"/me/passkeys/register/finish":{"post":{"operationId":"finishPasskeyRegistration","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/PasskeyRegisterFinish"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyInfo"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_ceremony`: expired or already used, start again"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`passkey_rejected`: the browser's answer does not check"},"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":"`passkey_exists`: this device is already 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"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`passkeys_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Finish adding a passkey","tags":["Me"]}},"/me/passkeys/register/start":{"post":{"description":"Answers with the options for `navigator.credentials.create()`. Passkeys\nalready on the account are excluded, so a device registers once.","operationId":"startPasskeyRegistration","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyOptions"}}},"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":"`too_many_passkeys`: the account holds 20"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`passkeys_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start adding a passkey","tags":["Me"]}},"/me/passkeys/{passkey_id}":{"delete":{"description":"The passkey stops working at once. Sessions it started stay open; end\nthem from `GET /me/sessions`.","operationId":"deleteMyPasskey","parameters":[{"description":"Passkey id from `GET /me/passkeys`","in":"path","name":"passkey_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":"No such passkey on this account"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 passkey","tags":["Me"]}},"/me/security-events":{"get":{"description":"Sign-ins (including failed ones), second-factor and password changes and\nsessions ended on the caller's account, newest first.","operationId":"listMySecurityEvents","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SecurityEvent"}}},"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 my security events","tags":["Me"]}},"/me/sessions":{"get":{"description":"Devices signed in to the caller's account (active refresh-token\nfamilies), most recently used first. Store API tokens are not\nsessions; see `/stores/{store_id}/api-tokens`.","operationId":"listMySessions","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_DeviceSession"}}},"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 my sessions","tags":["Me"]}},"/me/sessions/revoke-others":{"post":{"description":"Revokes every session of the caller except the one this request was\nmade with: those devices' refresh tokens and access tokens stop\nworking. When the request is not tied to a session (a store API\ntoken, or an access token issued before sessions existed), every\nsession is revoked. Idempotent: with nothing else signed in it does\nnothing and still answers 204.","operationId":"revokeMyOtherSessions","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"}}],"responses":{"204":{"description":"Other sessions revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Sign out my other sessions","tags":["Me"]}},"/me/sessions/{session_id}":{"delete":{"description":"Signs the device out: its refresh token and access tokens stop\nworking. Revoking the current session signs this client out too.","operationId":"revokeMySession","parameters":[{"description":"Session id from `GET /me/sessions`","in":"path","name":"session_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Session revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 active session with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Revoke one of my sessions","tags":["Me"]}},"/network-invites/accept":{"post":{"description":"Signs up through the invite: creates the account for the invited e-mail\n(or, with its password, uses the existing one), opens an organization\nwith one store (`store_name`), already a member, and signs in.","operationId":"acceptNetworkInvite","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/AcceptNetworkInviteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptNetworkInviteResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_credentials`: the e-mail has an account and this is not its password"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_disabled`; `owner_only`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`already_in_network`; `own_network`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Accept a network invite","tags":["Network"]}},"/network-invites/decline":{"post":{"description":"Holding the link is enough: no account needed. The brand is told by\ne-mail.","operationId":"declineNetworkInvite","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/DeclineNetworkInviteRequest"}}},"required":true},"responses":{"204":{"description":"Declined"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Decline a network invite","tags":["Network"]}},"/network-invites/lookup":{"post":{"description":"What the link is for: the network, the brand, exactly what the brand\nwill be able to see in your store (the ceiling) and what it never sees,\nwho pays Mobiari, and whether the invited e-mail has an account.","operationId":"lookupNetworkInvite","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/NetworkInviteTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkInvitePreview"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_invite`: unknown, used, cancelled or expired token"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Look a network invite up","tags":["Network"]}},"/oauth/consent":{"get":{"description":"The app asking to connect, and the stores and permission sets the\nsigned-in person may give it.","operationId":"getOAuthConsent","parameters":[{"in":"query","name":"client_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"redirect_uri","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentInfo"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_client`: unknown app or a return address it did not register"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 an OAuth consent request","tags":["API Tokens"]},"post":{"description":"Approving creates a service account for the connection with the chosen\npermission sets in the chosen store and returns the app's address with\nan authorization code. Declining returns it with `access_denied`.","operationId":"decideOAuthConsent","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/OAuthConsentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_client` or `invalid_request`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission` (managing access and keys in the store), `grant_exceeds_actor`, or `consent_requires_person`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Decide an OAuth consent request","tags":["API Tokens"]}},"/permissions/catalog":{"get":{"description":"Every permission code, grouped, for permission set editors and token scopes. A\nfixed list that changes only with releases.","operationId":"getPermissionCatalog","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionCatalog"}}},"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 permission catalog","tags":["Team"]}},"/places/autocomplete":{"get":{"description":"Brazilian address suggestions for what the user typed, from Google\nPlaces. Debounce calls; each one is billed. 503\n`places_not_configured` when the server has no Google key, in which\ncase fall back to plain address fields.","operationId":"autocompleteAddress","parameters":[{"description":"What the user typed; under 3 characters returns no predictions.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"A client-generated id (e.g. a UUID) shared by the autocomplete\ncalls and the final details call of one address entry, so Google\nbills them as one session.","in":"query","name":"session","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Prediction"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`places_upstream_error`"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`places_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Suggest addresses","tags":["Places"]}},"/places/details/{place_id}":{"get":{"description":"The chosen suggestion as structured address fields (street, number,\nneighborhood, city, state, postal code).","operationId":"getAddressDetails","parameters":[{"description":"`place_id` of a prediction","in":"path","name":"place_id","required":true,"schema":{"type":"string"}},{"description":"The same session id used for the autocomplete calls.","in":"query","name":"session","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParsedAddress"}}},"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":"Unknown place"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`places_upstream_error`"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`places_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get an address","tags":["Places"]}},"/pos/device/kiosk-session":{"post":{"description":"Authenticated with the device credential of a `kiosk` device: no operator,\nno PIN. The kiosk asks again before the session ends. A counter terminal is\nrefused (`403 not_a_kiosk`).","operationId":"openPosKioskSession","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosKioskSession"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_a_kiosk`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Open a kiosk session","tags":["Sales Channels"]}},"/pos/device/kiosk-settings":{"get":{"description":"Authenticated with the device credential of a `kiosk` device. A kiosk asks\nat start and whenever it renews its session.","operationId":"getPosDeviceKioskSettings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosKioskSettings"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_a_kiosk`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The look of this kiosk","tags":["Sales Channels"]}},"/pos/device/me":{"get":{"description":"Authenticated with the device credential. Also the heartbeat: it records\nthat the terminal is alive. `401 device_not_paired` means the credential\nwas revoked or replaced and the terminal must pair again.","operationId":"getPosDevice","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosDeviceIdentity"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"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":"This terminal","tags":["Sales Channels"]}},"/pos/device/operators":{"get":{"description":"Active team members who have a PIN and may use this POS. Names only.","operationId":"listPosDeviceOperators","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PosDeviceOperator"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"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":"Who may sign in on this terminal","tags":["Sales Channels"]}},"/pos/device/sign-in":{"post":{"description":"Authenticated with the device credential. Five wrong PINs lock that PIN for\nfive minutes; sign-in attempts are also limited per terminal.","operationId":"signInPosOperator","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/PosDeviceSignIn"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosDeviceSession"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`device_not_paired` or `invalid_pin`"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pos_not_allowed`: the member may not use this POS"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pin_locked` or `rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Open an operator session","tags":["Sales Channels"]}},"/pos/devices/pair":{"post":{"description":"No credentials: the pairing code is the proof. It is single use and\nexpires in 15 minutes; attempts are limited per address.","operationId":"pairPosDevice","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/PairPosDevice"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosDevicePaired"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_pairing_code`: wrong, used or expired"},"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`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pair a terminal","tags":["Sales Channels"]}},"/preview-auth/grant":{"post":{"description":"Mints a 24-hour token that lets the caller view the store's preview\ndeployments (`<ref>--<store>.<preview suffix>`). Needs\n`storefront.read` in the store. `return_url` must be an https URL on a\npreview host of this deployment; the UI then submits the token in a\nform POST to that host's `/__preview/grant`.","operationId":"grantStorefrontPreview","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/PreviewGrantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewGrant"}}},"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 store with this slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: neither `store_id` nor `store_slug` sent, or `return_url` missing or not a preview host (`invalid_return_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":"Grant a preview session","tags":["Storefront"]}},"/stores":{"get":{"description":"The stores of `tenant_id` the caller can reach (owner, or a member of\nthe store), by name. For every store across tenants with the caller's\npermissions in each, use `GET /me/access`.","operationId":"listStores","parameters":[{"description":"The tenant whose stores to list.","in":"query","name":"tenant_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 tenant's stores","tags":["Stores"]},"post":{"description":"Creates a store in the tenant, with the tenant's currency, language and\ntime zone. The caller becomes its owner, and a Storefront sales channel\nis created with it. Its slug (the free address) comes from the name: plain ASCII,\na taken one gets `-2`, `-3`…; change it with `PATCH /stores/{store_id}`\nuntil the first order. Counts against the plan's store limit. Emits the\n`store.created` webhook.","operationId":"createStore","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/CreateStoreRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`plan_limit_reached`: the plan's store limit is reached (`details` has `limit`, `max`, `used`, `plan`); `subscription_inactive`: the subscription is suspended or canceled"},"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 tenant"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slug_taken`: another store took the same slug at the same moment; retry"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty 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","tags":["Stores"]}},"/stores/{store_id}":{"get":{"description":"Its name, address (`slug`), currency, language and time zone.","operationId":"getStore","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"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"]},"patch":{"description":"`name` can change any time. `slug` only until the store's first order:\nafter that, links customers, carriers and payment providers already hold\nwould stop working. `kind` switches between a store and a service\nworkspace (owner only: it replaces the workspace's features with the\nmatching segment's). Fields left out stay as they are.","operationId":"updateStore","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreRequest"}}},"required":true},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slug_taken`: another store uses that slug; `slug_locked`: the store has orders, so its address no longer changes"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty name or a slug that is not a valid 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":"Rename a store","tags":["Stores"]}},"/stores/{store_id}/access/audit":{"get":{"description":"Who changed which group, policy, attachment or membership in this\nstore or across its organization, newest first.","operationId":"listAccessAudit","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AccessAuditEntry"}}},"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 access changes","tags":["Team"]}},"/stores/{store_id}/access/explain":{"get":{"description":"Why `user_id` may or may not do `action` in the store right now: the\npolicies that decided, and the member's recent decisions. Support's\nfirst screen for \"why can't Maria do this?\".","operationId":"explainAccess","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The member (or service account) to explain.","in":"query","name":"user_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A permission code from `GET /permissions/catalog`.","in":"query","name":"action","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessExplanation"}}},"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`: unknown action"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Explain a member's access","tags":["Team"]}},"/stores/{store_id}/ads/accounts":{"get":{"description":"Every connected ad account (Meta and Google Ads today), with the\nprovider's capabilities and sync health, plus which providers this server\ncan connect.","operationId":"listAdAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsResponse"}}},"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 ad accounts","tags":["Ads"]}},"/stores/{store_id}/ads/accounts/{account_id}":{"delete":{"description":"Meta only: stops syncing it and forgets the login, like disconnecting it\nunder Social. Google Ads is managed by the credentials saved in\nMarketing > Integrations; remove them there.","operationId":"disconnectAdAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account (`AdAccount.id`)","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_managed_in_integrations`: remove the credentials in Marketing > Integrations"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Disconnect an ad account","tags":["Ads"]}},"/stores/{store_id}/ads/ad-groups/{group_id}":{"patch":{"description":"Pause or resume it, or change its daily budget, on the provider that owns\nit. Meta only; Google Ads answers `unsupported` until its adapter grows\nwrites.","operationId":"updateAdGroup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad group (`GroupView.id`)","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdGroupUpdated"}}},"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 ad group in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`lifetime_budget`: the ad group uses a lifetime budget; `unsupported`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_refused`: the provider's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_unavailable`: try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an ad group","tags":["Ads"]}},"/stores/{store_id}/ads/campaigns":{"get":{"description":"Every campaign the store runs, on every provider, with the window's\nspend, impressions, clicks, conversions and the revenue Mobiari's\nattribution credits to it, from the local mirror (no provider call).","operationId":"listAdCampaigns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Start of the window (inclusive), `YYYY-MM-DD`. Overrides `days`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"End of the window (inclusive), `YYYY-MM-DD`. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"`meta`, `google`, `tiktok` or `pinterest`.","in":"query","name":"provider","required":false,"schema":{"type":"string"}},{"description":"The ad account (`AdAccount.id`).","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"active, paused, archived, in_review, rejected...","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Part of the name.","in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}},"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 campaigns","tags":["Ads"]},"post":{"description":"Builds a campaign on the account's provider from one provider-independent\ndraft: objective, daily budget, schedule, audience and creative. Provider\nspecifics go in `provider_options` (Meta: `page_id`, `networks`,\n`message_app`, `product_set_id`; Google: `business_name`, `location_ids`,\n`language_id`, `target_roas`, `logo_file_id`, `youtube_urls`). Created\npaused unless `start_active` is true.","operationId":"createAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateAdRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCreatedResponse"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`campaign_create_unsupported`: this provider cannot create from the standard draft; `account_disabled`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: name, budget, dates, creative or provider options"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_refused`: the provider's message (nothing is left running)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_unavailable`: the provider did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a campaign","tags":["Ads"]}},"/stores/{store_id}/ads/campaigns/{campaign_id}":{"get":{"description":"One campaign with its ad groups and ads, each with the window's numbers,\nand the campaign's daily series next to the revenue attributed to it.","operationId":"getAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The campaign (`Campaign.id`)","in":"path","name":"campaign_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Start of the window (inclusive), `YYYY-MM-DD`. Overrides `days`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"End of the window (inclusive), `YYYY-MM-DD`. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"`meta`, `google`, `tiktok` or `pinterest`.","in":"query","name":"provider","required":false,"schema":{"type":"string"}},{"description":"The ad account (`AdAccount.id`).","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"active, paused, archived, in_review, rejected...","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Part of the name.","in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignDetail"}}},"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 campaign 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 campaign","tags":["Ads"]},"patch":{"description":"Pause, resume or archive it, or change its daily budget, on the provider\nthat owns it. Providers that cannot write (Google Ads today) answer\n`unsupported`; the UI disables the control from the account's\ncapabilities.","operationId":"updateAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The campaign (`Campaign.id`)","in":"path","name":"campaign_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignUpdated"}}},"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 campaign in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`budget_on_ad_group`: the budget lives on the ad set; `unsupported`: this provider cannot write"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_refused`: the provider's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_unavailable`: try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a campaign","tags":["Ads"]}},"/stores/{store_id}/ads/connection":{"get":{"operationId":"getAdsConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsConnection"}}},"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 ads connection","tags":["Ads"]}},"/stores/{store_id}/ads/health":{"get":{"description":"The connected accounts and the latest sync runs, with their errors.","operationId":"getAdsHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsHealth"}}},"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 ads health","tags":["Ads"]}},"/stores/{store_id}/ads/overview":{"get":{"description":"The home screen of the ads area: totals across providers, the daily\nseries, the biggest campaigns and the alerts worth acting on.","operationId":"getAdsOverview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsOverview"}}},"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 ads overview","tags":["Ads"]}},"/stores/{store_id}/ads/performance":{"get":{"description":"Daily spend, impressions, clicks and purchases from the Meta ad account\nnext to the orders our own first-touch attribution assigns to Meta.\nA Meta failure is reported in `meta.error`, not as an error response.","operationId":"getAdsPerformance","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days back, 1 to 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"The ad account to read (`AdAccount.id`); the connected account with a Business by default.","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsPerformance"}}},"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 ads performance","tags":["Ads"]}},"/stores/{store_id}/ads/report":{"get":{"description":"Spend, impressions, clicks, the provider's conversions and the revenue\nMobiari's attribution credits, over one window, grouped by campaign, ad\ngroup, ad or provider. Reads the local mirror, so it is fast and keeps\nhistory.","operationId":"getAdsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Start of the window (inclusive), `YYYY-MM-DD`. Overrides `days`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"End of the window (inclusive), `YYYY-MM-DD`. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"provider","required":false,"schema":{"type":"string"}},{"in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`campaign` (default), `ad_group`, `ad` or `provider`.","in":"query","name":"group_by","required":false,"schema":{"$ref":"#/components/schemas/ReportGroupBy"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdReport"}}},"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 ads report","tags":["Ads"]}},"/stores/{store_id}/ads/sync":{"post":{"description":"Asks each provider for its campaigns, ad groups, ads and recent daily\ninsights now, instead of waiting for the background sync. Answers how\nmany accounts were read, how many rows were written and which failed.","operationId":"syncAdAccounts","parameters":[{"description":"Store id","in":"path","name":"store_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/SyncResult"}}},"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":"Missing permission"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sync every connected account","tags":["Ads"]}},"/stores/{store_id}/ai-actions":{"get":{"description":"The actions in the company's system the workspace's AI can take.","operationId":"listAiActions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiAction"},"type":"array"}}},"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 AI actions","tags":["Conversations"]},"put":{"description":"The whole list, in order. Each action is a signed POST to its `url`\n(see the customer context guide); calls need the workspace's\nintegration secret.","operationId":"replaceAiActions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiAction"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiAction"},"type":"array"}}},"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`: a bad or repeated name, a missing description, a URL that is not https, more than 20 actions or 10 parameters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the AI actions","tags":["Conversations"]}},"/stores/{store_id}/ai-actions/{name}/test":{"post":{"description":"Calls the saved action's endpoint with `input` and `\"test\": true`, as\nthe AI would (no customer), and returns what it answered.","operationId":"testAiAction","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The action's name","in":"path","name":"name","required":true,"schema":{"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/TestAiActionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiActionResult"}}},"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 action"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Test an AI action","tags":["Conversations"]}},"/stores/{store_id}/api-tokens/{token_id}":{"delete":{"description":"The key stops working immediately.","operationId":"revokeApiToken","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Token id","in":"path","name":"token_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Token revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 active token with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Revoke an API key","tags":["API Tokens"]},"patch":{"description":"Change which writes over MCP wait for approval. Works for keys issued in\nthe app and for OAuth connections. Only a signed-in person may: an API\nkey gets 403 `approval_requires_person`.","operationId":"updateApiToken","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Token id","in":"path","name":"token_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenSummary"}}},"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":"`missing_permission`, or `approval_requires_person` when called with an API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No active token with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 API key","tags":["API Tokens"]}},"/stores/{store_id}/assistant/actions":{"get":{"description":"Writes the assistant applied in the store, newest first: only those\nwhose permission the caller holds.","operationId":"listAssistantActions","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AssistantAction"}}},"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 assistant actions","tags":["Assistant"]}},"/stores/{store_id}/assistant/actions/{action_id}/undo":{"post":{"description":"Restores what the write changed, from the snapshot taken before it.\nSupported for `update_product`, `mark_order_paid`, `fulfill_order`,\n`cancel_order` and `bulk_update_variant_prices`; anything else has to be\nreverted by hand. Needs the permission the write needed.","operationId":"undoAssistantAction","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Assistant action id","in":"path","name":"action_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/AssistantAction"}}},"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 action in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`action_already_undone`, or `undo_conflict`: the record changed since the action"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`undo_not_supported`: this kind of write cannot be undone automatically"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Undo an assistant action","tags":["Assistant"]}},"/stores/{store_id}/assistant/chat":{"post":{"description":"Sends a message and streams the assistant's turn: text, tool calls and their results, and proposals for writes, which wait for `approveAssistantProposal` / `declineAssistantProposal`. A proposal left unanswered expires when the next message is sent. Counts toward the store's monthly message cap, set by the organization's plan.\n\nThe response is `text/event-stream`. Server-sent events, each `event: <type>` with a JSON `data` object carrying the same `type`: `conversation` {conversation_id} (always first), `message_start` {message_id}, `text_delta` {message_id, text}, `thinking_delta` {message_id, text}, `tool_call` {message_id, tool_use_id, tool_name, input}, `tool_result` {tool_use_id, content, is_error} (`content` is the tool's JSON output as a string; report tools may include `chart_png_b64`), `proposal` {message_id, proposal_id, tool_use_id, tool_name, preview, expires_at} (a write waiting for approval), `message_end` {message_id, stop_reason}, `title` {title}, `usage` {input_tokens, output_tokens, cache_read_tokens, cache_creation_tokens}, `stopped`, `error` {message} and `done` (always last).","operationId":"chatWithAssistant","parameters":[{"description":"Store id","in":"path","name":"store_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/AssistantChatRequest"}}},"required":true},"responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"The turn, as server-sent events (see the description)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`subscription_inactive`: the organization's subscription is suspended or canceled"},"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":"`assistant_busy`: a turn is already running in this conversation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: blank or too long message (32000 characters), or context over 64 kB"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_cap_reached`: the store used its plan's monthly messages (also `rate_limited`, see the other 429s)","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`: no model configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Talk to the assistant","tags":["Assistant"]}},"/stores/{store_id}/assistant/conversations":{"get":{"description":"Your own conversations in the store (web and WhatsApp), most recently\nactive first.","operationId":"listAssistantConversations","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Search titles and your own messages.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Same as `search` (older clients). Deprecated.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AssistantConversation"}}},"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 your assistant conversations","tags":["Assistant"]}},"/stores/{store_id}/assistant/phones":{"get":{"description":"Your WhatsApp numbers linked to the assistant in this store.","operationId":"listAssistantPhones","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AssistantLinkedPhone"}}},"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 your assistant phones","tags":["Assistant"]}},"/stores/{store_id}/assistant/phones/verify-complete":{"post":{"description":"Checks the code; from then on messages from the number reach the\nassistant as you, in this store.","operationId":"completeAssistantPhoneVerification","parameters":[{"description":"Store id","in":"path","name":"store_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/CompleteAssistantPhoneVerificationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantLinkedPhone"}}},"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 verification of this number pending for you in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`phone_already_verified`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_verification_code`: wrong or expired code; `validation_failed`: not a phone number"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`too_many_attempts`: 5 wrong codes; request a new one","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Verify a phone","tags":["Assistant"]}},"/stores/{store_id}/assistant/phones/verify-start":{"post":{"description":"Sends a 6-digit code over WhatsApp to link the number to you (the caller)\nin this store. Starting again replaces your previous code; a number\nalready linked to another account is refused.","operationId":"startAssistantPhoneVerification","parameters":[{"description":"Store id","in":"path","name":"store_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/StartAssistantPhoneVerificationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPhoneVerification"}}},"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":"`phone_linked_elsewhere`: the number is linked to another account"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not a phone number"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_send_failed`: the code could not be sent; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a phone verification code","tags":["Assistant"]}},"/stores/{store_id}/assistant/prefs":{"get":{"operationId":"getAssistantPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPreferences"}}},"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 assistant preferences","tags":["Assistant"]},"put":{"description":"The extra instructions go into every turn of every member, so this needs\n`stores.write`.","operationId":"updateAssistantPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssistantPreferencesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPreferences"}}},"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":"Update the assistant preferences","tags":["Assistant"]}},"/stores/{store_id}/assistant/usage":{"get":{"description":"Tokens and messages this month, and the monthly message cap set by the\norganization's plan.","operationId":"getAssistantUsage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantUsage"}}},"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 assistant usage","tags":["Assistant"]}},"/stores/{store_id}/audiences":{"get":{"description":"Segments mirrored to Meta Custom Audiences, newest first.","operationId":"listAdAudiences","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AdAudience"}}},"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 ad audiences","tags":["Ads"]},"post":{"description":"Mirrors a segment to a new Meta Custom Audience and starts the first sync\nin the background (hashed e-mail and name of members who accepted\nmarketing).","operationId":"createAdAudience","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateAdAudienceRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdAudience"}}},"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`: `segment_id` is not a segment of 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":"Create an ad audience","tags":["Ads"]}},"/stores/{store_id}/audiences/{audience_id}":{"delete":{"description":"Also deletes the audience on Meta (best effort), so hashed data does not\nlinger there.","operationId":"deleteAdAudience","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Ad audience id","in":"path","name":"audience_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 audience 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 ad audience","tags":["Ads"]}},"/stores/{store_id}/audiences/{audience_id}/sync":{"post":{"description":"Replaces the Meta audience with the segment's current members. Meta then\nmatches them: the audience stays `syncing` until its size shows (read it\nagain in a minute). The ad account must belong to a Business and have\naccepted Meta's Custom Audience terms; otherwise the answer says which.","operationId":"syncAdAudience","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Ad audience id","in":"path","name":"audience_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/AdAudience"}}},"description":"Uploaded; `last_count` is how many contacts went and `status` stays `syncing` while Meta matches them"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 audience in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_not_connected`, `account_unavailable` (connect again), `audience_needs_business`, `audience_needs_terms`, `audience_account_disabled`, `segment_missing` or `audience_empty` (no member can go to Meta): the message says what to do, and `details` carries `account` and `terms_url`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sync an ad audience now","tags":["Ads"]}},"/stores/{store_id}/audit":{"get":{"description":"Who did what in the store (assistant writes, campaign sends, settings\nchanges, customer data rights), newest first.","operationId":"listAuditEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only actions starting with this, e.g. `customers.` or `customers.merged`.","in":"query","name":"action","required":false,"schema":{"type":"string"}},{"description":"Only actions by this user.","in":"query","name":"actor","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only events at or after this instant (RFC 3339).","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Only events before this instant (RFC 3339).","in":"query","name":"to","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_AuditEvent"}}},"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 audit log","tags":["Audit"]}},"/stores/{store_id}/audit/actions":{"get":{"description":"The distinct actions recorded in this store, alphabetically, for a\nfilter menu. A small list; not paged.","operationId":"listAuditActions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"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 audited action names","tags":["Audit"]}},"/stores/{store_id}/audit/export":{"get":{"description":"The same filters as the list, as CSV (UTF-8, header row), newest first,\nat most 10,000 rows. For auditors and retention.","operationId":"exportAuditEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only actions starting with this, e.g. `customers.` or `customers.merged`.","in":"query","name":"action","required":false,"schema":{"type":"string"}},{"description":"Only actions by this user.","in":"query","name":"actor","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only events at or after this instant (RFC 3339).","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Only events before this instant (RFC 3339).","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Export the audit log","tags":["Audit"]}},"/stores/{store_id}/bank/connection":{"delete":{"description":"Forgets the credentials. The credits already read, and the charges made from them, stay.","operationId":"disconnectBank","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Disconnect the bank","tags":["Bank"]},"get":{"description":"Whether the store reads a bank account, and how the last read went. No secrets.","operationId":"getBankConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BankConnection"}]}}},"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":"The bank connection","tags":["Bank"]},"put":{"description":"Saves a statement-only Banco Inter integration (create it in Inter Empresas with only\n\"Consulta de extrato e saldo\"). The credentials are checked against the bank before they\nare kept, and sealed.","operationId":"connectBank","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankConnectInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankConnection"}}},"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_bank_credentials`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect the bank","tags":["Bank"]}},"/stores/{store_id}/bank/credits":{"get":{"description":"What arrived in the account, newest first; with `status`, only those.","operationId":"listBankCredits","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`new`, `charged` or `ignored`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BankCredit"},"type":"array"}}},"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_status`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 bank credits","tags":["Bank"]}},"/stores/{store_id}/bank/credits/{credit_id}/charge":{"post":{"description":"Records the credit as a charge already received, with its amount and date, for the\nbusiness, and remembers that this payer pays for that business.","operationId":"chargeBankCredit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Bank credit id","in":"path","name":"credit_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/CreditChargeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}},"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":"`credit_not_new`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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":"Make a charge from a bank credit","tags":["Bank"]}},"/stores/{store_id}/bank/credits/{credit_id}/ignore":{"post":{"description":"Not a payment to invoice (a transfer between your own accounts, say). It leaves the inbox.","operationId":"ignoreBankCredit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Bank credit id","in":"path","name":"credit_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/BankCredit"}}},"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":"`credit_not_new`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ignore a bank credit","tags":["Bank"]}},"/stores/{store_id}/bank/sync":{"post":{"description":"Does what the worker does every few minutes, for this store, and says what it found.","operationId":"syncBank","parameters":[{"description":"Store id","in":"path","name":"store_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/SyncReport"}}},"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":"`bank_read_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":"Read the statement now","tags":["Bank"]}},"/stores/{store_id}/billing/arrangements":{"get":{"description":"The store's billing arrangements, active first.","operationId":"listBillingArrangements","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Arrangement"},"type":"array"}}},"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 arrangements","tags":["Billing"]},"post":{"operationId":"createBillingArrangement","parameters":[{"description":"Store id","in":"path","name":"store_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/ArrangementInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Arrangement"}}},"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":"`client_required`, `name_required`, `invalid_basis`, `invalid_issue_when`, `invalid_status`, `amount_must_be_positive`, `amount_required`, `invalid_document`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 arrangement","tags":["Billing"]}},"/stores/{store_id}/billing/arrangements/{arrangement_id}":{"put":{"description":"Replaces its terms. Charges already made keep what they were.","operationId":"updateBillingArrangement","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Arrangement id","in":"path","name":"arrangement_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArrangementInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Arrangement"}}},"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":"Update an arrangement","tags":["Billing"]}},"/stores/{store_id}/billing/charges":{"get":{"description":"Newest first; with `stage`, only those with that left to do.","operationId":"listCharges","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`to_approve`, `to_receive`, `to_issue`, `done` or `void`.","in":"query","name":"stage","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"arrangement_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Only the charges of this business (to prefill the next one from the last).","in":"query","name":"company_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Charge"},"type":"array"}}},"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_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":"List charges","tags":["Billing"]},"post":{"description":"Under an arrangement, or ad hoc. With `received_on` it is created as\nalready received, which is how a payment that arrived first is recorded.","operationId":"createCharge","parameters":[{"description":"Store id","in":"path","name":"store_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/ChargeCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}},"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":"The arrangement does not exist"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`arrangement_inactive`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`client_required`, `description_required`, `amount_required`, `amount_must_be_positive`, `invalid_method`, `invalid_document`, `future_date`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 charge","tags":["Billing"]}},"/stores/{store_id}/billing/charges/{charge_id}/approve":{"post":{"description":"Marks it ready to invoice for an arrangement that invoices on approval.\nApproving twice changes nothing.","operationId":"approveCharge","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_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/Charge"}}},"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":"`charge_void`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 charge","tags":["Billing"]}},"/stores/{store_id}/billing/charges/{charge_id}/external-invoice":{"delete":{"description":"For a number typed wrongly: the charge goes back to what it was before.","operationId":"clearExternalInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}},"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":"Remove a recorded external invoice","tags":["Billing"]},"post":{"description":"The NFS-e was issued outside Mobiari (the accountant's platform, the city's portal): the\nnumber is recorded so the charge counts as invoiced. A charge that already has a live\nNFS-e here cannot take one.","operationId":"recordExternalInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_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/ExternalInvoiceInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}},"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":"`charge_void`, `charge_invoiced`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`number_required`, `invalid_source`, `future_date`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an invoice issued elsewhere","tags":["Billing"]}},"/stores/{store_id}/billing/charges/{charge_id}/issue-invoice":{"post":{"description":"Issues the NFS-e from what the charge and its business hold: the client and\nits address (abroad or in Brazil), the description and the amount. Nothing is\ntyped again. The charge must be ready to invoice (`to_issue`).","operationId":"issueChargeInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_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/IssueInvoiceResult"}}},"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":"`charge_invoiced`, `charge_void`, `charge_not_ready`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`company_required`, `company_invoice_data_missing`, `invalid_document`, `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 the service invoice of a charge","tags":["Billing"]}},"/stores/{store_id}/billing/charges/{charge_id}/receive":{"post":{"description":"The team says the money arrived. It also counts as approved.","operationId":"receiveCharge","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_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/ReceiveInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}},"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":"`charge_void`, `already_received`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_method`, `future_date`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 charge as received","tags":["Billing"]}},"/stores/{store_id}/billing/charges/{charge_id}/void":{"post":{"description":"A charge with a live service invoice cannot be voided: cancel the invoice\nfirst.","operationId":"voidCharge","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Charge id","in":"path","name":"charge_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/Charge"}}},"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":"`charge_invoiced`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 charge","tags":["Billing"]}},"/stores/{store_id}/boards":{"get":{"description":"Newest last, with how many cards each holds and how many are done.","operationId":"listBoards","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Include archived boards.","in":"query","name":"archived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BoardSummary"},"type":"array"}}},"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 boards","tags":["Projects"]},"post":{"operationId":"createBoard","parameters":[{"description":"Store id","in":"path","name":"store_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/BoardCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Board"}}},"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 or column 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 a board","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}":{"delete":{"description":"Deletes its columns and cards too.","operationId":"deleteBoard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_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 board 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 board","tags":["Projects"]},"get":{"description":"Columns in order and every card of the board by position.","operationId":"getBoard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Board"}}},"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 board 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 board","tags":["Projects"]},"patch":{"operationId":"updateBoard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Board"}}},"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 board 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":"Edit a board","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/cards":{"post":{"operationId":"createBoardCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_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/CardCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}},"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 board in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a title out of range, a column of another board, 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":"Add a card","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/cards/{card_id}":{"delete":{"operationId":"deleteBoardCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_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 card on this board"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 card","tags":["Projects"]},"patch":{"operationId":"updateBoardCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Card"}}},"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 card on this board"},"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":"Edit a card","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/cards/{card_id}/comments":{"get":{"description":"Oldest first.","operationId":"listBoardCardComments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CardComment"},"type":"array"}}},"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 card on this board"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 card's comments","tags":["Projects"]},"post":{"description":"The card's assignee is told, unless they wrote it.","operationId":"createBoardCardComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_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/CommentCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardComment"}}},"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 card on this board"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an empty or too long comment"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Comment on a card","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/cards/{card_id}/comments/{comment_id}":{"delete":{"description":"Only its author can (anyone who writes projects, when the author's account is gone).","operationId":"deleteBoardCardComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_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_author`: someone else's comment"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such comment on this card"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 comment","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/cards/{card_id}/move":{"post":{"description":"To a column of the same board at a place in it (the end by default). A card\nthat reaches a done column is finished; one that leaves it is reopened.","operationId":"moveBoardCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Card id","in":"path","name":"card_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/CardMoveRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Board"}}},"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 card on this board"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: the column is not on this board"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 card","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/columns":{"post":{"description":"It goes after the board's last column.","operationId":"createBoardColumn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_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/ColumnCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Column"}}},"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 board in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a name out of range or 20 columns already"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 column","tags":["Projects"]}},"/stores/{store_id}/boards/{board_id}/columns/{column_id}":{"delete":{"description":"Only an empty column can go; move or delete its cards first.","operationId":"deleteBoardColumn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Column id","in":"path","name":"column_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 column on this board"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`column_not_empty`: it still holds cards"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 column","tags":["Projects"]},"patch":{"description":"Renames it, marks it as the done column or places it among the others.\nTurning `is_done` on finishes the cards it holds; off reopens them.","operationId":"updateBoardColumn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Board id","in":"path","name":"board_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Column id","in":"path","name":"column_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Board"}}},"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 column on this board"},"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":"Edit or move a column","tags":["Projects"]}},"/stores/{store_id}/booking-invites":{"get":{"description":"The links sent to a customer or for a deal, newest first, with whether\nthey were booked. Covers 100.","operationId":"listBookingInvites","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"deal_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingInvite"},"type":"array"}}},"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`: neither a customer nor a deal"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 booking links","tags":["Bookings"]},"post":{"description":"Makes a personal link to the store's booking page for a customer (and a\ndeal), optionally e-mailed to them. When they book with it, the booking\nis theirs and becomes a meeting task for the assignee on that deal. The\naddress is returned once. Needs the booking page on.","operationId":"createBookingInvite","parameters":[{"description":"Store id","in":"path","name":"store_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/BookingInviteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInviteCreated"}}},"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":"`booking_page_off`, `customer_without_email`, `validation_failed` (a record of another store, an inactive service, a bad expiry)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 booking link","tags":["Bookings"]}},"/stores/{store_id}/booking-package-plans":{"get":{"description":"What the store sells as packages of sessions, active or not.","operationId":"listBookingPackagePlans","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingPackagePlan"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/BookingPackagePlanInput"}}},"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"]}},"/stores/{store_id}/booking-package-plans/{plan_id}":{"delete":{"description":"Packages already sold stay (they keep their own name and sessions).","operationId":"deleteBookingPackagePlan","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Package plan id","in":"path","name":"plan_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPackagePlanInput"}}},"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"]}},"/stores/{store_id}/booking-packages":{"get":{"description":"Clients' packages, newest first (up to 500), with the sessions spent.","operationId":"listBookingPackages","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/BookingPackage"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/IssuePackage"}}},"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"]}},"/stores/{store_id}/booking-packages/{package_id}":{"get":{"operationId":"getBookingPackage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/booking-packages/{package_id}/cancel":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/booking-packages/{package_id}/resend":{"post":{"description":"To the client's e-mail.","operationId":"resendBookingPackage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"204":{"description":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_email`: the client has no e-mail"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the package's code again","tags":["Bookings"]}},"/stores/{store_id}/booking-providers":{"get":{"description":"Every provider of the store with the services they deliver and their\nweekly hours.","operationId":"listBookingProviders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingProvider"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/BookingProviderInput"}}},"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"]}},"/stores/{store_id}/booking-providers/{provider_id}":{"delete":{"description":"Only one nobody ever booked; otherwise switch them off (`active: false`).","operationId":"deleteBookingProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingProviderInput"}}},"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"]}},"/stores/{store_id}/booking-providers/{provider_id}/calendar-feed":{"delete":{"description":"The link stops working; turning it on again makes a new one.","operationId":"disableBookingCalendarFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Off (also when it was off)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Turn off a provider's calendar feed","tags":["Bookings"]},"post":{"description":"Makes the link to the provider's bookings as an iCalendar feed (the same\nlink every time until it is turned off). Whoever has the link can read\nthe bookings' times, services and client names, so share it with care.","operationId":"enableBookingCalendarFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarFeed"}}},"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":"Turn on a provider's calendar feed","tags":["Bookings"]}},"/stores/{store_id}/booking-providers/{provider_id}/google":{"delete":{"description":"Stops writing and reading it, and asks Google to forget the grant. Events\nalready written stay in the calendar.","operationId":"disconnectBookingCalendar","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Disconnect a Google calendar","tags":["Bookings"]}},"/stores/{store_id}/booking-providers/{provider_id}/google/authorize":{"post":{"description":"Returns Google's address where the provider allows Mobiari to write their\nbookings and read when they are busy. Google sends the browser back to the\nadmin app (`/bookings?view=providers&gcal_code=…&gcal_state=…`), which calls\n`complete`.\nWith `bookings.manage`, or by the provider themselves (`bookings.own`).","operationId":"authorizeBookingCalendar","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarAuthorize"}}},"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":"`google_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a Google calendar","tags":["Bookings"]}},"/stores/{store_id}/booking-providers/{provider_id}/google/complete":{"post":{"description":"With the `gcal_code` and `gcal_state` Google sent back, by the person who\nstarted it. Bookings from now on are written to the calendar; those\nalready booked are written too.","operationId":"completeBookingCalendar","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CalendarComplete"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state` (expired, used, or someone else's), `google_refused` or `no_refresh_token`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Finish connecting a Google calendar","tags":["Bookings"]}},"/stores/{store_id}/booking-providers/{provider_id}/hours":{"put":{"description":"Replaces every window. A day can have several (a morning and an\nafternoon); an empty list closes the provider.","operationId":"setBookingProviderHours","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingHoursInput"}}},"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_hours`: a weekday outside 1 to 7, minutes out of range, an end before the start, overlapping windows or more than 70"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 provider's weekly hours","tags":["Bookings"]}},"/stores/{store_id}/booking-providers/{provider_id}/time-off":{"get":{"description":"Spans that have not ended yet, soonest first.","operationId":"listBookingTimeOff","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingTimeOff"},"type":"array"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/booking-providers/{provider_id}/time-off/{time_off_id}":{"delete":{"operationId":"deleteBookingTimeOff","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/booking-services":{"get":{"description":"Every service of the store, active or not, in the order the team set.","operationId":"listBookingServices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingService"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/BookingServiceInput"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service id","in":"path","name":"service_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingServiceInput"}}},"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"]}},"/stores/{store_id}/booking-waitlist":{"get":{"description":"Clients waiting for a time, by day then arrival (up to 500).","operationId":"listBookingWaitlist","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/WaitlistEntry"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/JoinWaitlist"}}},"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"]}},"/stores/{store_id}/booking-waitlist/{entry_id}":{"delete":{"operationId":"removeFromBookingWaitlist","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings":{"get":{"description":"Bookings starting in a window of at most 62 days, soonest first (up to\n1000).","operationId":"listBookings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/Booking"},"type":"array"}}},"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.","operationId":"createBooking","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateBooking"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"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"]}},"/stores/{store_id}/bookings/availability":{"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":"getBookingAvailability","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/BookingSlot"},"type":"array"}}},"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"]}},"/stores/{store_id}/bookings/series":{"post":{"description":"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":"createBookingSeries","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateBookingSeries"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The first session: `slot_taken` and the other booking codes"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_series` and the booking 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":"Book a repeating series","tags":["Bookings"]}},"/stores/{store_id}/bookings/settings":{"get":{"description":"Whether clients can book online, when they are reminded and where their\nreplies go.","operationId":"getBookingSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSettings"}}},"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":"Booking settings","tags":["Bookings"]},"put":{"description":"Fields left out stay as they are. Turning online booking on needs at least\none active service with an active provider who works some day.","operationId":"updateBookingSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSettingsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingSettings"}}},"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_reminders` 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":"Change the booking settings","tags":["Bookings"]}},"/stores/{store_id}/bookings/{booking_id}":{"get":{"operationId":"getBooking","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings/{booking_id}/cancel":{"post":{"description":"Frees the time and e-mails the client. The team can cancel any time.","operationId":"cancelBooking","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings/{booking_id}/complete":{"post":{"description":"For a confirmed booking whose time has come.","operationId":"completeBooking","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings/{booking_id}/no-show":{"post":{"description":"For a confirmed booking whose time has come and the client did not.","operationId":"markBookingNoShow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Booking id","in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BookingNote"},"type":"array"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings/{booking_id}/notes/{note_id}":{"delete":{"description":"Only its author, or with `bookings.notes`.","operationId":"deleteBookingNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/bookings/{booking_id}/reschedule":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/brand-kit":{"get":{"description":"The store's brand profile as e-mails use it, and the font presets.","operationId":"getEmailBrandKit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBrandKitResponse"}}},"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 e-mail brand kit","tags":["Brand"]},"put":{"description":"Replaces the stored kit. Templates with a block design pick it up the\nnext time they are saved or rendered.","operationId":"updateEmailBrandKit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailBrandKitRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBrandKitResponse"}}},"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":"Save the e-mail brand kit","tags":["Brand"]}},"/stores/{store_id}/brand-kit/ai":{"post":{"description":"Revise the brand profile from a free-text instruction (\"mais quente e artesanal\",\n\"botões arredondados e títulos em serifa\"). Returns the full patched kit plus notes on\nwhat changed; nothing is saved.","operationId":"reviseEmailBrandKitWithAssistant","parameters":[{"description":"Store id","in":"path","name":"store_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/ReviseEmailBrandKitRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBrandKitRevision"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_error`: the model failed or answered something unusable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: no model configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Revise the e-mail brand kit with the assistant","tags":["Brand"]}},"/stores/{store_id}/brand-kit/import":{"post":{"description":"Reads a public page and suggests colors, fonts and a logo on top of the\ncurrent kit. Nothing is saved.","operationId":"importEmailBrandKit","parameters":[{"description":"Store id","in":"path","name":"store_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/ImportEmailBrandKitRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The suggestion: the patched kit and what was found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`brand_import_failed`: the page could not be read or is not allowed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Suggest a brand kit from a website","tags":["Brand"]}},"/stores/{store_id}/brand-system":{"get":{"description":"The store's design system (identity, voice, colors, typography,\nspacing, effects, imagery, components, assets, guide), its version\nhistory and any job still running.","operationId":"getBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSystemState"}}},"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 brand system","tags":["Brand"]},"put":{"description":"Replaces the current system and records a new version. The e-mail\nbrand kit is derived from it in the same write.","operationId":"saveBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveBrandSystemRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSystemSaved"}}},"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":"Save the brand system","tags":["Brand"]}},"/stores/{store_id}/brand-system/ai":{"post":{"description":"Has the assistant apply the instruction to the system and save a new\nversion; runs in the background.","operationId":"reviseBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_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/ReviseBrandSystemRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandJobStarted"}}},"description":"Job started (or already running)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`brand_system_missing`: generate the system 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"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: AI is not configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Revise the brand system with AI","tags":["Brand"]}},"/stores/{store_id}/brand-system/assets":{"post":{"description":"`multipart/form-data` with one file (logo, image or font). Stores it\nand answers its public URL; the system is not changed until it is saved\nwith the URL.","operationId":"uploadBrandAsset","parameters":[{"description":"Store id","in":"path","name":"store_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/BrandAssetUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedBrandAsset"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"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"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Over 15 MB"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_missing`: no file part; `invalid_asset`: unsupported type or over 12 MB"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 brand asset","tags":["Brand"]}},"/stores/{store_id}/brand-system/export":{"get":{"description":"A `.zip` design-system package: the system as JSON, CSS tokens, the\nguide and a rendered e-mail preview, named `<brand>-design-system.zip`.","operationId":"exportBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"$ref":"#/components/schemas/BrandPackageFile"}}},"description":"The package"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`brand_system_missing`: nothing to export 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Export the brand system","tags":["Brand"]}},"/stores/{store_id}/brand-system/generate":{"post":{"description":"Crawls the pages, reads the repositories and attachments, and has the\nassistant write the system; runs in the background (a few minutes) and\nsaves a new version when done. With `from_kit`, derives the system from\nthe e-mail brand kit at once instead and answers 200 with it.","operationId":"generateBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_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/GenerateBrandSystemRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSystemSaved"}}},"description":"`from_kit`: saved"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandJobStarted"}}},"description":"Job started (or already running)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`brand_sources_missing`: no URL, notes or storefront to start from"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`: AI is not configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Generate the brand system","tags":["Brand"]}},"/stores/{store_id}/brand-system/import":{"post":{"description":"`multipart/form-data` with the `.zip` in `file`. Hosts the package's\nimages and fonts, has the assistant map it onto the brand system and\nsaves a new version; runs in the background.","operationId":"importBrandSystem","parameters":[{"description":"Store id","in":"path","name":"store_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/BrandImportForm"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandJobStarted"}}},"description":"Job started (or already running)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"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"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Over 40 MB"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_missing`: no `file` part; `invalid_package`: not a readable .zip package"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_unavailable`: AI is not configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Import a design-system package","tags":["Brand"]}},"/stores/{store_id}/brand-system/jobs/{job_id}":{"get":{"description":"Poll this after starting a generation, revision or import until\n`status` leaves `running`.","operationId":"getBrandJob","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Job id","in":"path","name":"job_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandJob"}}},"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":"`brand_job_not_found`: unknown job, or lost in a server restart (check the versions list)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 brand job","tags":["Brand"]}},"/stores/{store_id}/brand-system/versions/{version}":{"get":{"operationId":"getBrandSystemVersion","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version number","in":"path","name":"version","required":true,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSystemVersionDetail"}}},"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 version"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 brand system version","tags":["Brand"]}},"/stores/{store_id}/brand-system/versions/{version}/restore":{"post":{"description":"Saves the old version's system as a new version.","operationId":"restoreBrandSystemVersion","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version number","in":"path","name":"version","required":true,"schema":{"format":"int32","type":"integer"}},{"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/BrandSystemSaved"}}},"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 version"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Restore a brand system version","tags":["Brand"]}},"/stores/{store_id}/build-jobs":{"get":{"description":"Newest first, with the product, the order and live parts readiness.","operationId":"listBuildJobs","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["queued","in_progress","ready","cancelled"],"type":"string"}},{"in":"query","name":"variant_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"order_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_BuildJob"}}},"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 build jobs","tags":["Manufacturing"]}},"/stores/{store_id}/build-jobs/{job_id}":{"get":{"operationId":"getBuildJob","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Build job id","in":"path","name":"job_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildJob"}}},"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":"`build_job_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 build job","tags":["Manufacturing"]},"put":{"description":"Changes the status, notes or target date. Moving the status stamps\n`started_at` / `completed_at` / `cancelled_at`; to start part of a queued\njob use `startBuildJob`.","operationId":"updateBuildJob","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Build job id","in":"path","name":"job_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildJobUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildJob"}}},"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":"`build_job_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`build_job_shipped`: a built unit that already left cannot go back to the bench"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 build job","tags":["Manufacturing"]}},"/stores/{store_id}/build-jobs/{job_id}/start":{"post":{"description":"Moves units of a `queued` job to the bench. Starting fewer than the job\nquantity splits it: a new `in_progress` batch carries the started units\nand the original keeps the rest, queued. Answers with the started batch.","operationId":"startBuildJob","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Build job id","in":"path","name":"job_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/BuildJobStartRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildJob"}}},"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":"`build_job_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`build_job_not_queued`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_quantity`: not between 1 and the job quantity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start a build job","tags":["Manufacturing"]}},"/stores/{store_id}/calls":{"get":{"description":"Newest first, every provider. Covers the 500 most recent matches.","operationId":"listCalls","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`missed` (inbound nobody answered, or the team declined), `to_call_back`\n(missed, not yet called back), `answered`\n(talked through or in progress), `unlogged` (talked through, no\noutcome yet) or `all` (default).","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"`inbound` or `outbound`.","in":"query","name":"direction","required":false,"schema":{"type":"string"}},{"description":"`me` or a user id: calls that member answered or placed.","in":"query","name":"agent","required":false,"schema":{"type":"string"}},{"description":"One of the outcomes.","in":"query","name":"outcome","required":false,"schema":{"type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"deal_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`whatsapp`, `twilio` or `sip`.","in":"query","name":"provider","required":false,"schema":{"type":"string"}},{"description":"Calls from this day on (the store's day), inclusive.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Calls up to this day, inclusive.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Part of the number or of the name.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Call"}}},"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`: an unknown filter 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":"List calls","tags":["Calls"]}},"/stores/{store_id}/calls/stats":{"get":{"description":"Totals, answer and callback figures, outcomes, per-member activity, a\nweekday-by-hour heatmap and calls per day, in the store's time zone.","operationId":"getCallStats","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day (the store's), inclusive; 30 days before `to` by default.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Last day, inclusive; today by default.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"`me` or a user id: only that member's calls.","in":"query","name":"agent","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStats"}}},"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`: `from` after `to`, a period over 366 days or a bad agent"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Call figures","tags":["Calls"]}},"/stores/{store_id}/calls/{call_id}":{"get":{"description":"The call with its caller's context: owner, open deals, last order, open\ntasks and conversations, earlier calls and the last contact. The admin\nshows it while the call rings and runs (the screen pop).","operationId":"getCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}},"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 call 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 call","tags":["Calls"]},"patch":{"description":"The agent's side of a call: what it came to, notes, the deal it was about\nand, optionally, the next step as a task. `calls.logged` goes out when the\ncall first gets an outcome (a save with notes only does not count);\nediting it later does not emit it again. Logging counts as activity on\nthe deal.","operationId":"logCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallLogRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"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 call in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an unknown outcome, notes too long, a deal of another customer or store, a bad follow-up"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 call's outcome","tags":["Calls"]}},"/stores/{store_id}/calls/{call_id}/analyze":{"post":{"description":"Reads the transcript again (after a transcript arrived late, or with the\nstore's new alert words).","operationId":"analyzeCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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":{"202":{"description":"Queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 call in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_transcript`: nothing was transcribed for this call"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Analyse a call again","tags":["Calls"]}},"/stores/{store_id}/calls/{call_id}/recording":{"delete":{"description":"The caller asked not to be recorded (or it was a mistake): deletes the\naudio, the transcripts and the analysis, and refuses what the relay still\nsends for this call. The call itself and its audio path go on.","operationId":"discardCallRecording","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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 call 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":"Discard a call's recording","tags":["Calls"]},"get":{"description":"The segments with hour-long playback links, the transcript and the AI\nanalysis.","operationId":"getCallRecording","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallRecording"}}},"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 call 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 call's recording","tags":["Calls"]}},"/stores/{store_id}/canned-replies":{"get":{"description":"Ordered by shortcut.","operationId":"listCannedReplies","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches shortcut, 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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CannedReply"}}},"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 canned replies","tags":["Conversation Settings"]},"post":{"description":"A reply with the same shortcut is replaced.","operationId":"createCannedReply","parameters":[{"description":"Store id","in":"path","name":"store_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/CannedReplyInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReply"}}},"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 shortcut or body"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 canned reply","tags":["Conversation Settings"]}},"/stores/{store_id}/canned-replies/{reply_id}":{"delete":{"operationId":"deleteCannedReply","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Canned reply id","in":"path","name":"reply_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 canned reply 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 canned reply","tags":["Conversation Settings"]},"patch":{"operationId":"updateCannedReply","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Canned reply id","in":"path","name":"reply_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReplyInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReply"}}},"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 canned reply in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`canned_reply_shortcut_taken`: another reply uses the shortcut"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: missing shortcut or body"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 canned reply","tags":["Conversation Settings"]}},"/stores/{store_id}/capabilities":{"get":{"description":"How the store runs inventory, payments and freight: the registry of\ncapabilities and modules, and which modules the store has active.","operationId":"getStoreCapabilities","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCapabilities"}}},"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 store capabilities","tags":["Integrations"]}},"/stores/{store_id}/capabilities/inventory":{"put":{"description":"`mobi`: Mobiari owns stock and reserves it at checkout. `tiny`: the ERP\nowns stock and Mobiari does not reserve. Moving from an ERP to `mobi`\nstarts the fiscal stock reconciliation today (`checks_start_on`), unless\nit already starts later.","operationId":"setInventoryMode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInventoryModeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryModeResponse"}}},"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_module`: not an inventory module"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the inventory module","tags":["Integrations"]}},"/stores/{store_id}/cart-offers":{"get":{"description":"The products the cart and the cart drawer offer, in order.","operationId":"listCartOffers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only the active ones (what the store shows). Defaults to false.","in":"query","name":"active","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CartOffer"}}},"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 cart offers","tags":["Discounts"]},"post":{"description":"Offers a product in the cart and the cart drawer. With `discount_percent`\nit is a `buy_x_get_y` automatic discount too: while the cart holds any\nother product, one unit of this one costs that much less.","operationId":"createCartOffer","parameters":[{"description":"Store id","in":"path","name":"store_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/CartOfferCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartOffer"}}},"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":"`cart_offer_exists`: the product is offered already"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a discount out of range, or the store has 20 offers"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 cart offer","tags":["Discounts"]}},"/stores/{store_id}/cart-offers/{offer_id}":{"delete":{"description":"Its promotion goes with it.","operationId":"deleteCartOffer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cart offer id","in":"path","name":"offer_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":"`cart_offer_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 cart offer","tags":["Discounts"]},"patch":{"description":"Partial. Changing or clearing `discount_percent` changes or deletes its\npromotion; switching the offer off switches its promotion off.","operationId":"updateCartOffer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cart offer id","in":"path","name":"offer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartOfferUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartOffer"}}},"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":"`cart_offer_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a discount 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 a cart offer","tags":["Discounts"]}},"/stores/{store_id}/carts":{"get":{"description":"Most recently updated first. Storefront carts by default; pass\n`kind=quote` for carts built as quotes.","operationId":"listCarts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/carts/{cart_id}":{"delete":{"description":"Removes the cart and its lines, freight quotes and stock reservations.\nAn order the cart became keeps its record. For clearing out test or\nstale carts.","operationId":"deleteCart","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cart id","in":"path","name":"cart_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 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":"Delete a cart","tags":["Carts"]},"get":{"description":"The cart with its lines, oldest line first.","operationId":"getCart","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cart id","in":"path","name":"cart_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartDetail"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Renaming also changes the slug.","operationId":"updateCategory","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/cms/collections":{"get":{"description":"The store's content collections by name.","operationId":"listCmsCollections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Include archived collections. Defaults to `false`.","in":"query","name":"include_archived","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CmsCollection"}}},"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 content collections","tags":["Content"]},"post":{"description":"Slugs are lowercase letters, numbers and underscores; no git push\nneeded since the theme pipeline left.","operationId":"createCmsCollection","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateCollectionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmsCollection"}}},"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_slug` / `invalid_schema`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 content collection","tags":["Content"]}},"/stores/{store_id}/cms/collections/{collection_slug}":{"get":{"description":"Archived collections are returned too.","operationId":"getCmsCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmsCollection"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 content collection","tags":["Content"]},"patch":{"description":"Renames, replaces the field schema, or archives. Replacing the schema\nanswers how many existing documents stop validating, without touching\nthem; their next write must conform.","operationId":"updateCmsCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionResult"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_schema`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 content collection","tags":["Content"]}},"/stores/{store_id}/cms/collections/{collection_slug}/documents":{"get":{"description":"In display order (`position`, then creation).","operationId":"listCmsDocuments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CmsDocument"}}},"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, or it is archived"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 documents","tags":["Content"]},"post":{"description":"Appends a document to the collection (or at `position`).","operationId":"createCmsDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"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/CreateDocumentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmsDocument"}}},"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 collection, or it is archived"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Content"]}},"/stores/{store_id}/cms/collections/{collection_slug}/documents/reorder":{"post":{"description":"Sets `position` to each document's index in `document_ids`. Ids not in\nthe collection are ignored; documents left out keep their position.","operationId":"reorderCmsDocuments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"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/ReorderRequest"}}},"required":true},"responses":{"204":{"description":"Reordered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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, or it is archived"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reorder documents","tags":["Content"]}},"/stores/{store_id}/cms/collections/{collection_slug}/documents/{document_id}":{"delete":{"operationId":"deleteCmsDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Document 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 or document"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Content"]},"get":{"operationId":"getCmsDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmsDocument"}}},"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 or document"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Content"]},"put":{"description":"Fields left out stay as they are; `data` is replaced whole.","operationId":"updateCmsDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection slug, e.g. `hero_videos`","in":"path","name":"collection_slug","required":true,"schema":{"type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CmsDocument"}}},"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 or document"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Content"]}},"/stores/{store_id}/cnpj-lookup/{cnpj}":{"get":{"description":"The company's public registry data (Receita Federal, through BrasilAPI):\nlegal and trade name, status, main activity, size, opening date, address,\nphone and e-mail. Only the CNPJ is sent, after its check digits pass.\nSaves nothing. Up to 60 lookups per store per hour.","operationId":"lookupCnpj","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"With or without punctuation","in":"path","name":"cnpj","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CnpjData"}}},"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":"`cnpj_not_found`: the registry has no such CNPJ"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_invalid`: wrong length or check digits"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`cnpj_lookup_unavailable`: the registry did not answer in time"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Look up a CNPJ","tags":["Companies"]}},"/stores/{store_id}/collection-products":{"delete":{"operationId":"removeProductFromCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionProductRequest"}}},"required":true},"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"]},"post":{"description":"Idempotent.","operationId":"addProductToCollection","parameters":[{"description":"Store id","in":"path","name":"store_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/CollectionProductRequest"}}},"required":true},"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"]}},"/stores/{store_id}/collections":{"get":{"description":"By name.","operationId":"listCollections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/collections/{collection_id}":{"delete":{"description":"The products are kept. Emits the `collections.deleted` webhook.","operationId":"deleteCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Renaming also changes the slug. Emits the `collections.updated` webhook\nand purges the collection's storefront cache.","operationId":"updateCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdateRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/collections/{collection_id}/sales-channels":{"get":{"operationId":"getCollectionSalesChannels","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"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's sales channels","tags":["Collections"]},"put":{"operationId":"setCollectionSalesChannels","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Collection id","in":"path","name":"collection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"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`, `sales_channel_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":"Set a collection's sales channels","tags":["Collections"]}},"/stores/{store_id}/companies":{"get":{"description":"By name, with how many contacts each has and what they bought. Covers\n1,000 companies.","operationId":"listCompanies","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/CompanyRequest"}}},"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"]}},"/stores/{store_id}/companies/{company_id}":{"delete":{"description":"Its contacts stay, without a company.","operationId":"deleteCompany","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Company id","in":"path","name":"company_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRequest"}}},"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"]}},"/stores/{store_id}/companies/{company_id}/cnpj-refresh":{"post":{"description":"Looks its CNPJ up in the public registry (Receita Federal, through\nBrasilAPI; only the CNPJ is sent), keeps what the registry says on the\ncompany and fills its trade name, phone and e-mail where they are empty.\nCounts toward the store's 60 lookups per hour.","operationId":"refreshCompanyFromCnpj","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Company id","in":"path","name":"company_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/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, or `cnpj_not_found` in the registry"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`company_document_changed`: its CNPJ changed while the registry answered"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`company_without_cnpj`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_rate_limited`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`cnpj_lookup_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a company from its CNPJ","tags":["Companies"]}},"/stores/{store_id}/component-candidates":{"get":{"description":"Every variant of the store, not only the ones already used as parts, so\na new part can be picked into a bill of materials. Existing parts first.","operationId":"listComponentCandidates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches SKU, name or product title.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"The kit being edited, left out so a variant cannot become a part of\nitself.","in":"query","name":"exclude_variant_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ComponentCandidate"}}},"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 component candidates","tags":["Manufacturing"]}},"/stores/{store_id}/components":{"get":{"description":"Every part of the store (variants created as parts or used in a bill of\nmaterials) with stock, how many kits use it, and what open build jobs\nstill need. Biggest shortfall first.","operationId":"listComponents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches SKU, name or product title.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Only components whose open build demand exceeds what is available:\nwhat is blocking production.","in":"query","name":"short_only","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Component"}}},"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 components","tags":["Manufacturing"]},"post":{"description":"Creates a part as a `draft` product with a single variant (draft keeps it\noff the storefront and the marketplace feeds; publish it like any product\nif it is also sold on its own). Opening stock is written to the ledger as\na `count` with reason `opening_balance`.","operationId":"createComponent","parameters":[{"description":"Store id","in":"path","name":"store_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/ComponentCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Component"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `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":"Create a component","tags":["Manufacturing"]}},"/stores/{store_id}/components/{variant_id}":{"delete":{"description":"Refused while any kit lists the part (409 `component_in_use`, with\n`details.kits`): deleting it would silently drop a line from every such\nbill of materials. Also refused (409 `component_not_removable`) when the\npart is itself a kit, was sold, holds reserved stock, has units in stock\n(they would vanish from the book with no movement) or has any stock\nhistory (the history is kept: archive the product instead). Deletes its\nempty stock rows, and the wrapper product when it is an empty, unsold\ndraft.","operationId":"deleteComponent","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The component's variant id","in":"path","name":"variant_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":"`variant_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`component_in_use` (`details.kits`), `component_not_removable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 component","tags":["Manufacturing"]},"patch":{"description":"A rename also renames the wrapper product when it exists only to carry\nthis part (a single-variant draft).","operationId":"updateComponent","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The component's variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComponentUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Component"}}},"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`"},"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 component","tags":["Manufacturing"]}},"/stores/{store_id}/components/{variant_id}/usage":{"get":{"description":"The kits whose bill of materials lists this part, with the quantity per\nkit and what their open build jobs still need.","operationId":"listComponentUsage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The component's variant id","in":"path","name":"variant_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ComponentUsage"}}},"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":"List where a component is used","tags":["Manufacturing"]}},"/stores/{store_id}/consent/ledger":{"get":{"description":"Every consent change, newest first, with the words agreed to, where and\nby whom: the record the store shows when asked. `format=csv` downloads\nit.","operationId":"listConsentLedger","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`email` or `whatsapp`.","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"`granted` or `revoked`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"From this date (`YYYY-MM-DD`), inclusive.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Until this date (`YYYY-MM-DD`), inclusive.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Entries before this one (the last `id` of the previous page).","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Up to 200; 50 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"`csv` downloads every matching entry (up to 50,000) as a spreadsheet.","in":"query","name":"format","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LedgerEntry"},"type":"array"}}},"description":"The entries; with `format=csv`, a CSV 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Consent record","tags":["Customers"]}},"/stores/{store_id}/consent/overview":{"get":{"description":"Who the store may contact by e-mail and WhatsApp, where opt-ins and\nopt-outs came from in the last 30 days, what consent held back, open\nLGPD requests and the latest changes.","operationId":"getConsentOverview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentOverview"}}},"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":"Consent overview","tags":["Customers"]}},"/stores/{store_id}/consent/suppressions":{"delete":{"description":"Only blocks the team added (a WhatsApp block made from a conversation is lifted there, where WhatsApp is told too); an opt-out is the person's to undo (from the\npreferences link, their account or by replying VOLTAR).","operationId":"deleteConsentSuppression","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionChange"}}},"required":true},"responses":{"204":{"description":"Lifted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 team block on that 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":"Lift a team block","tags":["Customers"]},"get":{"description":"E-mail addresses and phone numbers the store does not message: opt-outs,\nbounces, complaints, erasures and team blocks. Up to 500, newest first.","operationId":"listConsentSuppressions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Part of the address.","in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Suppression"},"type":"array"}}},"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":"Blocked addresses","tags":["Customers"]},"post":{"description":"The store stops messaging it entirely, order updates included (a person\nwho asked never to be contacted, a wrong number).","operationId":"createConsentSuppression","parameters":[{"description":"Store id","in":"path","name":"store_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/SuppressionChange"}}},"required":true},"responses":{"204":{"description":"Blocked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 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":"Block an address","tags":["Customers"]}},"/stores/{store_id}/conversation-channels":{"get":{"operationId":"listConversationChannels","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConversationChannel"}}},"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 inbox channels","tags":["Conversation Settings"]},"post":{"description":"For WhatsApp prefer `POST .../conversation-channels/whatsapp/connect`\n(Meta Embedded Signup), which fills the credentials for you.","operationId":"createConversationChannel","parameters":[{"description":"Store id","in":"path","name":"store_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/ConversationChannelCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationChannel"}}},"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`: `config` is not an object"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 inbox channel","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/instagram-config":{"get":{"description":"Whether the \"Connect Instagram\" button can be offered (the server has a\nMeta app for Business Login).","operationId":"getInstagramConnectConfig","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramConnectConfig"}}},"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 Instagram connect configuration","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/instagram/authorize":{"post":{"description":"The Business Login address to open: the store's admin logs in to\nInstagram, grants messaging, and comes back to the channel settings with\nthe account connected.","operationId":"authorizeInstagram","parameters":[{"description":"Store id","in":"path","name":"store_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/InstagramAuthorizeUrl"}}},"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":"`instagram_not_configured`: no Meta app on this server"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting Instagram","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/meta-config":{"get":{"description":"The Meta app id and Embedded Signup configuration to open the\n\"Connect with Facebook\" dialog.","operationId":"getWhatsappSignupConfig","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappSignupConfig"}}},"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 WhatsApp signup configuration","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/whatsapp/connect":{"post":{"description":"Finishes Meta's Embedded Signup: exchanges the dialog's code for a\nbusiness token, registers a Cloud API number (random two-step PIN),\nsubscribes the WhatsApp Business account to this channel's webhook and\nstores the credentials encrypted. With `coexistence` it skips the\nregistration and asks Meta for the Business app's contacts and up to 180\ndays of chats, imported as they arrive. Creates the channel, or updates\n`channel_id`.","operationId":"connectWhatsappChannel","parameters":[{"description":"Store id","in":"path","name":"store_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/WhatsappConnectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappConnectResult"}}},"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":"`meta_not_configured`, `no_whatsapp_account` or `no_phone_number`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused the code or did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a WhatsApp number","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}":{"delete":{"description":"Its conversations stay, detached from the channel.","operationId":"deleteConversationChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Channel id","in":"path","name":"channel_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 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":"Delete an inbox channel","tags":["Conversation Settings"]},"patch":{"operationId":"updateConversationChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationChannelUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationChannel"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `config` is not an object. `instagram_disconnected`: an Instagram account disconnected from Social cannot be switched on without connecting it again. `instagram_other_account`: a token for another account on a disconnected Instagram channel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 inbox channel","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/rotate-key":{"post":{"description":"Issues a new widget key; the old one stops working at once, so update\nthe embed snippet on the site.","operationId":"rotateConversationChannelKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Channel id","in":"path","name":"channel_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/ConversationChannel"}}},"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":"Rotate a channel's public key","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-backup-import":{"post":{"description":"Takes the chats and labels the `whatsapp-backup-import` tool read from a\nbackup of the WhatsApp Business app and adds them to a WhatsApp channel\nof the store, as resolved conversations dated by their messages, with no\nnotifications, automation events or bot. Labels become tags on the\nconversation and on the matching customer. Sending the same messages again\nchanges nothing. At most 50 chats and 5,000 messages per call.","operationId":"importWhatsappBackup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp channel of the store","in":"path","name":"channel_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/WhatsappBackupBatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappBackupResult"}}},"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 WhatsApp channel in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`batch_too_large`: more than 50 chats or 5,000 messages"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 batch of a WhatsApp Business app backup","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-calling":{"get":{"operationId":"getWhatsappCalling","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp channel of the store","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallingSettings"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Read a number's calling settings","tags":["Conversation Settings"]},"put":{"description":"Meta requires the number on the Cloud API, the app subscribed to the\n`calls` webhook field and a messaging limit of 2,000 a day; when one of\nthem is missing, Meta's own message comes back as `meta_error`.","operationId":"setWhatsappCalling","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp channel of the store","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallingSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallingSettings"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused it (the message says why)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Turn a number's calling on or off","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-status":{"get":{"description":"Asks Meta whether the stored token still works and how the number\nstands (quality rating, status). A broken channel answers 200 with\n`ok: false`.","operationId":"getWhatsappChannelStatus","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannelStatus"}}},"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 WhatsApp 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":"Check a WhatsApp channel","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-templates":{"get":{"description":"The channel's templates as last synced from Meta, by name. Sync to pick\nup changes made in WhatsApp Manager; review results also arrive by\nwebhook when the Meta app subscribes to `message_template_status_update`.","operationId":"listWhatsappTemplates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WhatsappTemplate"},"type":"array"}}},"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 WhatsApp 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":"List WhatsApp templates","tags":["Conversation Settings"]},"post":{"description":"Submits the template to Meta for review and stores it as `PENDING` (or\nwhatever Meta answers). It can be sent once approved.","operationId":"createWhatsappTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_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/WhatsappTemplateCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"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 WhatsApp channel in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_template` (the message says why), `whatsapp_no_waba` or `whatsapp_no_token`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_meta_error`: Meta refused it (the message is Meta's)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a WhatsApp template","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-templates/presets":{"get":{"description":"Templates most stores need (abandoned cart, review request, NPS, order\npaid and shipped), worded for Meta's review and filled in with the\nstore's name and address. Each says which notification it is made for\nand how Mobiari fills its variables. Submitting one is a normal create.","operationId":"listWhatsappTemplatePresets","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WhatsappTemplatePreset"},"type":"array"}}},"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 WhatsApp 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":"Ready-made WhatsApp templates","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-templates/sync":{"post":{"description":"Fetches every template of the channel's WhatsApp Business Account and\nreplaces the local copy (templates deleted at Meta are removed).","operationId":"syncWhatsappTemplates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_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":{"items":{"$ref":"#/components/schemas/WhatsappTemplate"},"type":"array"}}},"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 WhatsApp channel in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_no_waba` or `whatsapp_no_token`: the channel is not fully configured"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_meta_error` (Meta's message) or `whatsapp_meta_unreachable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sync WhatsApp templates from Meta","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-templates/{template_id}":{"delete":{"description":"Deletes this language of the template at Meta and here. Meta keeps the\nname reserved for 30 days.","operationId":"deleteWhatsappTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_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 template on this channel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_meta_error`: Meta refused it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a WhatsApp template","tags":["Conversation Settings"]},"put":{"description":"Sends the new content to Meta, which reviews the template again; it is\nstored as `PENDING` until the review result arrives (webhook or sync).\nMeta limits edits of an approved template (about once a day, ten times a\nmonth) and answers with its own message when the limit is reached.","operationId":"updateWhatsappTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"WhatsApp channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplateUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"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 template on this channel"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_template` (the message says why), `template_not_synced` (no Meta id yet: sync first) or `template_not_editable` (authentication templates, or a status other than approved, rejected or paused)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_meta_error`: Meta refused it (the message is Meta's)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Edit a WhatsApp template","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-channels/{channel_id}/whatsapp-test":{"post":{"description":"Sends an approved template to a phone, so the store sees the number\nworking. Templates are synced from Meta first; it prefers `hello_world`,\nthen one without variables, then any whose variables have examples, which\nfill them in. A template is used because nobody has written to the number\nyet: Meta accepts nothing else. Meta bills it like any template.","operationId":"sendWhatsappTestMessage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Channel id","in":"path","name":"channel_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/WhatsappTestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTestResult"}}},"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 WhatsApp channel in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_phone`, or `no_test_template`: no approved template to send (one without variables, or whose variables have examples)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused it (the message says why)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a test message","tags":["Conversation Settings"]}},"/stores/{store_id}/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":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationLabel"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/conversation-labels/{label_id}":{"delete":{"description":"Removes it from the catalog and from every conversation.","operationId":"deleteConversationLabel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/conversation-teams":{"get":{"operationId":"listConversationTeams","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationTeam"},"type":"array"}}},"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 teams","tags":["Conversation Settings"]},"post":{"operationId":"createConversationTeam","parameters":[{"description":"Store id","in":"path","name":"store_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/ConversationTeamRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationTeam"}}},"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":"`team_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 team","tags":["Conversation Settings"]}},"/stores/{store_id}/conversation-teams/{team_id}":{"delete":{"description":"Its conversations stay, without a team.","operationId":"deleteConversationTeam","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Team id","in":"path","name":"team_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 team"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 team","tags":["Conversation Settings"]},"patch":{"operationId":"updateConversationTeam","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Team id","in":"path","name":"team_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationTeamRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationTeam"}}},"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 team"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`team_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 team","tags":["Conversation Settings"]}},"/stores/{store_id}/conversations":{"get":{"description":"The inbox, one page at a time. With the default `activity` sort the\nnewest activity comes first and pages are cursor-based, so a\nconversation that gets a new message while you page moves to the head\ninstead of shifting the pages; keep the list fresh with the\n`conversation:new` and `conversation:updated` events of the agent\nWebSocket (`/ws/conversations`). For badge counts use\n`GET /stores/{store_id}/conversations/counts`.","operationId":"listConversations","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Defaults to `activity`. `activity` and `newest` page by cursor;\n`waiting` and `priority` by offset.","in":"query","name":"sort","required":false,"schema":{"description":"Order of the conversation list.","enum":["activity","waiting","priority","newest"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConversationListItem"}}},"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"]}},"/stores/{store_id}/conversations-ai":{"get":{"operationId":"getConversationBotSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationBotSettings"}}},"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 chat bot settings","tags":["Conversation Settings"]},"put":{"description":"Fields left out keep their value.","operationId":"updateConversationBotSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationBotSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationBotSettings"}}},"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":"Update the chat bot settings","tags":["Conversation Settings"]}},"/stores/{store_id}/conversations-sales-settings":{"get":{"operationId":"getConversationSalesSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSalesSettings"}}},"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 inbox sales settings","tags":["Conversation Settings"]},"put":{"description":"Needs `discounts.write`: the people who approve discounts set the cap.","operationId":"updateConversationSalesSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSalesSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSalesSettings"}}},"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`: the cap is not 0 to 100"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the inbox sales settings","tags":["Conversation Settings"]}},"/stores/{store_id}/conversations-settings":{"get":{"operationId":"getConversationInboxSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationInboxSettings"}}},"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 inbox settings","tags":["Conversation Settings"]},"put":{"description":"Fields left out keep their value.","operationId":"updateConversationInboxSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationInboxSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationInboxSettings"}}},"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`: unknown time zone, malformed hours, SLA, ticket targets or `auto_resolve_hours` 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 the inbox settings","tags":["Conversation Settings"]}},"/stores/{store_id}/conversations/bulk":{"post":{"description":"Assign, resolve, reopen, snooze, reprioritize, label or mark read up to\n200 conversations at once. Each one publishes `conversation:updated`;\nthe whole action is recorded in the audit log.","operationId":"bulkUpdateConversations","parameters":[{"description":"Store id","in":"path","name":"store_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/ConversationBulkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationBulkResult"}}},"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`: no ids or more than 200, a bad `value` for the action"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Act on many conversations","tags":["Conversations"]}},"/stores/{store_id}/conversations/conversion-events/retry":{"post":{"description":"Sends again, in the background, the store's business-messaging events\nthat failed (up to 200): the leads, qualified leads and purchases of\nconversations that started from an ad, each rebuilt from its\nconversation (and order), and claims left sending for ten minutes. A\npurchase is sent only when its order's Meta Purchase is this\nconversation's, with the order's ad click. Answers how many\nwere queued; their new status shows in the list.","operationId":"retryConversationConversionEvents","parameters":[{"description":"Store id","in":"path","name":"store_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/RetriedEvents"}}},"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":"Retry what failed (e.g. before Meta granted the permissions)","tags":["Conversations"]}},"/stores/{store_id}/conversations/counts":{"get":{"description":"Per-status totals and unread counts for the whole store, in one cheap\nquery. Poll it for a badge or refresh it on `conversation:updated`.","operationId":"getConversationCounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCounts"}}},"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":"Count conversations","tags":["Conversations"]}},"/stores/{store_id}/conversations/followup-settings":{"get":{"operationId":"getLeadFollowupSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadFollowupSettings"}}},"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 follow-up settings","tags":["Conversations"]},"put":{"description":"Turning the sequence on replaces the sales blueprint's single cart\nfollow-up; sequences already running stop at their next step when it is\nturned off.","operationId":"updateLeadFollowupSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadFollowupSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadFollowupSettings"}}},"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":"Change the follow-up settings","tags":["Conversations"]}},"/stores/{store_id}/conversations/followups":{"get":{"description":"Conversations whose follow-up is running and has already reminded the\nteam, most urgent first, then oldest reminder first. Up to 200.","operationId":"listFollowupsDue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`me`: conversations assigned to the caller or to nobody. Omit for all.","in":"query","name":"assignee","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationFollowupDue"},"type":"array"}}},"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 leads due a follow-up","tags":["Conversations"]}},"/stores/{store_id}/conversations/reports":{"get":{"description":"Volume, response and resolution times, satisfaction, per-agent numbers,\nattributed revenue, labels, chat-to-order rates and follow-up recovery\nover the last `days`.","operationId":"getConversationReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Window in days, 1 to 365. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationReport"}}},"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 attendance report","tags":["Conversations"]}},"/stores/{store_id}/conversations/stats":{"get":{"operationId":"getConversationStats","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStats"}}},"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 inbox stats","tags":["Conversations"]}},"/stores/{store_id}/conversations/ws-ticket":{"post":{"description":"Browsers cannot set an `Authorization` header on a WebSocket, so they\ntrade their token for a single-use, one-minute ticket and connect to\n`wss://api.mobiari.com/ws/conversations?ticket=...`. Native clients can\nskip this and connect with `Authorization: Bearer` and `?store_id=`.\nSee the realtime guide for the events.","operationId":"createConversationSocketTicket","parameters":[{"description":"Store id","in":"path","name":"store_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":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSocketTicket"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 WebSocket ticket","tags":["Conversations"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationRequest"}}},"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"]}},"/stores/{store_id}/conversations/{conversation_id}/ask-whatsapp":{"post":{"description":"Instagram conversations only: sends the standard ask (or `text`). When\nthe customer answers with a number it is saved on the conversation and\nthe customer record by itself; `PUT .../whatsapp-number` saves one by\nhand.","operationId":"askConversationWhatsapp","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationAskWhatsappRequest"}}},"description":"Optional","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":"`not_instagram`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask for the customer's WhatsApp","tags":["Conversations"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]},"post":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/conversations/{conversation_id}/call-permission":{"get":{"description":"Asks Meta whether the customer of a WhatsApp conversation has given\npermission to be called, and whether a request or a call is allowed now.","operationId":"getWhatsappCallPermission","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp conversation","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPermission"}}},"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 a WhatsApp conversation of 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Can we call this customer","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/call-permission/request":{"post":{"description":"Sends WhatsApp's call permission request in the conversation. Works while\nthe 24-hour customer window is open; Meta's message comes back as\n`meta_error` when it is not. The customer answers by tapping allow or not;\neither way a line appears in the conversation.","operationId":"requestWhatsappCallPermission","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp conversation","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/CallPermissionRequest"}}},"required":true},"responses":{"204":{"description":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 a WhatsApp conversation of 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused it (the message says why)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask the customer for permission to call","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/campaign-card":{"get":{"description":"Active automatic discounts and the store's collections, as the card\neach one sends.","operationId":"listConversationCampaignOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCampaignOptions"}}},"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":"List campaign card options","tags":["Conversations"]},"post":{"description":"Sends one active automatic discount or one collection as a card to this\nconversation only (`payload.campaign`): a link with preview on WhatsApp\nand e-mail, a card on Instagram and the site chat.","operationId":"sendConversationCampaignCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationCampaignCardRequest"}}},"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, or `campaign_not_found`: no such active discount or collection"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (send one of `discount_id` and `collection_id`) or `whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 campaign card","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart":{"get":{"description":"The assisted-sale cart: one per conversation, shared live with the bot\nand the contact (`cart:updated` events). 404 `no_cart` until the first\nitem is added.","operationId":"getConversationCart","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"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, or `no_cart`: it has no usable cart"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 conversation's cart","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/customer":{"get":{"description":"What the order will be placed with, and what is still missing before a\nPIX can be generated.","operationId":"getConversationCartCustomer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCartCustomer"}}},"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 the cart's contact details","tags":["Conversations"]},"put":{"description":"Merges the details into the cart (fields left out are kept), fills the\nconversation's blank contact fields and links a matching customer.\nOpens a cart when there is none. A `zip_code` sent without `street` and\n`city` brings the address the CEP names (street, neighborhood, city,\nstate), so only the number has to be typed.","operationId":"updateConversationCartCustomer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCartCustomerInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCartCustomer"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cart_converted`: the cart is an order already"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_document`: not a valid CPF"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 cart's contact details","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/discount":{"put":{"description":"Applies a discount (and an optional deadline) to the conversation's\ncart. Above the store's cap (`max_agent_discount_pct`) and without\n`discounts.write`, it is filed for approval instead (`status`\n`pending_approval`): the cart keeps its price, cannot be sent or\ncharged, and whoever approves discounts is notified. A new request\nreplaces a pending one; an empty body removes the discount.","operationId":"setConversationCartDiscount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCartDiscountRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOfferResult"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart` or `cart_converted`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_discount` or `invalid_expiry`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 cart's discount","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/discount-code":{"post":{"description":"Validates an existing code against the cart (`code`, the same rules as\n`POST /discount-codes/validate`) or creates a single-use one\n(`create`), and puts it on the conversation's cart. The store's cap\napplies as for a plain discount: above it, the code waits for approval\n(a created code is only created once approved). One use is taken when\nthe cart becomes an order. To only share a code, send it as text.","operationId":"applyConversationCartDiscountCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationCartCodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOfferResult"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart` or `cart_converted`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_discount_code` (details: `reason`, as `DiscountCodeRejection`), `invalid_discount`, `invalid_expiry` or `validation_failed` (send one of `code` and `create`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Apply a discount code to the cart","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/duplicate":{"post":{"description":"Copies the conversation's cart into a new cart with its own payment link\nand makes it the conversation's cart: the same items at the same prices,\nthe discount, the customer, the contact and address, the delivery method\nand the quote's settings. The freight is not copied: the first change to\nthe new cart's items quotes it again and chooses the same service. The\ncart copied and its link stay as they are, so a link already sent keeps\nshowing what it showed.","operationId":"duplicateConversationCart","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"description":"The new cart, now the conversation's"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart` or `empty_cart`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Duplicate the cart as a new option","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/freight":{"post":{"description":"With `cep`: quotes the cart's shipping options (and remembers the CEP\non the cart). With `option_id`: selects that option and returns the\ncart with the new total. With `manual`: selects freight priced by hand\n(`provider_code` `manual`; the store's shipping rules do not change it\nand the order's shipment is booked by the team) and returns the cart.","operationId":"conversationCartFreight","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationFreightRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFreightResult"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`, or `cart_converted`: the cart is an order already"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (none of `cep`, `option_id` and `manual`, or a `manual` field out of range), `freight_quote_failed` or `freight_option_invalid` (also when the cart changed since the quote)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Quote or select freight","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/freight/prefill":{"get":{"description":"The CEP typed in the cart, else the customer's address, else the last\nCEP the customer wrote in the conversation.","operationId":"prefillConversationCartFreight","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFreightPrefill"}}},"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":"Suggest a CEP to quote","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/freight/send":{"post":{"description":"Quotes the cart's freight (Melhor Envio, Central do Frete or the\nstore's own rules) at `cep` and sends the options to the customer.\nWith `option_ids`, sends those options from the quote already made\ninstead of quoting again. On WhatsApp the first three go as reply\nbuttons, and the customer's tap selects that freight on the cart (a\nsystem line says so). Elsewhere the team selects with\n`POST .../cart/freight` and `option_id`.","operationId":"sendConversationCartFreight","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationFreightSendRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFreightSent"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cep_required` (none given or known), `freight_quote_failed`, `no_freight_options`, `freight_quote_stale` (`option_ids` not in the cart's current quote at this CEP: quote again) or `whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 shipping options","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/items":{"post":{"description":"Opens the cart (a quote cart valid for 14 days) on first use. Adding a\nvariant already in the cart raises its quantity. A freight chosen before\nis quoted again for the new contents and the same service chosen again;\n`freight_change` says whether it was kept (and its new price) or left.","operationId":"addConversationCartItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationCartItemRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_unavailable`: not a sellable variant of 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":"Add an item to the conversation's cart","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/items/{variant_id}":{"delete":{"description":"A freight chosen before is quoted again for what is left, as when a\nquantity changes (`freight_change`).","operationId":"removeConversationCartItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"description":"The cart without the item"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an item from the cart","tags":["Conversations"]},"patch":{"description":"A freight chosen before is quoted again for the new contents and the\nsame service chosen again; `freight_change` says whether it was kept\n(and its new price) or left the cart.","operationId":"setConversationCartItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCartQuantityRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`, `insufficient_stock` or `cart_converted` (the cart is an order already)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an item's quantity","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/options/{cart_id}/edit":{"post":{"description":"Makes one of the conversation's options (`GET .../sale` lists them, with\n`cart_id`) the cart the sale edits: the items, freight, discount and\npayment buttons are then that option's. An open option holds its stock\nagain; one that became an order opens as that order. Links already sent\nkeep showing what they showed.","operationId":"editConversationCartOption","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The option's cart","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":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCart"}}},"description":"The option's cart, now the conversation's"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 `no_option`: the cart is not one of its options"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_expired`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 another option","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/pix":{"post":{"description":"Turns the cart into an order, creates the PIX charge (or reuses a live\none for the same order) and posts it into the conversation as the\ncaller: a message with the QR code card, then one with just the\ncopy-and-paste code. Needs the contact details and freight\n(`GET .../cart/customer` says what is missing).","operationId":"createConversationCartPix","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPixSent"}}},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`, `insufficient_stock` or `discount_pending_approval`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_info` (details: `missing`), `checkout_failed`, `pix_failed` or `whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 cart by PIX","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/reset":{"post":{"description":"The next item added opens a fresh cart. The old cart is left as it is:\nits link keeps working until it expires.","operationId":"resetConversationCart","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"204":{"description":"Detached"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Detach the cart","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/search":{"get":{"description":"Active variants of the store's active products (what the storefront sells),\nbest title match first. `limit` defaults to 12 here.","operationId":"searchConversationCartVariants","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product title, variant title, SKU or slug. Empty lists everything.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConversationVariantHit"}}},"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":"Search variants to sell","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/cart/send":{"post":{"description":"Posts the cart's payment link into the conversation as the caller (and\ndelivers it on WhatsApp or e-mail). The message carries the cart\nsnapshot in `payload.cart`, so clients render a cart card. Takes the\nconversation over like a reply, and follows the same WhatsApp 24-hour\nrule.","operationId":"sendConversationCartLink","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationCartLinkRequest"}}},"description":"Optional","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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_cart`, `empty_cart` or `discount_pending_approval`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the payment link","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/consent-request":{"post":{"description":"Sends the customer a message asking whether the store may send offers\nand news by WhatsApp, with \"Sim, quero\" and \"Não, obrigado\" buttons.\n\"Sim\" records their opt-in with the question as the words agreed to.\nOnly inside the 24-hour window (it is a free-form message).","operationId":"requestConversationConsent","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_whatsapp`, `whatsapp_window_closed` or `contact_opted_out` (the number opted out or is blocked)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask for WhatsApp consent","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/context":{"get":{"description":"Who the conversation's customer is, from the signed identity it opened\nwith, the workspace's context URL (asked when the cached answer is older\nthan ten minutes, or with `refresh=true`) and, for a ticket, the\nworkspace's ticket fields and their values.","operationId":"getConversationContext","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Ask the company's system again instead of the cached answer.","in":"query","name":"refresh","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerContext"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 customer's context","tags":["Tickets"]}},"/stores/{store_id}/conversations/{conversation_id}/facts":{"get":{"description":"The facts of the conversation's customer, or of its contact while it is\nnot linked to one (they move to the customer on linking). Same shape as\n`listCustomerFacts`.","operationId":"listConversationFacts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CustomerFact"}}},"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":"List the facts of a conversation's contact","tags":["Conversations"]},"post":{"description":"Saved on the conversation's customer, or on its contact until linked.\nThe same rules as `createCustomerFact` apply.","operationId":"createConversationFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerFactCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFact"}}},"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":"`fact_rejected`: unknown category, empty or too long, or data that is never kept; `validation_failed`: a source message 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":"Add a fact about a conversation's contact","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/facts/{fact_id}":{"delete":{"operationId":"deleteConversationFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fact id","in":"path","name":"fact_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 conversation, or `fact_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 fact of a conversation's contact","tags":["Conversations"]},"patch":{"operationId":"updateConversationFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fact id","in":"path","name":"fact_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFactUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFact"}}},"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, or `fact_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fact_rejected`: unknown category, empty or too long, or data that is never kept"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 fact of a conversation's contact","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/followups":{"get":{"description":"The current sequence and earlier ones, newest sequence first, each in\nstep order.","operationId":"listConversationFollowups","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationLeadFollowup"},"type":"array"}}},"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":"List a conversation's follow-up steps","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/followups/cancel":{"post":{"description":"Stops the pending steps (reason `agent`) and completes the follow-up\ntask. A later message from the team starts a new sequence while the lead\nis open; to close the lead, set `lead_stage: lost` on the conversation.","operationId":"cancelConversationFollowup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/ConversationLeadFollowup"},"type":"array"}}},"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":"Cancel a conversation's follow-up","tags":["Conversations"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/conversations/{conversation_id}/linkable-orders":{"get":{"description":"The store's orders of the last 90 days, newest first (50 at most), for\n\"Vincular pedido\": the conversation's own orders first. `q` searches the\nnumber, the customer's name, e-mail and phone.","operationId":"listConversationLinkableOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order number, customer name, e-mail or phone.","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LinkableOrder"},"type":"array"}}},"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":"Orders to link to a conversation","tags":["Conversations"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationReplyRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/conversations/{conversation_id}/messages/{message_id}/attachments/{index}/transcript":{"post":{"description":"Turns the audio of a message attachment into text and keeps it on the\nattachment (`transcript`), where the team and the store's AI read it.\nAlready transcribed: returns the message as is. Customer audio is\ntranscribed on arrival while the inbox setting `transcribe_audio` is on.","operationId":"transcribeConversationAttachment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}},{"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/ConversationMessage"}}},"description":"The message, its attachment carrying `transcript`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Needs `conversations.reply`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such message, or the attachment is not a stored audio"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`audio_unsupported`: a format or size the service does not read"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`transcription_failed`: the service did not answer; try again"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`transcription_unavailable`: this server has no transcription service"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Transcribe an audio attachment","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/messages/{message_id}/reaction":{"post":{"description":"Sets (or, with an empty emoji, removes) your reaction on a message of\nthe conversation. On WhatsApp the customer sees it on their message;\nlike any free-form message it needs the 24-hour window open.","operationId":"reactToConversationMessage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"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/ConversationReactionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}},"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 message in this conversation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_emoji` or `whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reaction_not_delivered`: the channel refused it (nothing saved)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"React to a message","tags":["Conversations"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/conversations/{conversation_id}/notes/{note_id}":{"delete":{"operationId":"deleteConversationNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/conversations/{conversation_id}/products":{"post":{"description":"Sends product cards in the channel's best format (`format` says which):\nWhatsApp's catalog message when the number has a Meta catalog, photo\ncards otherwise; an Instagram carousel with a buy button; cards on the\nsite chat; a list on e-mail. Takes the conversation over like a reply\nand follows the same WhatsApp 24-hour rule.","operationId":"sendConversationProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationSendProductsRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationProductsSent"}}},"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` (1 to 5 products), `no_products` (none is an active product of the store) or `whatsapp_window_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 products","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/read":{"post":{"description":"Clears `unread_for_agents` for the whole team, marks the contact's\nmessages read and my notifications about the conversation read.\nPublishes `conversation:updated` when something changed.","operationId":"markConversationRead","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"204":{"description":"Marked read"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Mark a conversation as read","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/sale":{"get":{"description":"Where the sale stands (stage, lock), the cart, the checkout details and\nwhat is missing, the freight quote that still prices the cart, the\ndiscount, the Pix waiting to be paid, every action with whether it is\nallowed now (and why not), what the customer wrote that the order\nneeds, and up to two next steps.","operationId":"getConversationSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSale"}}},"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 the conversation's sale","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/suggest":{"post":{"description":"A draft from the knowledge base, the customer's orders and the thread,\nin the brand's voice. Never sent by itself.","operationId":"suggestConversationReply","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationSuggestRequest"}}},"description":"Optional","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSuggestion"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_failed`: the model call failed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Suggest a reply","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/summary":{"post":{"description":"What the contact wants, what was done and what is pending, from the AI\nmodel. Stored on the conversation (`attributes.summary`) and reused\nuntil a new message arrives.","operationId":"summarizeConversation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationSummaryResult"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_failed`: the model call failed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Summarize a conversation","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/template":{"post":{"description":"Sends an approved template in a WhatsApp conversation with its variables\nfilled in. Unlike a free-form reply, it is accepted after the 24-hour\ncustomer-service window has closed, which makes it the way to resume a\nconversation. Like a reply, it takes the conversation over (the bot\nstops, the sender becomes the assignee if there is none). Meta bills\ntemplates by category: send an `Idempotency-Key` header and reuse it\nwhen retrying, so a lost response never sends the template twice.","operationId":"sendConversationTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationTemplateSendRequest"}}},"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 or template"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_whatsapp`, `template_not_sendable`, `template_params_missing`, `marketing_consent_required` (a MARKETING template to someone without a WhatsApp opt-in) or `contact_opted_out` (the person opted out or the number is blocked)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 WhatsApp template","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/ticket":{"post":{"description":"Gives the conversation a ticket number and a reply deadline by its\npriority. Turning one that already is a ticket answers that ticket.","operationId":"openTicket","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/OpenTicketRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 conversation into a ticket","tags":["Tickets"]}},"/stores/{store_id}/conversations/{conversation_id}/typing":{"post":{"description":"Shows the contact (web widget) and the other agents that you are\ntyping. The agent WebSocket's `typing` message does the same without an\nHTTP round trip. Repeat it every few seconds while typing; indicators\nexpire on their own.","operationId":"setConversationTyping","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ConversationTypingRequest"}}},"required":true},"responses":{"204":{"description":"Published"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Signal typing","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/uploads":{"post":{"description":"Stores a file to attach to a reply: send its `id` in the reply's\n`payload.upload_ids`. Files are private to the store's team and the\nconversation's customer.","operationId":"uploadConversationFile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConversationUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpload"}}},"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":"No such conversation in this store"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_too_large`: over 16 MB"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no `file` part; `unsupported_file`: a type the inbox does not send"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 file to a conversation","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/uploads/{upload_id}":{"delete":{"description":"Deletes a file uploaded to the conversation that no message carries\n(the attachment was removed from the draft). Files already sent stay.","operationId":"deleteConversationUpload","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Upload id","in":"path","name":"upload_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 upload in this conversation"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`upload_in_use`: a message carries 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":"Discard an unsent upload","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/whatsapp-call":{"post":{"description":"Starts a call from the store to the customer of a WhatsApp conversation:\nthe browser's SDP offer goes to Meta, which rings the customer and answers\nby webhook (`call:answer`, fetched with `GET .../whatsapp-calls/{id}`).\nNeeds the customer's permission (`no_call_permission` otherwise).","operationId":"startWhatsappCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp conversation","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/StartCall"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedCall"}}},"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 a WhatsApp conversation of this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_call_permission`: the customer has not allowed calls; `whatsapp_payment_required`: the WhatsApp Business account has no valid payment method (calls the business starts are billed)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused it (the message says why)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Call the customer","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/whatsapp-call/relayed":{"post":{"description":"Like `startWhatsappCall`, with the relay's offer going to Meta: the answer\nhere is the relay's offer for this device. Meta's answer reaches the relay\nby webhook. 503 `relay_unavailable`: no relay; call directly instead.","operationId":"startWhatsappCallRelayed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A WhatsApp conversation","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/RelayLeg"}}},"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 a WhatsApp conversation of this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_call_permission` or `whatsapp_payment_required`, as for a direct call"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused it (the message says why)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`relay_unavailable`: call directly instead"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Call the customer through the media relay","tags":["Conversations"]}},"/stores/{store_id}/conversations/{conversation_id}/whatsapp-number":{"put":{"description":"Stores the number on the conversation (`contact_phone`) and on the\ncustomer record, found by the number or created.","operationId":"setConversationWhatsappNumber","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Conversation id","in":"path","name":"conversation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationWhatsappNumberRequest"}}},"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":"`invalid_phone`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save the customer's WhatsApp","tags":["Conversations"]}},"/stores/{store_id}/credit/accounts":{"get":{"description":"Gift cards and customer wallets, newest first.","operationId":"listCreditAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/credit/accounts/{account_id}":{"get":{"operationId":"getCreditAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/credit/accounts/{account_id}/adjust":{"post":{"operationId":"adjustCreditAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/credit/accounts/{account_id}/code":{"post":{"description":"The one way to read a card's code after it was issued: lists and details\nshow only its last four characters. Needs `credit.write`, since whoever\nhas a code can spend the card.","operationId":"revealGiftCardCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/GiftCardCode"}}},"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":"Show a gift card's code","tags":["Store credit"]}},"/stores/{store_id}/credit/accounts/{account_id}/disable":{"post":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/credit/accounts/{account_id}/enable":{"post":{"operationId":"enableGiftCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/credit/accounts/{account_id}/resend":{"post":{"description":"Sends the card's code to its recipient (or the buyer) now, ignoring the\ndelivery day, and clears an earlier failure. `recipient_email` corrects the\naddress.","operationId":"resendGiftCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Gift card 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/ResendGiftCard"}}},"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_email` or `not_a_sold_card`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`send_failed`: the mail provider refused it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"E-mail a gift card again","tags":["Store credit"]}},"/stores/{store_id}/credit/gift-cards":{"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":"issueGiftCard","parameters":[{"description":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/credit/summary":{"get":{"description":"What every gift card and wallet that can still be spent holds, in total.","operationId":"getCreditSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditSummary"}}},"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":"Credit you owe your customers.","tags":["Store credit"]}},"/stores/{store_id}/crm/goals":{"get":{"description":"The team's goals, then each member's, by metric.","operationId":"listGoals","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Goal"},"type":"array"}}},"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 goals","tags":["Goals"]},"post":{"operationId":"createGoal","parameters":[{"description":"Store id","in":"path","name":"store_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/GoalCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}},"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":"`goal_exists`: that member (or the team) already has a goal for this metric and period"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an unknown metric or period, a target out of range or a user outside the team"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 goal","tags":["Goals"]}},"/stores/{store_id}/crm/goals/progress":{"get":{"description":"Each goal in the week or month (the store's time zone) holding `on`:\ndone so far, the share of the target, what pro-rata pace expects by now\nand whether that is on track.","operationId":"getGoalProgress","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A day of the periods to report (the store's day). Defaults to today.","in":"query","name":"on","required":false,"schema":{"format":"date","type":"string"}},{"description":"`me` or a user id: that member's goals and the team's. Omit for every goal.","in":"query","name":"user","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressReport"}}},"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`: a bad user"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Goal progress","tags":["Goals"]}},"/stores/{store_id}/crm/goals/{goal_id}":{"delete":{"operationId":"deleteGoal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goal id","in":"path","name":"goal_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 goal 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 goal","tags":["Goals"]},"patch":{"operationId":"updateGoal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goal id","in":"path","name":"goal_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}},"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 goal 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 goal","tags":["Goals"]}},"/stores/{store_id}/crm/reports/forecast":{"get":{"description":"The open deals weighted by their stage's probability, by the month they\nare expected to close (overdue ones and those without a date apart), by\npipeline and by owner, with what was won so far this month (the store's\ntime zone).","operationId":"getDealForecast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"One pipeline; every active pipeline when omitted.","in":"query","name":"pipeline_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`me` or a user id: that owner's deals.","in":"query","name":"owner","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealForecast"}}},"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`: a bad owner"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Deal forecast","tags":["Deals"]}},"/stores/{store_id}/crm/reports/funnel":{"get":{"description":"For the deals created in the period: how many reached each stage of the\npipeline, how long they stayed, the win rate and the weighted forecast.","operationId":"getSalesFunnel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Defaults to the store's first pipeline.","in":"query","name":"pipeline_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Deals created from then. Defaults to 90 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Deals created until then. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Funnel"}}},"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":"Sales funnel","tags":["Deals"]}},"/stores/{store_id}/crm/reports/owners":{"get":{"description":"For the deals created in the period: each owner's open pipeline, wins and\nlosses, with unowned deals as one row.","operationId":"getSalesByOwner","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Defaults to the store's first pipeline.","in":"query","name":"pipeline_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Deals created from then. Defaults to 90 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Deals created until then. Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OwnerRow"},"type":"array"}}},"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":"Deals by owner","tags":["Deals"]}},"/stores/{store_id}/crm/settings":{"get":{"operationId":"getCrmSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettings"}}},"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 CRM settings","tags":["Deals"]},"put":{"description":"Lead routing (round robin over chosen members), the hours before a waiting\nlead or deal alerts its owner, the lead score weights, which the next\nscoring pass (every six hours) applies, and what a missed call does (a\ncallback task, a WhatsApp reply).","operationId":"updateCrmSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettings"}}},"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`: an unknown mode or weight, a weight out of range, hours out of range, or a member outside the team"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the CRM settings","tags":["Deals"]}},"/stores/{store_id}/custom-fields":{"get":{"description":"The fields the store defined for its customers, products and variants, in\ndisplay order. Needs the read permission of what is asked for\n(`customers.read`, `products.read`); without `entity`, both.","operationId":"listCustomFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only the fields of this kind of record.","in":"query","name":"entity","required":false,"schema":{"$ref":"#/components/schemas/Entity"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomField"},"type":"array"}}},"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 custom fields","tags":["Custom Fields"]},"post":{"description":"Needs the write permission of the record kind (`customers.write`,\n`products.write`). A field's key, kind and record kind cannot change\nafterwards.","operationId":"createCustomField","parameters":[{"description":"Store id","in":"path","name":"store_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/CustomFieldCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}},"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":"`field_key_taken`: another field of this record kind has the key"},"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 custom field","tags":["Custom Fields"]}},"/stores/{store_id}/custom-fields/{field_id}":{"delete":{"description":"Its values are removed from every record.","operationId":"deleteCustomField","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Field id","in":"path","name":"field_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":"`field_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 custom field","tags":["Custom Fields"]},"patch":{"operationId":"updateCustomField","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Field id","in":"path","name":"field_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}},"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":"`field_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 custom field","tags":["Custom Fields"]}},"/stores/{store_id}/customer-fields":{"get":{"operationId":"listCustomerFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerField"},"type":"array"}}},"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 fields","tags":["Customers"]},"post":{"operationId":"createCustomerField","parameters":[{"description":"Store id","in":"path","name":"store_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/CustomerFieldCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerField"}}},"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 customer field","tags":["Customers"]}},"/stores/{store_id}/customer-fields/{field_id}":{"delete":{"description":"Its values go with it.","operationId":"deleteCustomerField","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Field id","in":"path","name":"field_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 field 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 field","tags":["Customers"]},"patch":{"operationId":"updateCustomerField","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Field id","in":"path","name":"field_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFieldUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerField"}}},"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 field 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":"Update a customer field","tags":["Customers"]}},"/stores/{store_id}/customer-groups":{"get":{"description":"By name, with how many customers and discounts each has.","operationId":"listCustomerGroups","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerGroup"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"operationId":"renameCustomerGroup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customer-imports":{"post":{"description":"Reads the file (the first sheet; the first row is the header), keeps it\nfor the preview and the run, and returns its columns with samples and a\nsuggested field for each. Nothing is imported yet.","operationId":"uploadCustomerImport","parameters":[{"description":"Store id","in":"path","name":"store_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/CustomerImportUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerImportUpload"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: malformed upload or no `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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_sheet`: the file could not be read, is empty, or is too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 customer spreadsheet","tags":["Customers"]}},"/stores/{store_id}/customer-imports/from-url":{"post":{"description":"Downloads the sheet (shared as \"Anyone with the link\") and keeps it as\nan upload does: the answer and every next step are the upload's.","operationId":"uploadCustomerImportFromUrl","parameters":[{"description":"Store id","in":"path","name":"store_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerImportUpload"}}},"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_sheet_link`: not a Google Sheets link; `sheet_not_shared`: Google asked to sign in (share the sheet as \"Anyone with the link\"); `invalid_sheet`: the file could not be read, is empty, or is too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sheet_download_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Import customers from a Google Sheets link","tags":["Customers"]}},"/stores/{store_id}/customer-imports/{import_id}/ai-mapping":{"post":{"description":"The model's field for each column from its header and samples, with\nwhy. A proposal: nothing is saved.","operationId":"aiMapCustomerImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer import id","in":"path","name":"import_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/CustomerImportAiMapping"}}},"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":"`import_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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_error`"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Map the customer columns with AI","tags":["Customers"]}},"/stores/{store_id}/customer-imports/{import_id}/apply":{"post":{"description":"Creates the new customers and fills what existing ones lack (never\noverwriting a value, tags added to theirs); adds an address a customer\ndoes not have yet. Marketing consent is recorded only where the sheet\nsays yes and the customer never refused.","operationId":"applyCustomerImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer import id","in":"path","name":"import_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/CustomerImportMapping"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerImportResult"}}},"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":"`import_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":"Run a customer import","tags":["Customers"]}},"/stores/{store_id}/customer-imports/{import_id}/preview":{"post":{"description":"Reads every row with `mapping` without writing: how many customers\nwould be created and updated (matched by e-mail, phone or CPF/CNPJ), and\nevery problem by row.","operationId":"previewCustomerImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer import id","in":"path","name":"import_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/CustomerImportMapping"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerImportPreview"}}},"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":"`import_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":"Preview a customer import","tags":["Customers"]}},"/stores/{store_id}/customer-tags":{"get":{"description":"Every tag the store's customers have, most used first.","operationId":"listCustomerTags","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerTag"},"type":"array"}}},"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"]}},"/stores/{store_id}/customer-tags/rename":{"post":{"description":"On every customer of the store that has it. Returns how many changed.","operationId":"renameCustomerTag","parameters":[{"description":"Store id","in":"path","name":"store_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/CustomerTagRenameRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"`{\"customers\": n}`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Rename, merge or remove a customer tag","tags":["Customers"]}},"/stores/{store_id}/customers":{"get":{"description":"Newest first (`created_at`, then `id`) unless `sort` says otherwise.\nPaged by keyset: follow `next_cursor`, or pass `offset` (with\n`include_total=true`) for a page-number table; other orders page by\n`offset` only. Each row carries its `lifecycle` stage; `acquisition`\nis only on the customer record.","operationId":"listCustomers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Only customers whose custom field has this value, as `key:value`\n(the key from `GET .../customer-fields`; text and choice fields).","in":"query","name":"field","required":false,"schema":{"type":"string"}},{"description":"Defaults to `newest`; other orders page by `offset`.","in":"query","name":"sort","required":false,"schema":{"description":"The order of the customer list.","enum":["newest","oldest","alphabetical","spent","orders","last_order"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/CustomerCreateRequest"}}},"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"]}},"/stores/{store_id}/customers/bulk":{"post":{"description":"Adds or removes a tag, or sets the owner, on the given customers of the\nstore. Returns how many changed.","operationId":"bulkUpdateCustomers","parameters":[{"description":"Store id","in":"path","name":"store_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/CustomerBulkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"`{\"customers\": n}`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Change many customers","tags":["Customers"]}},"/stores/{store_id}/customers/duplicates":{"get":{"description":"Groups of customers in the store sharing an e-mail address, a CPF/CNPJ\nor a phone number, candidates for a merge. At most 200 groups are considered.","operationId":"listCustomerDuplicates","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_DuplicateGroup"}}},"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 duplicate customers","tags":["Customers"]}},"/stores/{store_id}/customers/export":{"get":{"description":"The list's filters, as a spreadsheet CSV (`;`-separated with a BOM and\ndecimal commas, as Excel in Portuguese opens it) with contact, stage,\npurchase totals, owner, tags and the store's custom fields. Up to 50,000\nrows.","operationId":"exportCustomers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Only customers whose custom field has this value, as `key:value`\n(the key from `GET .../customer-fields`; text and choice fields).","in":"query","name":"field","required":false,"schema":{"type":"string"}},{"description":"Defaults to `newest`; other orders page by `offset`.","in":"query","name":"sort","required":false,"schema":{"description":"The order of the customer list.","enum":["newest","oldest","alphabetical","spent","orders","last_order"],"type":"string"}}],"responses":{"200":{"content":{"text/csv":{}},"description":"`clientes.csv`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Export customers","tags":["Customers"]}},"/stores/{store_id}/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 .../erase`. Emits the\n`customers.deleted` webhook.","operationId":"deleteCustomer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetail"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdateRequest"}}},"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"]}},"/stores/{store_id}/customers/{customer_id}/addresses":{"get":{"description":"Default addresses first, then newest.","operationId":"listCustomerAddresses","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerAddressCreateRequest"}}},"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"]}},"/stores/{store_id}/customers/{customer_id}/addresses/{address_id}":{"delete":{"operationId":"deleteCustomerAddress","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerAddressUpdateRequest"}}},"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"]}},"/stores/{store_id}/customers/{customer_id}/call-options":{"get":{"operationId":"getCustomerCallOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallOptions"}}},"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":"How can we call this customer","tags":["Calls"]}},"/stores/{store_id}/customers/{customer_id}/consent":{"post":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/credit":{"get":{"operationId":"getCustomerCredit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/email-activity":{"get":{"description":"Consent (with its source), deliverability status, lead score and topics,\nand the 200 most recent sends, opens, clicks and provider events.","operationId":"getCustomerEmailActivity","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEmailActivity"}}},"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":"Get a customer's e-mail activity","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/emails":{"get":{"operationId":"listCustomerEmails","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailMessageSummary"},"type":"array"}}},"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 .../customers/{customer_id}/emails`: the e-mails the store sent to\na customer, newest first.","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/erase":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/export":{"get":{"description":"Everything held about one customer, as a downloadable JSON document:\nprofile, addresses, identities, consent, orders, conversations with\nmessages, e-mail activity, subscriptions, visits, checkout drafts and journey runs. The\nexport is recorded in the audit log.","operationId":"exportCustomerData","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The data bundle, sent as an attachment (`cliente-<id>.json`)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Export a customer's data (LGPD)","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/facts":{"get":{"description":"What the store remembers about the customer from their conversations\n(on every channel), oldest first: each fact with its category, the day\nit was learned and the message it came from. Replaced facts are left\nout.","operationId":"listCustomerFacts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CustomerFact"}}},"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":"List a customer's facts","tags":["Customers"]},"post":{"description":"Saved as written by the team (`author` `agent`). Refused (422\n`fact_rejected`) when it holds a document number, payment data, a code,\ncontact details, a street address or CEP, or sensitive data; a\n`dwelling` fact keeps only whether the customer lives in a house or an\napartment.","operationId":"createCustomerFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerFactCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFact"}}},"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":"`fact_rejected`: unknown category, empty or too long, or data that is never kept; `validation_failed`: a source message 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":"Add a fact about a customer","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/facts/{fact_id}":{"delete":{"description":"Gone for good, for the team and the assistant.","operationId":"deleteCustomerFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fact id","in":"path","name":"fact_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":"`fact_not_found`: no such fact 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 fact","tags":["Customers"]},"patch":{"description":"The same rules as adding one apply. The fact becomes the team's\n(`author` `agent`).","operationId":"updateCustomerFact","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fact id","in":"path","name":"fact_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFactUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFact"}}},"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":"`fact_not_found`: no such fact for this customer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fact_rejected`: unknown category, empty or too long, or data that is never kept"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 customer fact","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/fields":{"patch":{"description":"Merges into what the customer has; unknown keys and values of the wrong\nkind are refused. Returns every value the customer now has.","operationId":"setCustomerFieldValues","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFieldValuesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The customer's values by key"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: per-key messages"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 customer's field values","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/graph":{"get":{"description":"Identities, per-channel reachability and consent, the recent consent\nledger and likely duplicates, in one response.","operationId":"getCustomerGraph","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGraph"}}},"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":"Get a customer's identity graph","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/group":{"get":{"operationId":"getCustomersGroup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroupOf"}}},"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":"A customer's group","tags":["Customers"]},"put":{"description":"One group per customer; `null` takes them out. Carts they have open are priced with the new group's discounts the\nnext time they are loaded.","operationId":"setCustomerGroup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGroup"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroupOf"}}},"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 or 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":"Put a customer in a group","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/insights":{"get":{"description":"Purchase rhythm (average gap, the date they usually come back), what\nthey buy, through which channel and how they pay, their RFM standing\nagainst the store's other buyers, and recent engagement.","operationId":"getCustomerInsights","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInsights"}}},"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":"Get a customer's insights","tags":["Customers"]}},"/stores/{store_id}/customers/{customer_id}/interactions":{"get":{"description":"Newest first, keyset-paged: follow `next_cursor` (or pass `offset`).\nTeam notes and system events alike; the CRM timeline\n(`GET .../timeline`) merges these with orders, messages and consent.","operationId":"listCustomerInteractions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerInteractionCreateRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CustomerInteractionUpdateRequest"}}},"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"]}},"/stores/{store_id}/customers/{customer_id}/journey":{"get":{"description":"Every storefront visit of the customer's browsers (the visits stamped\nwith them and the browsers linked to them) and every conversation, as\ntouches with where they came from, plus the customer's orders and the\ntouch each was credited to.","operationId":"getCustomerJourney","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerJourney"}}},"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's journey","tags":["Analytics"]}},"/stores/{store_id}/customers/{customer_id}/loyalty":{"get":{"operationId":"getCustomerLoyalty","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/loyalty/adjust":{"post":{"operationId":"adjustCustomerPoints","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/loyalty/redeem":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/merge":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/customers/{customer_id}/timeline":{"get":{"description":"Everything that happened to one customer, newest first: orders,\nshipments and NF-e, conversations, e-mails sent (the archive) and\ne-mail activity, storefront visits and products viewed, abandoned carts,\nreviews, form submissions, stock alerts, team notes, consent changes,\njourney runs and changes to their data (`profile`: who changed which\nfield, from what, to what). `module` narrows it to one kind. Covers the 500 most\nrecent events.","operationId":"getCustomerTimeline","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Customer id","in":"path","name":"customer_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only events of this module (`order`, `conversation`, `note`, ...).","in":"query","name":"module","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TimelineEvent"}}},"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 timeline","tags":["Customers"]}},"/stores/{store_id}/dashboard/attention":{"get":{"description":"Orders to fulfil or awaiting payment, low and out-of-stock variants,\nfailed or waiting automations, pending assistant proposals, overdue\npurchase orders, recently abandoned carts and reviews to moderate.","operationId":"getDashboardAttention","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardAttention"}}},"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 what needs attention","tags":["Analytics"]}},"/stores/{store_id}/dashboard/stats":{"get":{"description":"Products, customers, pending orders and paid revenue for the period,\neach with its change against the previous period, plus today's paid\nrevenue and orders, recent activity, daily storefront traffic and\ndaily revenue and order series.\n\nDays are computed in the store's time zone (returned as `timezone`);\nsee `DashboardStats` for the exact boundaries and what each series\ncounts.","operationId":"getDashboardStats","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"KPIs, deltas and the charts all follow this window, in the store's\ntime zone. Defaults to `month`.","in":"query","name":"range","required":false,"schema":{"description":"The period the dashboard covers.","enum":["7d","30d","90d","month"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}},"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 dashboard numbers","tags":["Analytics"]}},"/stores/{store_id}/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":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/DealCreateRequest"}}},"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"]}},"/stores/{store_id}/deals/{deal_id}":{"delete":{"operationId":"deleteDeal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deal id","in":"path","name":"deal_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdateRequest"}}},"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"]}},"/stores/{store_id}/deals/{deal_id}/move":{"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":"moveDeal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/DealMoveRequest"}}},"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"]}},"/stores/{store_id}/delivery-zones":{"get":{"description":"By `sort_order`, then the start of the range.","operationId":"listDeliveryZones","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_DeliveryZone"}}},"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 delivery zones","tags":["Freight"]},"post":{"operationId":"createDeliveryZone","parameters":[{"description":"Store id","in":"path","name":"store_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/DeliveryZoneRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryZone"}}},"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`: empty label, invalid CEP range or negative price"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 delivery zone","tags":["Freight"]}},"/stores/{store_id}/delivery-zones/{zone_id}":{"delete":{"operationId":"deleteDeliveryZone","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Delivery zone id","in":"path","name":"zone_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 zone 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 delivery zone","tags":["Freight"]},"put":{"description":"`label`, the CEP range and the price are replaced; omitted optional\nfields keep their value, and `null` clears `description` or\n`delivery_days`.","operationId":"updateDeliveryZone","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Delivery zone id","in":"path","name":"zone_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryZoneUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryZone"}}},"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 zone in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty label, invalid CEP range or negative price"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 delivery zone","tags":["Freight"]}},"/stores/{store_id}/discount-approvals":{"get":{"description":"Newest first. For people who approve discounts (`discounts.write`).","operationId":"listConversationDiscountApprovals","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`pending` (default), `approved`, `rejected`, `cancelled` or `all`.","in":"query","name":"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConversationDiscountApproval"}}},"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 approvals","tags":["Conversations"]}},"/stores/{store_id}/discount-approvals/{approval_id}/approve":{"post":{"description":"Applies it to the conversation's cart and tells the requester.","operationId":"approveConversationDiscount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Approval id","in":"path","name":"approval_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/ConversationDiscountApproval"}}},"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 approval in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`approval_closed`: already decided, or the cart became an 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":"Approve a discount","tags":["Conversations"]}},"/stores/{store_id}/discount-approvals/{approval_id}/reject":{"post":{"operationId":"rejectConversationDiscount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Approval id","in":"path","name":"approval_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/ConversationDiscountApproval"}}},"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 approval in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`approval_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 discount","tags":["Conversations"]}},"/stores/{store_id}/discount-code-batches":{"get":{"description":"Newest first, with how many codes were used and handed out.","operationId":"listDiscountCodeBatches","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/discount-code-batches/{batch_id}/export":{"get":{"description":"A CSV file (comma-separated, UTF-8, with a header): `code`, `used`\n(`true` once an order used it), `handed_out_at`, `handed_out_to`,\n`expires_at`.","operationId":"exportDiscountCodeBatch","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Discount code batch id","in":"path","name":"batch_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"The codes as CSV"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 batch 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":"Export a batch of codes","tags":["Discounts"]}},"/stores/{store_id}/discount-codes":{"get":{"description":"Newest first.","operationId":"listDiscountCodes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/discount-codes/validate":{"post":{"description":"Answers 200 whether or not the code applies; read `valid` and `reason`.\nDoes not reserve a use.","operationId":"validateDiscountCode","parameters":[{"description":"Store id","in":"path","name":"store_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/DiscountCodeValidateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeValidation"}}},"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":"Validate a discount code","tags":["Discounts"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Partial: omitted fields keep their value, an explicit `null` clears a\nnullable one. Emits the `discount.updated` webhook.","operationId":"updateDiscountCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/discount-codes/{code_id}/usage":{"get":{"description":"Orders that used it, their revenue and the discount it gave.","operationId":"getDiscountCodeUsage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/discounts":{"get":{"description":"Highest `priority` first, then newest.","operationId":"listAutomaticDiscounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/discounts/{discount_id}":{"delete":{"description":"Orders that already applied it keep their discount. Purges the cached\nstorefront pages.","operationId":"deleteAutomaticDiscount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Partial: omitted fields keep their value, an explicit `null` clears a\nnullable one. Purges the cached storefront pages.","operationId":"updateAutomaticDiscount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/document-folders":{"get":{"description":"Every folder this member may see, as a flat list (`parent_id` builds the\ntree), by name.","operationId":"listDocumentFolders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentFolder"},"type":"array"}}},"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 document folders","tags":["Documents"]},"post":{"operationId":"createDocumentFolder","parameters":[{"description":"Store id","in":"path","name":"store_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/DocumentFolderCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFolder"}}},"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":"`missing_permission` (a restricted folder needs `documents.restricted`)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_not_found` (parent)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_name_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_folder_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 document folder","tags":["Documents"]}},"/stores/{store_id}/document-folders/{folder_id}":{"delete":{"description":"Only an empty folder: no documents (archived included) and no\nsubfolders.","operationId":"deleteDocumentFolder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Folder id","in":"path","name":"folder_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":"`folder_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_not_empty`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document folder","tags":["Documents"]},"patch":{"description":"Rename it, move it, or restrict it. Restricting (or lifting it) carries\nto every folder and document below it; a folder inside a restricted\none stays restricted.","operationId":"updateDocumentFolder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Folder id","in":"path","name":"folder_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFolderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFolder"}}},"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":"`folder_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_name_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_folder_name`, `folder_cycle` (moved into itself)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document folder","tags":["Documents"]}},"/stores/{store_id}/document-templates":{"get":{"operationId":"listDocumentTemplates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentTemplate"},"type":"array"}}},"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 document templates","tags":["Document Templates"]},"post":{"operationId":"createDocumentTemplate","parameters":[{"description":"Store id","in":"path","name":"store_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/DocumentTemplateInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTemplate"}}},"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_body`, `invalid_entity_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":"Create a document template","tags":["Document Templates"]}},"/stores/{store_id}/document-templates/fields":{"get":{"description":"The store's and today's, and the record's when `entity_type` is given.\nFree fields are any `{{livre.nome}}`, typed in when generating.","operationId":"listDocumentTemplateFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`supplier`, `customer`, `order`, `purchase_order` or `member`.","in":"query","name":"entity_type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TemplateField"},"type":"array"}}},"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":"Fields a template can use","tags":["Document Templates"]}},"/stores/{store_id}/document-templates/{template_id}":{"delete":{"description":"Documents made from it stay.","operationId":"deleteDocumentTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_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":"`template_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 document template","tags":["Document Templates"]},"get":{"operationId":"getDocumentTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTemplate"}}},"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":"`template_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 document template","tags":["Document Templates"]},"patch":{"description":"Its name, description, record type, body, folder and tags, or archive\nit. Documents already made from it do not change.","operationId":"updateDocumentTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTemplateInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTemplate"}}},"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":"`template_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_name`, `invalid_body`, `invalid_entity_type`, `invalid_status`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document template","tags":["Document Templates"]}},"/stores/{store_id}/document-templates/{template_id}/generate":{"post":{"description":"Fills the template for a record (and free values), files the PDF in the\nlibrary (in the template's folder, with its tags, linked to the record)\nand answers it with the record's contact, ready to send for signature.","operationId":"generateDocumentFromTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_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/TemplateFillInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateGenerated"}}},"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":"`template_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fields_missing` (details.fields; send allow_missing to go ahead), `entity_required`, `link_target_not_found`, `render_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":"Generate a document from a template","tags":["Document Templates"]}},"/stores/{store_id}/document-templates/{template_id}/preview":{"post":{"description":"The PDF it makes for a record (and free values), without filing it.\nAn unsaved `body` can be previewed too.","operationId":"previewDocumentTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Template id","in":"path","name":"template_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/TemplateFillInput"}}},"required":true},"responses":{"200":{"content":{"application/pdf":{}},"description":"The 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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`template_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`entity_required`, `link_target_not_found`, `invalid_body`, `render_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":"Preview a template","tags":["Document Templates"]}},"/stores/{store_id}/documents":{"get":{"description":"Newest change first, or soonest expiry with `expiring_within_days`.\nRestricted documents only reach members with `documents.restricted`.","operationId":"listDocuments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Documents directly in this folder.","in":"query","name":"folder_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only documents in no folder.","in":"query","name":"unfiled","required":false,"schema":{"type":"boolean"}},{"description":"Matches the title, description, file name and tags.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"tag","required":false,"schema":{"type":"string"}},{"description":"With `entity_id`: documents linked to it.","in":"query","name":"entity_type","required":false,"schema":{"$ref":"#/components/schemas/DocumentEntity"}},{"in":"query","name":"entity_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`active` (default), `archived` or `all`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Active documents that expire within this many days (expired ones\nincluded), soonest first.","in":"query","name":"expiring_within_days","required":false,"schema":{"format":"int32","type":"integer"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_DocumentSummary"}}},"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 documents","tags":["Documents"]},"post":{"description":"`multipart/form-data` with the file and, optionally, its title, folder,\ntags, expiry date and links. The file becomes version 1.","operationId":"uploadDocument","parameters":[{"description":"Store id","in":"path","name":"store_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/DocumentUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"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":"`folder_not_found`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_too_large` (over 50 MB)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_missing`, `invalid_title`, `invalid_tag`, `invalid_reminder`, `link_target_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":"Upload a document","tags":["Documents"]}},"/stores/{store_id}/documents/tags":{"get":{"operationId":"listDocumentTags","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentTag"},"type":"array"}}},"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 document tags","tags":["Documents"]}},"/stores/{store_id}/documents/{document_id}":{"delete":{"description":"For a document uploaded by mistake: removes it with its versions, links\nand history. A signed document cannot be deleted; archive it instead.","operationId":"deleteDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_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":"`document_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`document_locked` (signed)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Documents"]},"get":{"description":"With its versions, links and recent history.","operationId":"getDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"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":"`document_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 document","tags":["Documents"]},"patch":{"description":"Its title, description, folder, tags, expiry and reminder, or archive\nand restore it.","operationId":"updateDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"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":"`document_not_found`, `folder_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_title`, `invalid_tag`, `invalid_reminder`, `invalid_status`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 document","tags":["Documents"]}},"/stores/{store_id}/documents/{document_id}/links":{"post":{"description":"To a supplier, customer, order, purchase order or team member.","operationId":"linkDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentLinkRef"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentLink"},"type":"array"}}},"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":"`document_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`link_target_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":"Link a document","tags":["Documents"]}},"/stores/{store_id}/documents/{document_id}/links/{entity_type}/{entity_id}":{"delete":{"operationId":"unlinkDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"What the link points at","in":"path","name":"entity_type","required":true,"schema":{"$ref":"#/components/schemas/DocumentEntity"}},{"description":"Its id","in":"path","name":"entity_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentLink"},"type":"array"}}},"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":"`document_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 document's link","tags":["Documents"]}},"/stores/{store_id}/documents/{document_id}/signature-requests":{"post":{"description":"Sends the document's current version (a PDF) to its signers. Each one\ngets a private link (e-mailed when they have an e-mail; the links are\nalso returned, once, to share by other means) and confirms a code sent\nto their e-mail or WhatsApp before signing. In order (`sequential`),\neach signer is invited when the one before signs.","operationId":"createSignatureRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestCreated"}}},"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":"`document_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`document_locked` (already signed), `signature_in_progress`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_a_pdf`, `invalid_signer`, `whatsapp_unavailable`, `store_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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a document for signature","tags":["Signatures"]}},"/stores/{store_id}/documents/{document_id}/versions":{"post":{"description":"`multipart/form-data` with the file and an optional `note`. It becomes\nthe current version; earlier ones stay downloadable.","operationId":"uploadDocumentVersion","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"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":"`document_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`document_locked` (signed)"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_too_large`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_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":"Upload a new version","tags":["Documents"]}},"/stores/{store_id}/documents/{document_id}/versions/{version_id}/content":{"get":{"description":"The bytes of one version. Shown in place (PDFs, images, text) or, with\n`download=true`, as an attachment. Every call is recorded in the\ndocument's history.","operationId":"getDocumentVersionContent","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version id","in":"path","name":"version_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Answer as an attachment (a download) rather than to show in place;\nrecorded as `downloaded` instead of `viewed`.","in":"query","name":"download","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/octet-stream":{}},"description":"The 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":"`document_not_found`, `version_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 version's file","tags":["Documents"]}},"/stores/{store_id}/domains":{"get":{"description":"The store's platform domain and custom domains.","operationId":"listDomains","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_DomainOut"}}},"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 storefront domains","tags":["Storefront"]},"post":{"description":"Registers the hostname unverified and returns the TXT record to\npublish (`txt_record_name` = `dns_challenge`). Then call\n`POST .../domains/{domain_id}/verify`.","operationId":"addDomain","parameters":[{"description":"Store id","in":"path","name":"store_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/AddDomainRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOut"}}},"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":"`hostname_already_exists`: registered by a store already"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_hostname`; `reserved_platform_domain`: a domain the platform owns (or a subdomain of it); `reserved_suffix`: a platform hostname"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 custom domain","tags":["Storefront"]}},"/stores/{store_id}/domains/{domain_id}":{"delete":{"description":"The storefront stops answering on it. The platform domain cannot be\nremoved.","operationId":"deleteDomain","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Domain id","in":"path","name":"domain_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Domain 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":"No such custom domain 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":"Remove a custom domain","tags":["Storefront"]}},"/stores/{store_id}/domains/{domain_id}/primary":{"post":{"description":"The domain becomes the store's canonical URL in product feeds,\nsitemaps and other absolute links. Must be verified; platform and\ncustom domains both qualify.","operationId":"setPrimaryDomain","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Domain id","in":"path","name":"domain_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":"Primary domain set"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 domain in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`domain_not_verified`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 a domain primary","tags":["Storefront"]}},"/stores/{store_id}/domains/{domain_id}/verify":{"post":{"description":"Looks up the TXT record now. 200 when it matches: the domain is\nverified and published to the edge, which then issues its certificate.\n202 when it does not match yet (DNS can take a while); the failure is\ncounted and the call can be repeated.","operationId":"verifyDomain","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Domain id","in":"path","name":"domain_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/DomainOut"}}},"description":"Verified"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOut"}}},"description":"Not verified yet: the TXT record was not found"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 custom domain in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_challenge`: the domain has no verification challenge"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Verify a custom domain","tags":["Storefront"]}},"/stores/{store_id}/dropship-orders":{"get":{"description":"Newest first (at most 200). Needs `purchasing.read`.","operationId":"listDropshipOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`pending`, `shipped` or `cancelled`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DropshipOrder"},"type":"array"}}},"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 dropship orders","tags":["Dropshipping"]}},"/stores/{store_id}/dropship-orders/{dropship_id}/cancel":{"post":{"description":"The supplier's link stops working. A shipped one cannot be cancelled. Needs `purchasing.write`.","operationId":"cancelDropshipOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Dropship order id","in":"path","name":"dropship_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/DropshipOrder"}}},"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":"`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":"Cancel a dropship order","tags":["Dropshipping"]}},"/stores/{store_id}/dropship-orders/{dropship_id}/resend":{"post":{"description":"For a pending dropship order. 422 `send_failed` when the e-mail cannot go (the supplier has no address, or the provider\nrefused). Needs `purchasing.write`.","operationId":"resendDropshipOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Dropship order id","in":"path","name":"dropship_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/DropshipOrder"}}},"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":"`not_pending`"},"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":"Send the supplier its link again","tags":["Dropshipping"]}},"/stores/{store_id}/email-templates":{"get":{"description":"Every e-mail the store sends on its own (order confirmation, shipping,\npassword reset...), with the subject it uses today and whether the store\nchanged it.","operationId":"listTransactionalEmails","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TransactionalEmailSummary"}}},"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 transactional e-mails","tags":["Transactional Email"]}},"/stores/{store_id}/email-templates/{event}":{"delete":{"description":"Drops the store's version; the shipped default takes over again. Resetting\nan e-mail the store never changed does nothing.","operationId":"resetTransactionalEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transactional e-mail event, e.g. `order.paid`","in":"path","name":"event","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Reset"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 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":"Reset a transactional e-mail","tags":["Transactional Email"]},"get":{"description":"The effective template with its defaults, the block catalog and the\nmerge variables of the event.","operationId":"getTransactionalEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transactional e-mail event, e.g. `order.paid`","in":"path","name":"event","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionalEmailDetail"}}},"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 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":"Get a transactional e-mail","tags":["Transactional Email"]},"put":{"description":"Stores the store's version of the e-mail, replacing any earlier one. The\nnext send of the event uses it.","operationId":"saveTransactionalEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transactional e-mail event, e.g. `order.paid`","in":"path","name":"event","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveTransactionalEmailRequest"}}},"required":true},"responses":{"204":{"description":"Saved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 event"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty subject, or empty body in `html` mode"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save a transactional e-mail","tags":["Transactional Email"]}},"/stores/{store_id}/email-templates/{event}/preview":{"post":{"description":"Renders the template in the request body (not the saved one) with sample\ndata and the store's brand kit, so an editor can preview unsaved edits.","operationId":"previewTransactionalEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transactional e-mail event, e.g. `order.paid`","in":"path","name":"event","required":true,"schema":{"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/PreviewTransactionalEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderedEmailPreview"}}},"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 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":"Preview a transactional e-mail","tags":["Transactional Email"]}},"/stores/{store_id}/email-templates/{event}/test":{"post":{"description":"Sends the template in the request body, rendered with sample data, to one\ninbox with `[teste]` before the subject. Nothing is saved.","operationId":"testTransactionalEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transactional e-mail event, e.g. `order.paid`","in":"path","name":"event","required":true,"schema":{"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/TestTransactionalEmailRequest"}}},"required":true},"responses":{"204":{"description":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 event"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `to` is not an e-mail 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_send_failed`: the provider refused it; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a transactional e-mail test","tags":["Transactional Email"]}},"/stores/{store_id}/email/audience-preview":{"post":{"description":"Resolves the filter the way a send would and counts who it reaches.","operationId":"previewEmailAudience","parameters":[{"description":"Store id","in":"path","name":"store_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/EmailAudienceFilter"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAudiencePreview"}}},"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":"Preview a campaign audience","tags":["Email"]}},"/stores/{store_id}/email/broadcasts":{"get":{"description":"The store's e-mail campaigns, newest first.","operationId":"listEmailBroadcasts","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailBroadcast"}}},"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 campaigns","tags":["Email"]},"post":{"description":"Copies subject and body from `template_id` unless overridden. Without\n`scheduled_at` the campaign is a `draft` until sent; with it, it is\n`scheduled` and goes out on its own at that time.","operationId":"createEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateEmailBroadcastRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}},"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`: no subject or body (neither the template nor the overrides give one), or `template_id` is not a template of 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":"Create a campaign","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}":{"delete":{"description":"Any campaign that is not sending right now; its recipients and events go\nwith it.","operationId":"deleteEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_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 campaign in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`broadcast_sending`: it is being sent; cancel it 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 campaign","tags":["Email"]},"get":{"operationId":"getEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}},"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 campaign 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 campaign","tags":["Email"]},"patch":{"description":"Changes the fields sent while the campaign is a draft or scheduled.\nSetting `scheduled_at` schedules it. The body is frozen once sending\nstarts.","operationId":"updateEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailBroadcastRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}},"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 campaign in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`broadcast_in_flight`: already sending or sent"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `template_id` is not a template of 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":"Update a campaign","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/ab":{"get":{"description":"Sends, opens and clicks per subject variant.","operationId":"getEmailBroadcastAbResults","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAbResults"}}},"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 campaign's A/B results","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/cancel":{"post":{"description":"Stops a draft, scheduled or sending campaign. Recipients already sent to\nstay sent.","operationId":"cancelEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_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/EmailBroadcast"}}},"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 campaign in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`broadcast_not_cancellable`: already sent, failed 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 campaign","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/recipients":{"get":{"description":"Newest first, optionally one delivery state only.","operationId":"listEmailBroadcastRecipients","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only recipients in this state (`pending`, `sent`, `delivered`,\n`failed`, `bounced`...).","in":"query","name":"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailRecipient"}}},"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 campaign's recipients","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/report":{"get":{"description":"Delivery funnel and rates, opens and clicks over time, top links, bounces,\ntime to first open, and revenue from recipients who engaged (orders within\n7 days of their send).","operationId":"getEmailBroadcastReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCampaignReport"}}},"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 campaign 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 campaign report","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/resend-unopened":{"post":{"description":"Creates a follow-up campaign, with a new subject and the same body, for\neveryone who received the original and did not open it. With `send_now`\n(the default) it is scheduled for now and goes out within a minute.","operationId":"resendEmailBroadcastToUnopened","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_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/ResendUnopenedRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}},"description":"The follow-up campaign"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 campaign in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_unopened_recipients`: everyone opened it, or nothing 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Resend to non-openers","tags":["Email"]}},"/stores/{store_id}/email/broadcasts/{broadcast_id}/send":{"post":{"description":"Moves a draft or scheduled campaign to `sending` and starts the send in\nthe background; answers 202 with the campaign. Recipients are written as\nthe audience resolves and go out over the next minutes (A/B tests and\nsend-time optimization spread them further).","operationId":"sendEmailBroadcast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Campaign (broadcast) id","in":"path","name":"broadcast_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":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBroadcast"}}},"description":"Sending"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 campaign in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`broadcast_not_sendable`: not a draft or scheduled campaign; `email_campaigns_held`: the store's campaigns are held (`details.reason`: `owner_email_unverified` until the organization's owner confirms their e-mail, `reputation` after too many bounces or spam complaints)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 campaign now","tags":["Email"]}},"/stores/{store_id}/email/config":{"get":{"description":"Sender identity, provider, reply routing and preference-center topics.","operationId":"getEmailSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSettings"}}},"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 e-mail settings","tags":["Transactional Email"]},"patch":{"description":"Changes the fields sent and records an audit entry.","operationId":"updateEmailSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSettings"}}},"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`: unknown `provider` or `inbox_mode`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the e-mail settings","tags":["Transactional Email"]}},"/stores/{store_id}/email/contacts/import":{"post":{"description":"Creates or updates customers by e-mail: fills missing names and phone,\nadds tags, and opts in (recording `source`) contacts with no consent\nhistory when the row or the form says so (`opt_in` defaults to false: a\nlist is not consent). Someone who opted out is never opted back in, and\nexisting consent is never withdrawn.\nBodies up to 30 MB.","operationId":"importEmailContacts","parameters":[{"description":"Store id","in":"path","name":"store_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/EmailContactImportForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailContactImportResult"}}},"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":"`csv_missing_file`, `csv_empty` or `csv_missing_email_column`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 contacts from a CSV","tags":["Email"]}},"/stores/{store_id}/email/design-catalog":{"get":{"description":"Block types, starter designs and merge variables for the e-mail editor.","operationId":"getEmailDesignCatalog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDesignCatalog"}}},"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 e-mail design catalog","tags":["Email"]}},"/stores/{store_id}/email/domains":{"get":{"description":"The store's SES sending domains with the DNS records to publish. Pending\ndomains not checked in the last 30 seconds are re-checked with SES first.","operationId":"listEmailDomains","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailDomain"}}},"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 sending domains","tags":["Email Deliverability"]},"post":{"description":"Creates the SES identity (Easy DKIM and a custom MAIL FROM) and returns\nthe DNS records to publish. Adding a domain the store already has returns\nit refreshed.","operationId":"addEmailDomain","parameters":[{"description":"Store id","in":"path","name":"store_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/AddEmailDomainRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"}}},"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":"`email_domain_taken`: another store sends from it"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not a domain; `platform_domain_reserved`: one of the platform's own domains"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ses_error`: SES refused it; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Add a sending domain","tags":["Email Deliverability"]}},"/stores/{store_id}/email/domains/{domain_id}":{"delete":{"description":"Deletes the SES identity too (except the platform's own domains). Mail\nfrom this domain falls back to the platform identity.","operationId":"deleteEmailDomain","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sending domain id","in":"path","name":"domain_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":"No such domain 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":"Remove a sending domain","tags":["Email Deliverability"]}},"/stores/{store_id}/email/domains/{domain_id}/check":{"post":{"description":"Asks SES for the domain's verification state now.","operationId":"checkEmailDomain","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sending domain id","in":"path","name":"domain_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/EmailDomain"}}},"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 domain 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ses_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Check a sending domain","tags":["Email Deliverability"]}},"/stores/{store_id}/email/forms":{"get":{"description":"The store's embeddable sign-up forms with their embed code, newest first.","operationId":"listEmailForms","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailForm"}}},"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 subscription forms","tags":["Email"]},"post":{"operationId":"createEmailForm","parameters":[{"description":"Store id","in":"path","name":"store_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/EmailFormRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailForm"}}},"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":"`email_form_slug_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty name, or `welcome_template_id` is not a template of 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":"Create a subscription form","tags":["Email"]}},"/stores/{store_id}/email/forms/{form_id}":{"delete":{"description":"Embedded copies stop accepting submissions. Contacts it collected stay.","operationId":"deleteEmailForm","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"No such form 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 subscription form","tags":["Email"]},"put":{"description":"Every setting is replaced by the request's (absent `fields` keep theirs).","operationId":"updateEmailForm","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFormRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailForm"}}},"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 form in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_form_slug_taken`"},"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":"Replace a subscription form","tags":["Email"]}},"/stores/{store_id}/email/health":{"get":{"description":"Campaign delivery, bounce, complaint and open rates over 30 days, the\nsuppression count, verified domains and the platform's SES quota.","operationId":"getEmailHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailHealth"}}},"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 e-mail deliverability health","tags":["Email Deliverability"]}},"/stores/{store_id}/email/messages/{message_id}":{"get":{"operationId":"getEmailMessage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Archived message id","in":"path","name":"message_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}},"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 message 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 .../email/messages/{message_id}`: one archived message with its\ncontent. Needs `customers.read`, or `orders.read` for a message about an\norder.","tags":["Email"]}},"/stores/{store_id}/email/overview":{"get":{"description":"List health and growth, the last campaigns, when subscribers open, and\nrevenue attributed to e-mail over 90 days.","operationId":"getEmailOverview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOverview"}}},"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 e-mail overview","tags":["Email"]}},"/stores/{store_id}/email/product-subscriptions":{"get":{"description":"Back-in-stock and price-drop sign-ups from the storefront, newest first.","operationId":"listProductSubscriptions","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductSubscription"}}},"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 product subscriptions","tags":["Email"]}},"/stores/{store_id}/email/product-subscriptions/summary":{"get":{"operationId":"getProductSubscriptionSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubscriptionSummary"}}},"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":"Summarize product subscriptions","tags":["Email"]}},"/stores/{store_id}/email/products":{"get":{"description":"Product cards for the e-mail editor's picker: active products matching\n`q`, most recently updated first, or exactly the products in `ids`.\nAt most 64 per page; `total` is not available.","operationId":"listEmailProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Search active products by title.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Comma-separated product ids to resolve, in that order (any status).","in":"query","name":"ids","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailProductCard"}}},"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 for e-mails","tags":["Email"]}},"/stores/{store_id}/email/segments":{"get":{"description":"The store's saved segments by name, each with its current member count.","operationId":"listEmailSegments","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailSegment"}}},"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 segments","tags":["Email"]},"post":{"operationId":"createEmailSegment","parameters":[{"description":"Store id","in":"path","name":"store_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/EmailSegmentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSegment"}}},"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 segment","tags":["Email"]}},"/stores/{store_id}/email/segments/fields":{"get":{"description":"The fields and operators segment rules can use.","operationId":"listEmailSegmentFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailSegmentField"},"type":"array"}}},"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 segment fields","tags":["Email"]}},"/stores/{store_id}/email/segments/preview":{"post":{"description":"Counts and samples the customers the rules match, while they are edited.","operationId":"previewEmailSegment","parameters":[{"description":"Store id","in":"path","name":"store_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/PreviewEmailSegmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSegmentPreview"}}},"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":"Preview segment rules","tags":["Email"]}},"/stores/{store_id}/email/segments/{segment_id}":{"delete":{"description":"Meta audiences built from it are removed from the store with it (the\ncopies on Meta stay). Campaigns already sent keep their recipients.","operationId":"deleteEmailSegment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Segment id","in":"path","name":"segment_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 segment in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`builtin_segment`: built-in segments cannot be deleted"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 segment","tags":["Email"]},"put":{"operationId":"updateEmailSegment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Segment id","in":"path","name":"segment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSegmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSegment"}}},"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 segment in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, or `builtin_segment` (a built-in segment)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 segment","tags":["Email"]}},"/stores/{store_id}/email/segments/{segment_id}/export.csv":{"get":{"description":"Every member with e-mail, name, orders, spend (reais), last order, tags,\nconsent and e-mail status. Comma-separated, UTF-8.","operationId":"exportEmailSegment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Segment id","in":"path","name":"segment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"The CSV 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":"No such segment 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":"Export a segment as CSV","tags":["Email"]}},"/stores/{store_id}/email/segments/{segment_id}/members":{"get":{"description":"Every customer the segment matches now (with or without an e-mail), newest\ncustomers first.","operationId":"listEmailSegmentMembers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Segment id","in":"path","name":"segment_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailSegmentMember"}}},"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 segment 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 segment's members","tags":["Email"]}},"/stores/{store_id}/email/suppressions":{"get":{"description":"Newest first.","operationId":"listEmailSuppressions","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailSuppression"}}},"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 suppressed addresses","tags":["Email Deliverability"]},"post":{"description":"The store stops e-mailing it (marketing and transactional sends through\nthe platform), and the matching customer's e-mail status becomes\n`suppressed`. Suppressing an address again updates its reason to `manual`.","operationId":"addEmailSuppression","parameters":[{"description":"Store id","in":"path","name":"store_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/AddEmailSuppressionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSuppression"}}},"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`: not an e-mail 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":"Suppress an address","tags":["Email Deliverability"]}},"/stores/{store_id}/email/suppressions/{suppression_id}":{"delete":{"description":"The address can be e-mailed again and the customer's e-mail status goes\nback to `ok`.","operationId":"deleteEmailSuppression","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Suppression id","in":"path","name":"suppression_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":"No such suppression 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":"Remove a suppression","tags":["Email Deliverability"]}},"/stores/{store_id}/email/templates":{"get":{"description":"The store's marketing templates, most recently edited first.","operationId":"listEmailTemplates","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EmailTemplate"}}},"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 e-mail templates","tags":["Email"]},"post":{"description":"A `design` is compiled to `html` with the store's brand kit; without one,\n`html` is stored as sent.","operationId":"createEmailTemplate","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateEmailTemplateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}},"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`: empty 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 an e-mail template","tags":["Email"]}},"/stores/{store_id}/email/templates/ai":{"post":{"description":"Writes (or revises) a block design from a prompt, using the store's brand\nguide and real products. Nothing is saved.","operationId":"draftEmailWithAssistant","parameters":[{"description":"Store id","in":"path","name":"store_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/DraftEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraft"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_error`: the model failed or answered something unusable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: no model configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Draft an e-mail with the assistant","tags":["Email"]}},"/stores/{store_id}/email/templates/render":{"post":{"description":"Compiles a block design with the store's brand kit (or the one sent) and\nfills merge variables with sample values, for a live preview. Product\nblocks show current catalog data.","operationId":"renderEmailDesign","parameters":[{"description":"Store id","in":"path","name":"store_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/RenderEmailDesignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderedEmailPreview"}}},"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":"Render an e-mail design","tags":["Email"]}},"/stores/{store_id}/email/templates/{template_id}":{"delete":{"description":"Campaigns already created from it keep their copy of the content.","operationId":"deleteEmailTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"E-mail template id","in":"path","name":"template_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 template 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 e-mail template","tags":["Email"]},"get":{"operationId":"getEmailTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"E-mail template id","in":"path","name":"template_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}},"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 template 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 e-mail template","tags":["Email"]},"patch":{"description":"Changes the fields sent. A `design` recompiles `html` (with\n`preview_text`); an `html` without a `design` switches the template to raw\nHTML and drops its design.","operationId":"updateEmailTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"E-mail template id","in":"path","name":"template_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailTemplateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}},"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 template 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":"Update an e-mail template","tags":["Email"]}},"/stores/{store_id}/email/templates/{template_id}/test":{"post":{"description":"Renders the saved template with stub merge values (customer \"Teste\nMarketing\") and sends it to one address. No recipient row is written.","operationId":"testEmailTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"E-mail template id","in":"path","name":"template_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/TestEmailTemplateRequest"}}},"required":true},"responses":{"204":{"description":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `to` is not an e-mail 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_send_failed`: the provider refused it; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send an e-mail template test","tags":["Email"]}},"/stores/{store_id}/email/test":{"post":{"description":"Sends a short branded message through the store's configured identity (or\nthe platform fallback). A provider refusal (unverified domain, bad key)\ncomes back as `email_send_failed` with the provider's reason.","operationId":"sendTestEmail","parameters":[{"description":"Store id","in":"path","name":"store_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/SendTestEmailRequest"}}},"required":true},"responses":{"204":{"description":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: `to` is not an e-mail 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`email_send_failed`: the provider refused it; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a test e-mail","tags":["Transactional Email"]}},"/stores/{store_id}/erp-providers":{"get":{"description":"The store's ERP connections, the default first. Secrets are masked.","operationId":"listErpProviders","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ErpProvider"}}},"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 ERP providers","tags":["Integrations"]},"post":{"description":"Creates the store's connection to an ERP (for Tiny, `code` is\n`tiny_erp`; then authorize it with the OAuth calls). The answer masks\nthe secrets.","operationId":"createErpProvider","parameters":[{"description":"Store id","in":"path","name":"store_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/ErpProviderCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpProvider"}}},"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":"`erp_provider_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":"Connect an ERP","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}":{"put":{"description":"Changes the fields sent. `config_json` is merged into the stored\nsettings; masked secrets sent back unchanged keep the stored values.","operationId":"updateErpProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpProviderUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpProvider"}}},"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":"`erp_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":"Update an ERP provider","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/health":{"get":{"description":"The stored connection and sync state (always available, even when Tiny is\ndown), plus a live call to Tiny's `/info` when a token is present. Also\ncreates the stock webhook secret on first read, so `status.webhook_url`\nis always ready to paste into Tiny.","operationId":"getErpProviderHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpProviderHealth"}}},"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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Check an ERP provider","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/sync-logs":{"get":{"description":"The provider's sync and import runs, newest first. Keyset-paged.","operationId":"listErpSyncLogs","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ErpSyncLog"}}},"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 ERP sync runs","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/sync-logs/{log_id}":{"get":{"description":"Poll it to follow an import started with `importTinyProducts` (its\n`job_id`).","operationId":"getErpSyncLog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync log id","in":"path","name":"log_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpSyncLog"}}},"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":"`sync_log_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 ERP sync run","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/info":{"get":{"description":"Tiny's `/info` answer (the account behind the token), passed through.","operationId":"getTinyAccountInfo","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Tiny's own payload"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_missing`, `provider_needs_reauth` (Tiny refused the stored authorization)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_error` (`details.provider_status`, `details.provider_body`)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the Tiny account","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/link-report":{"get":{"description":"Every variant of the store with whether a sync matched it to a Tiny\nproduct (by SKU, case-insensitive) and the stock held in Mobiari: which\nSKUs are linked, which are not, and where stock is 0 because a SKU never\nmatched.","operationId":"getTinyLinkReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinyLinkReport"}}},"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":"`erp_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":"Get the Tiny link report","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/oauth/authorize-url":{"get":{"description":"Built from the provider's `oauth_client_id` and `oauth_redirect_uri`.","operationId":"getTinyAuthorizeUrl","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Echoed back on the redirect, to find the store and provider again.","in":"query","name":"state","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinyAuthorizeUrl"}}},"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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `oauth_not_configured` (client id or redirect URI 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":"Get Tiny's OAuth authorize URL","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/oauth/token":{"post":{"description":"Trades the `code` from Tiny's redirect for tokens, stores them (never\nreturned) and clears any needs-reauth state.","operationId":"exchangeTinyOauthCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP 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/TinyOauthTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinyOauthResult"}}},"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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `oauth_not_configured`, `validation_failed` (empty 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`oauth_exchange_failed`: Tiny refused the code (`details.provider_response`)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Exchange Tiny's OAuth code","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/orders":{"get":{"description":"Tiny's `/pedidos` answer, passed through as Tiny paginates it.","operationId":"listTinyOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Tiny's `orderBy`.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}},{"description":"Tiny's `situacao`.","in":"query","name":"situacao","required":false,"schema":{"type":"string"}},{"description":"Created on or after (products), or the order period start.","in":"query","name":"data_inicial","required":false,"schema":{"type":"string"}},{"description":"Order period end.","in":"query","name":"data_final","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Tiny's own payload"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_missing`, `provider_needs_reauth` (Tiny refused the stored authorization)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List Tiny orders","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/products":{"get":{"description":"Tiny's `/produtos` answer, passed through as Tiny paginates it (this is\nTiny's list, not a Mobiari `Page`).","operationId":"listTinyProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Tiny's `orderBy`.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}},{"description":"Tiny's `situacao`.","in":"query","name":"situacao","required":false,"schema":{"type":"string"}},{"description":"Created on or after (products), or the order period start.","in":"query","name":"data_inicial","required":false,"schema":{"type":"string"}},{"description":"Order period end.","in":"query","name":"data_final","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Tiny's own payload"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_missing`, `provider_needs_reauth` (Tiny refused the stored authorization)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`provider_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List Tiny products","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/products/import":{"post":{"description":"Starts a background import of Tiny's catalogue (products, variations,\nkits and their components, prices and stock) and answers at once with\nthe sync log that tracks it. One sync runs per provider at a time.","operationId":"importTinyProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP 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"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpImportStarted"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sync_already_running`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_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 products from Tiny","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/products/import/stream":{"post":{"description":"The same import as `importTinyProducts`, answering with its progress as\nnewline-delimited JSON (`application/x-ndjson`), one event object per\nline, ending with `{\"type\": \"done\", ...}`. Read it as a stream. Do not\nsend an `Idempotency-Key`: the stream would be buffered to be replayed.","operationId":"streamTinyProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP 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"}}],"responses":{"200":{"content":{"application/x-ndjson":{"schema":{"type":"string"}}},"description":"Progress events, one JSON object per line"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sync_already_running`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_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 products from Tiny, streaming progress","tags":["Integrations"]}},"/stores/{store_id}/erp-providers/{provider_id}/tiny/sync":{"post":{"description":"Pulls Tiny's stock into the store's location (matching variants by SKU)\nin the background and answers 202 at once; follow it with\n`listErpSyncLogs` (how the run ended) and `getErpProviderHealth`\n(`status.last_sync_at`, the last successful sync, and\n`status.last_error`). One run per provider at a time.\nWith `dry_run=true` it runs inline, writes nothing and answers 200 with\nwhat would change. The scheduled sync (leader-elected worker) is\nseparate and unaffected.","operationId":"syncTinyStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"ERP provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Location the ERP's stock is written to; defaults to the store's\nfirst active location (created when the store has none).","in":"query","name":"location_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Compute what the sync would change and answer with it, writing\nnothing.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"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/ErpSyncPreview"}}},"description":"Dry run: what would change"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErpSyncStarted"}}},"description":"Started in the background"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`erp_provider_not_found` (or the location)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sync_already_running`: a sync or import of this provider is under way"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_erp_provider`, `provider_token_missing`, `provider_needs_reauth` (dry run: Tiny refused the stored authorization)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sync stock from Tiny","tags":["Integrations"]}},"/stores/{store_id}/events":{"get":{"description":"The store's domain events (the outbox that feeds webhooks, workflows\nand team alerts), newest first, with their delivery status.","operationId":"listStoreEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only events of this type, e.g. `orders.paid`.","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"description":"Where an event is in delivery.","enum":["dispatched","pending","failed"],"type":"string"}},{"description":"Only the events of the catalog (`GET /events/catalog`), not the\nolder internal ones.","in":"query","name":"catalogued","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_EventRow"}}},"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"]}},"/stores/{store_id}/features":{"get":{"description":"The enabled features, the segment they equal (or `custom`), every feature\nwith what it requires, and the segments offered at sign-up.","operationId":"getWorkspaceFeatures","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFeatures"}}},"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":"What the workspace uses","tags":["Stores"]},"put":{"description":"Replaces the set of enabled features. Only the owner of the store (or its\norganization) may. Turning a feature off hides it from the admin and\ndeletes nothing: turn it back on and it is as it was. The workspace's\nlegacy `kind` follows: `store` while any commerce feature (`catalog`,\n`sales`, `storefront`, `inventory`, `purchasing`, `shipping`) is on,\notherwise `service`, whose storefront host answers 404.","operationId":"updateWorkspaceFeatures","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeaturesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFeatures"}}},"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":"`owner_only`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unknown_feature`, or `feature_requires`: a feature is on without one it 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":"Choose what the workspace uses","tags":["Stores"]}},"/stores/{store_id}/finance/bank-imports":{"post":{"description":"Reads an OFX file (the one banks offer as \"extrato OFX\") and keeps its\ntransactions as lines to reconcile. A transaction already imported (same\naccount and FITID) is not added again, so a file can overlap an earlier one.","operationId":"importBankStatement","parameters":[{"description":"Store id","in":"path","name":"store_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/ImportStatement"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Imported"}}},"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_statement`: not an OFX file, a bad date or amount, or too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 bank statement","tags":["Purchasing"]}},"/stores/{store_id}/finance/bank-lines":{"get":{"description":"Newest first (up to 500). Each open debit comes with the payables it could\nhave paid.","operationId":"listBankLines","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`open` (default), `matched`, `ignored` or `all`.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BankLine"},"type":"array"}}},"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":"Statement lines","tags":["Purchasing"]}},"/stores/{store_id}/finance/bank-lines/{line_id}/ignore":{"post":{"description":"For something that needs no booking here (a transfer between own\naccounts, a fee already entered, money in that is not a sale).","operationId":"ignoreBankLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Statement line id","in":"path","name":"line_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/BankLine"}}},"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":"`line_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`line_resolved`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ignore a statement line","tags":["Purchasing"]}},"/stores/{store_id}/finance/bank-lines/{line_id}/match":{"post":{"description":"A debit with `payable_id`: marks the payable paid on the day and for the\namount the bank shows (method `transfer`); the payable must be open\nand its amount equal. A credit with `payment_id`: confirms that receivable\non the bank's day (its net of the estimated fee, or the whole payment,\nwithin R$ 1,00 or 2%, whichever is less); a payment is confirmed by one line only.","operationId":"matchBankLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Statement line id","in":"path","name":"line_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/MatchLine"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankLine"}}},"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":"`line_not_found`, `payable_not_found` or `payment_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`line_resolved` (already matched or ignored), `payable_not_open` or `payment_confirmed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_match` (give a payable or a payment), `not_a_debit`, `not_a_credit` or `amount_mismatch`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Match a statement line","tags":["Purchasing"]}},"/stores/{store_id}/finance/bank-lines/{line_id}/unmatch":{"post":{"description":"A matched line goes back to open: the payable it paid is reopened (paid date, amount and method cleared), or the receivable it\nconfirmed is unconfirmed. An ignored line goes back to open. For a wrong click, which otherwise would stay forever and hide\nthe payable from every other line. Needs `finance.write`, and `payables.write` to reopen a payable.","operationId":"unmatchBankLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Statement line id","in":"path","name":"line_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/BankLine"}}},"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":"`line_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`line_open`: nothing to undo"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Undo a statement line's resolution","tags":["Purchasing"]}},"/stores/{store_id}/finance/cash-flow":{"get":{"description":"Per day: the receivables expected and the payables paid or due. Past days\nshow what arrived and what was paid; future days are the projection from\nthe open receivables and payables.","operationId":"getCashFlow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day of the window. Defaults to 14 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Last day of the window. Defaults to 30 days from today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashFlow"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cash flow","tags":["Finance"]}},"/stores/{store_id}/finance/dre":{"get":{"description":"Income statement for a period. Revenue counts orders by the day they were\npaid; expenses count by the day paid (or due, while open). Stock purchases\nare not expenses: they become cost of goods when sold.","operationId":"getDre","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day. Defaults to the first of this month.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Last day, included. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dre"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"DRE","tags":["Finance"]}},"/stores/{store_id}/finance/payment-terms":{"get":{"description":"Fee and settlement days for every payment method, with the default where\nthe store has not set one.","operationId":"getPaymentTerms","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodTermsList"}}},"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 payment terms","tags":["Finance"]},"put":{"description":"Sets the methods sent; the others keep what they had.","operationId":"setPaymentTerms","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodTermsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodTermsList"}}},"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_method`, `invalid_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":"Set payment terms","tags":["Finance"]}},"/stores/{store_id}/fiscal/accounting/export":{"get":{"description":"A ZIP with the month's XMLs (authorized and cancelled notes), `notas.csv`\n(every note of the month with its situation) and `receita-por-cfop.csv`\n(authorized notes only; cancelled ones are listed apart and left out of the\ntotal). For produção, of the whole store or of its own CNPJ, also the\nsupplier notes issued in the month (`xml/entradas/`, received or pending)\nand the inventory position at the month's last day (today for the current\nmonth), `posicao-estoque-<day>.csv`, with the SPED Bloco H fields (see\n`GET /stores/{store_id}/inventory/position`). Read-only: the same\npermission as reading the notes.","operationId":"downloadFiscalAccountingPackage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`YYYY-MM`, in São Paulo time.","in":"query","name":"month","required":true,"schema":{"type":"string"}},{"description":"Only the notes of this issuer (CNPJ): each CNPJ is its own taxpayer\nfor the accountant.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"`producao` (default) or `homologacao`.","in":"query","name":"environment","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/zip":{}},"description":"ZIP 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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`month` is not YYYY-MM or `environment` is unknown"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The monthly package for the accountant.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/certificate":{"post":{"description":"The `.pfx` and its password are stored encrypted. Refused when the\npassword is wrong, it is expired, or it belongs to another company.","operationId":"uploadFiscalCertificate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","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/FiscalCertificateInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalCertificate"}}},"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_configured`: fill in the company data (CNPJ) first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_certificate_invalid`: wrong password, not an A1 e-CNPJ, expired or another company"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the A1 certificate.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/cnpj/{cnpj}":{"get":{"description":"Receita Federal's open data (via BrasilAPI) to pre-fill the profile:\nname, address with IBGE code, CNAE, Simples/MEI option. No state\nregistration (IE): that comes from the SEFAZ registry check.","operationId":"lookupFiscalCnpj","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"CNPJ, punctuation allowed","in":"path","name":"cnpj","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CnpjLookup"}}},"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":"`cnpj_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: invalid CNPJ"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cnpj_lookup_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Look up public company data for a CNPJ.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/corrections/{correction_id}/pdf":{"get":{"description":"To staple to the DANFE before the goods leave.","operationId":"downloadFiscalCorrectionPdf","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/fiscal/corrections/{correction_id}/refresh":{"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":"refreshFiscalCorrection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/fiscal/corrections/{correction_id}/xml":{"get":{"description":"The procEventoNFe (the signed event with SEFAZ's answer) once\nregistered.","operationId":"downloadFiscalCorrectionXml","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/fiscal/dispatch-place":{"put":{"description":"When the store ships or hands over goods from somewhere other than the\nemitter's address (a deposit, someone's house), the NF-e of shipped and\npicked-up orders carries that place (`retirada`): who holds it and its\naddress. Null clears it.","operationId":"putFiscalDispatchPlace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDispatchPlaceInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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_configured`: save the fiscal profile first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a field is 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":"Set where the goods leave from.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/documents":{"get":{"operationId":"listFiscalDocuments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/fiscal/documents/{document_id}":{"get":{"operationId":"getFiscalDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocumentDetail"}}},"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"]}},"/stores/{store_id}/fiscal/documents/{document_id}/complement":{"post":{"description":"Numbers, signs, stores and transmits the complement; it hangs on the\nnote's order, beside it.","operationId":"emitFiscalComplement","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note to complement","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/FiscalComplementRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"Stored and transmitted once; `status` says where it stands"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`complement_not_authorized`, `complement_environment_mismatch`, `fiscal_production_locked`"},"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 an NF-e complementar","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/documents/{document_id}/complement/preview":{"post":{"description":"The complement of an authorized NF-e: a price difference per item (its\ntaxes at the note's rates), or the ICMS / ICMS-ST that was short.\nValidated and serialized; spends no number.","operationId":"previewFiscalComplement","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The note to complement","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/FiscalComplementRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalPreview"}}},"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":"`complement_not_authorized`, `complement_environment_mismatch`"},"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":"Preview an NF-e complementar","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/documents/{document_id}/danfe":{"get":{"operationId":"downloadFiscalDocumentDanfe","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/fiscal/documents/{document_id}/refresh":{"post":{"description":"Retries a document without a verdict, or detects a cancellation done\nelsewhere.","operationId":"refreshFiscalDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/fiscal/environment":{"put":{"description":"Production is refused until every readiness item passes.","operationId":"setFiscalEnvironment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalEnvironmentInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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_ready`: the readiness checklist has open items"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Switch between homologação and produção.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/future-delivery":{"put":{"description":"Venda para entrega futura (RICMS/SP art. 129): the simples faturamento\n(CFOP 5922/6922) and the remessas (5116/6116 for goods the store\nproduces, 5117/6117 for goods bought for resale), each with its CSOSN\nand natureza da operação. The accountant decides them.","operationId":"putFiscalFutureDelivery","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalFutureDeliveryInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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_configured`: save the fiscal profile first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a field is 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":"Set the store's entrega futura codes.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/gift":{"put":{"description":"The NF-e of an order given at no charge (doação ou brinde, CFOP\n5910/6910): its CSOSN and natureza da operação. The accountant decides\nthem.","operationId":"putFiscalGift","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalGiftInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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_configured`: save the fiscal profile first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a field is 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":"Set the store's nota de bonificação codes.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/issuers":{"get":{"description":"The default issuer (the company profile's CNPJ) first, then the branches\n(filiais) by name. A store that never set up its fiscal data has none.","operationId":"listFiscalIssuers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FiscalIssuer"},"type":"array"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 fiscal issuers.","tags":["Fiscal"]},"post":{"description":"A CNPJ of its own with its IE, address and regime. It starts in\nhomologação with the default issuer's NF-e settings (natureza, default\ntax class, entrega futura and bonificação codes) and no certificate:\nupload one (the company's e-CNPJ serves every branch with the same CNPJ\nroot), set the NFC-e and go through its readiness checklist with\n`?issuer_id=` on the profile routes.","operationId":"createFiscalIssuer","parameters":[{"description":"Store id","in":"path","name":"store_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/FiscalIssuerInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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":"`fiscal_issuer_cnpj_taken`: the company profile or another branch has this CNPJ"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a field is 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":"Add a branch (filial) as an issuer.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/issuers/{issuer_id}":{"delete":{"description":"Only a branch that never issued, voided or corrected a note: its notes\nmust stay traceable to it. Sales channels and locations that named it go\nback to the default issuer.","operationId":"deleteFiscalIssuer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fiscal issuer id","in":"path","name":"issuer_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":"No such issuer in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_issuer_is_company` (the default issuer), `fiscal_issuer_in_use` (it has notes, voidings or cartas de correção)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 branch.","tags":["Fiscal"]},"put":{"description":"The whole identity, as on creation (`serie` is ignored). The CNPJ and IE\ncannot change while the branch emits in production. The default issuer is\nthe company profile (`PUT /stores/{store_id}/legal-info`).","operationId":"updateFiscalIssuer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Fiscal issuer id","in":"path","name":"issuer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalIssuerInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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 issuer in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_issuer_is_company` (the default issuer), `fiscal_identity_locked` (CNPJ or IE in production), `fiscal_issuer_cnpj_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a field is 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 branch's identity.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/nfce":{"put":{"description":"The NFC-e is numbered in its own series, which cannot be the NF-e's.\nTurning it on needs the series; the CSC can be sent now or later.","operationId":"putFiscalNfceSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalNfceSettingsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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`: the series or the CSC is 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":"Turn the NFC-e on or off and set its series and CSC.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/numbering":{"put":{"description":"One after the last NF-e the store issued in this série anywhere. Cannot\ngo below a number already used here.","operationId":"confirmFiscalNumbering","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalNumberingInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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":"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":"Confirm the next production number.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/profile":{"get":{"description":"Emitter data, certificate metadata (never the certificate), environment,\nnext numbers and the problems that would block emission.","operationId":"getFiscalProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the store's fiscal profile.","tags":["Fiscal"]},"put":{"description":"The NF-e's own settings: série, natureza, Simples credit rate, the\nPIS/COFINS regime of a regime-normal company, additional info, default\ntax class, auto-emission. The default issuer's identity (CNPJ, IE,\naddress...) is the store's company profile; a branch's is set with\n`PUT /stores/{store_id}/fiscal/issuers/{issuer_id}`. The environment\nis changed separately.","operationId":"putFiscalProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalProfileView"}}},"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`: a field is invalid; `fiscal_identity_moved`: a CNPJ or IE different from the company profile's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save an issuer's fiscal profile.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/readiness":{"get":{"description":"Profile, certificate, a SEFAZ status check, an authorized and a\ncancelled homologação document, and confirmed production numbering.","operationId":"getFiscalReadiness","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalReadiness"}}},"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":"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":"Production readiness checklist.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/registration-check":{"post":{"description":"Uses the store's certificate (CadConsultaCadastro): whether the IE is\nactive, whether the company is accredited for NF-e, the IE and regime\nSEFAZ has on file. The result feeds the readiness checklist.","operationId":"checkFiscalRegistration","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SefazRegistrationCheck"}}},"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_configured`, `fiscal_certificate_missing`, `fiscal_profile_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":"Check the emitter in SEFAZ's taxpayer registry.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/st-rules":{"get":{"description":"For the issuer's state as origin: per destination state, whether the goods\nare under ICMS-ST (and with which MVA, rate and FCP), not under it, or\nunknown (no entry), with the citation. Rules still waiting for review are\nshown as such and are not used on any note.","operationId":"getFiscalStRules","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The goods' NCM, 8 digits.","in":"query","name":"ncm","required":true,"schema":{"type":"string"}},{"description":"The goods' CEST, 7 digits, when they have one.","in":"query","name":"cest","required":false,"schema":{"type":["string","null"]}},{"description":"The issuer whose state is the origin; the default issuer when omitted.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalStRules"}}},"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_configured`: the issuer has no state yet"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: NCM or CEST malformed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The ICMS-ST rules for some goods.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/status-check":{"post":{"description":"Calls NfeStatusServico (cStat 107 means in operation) and records the\nexchange.","operationId":"checkSefazStatus","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer whose certificate and state to use; the default issuer\nwhen omitted.","in":"query","name":"issuer_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Defaults to the profile's environment.","in":"query","name":"environment","required":false,"schema":{"type":["string","null"]}},{"description":"`nfe` (default) or `nfce`: whose web services to ask.","in":"query","name":"model","required":false,"schema":{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SefazStatus"}}},"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":"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":"Check SEFAZ status with the store's certificate.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/tax-classes":{"get":{"operationId":"listFiscalTaxClasses","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FiscalTaxClass"},"type":"array"}}},"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"]},"post":{"description":"NCM, CEST, origin, CSOSN, PIS/COFINS CST, CFOPs by destination and the\noptional IBS/CBS group.","operationId":"createFiscalTaxClass","parameters":[{"description":"Store id","in":"path","name":"store_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/FiscalTaxClassInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalTaxClass"}}},"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"]}},"/stores/{store_id}/fiscal/tax-classes/ibpt":{"post":{"description":"One entry per class; a class IBPT does not know (or a failed lookup) does\nnot stop the others.","operationId":"fillFiscalTaxClassesFromIbpt","parameters":[{"description":"Store id","in":"path","name":"store_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":{"items":{"$ref":"#/components/schemas/FiscalIbptFill"},"type":"array"}}},"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":"`ibpt_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Fill every tax class's approximate taxes from IBPT.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/tax-classes/{tax_class_id}":{"delete":{"operationId":"deleteFiscalTaxClass","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"operationId":"updateFiscalTaxClass","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/FiscalTaxClassInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalTaxClass"}}},"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"]}},"/stores/{store_id}/fiscal/tax-classes/{tax_class_id}/assign":{"post":{"operationId":"assignFiscalTaxClass","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/FiscalTaxClassAssign"}}},"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"]}},"/stores/{store_id}/fiscal/tax-classes/{tax_class_id}/ibpt":{"post":{"description":"Uses the platform's IBPT credentials; the rate is the NCM's federal\n(imported when the origin is) + state + municipal, for the emitter's state.","operationId":"fillFiscalTaxClassFromIbpt","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalTaxClass"}}},"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":"Unknown tax class, or `ibpt_ncm_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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ibpt_unavailable`"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ibpt_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Fill a tax class's approximate taxes from IBPT.","tags":["Fiscal"]}},"/stores/{store_id}/fiscal/voidings":{"get":{"operationId":"listFiscalVoidings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's 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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The issuer: one of the store's fiscal issuers\n(`GET /stores/{store_id}/fiscal/issuers`). Omitted: the store's default\nissuer, the company profile's CNPJ.","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/FiscalVoidingInput"}}},"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"]}},"/stores/{store_id}/form-submissions/{submission_id}":{"delete":{"operationId":"deleteStoreFormSubmission","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"patch":{"operationId":"updateStoreFormSubmission","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/forms":{"get":{"operationId":"listStoreForms","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StoreForm"}}},"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"]},"post":{"operationId":"createStoreForm","parameters":[{"description":"Store id","in":"path","name":"store_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/StoreFormInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreForm"}}},"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"]}},"/stores/{store_id}/forms/{form_id}":{"delete":{"operationId":"deleteStoreForm","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"get":{"operationId":"getStoreForm","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Form id","in":"path","name":"form_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreForm"}}},"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"]},"put":{"description":"Submissions keep the values they were sent with; removing a field does\nnot touch them.","operationId":"updateStoreForm","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/StoreForm"}}},"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"]}},"/stores/{store_id}/forms/{form_id}/submissions":{"get":{"operationId":"listStoreFormSubmissions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/freight-providers":{"get":{"description":"The default first, then by name. Secrets are masked.","operationId":"listFreightProviders","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_FreightProvider"}}},"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 freight providers","tags":["Freight"]},"post":{"description":"Secrets in the response are masked.","operationId":"createFreightProvider","parameters":[{"description":"Store id","in":"path","name":"store_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/FreightProviderCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightProvider"}}},"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":"`freight_provider_exists`: same code and name already connected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a freight provider","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}":{"put":{"description":"Partial: omitted fields keep their value; `config_json` is merged into\nthe stored settings and masked secrets (`__stored__`) are kept.","operationId":"updateFreightProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightProviderUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightProvider"}}},"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 provider 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":"Update a freight provider","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/cargo-types":{"get":{"description":"Asks Central do Frete for the cargo types it quotes, for the \"default\ncargo types\" setting. A small catalog from the carrier, returned whole\nas an array. Only `central_do_frete` providers have one.","operationId":"listFreightProviderCargoTypes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FreightCargoType"},"type":"array"}}},"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 provider in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_provider`: not Central do Frete; `provider_token_missing`: no API token saved"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_provider_error`: the carrier did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List a provider's cargo types","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/correios-keys":{"get":{"description":"The keys of a Correios provider, oldest first, with how close each is to\nexpiring. The keys themselves are never returned.","operationId":"listCorreiosKeys","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","in":"path","name":"provider_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CorreiosAccessKey"}}},"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 provider in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_provider`: not a Correios provider"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 Correios access keys","tags":["Freight"]},"post":{"description":"Seals the key and checks it with read-only calls to each API Mobiari\nuses (`scopes`). A key Correios refuses is not saved.","operationId":"createCorreiosKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","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/CreateCorreiosKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorreiosAccessKey"}}},"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 provider in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `unsupported_provider`, or `correios_key_refused`: Correios refused the key"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 Correios access key","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/correios-keys/{key_id}":{"delete":{"operationId":"deleteCorreiosKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Access key id","in":"path","name":"key_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":"`key_not_found`, or no such provider"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 Correios access key","tags":["Freight"]},"put":{"description":"Changes its date, label or contract details, or replaces the key (which\nis checked again).","operationId":"updateCorreiosKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Access key id","in":"path","name":"key_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCorreiosKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorreiosAccessKey"}}},"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":"`key_not_found`, or no such provider"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `unsupported_provider` or `correios_key_refused`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 Correios access key","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/correios-keys/{key_id}/check":{"post":{"description":"Calls each API Mobiari uses once, read-only (a CEP, a deadline, a\nprice, an unknown object's tracking, the empty pré-postagem list, the\nwebhook services), and stores which ones the key reaches.","operationId":"checkCorreiosKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Access key id","in":"path","name":"key_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/CorreiosAccessKey"}}},"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":"`key_not_found`, or no such provider"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Check a Correios access key","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/correios-webhook":{"post":{"description":"Registers this provider's address in Correios' webhook service\n(`wh-rastro`) for the contract, with a new signing secret, so shipments\nupdate as Correios scans them instead of on the next poll. Off on a\nserver until approved there: 409 `webhook_registration_disabled`.","operationId":"registerCorreiosWebhook","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id (a `correios` provider)","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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorreiosWebhookRegistration"}}},"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 provider in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`webhook_registration_disabled`: not enabled on this server"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unsupported_provider`, 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_provider_error`: Correios refused or did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Subscribe to Correios tracking events","tags":["Freight"]}},"/stores/{store_id}/freight-providers/{provider_id}/health":{"get":{"description":"Reports whether the provider's required settings are all present (from\nthe module's registry spec). It does not call the carrier.","operationId":"checkFreightProviderHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Freight provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightProviderHealth"}}},"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 provider 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":"Check a freight provider","tags":["Freight"]}},"/stores/{store_id}/freight/cancel-reasons":{"get":{"description":"The carrier's reasons for cancelling a freight order; send one's `id`\nto `POST .../shipments/{shipment_id}/cancel`.","operationId":"listFreightCancelReasons","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_FreightCancelReason"}}},"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":"`freight_provider_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_provider_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List freight cancel reasons","tags":["Shipments"]}},"/stores/{store_id}/freight/coverage":{"get":{"description":"How many active variants ship from recorded data (`complete`), how many\nrely on a default or an estimate (`estimated`), and how many are digital.","operationId":"getFreightCoverage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightCoverage"}}},"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":"Freight coverage","tags":["Freight"]}},"/stores/{store_id}/freight/packages":{"get":{"description":"Per variant, the boxes one unit ships as, from the packing engine that\ncheckout, shipments and the NF-e use: its profile's mode (or the\nautomatic rules), which boxes are estimates and what to fix. Variants\nwith something to fix come first.","operationId":"listFreightPackages","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the product title, the variant title or the SKU.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"One product's variants.","in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["all","complete","estimated","not_shipped"],"type":"string"}},{"in":"query","name":"role","required":false,"schema":{"enum":["all","product","part"],"type":"string"}},{"description":"Include inactive variants (excluded by default).","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_FreightVariantRow"}}},"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 freight data by variant","tags":["Freight"]}},"/stores/{store_id}/freight/settings":{"get":{"description":"The origin CEP, default cargo types and sender address details of the\nstore's Central do Frete integration.","operationId":"getFreightSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightSettings"}}},"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":"`freight_provider_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 freight settings","tags":["Shipments"]}},"/stores/{store_id}/goods-notes":{"get":{"description":"The store's transfers between establishments and remessas (own goods sent\nout, goods of others sent back), newest first, with their NF-e and what\nthey moved.","operationId":"listGoodsNotes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only this kind.","in":"query","name":"kind","required":false,"schema":{"type":["string","null"]}},{"description":"Transfers in transit only (authorized, not received yet).","in":"query","name":"in_transit","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoodsNote"},"type":"array"}}},"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 goods notes","tags":["Inventory"]},"post":{"description":"Emits the NF-e of a transfer between two establishments (CNPJs) of the\ncompany, of own goods sent for repair, demonstration or consignment, or\nof goods of others going back to them (numbered, signed and transmitted\nonce; the fiscal worker keeps trying until SEFAZ answers). Once authorized\nin production the goods move: a transfer leaves the origin and waits in\ntransit to be received, own goods leave the shelf and are held by the\nrecipient, goods of others leave the third-party balance.","operationId":"createGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_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/GoodsNoteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodsNote"}}},"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":"`transfer_without_note`, `location_issuer_ambiguous`, `goods_note_wrong_invoice`, `fiscal_production_locked`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_validation_failed` with `details.issues` (`insufficient_stock`, `tax_class_required`, `goods_note_value_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":"Emit a goods note","tags":["Inventory"]}},"/stores/{store_id}/goods-notes/preview":{"post":{"description":"The NF-e of a transfer between establishments or of a remessa, validated,\nwith its CFOP and totals. Spends no number.","operationId":"previewGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_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/GoodsNoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodsNotePreview"}}},"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":"`transfer_without_note` (both locations are one CNPJ), `location_issuer_ambiguous`, `goods_note_wrong_invoice`, `fiscal_profile_invalid`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `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":"Preview a goods note","tags":["Inventory"]}},"/stores/{store_id}/goods-notes/{note_id}":{"get":{"operationId":"getGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goods note id","in":"path","name":"note_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodsNote"}}},"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":"`goods_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":"Get a goods note","tags":["Inventory"]}},"/stores/{store_id}/goods-notes/{note_id}/cancel":{"post":{"description":"Cancels its authorized NF-e at SEFAZ (within the state's deadline, 24\nhours in most), then moves the goods back: a transfer returns to its\norigin, own goods to the shelf, goods of others to the third-party\nbalance. A transfer already received at the destination cannot be\ncancelled here.","operationId":"cancelGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goods note id","in":"path","name":"note_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/GoodsNoteCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoodsNote"}}},"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":"`goods_note_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`goods_note_without_document`, `transfer_already_received`, `goods_already_back` (own goods already came back on the recipient's note), `fiscal_not_authorized`, `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":"Cancel a goods note","tags":["Inventory"]}},"/stores/{store_id}/goods-notes/{note_id}/receive":{"post":{"description":"The goods of a transfer in transit (its note authorized in production)\nenter the destination location, on the same note.","operationId":"receiveGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goods note id","in":"path","name":"note_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/GoodsNote"}}},"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":"`goods_note_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`transfer_not_in_transit` (not a transfer, its note is not authorized yet, or it was received 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":"Receive a transfer at its destination","tags":["Inventory"]}},"/stores/{store_id}/goods-notes/{note_id}/refresh":{"post":{"description":"For a note still waiting: asks SEFAZ where it stands, then moves the\ngoods (or back) to match.","operationId":"refreshGoodsNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Goods note id","in":"path","name":"note_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/GoodsNote"}}},"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":"`goods_note_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`goods_note_without_document`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask SEFAZ about a goods note","tags":["Inventory"]}},"/stores/{store_id}/help-center":{"get":{"description":"Whether the workspace's public help center is on, its title and\naddress. It shows the published knowledge base articles marked `public`.","operationId":"getHelpCenter","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpCenter"}}},"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 help center","tags":["Knowledge Base"]},"put":{"description":"Switches it on or off and sets its title and intro. Fields left out\nstay as they are.","operationId":"updateHelpCenter","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpCenterUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpCenter"}}},"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`: a title over 120 or an intro over 300 characters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the help center","tags":["Knowledge Base"]}},"/stores/{store_id}/import-connections":{"get":{"operationId":"listImportConnections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportConnection"},"type":"array"}}},"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":"The store's import connections","tags":["Imports"]},"post":{"description":"Verifies an API-key source and stores its encrypted credentials as an `active`\nconnection (one per source: connecting again replaces it). An OAuth\nsource connects by `POST /stores/{store_id}/import-sources/{source}/authorize`\ninstead: `oauth_authorize_required` when this server can, else\n`oauth_not_available`.","operationId":"createImportConnection","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateImportConnection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConnection"}}},"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":"`import_running`: a run uses this source"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unknown_source`; `nothing_to_connect`: a spreadsheet source; `oauth_authorize_required`: an OAuth source, connect it through its authorize address; `validation_failed`: the credentials do not match the source's fields; `import_connection_invalid`: the provider rejected the credentials"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`oauth_not_available`: this source connects by OAuth, not ready on this server yet"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The provider is unavailable or timed out"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a source","tags":["Imports"]}},"/stores/{store_id}/import-connections/{connection_id}":{"delete":{"description":"Deletes the connection and its credentials. Past runs keep their\nresults; what they imported stays.","operationId":"deleteImportConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import connection id","in":"path","name":"connection_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":"`connection_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: a run uses 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":"Disconnect a source","tags":["Imports"]},"patch":{"operationId":"updateImportConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import connection id","in":"path","name":"connection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateImportConnection"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConnection"}}},"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":"`connection_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: a run uses this source"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `import_connection_invalid` or `oauth_authorize_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"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The provider is unavailable or timed out"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Replace a connection's credentials","tags":["Imports"]}},"/stores/{store_id}/import-connections/{connection_id}/google-sheets/customers":{"post":{"operationId":"readPrivateGoogleCustomers","parameters":[{"in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"connection_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerImportUpload"}}},"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"},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Snapshot customers from a private Google Sheets tab","tags":["Imports"]}},"/stores/{store_id}/import-connections/{connection_id}/google-sheets/orders":{"post":{"operationId":"readPrivateGoogleOrders","parameters":[{"in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"connection_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderImportUpload"}}},"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"},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Snapshot orders from a private Google Sheets tab","tags":["Imports"]}},"/stores/{store_id}/import-connections/{connection_id}/google-sheets/products":{"post":{"operationId":"readPrivateGoogleProducts","parameters":[{"in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"connection_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportUpload"}}},"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"},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Snapshot products from a private Google Sheets tab","tags":["Imports"]}},"/stores/{store_id}/import-connections/{connection_id}/google-sheets/tabs":{"post":{"description":"Every tab of the spreadsheet with its first row, read through the\nstore's Google connection, and what each most likely holds.","operationId":"listPrivateGoogleTabs","parameters":[{"in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"connection_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/SheetLinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSheetTabs"}}},"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"},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the tabs of a private Google sheet","tags":["Imports"]}},"/stores/{store_id}/import-runs":{"get":{"operationId":"listImportRuns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRun"},"type":"array"}}},"description":"The last 20 runs, 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":"The store's recent imports","tags":["Imports"]},"post":{"description":"With `dry_run`, reads the first page of each entity and answers counts,\nsamples and issues without writing anything. Otherwise queues the run,\nwhich goes on in the background (products, then customers, then orders);\nfollow it with `GET …/import-runs/{run_id}`. Running again updates what\nan earlier run brought instead of duplicating it. Imported orders are\nhistory: they move no stock and send nothing.","operationId":"createImportRun","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateImportRun"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRunCreated"}}},"description":"The dry run's preview"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRunCreated"}}},"description":"The queued run"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission`: products.import, customers.write or orders.write, per entity"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: the store already has an import running"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unknown_source`, `source_not_available`, `validation_failed`, or `import_source_error`: the source could not be read"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start an import (or preview one)","tags":["Imports"]}},"/stores/{store_id}/import-runs/{run_id}":{"get":{"description":"Status, counts per entity (seen, created, updated, skipped, failed), the\nentity being imported now and how many issues it has.","operationId":"getImportRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import run id","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRun"}}},"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":"`import_run_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":"An import's progress","tags":["Imports"]}},"/stores/{store_id}/import-runs/{run_id}/cancel":{"post":{"description":"Stops after the item being written; what came in stays.","operationId":"cancelImportRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import run id","in":"path","name":"run_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/ImportRun"}}},"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":"`import_run_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_finished`: the run is not running"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an import","tags":["Imports"]}},"/stores/{store_id}/import-runs/{run_id}/issues":{"get":{"operationId":"listImportIssues","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import run id","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`error` or `warning`; both when absent.","in":"query","name":"severity","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"entity","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 1000; 200 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportIssue"},"type":"array"}}},"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":"`import_run_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":"An import's issues","tags":["Imports"]}},"/stores/{store_id}/import-runs/{run_id}/retry-failed":{"post":{"description":"Starts a new run of the same source for the items that could not be\nwritten (rows a sheet left out are fixed in the sheet and imported\nagain instead).","operationId":"retryFailedImportItems","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import run id","in":"path","name":"run_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":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRun"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`import_run_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: the run (or another) is still running"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nothing_to_retry`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Retry an import's failed items","tags":["Imports"]}},"/stores/{store_id}/import-sheets/tabs":{"post":{"description":"Reads every tab of the uploaded CSV, XLSX, XLS or ODS (a CSV is one tab)\nand says what each most likely holds. Nothing is kept: load each tab\nwith the entity's upload and its `tab`.","operationId":"listImportSheetTabs","parameters":[{"in":"path","name":"store_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/ImportSheetTabsForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSheetTabs"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: malformed upload or no `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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_sheet`: no tab could be read"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 tabs of a spreadsheet file","tags":["Imports"]}},"/stores/{store_id}/import-sheets/tabs/from-url":{"post":{"description":"Downloads the whole spreadsheet (shared as \"Anyone with the link\"),\nwhatever tab the link points at, and lists its tabs as the file listing\ndoes.","operationId":"listImportSheetTabsFromUrl","parameters":[{"in":"path","name":"store_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/SheetLinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSheetTabs"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_sheet_link`, `sheet_not_shared` or `invalid_sheet`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sheet_download_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List the tabs of a Google Sheets link","tags":["Imports"]}},"/stores/{store_id}/import-sources":{"get":{"description":"Every source the import knows, with how it connects, what it brings,\nwhether this server can use it now (`configured`; the others are coming\nsoon) and whether the store is connected to it.","operationId":"listImportSources","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportSource"},"type":"array"}}},"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":"`missing_permission`: products.import, customers.write or orders.write"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Where a store can import from","tags":["Imports"]}},"/stores/{store_id}/import-sources/bling/claim":{"post":{"operationId":"claimBlingImportSource","parameters":[{"description":"Store id","in":"path","name":"store_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/ClaimImportSource"}}},"required":true},"responses":{"204":{"description":"Connected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The installation expired or was already claimed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 Bling installation to a store after signing in","tags":["Imports"]}},"/stores/{store_id}/import-sources/{source}/authorize":{"post":{"description":"The platform address to open: the merchant signs in there and\nauthorizes Mobiari, and the platform sends the browser back to the\nadmin's import page (`/import?<source>=complete`, `failed` or\n`cancelled`) with the connection stored. The address works once, for\nten minutes, for this person and store.","operationId":"authorizeImportSource","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"An OAuth source key, e.g. `bling`","in":"path","name":"source","required":true,"schema":{"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/ImportAuthorizeRequest"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAuthorizeUrl"}}},"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":"`missing_permission`: products.import, customers.write or orders.write"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unknown_source`; `not_oauth`; `import_app_credentials_required`: private app credentials are missing or 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"}}}},"501":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`oauth_not_available`: this source is not ready on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting an OAuth source","tags":["Imports"]}},"/stores/{store_id}/inventory-locations":{"get":{"description":"By priority, then name. The first active one is the default location.","operationId":"listInventoryLocations","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Changes the fields sent. Emits the `inventory_location.updated` webhook.","operationId":"updateInventoryLocation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/inventory/position":{"get":{"description":"What the store held at the end of a day (São Paulo time), per variant or\nitem, summed over its locations: today's stock less every movement that\ntook effect after that moment. Each row has the unit, the quantity, the\nmoving average cost (as it is now: no history of the average is kept)\nand the value, and the ownership of SPED Bloco H: 0 for the store's own\ngoods, 2 for someone else's goods it holds (consignação, conserto,\ndemonstração received), with the owner's document and the value of their\nnotes. `format=csv` gives a spreadsheet with one H010 line per row\n(`REG;COD_ITEM;DESCR_ITEM;UNID;QTD;VL_UNIT;VL_ITEM;IND_PROP;COD_PART;NOME_PART`,\nsemicolons and decimal commas); it is the base of Bloco H, not a SPED file.","operationId":"getInventoryPosition","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The day, `YYYY-MM-DD`: the position at its end, São Paulo time.\nToday when absent. A day after today is refused.","in":"query","name":"as_of","required":false,"schema":{"type":"string"}},{"description":"`json` (default) or `csv`.","in":"query","name":"format","required":false,"schema":{"description":"The file's form.","enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryPosition"}},"text/csv":{"schema":{"type":"string"}}},"description":"The position; a CSV file with `format=csv`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_as_of`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 inventory position as of a day","tags":["Inventory"]}},"/stores/{store_id}/invites":{"get":{"description":"Invites not yet accepted or cancelled, newest first.","operationId":"listInvites","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StoreInvite"}}},"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 pending invites","tags":["Team"]},"post":{"description":"Creates a pending invite, valid for a limited time, that grants\n`policy_ids` (permission sets) to whoever accepts it with this e-mail. They may not\ngrant permissions the inviter does not hold. The acceptance link is\ne-mailed to the invitee; its token is never returned. Someone new to\nthe organization takes a seat of the plan.","operationId":"createInvite","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateInviteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreInvite"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`plan_limit_reached`: every seat of the plan is taken (`details` has `limit`, `max`, `used`, `plan`); `subscription_inactive`: the subscription is suspended or canceled"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission`, or `grant_exceeds_actor`: the permission sets or groups grant permissions the inviter does not hold"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: neither a permission set nor a group, an unknown one, or an invalid e-mail"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Invite someone to the store","tags":["Team"]}},"/stores/{store_id}/invites/{invite_id}":{"delete":{"description":"The acceptance link stops working.","operationId":"cancelInvite","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Invite id","in":"path","name":"invite_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Invite cancelled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 pending invite with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an invite","tags":["Team"]}},"/stores/{store_id}/invites/{invite_id}/resend":{"post":{"description":"E-mails a new acceptance link (the old one stops working) and gives the\ninvite another 7 days. When the e-mail cannot be delivered, the answer\nhas `email_sent: false` and the link in `accept_link`, to pass on by\nhand. Owner invites are resent by the platform operator. The caller\nmust be allowed to create the same invite (its permission sets and\ngroups within their own permissions).","operationId":"resendInvite","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Invite id","in":"path","name":"invite_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/StoreInvite"}}},"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":"`missing_permission`, or `grant_exceeds_actor`: the invite grants permissions the caller does not hold"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No pending invite with this id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: at most 5 resends of an invite per hour","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Resend an invite","tags":["Team"]}},"/stores/{store_id}/item-production-runs":{"get":{"operationId":"listProductionRuns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["queued","in_progress","ready","cancelled"],"type":"string"}},{"in":"query","name":"item_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductionRun"}}},"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 production runs","tags":["Manufacturing"]}},"/stores/{store_id}/item-production-runs/{run_id}":{"get":{"operationId":"getProductionRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Production run id","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}},"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":"`production_run_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 production run","tags":["Manufacturing"]},"patch":{"description":"Moves the run: `in_progress` takes the components off the shelf,\n`ready` puts the finished units in stock (and gives them to any order\nwaiting for the item), back to `queued` or `cancelled` from the bench\nreturns the components, `cancelled` once ready leaves the units made.","operationId":"updateProductionRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Production run id","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}},"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":"`production_run_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`run_closed`: a cancelled run cannot move; `run_units_gone`: the units a ready run made are held or gone, so it cannot go back"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 production run","tags":["Manufacturing"]}},"/stores/{store_id}/items":{"get":{"description":"The warehouse's items: purchased parts and made sub-assemblies with their\nbase unit, stock in that unit (and as whole packs when the item has\npacks), and how many recipes use them. Stock and usage are read from the\nvariants the items were created from, so they are current.","operationId":"listItems","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the name or the SKU.","in":"query","name":"search","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"kind","required":false,"schema":{"oneOf":[{"type":"null"},{"enum":["purchased","made"],"type":"string"}]}},{"description":"`in_stock` (something available), `out` (nothing available) or `all`.","in":"query","name":"stock","required":false,"schema":{"oneOf":[{"type":"null"},{"enum":["all","in_stock","out"],"type":"string"}]}},{"description":"Include inactive items (excluded by default).","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ItemRow"}}},"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 items","tags":["Items"]},"post":{"description":"Creates a part with its opening stock (written to the ledger as an\n`opening_balance` count), its base unit and any packs, in one call. The\npart is created the way `createComponent` creates one: it is not on sale,\nand can be used in any recipe.","operationId":"createItem","parameters":[{"description":"Store id","in":"path","name":"store_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/ItemCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `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":"Create an item","tags":["Items"]}},"/stores/{store_id}/items/reconciliation":{"get":{"description":"Compares the item tables with the legacy variant, stock, ledger and recipe\ntables for this store: item count, stock rows (and that each matches),\nunits on hand and reserved, movements and their units, recipe lines\n(and that each matches), and the effective recipe per variant (variant\nlines winning over product base lines, on both sides). The mirror follows\nevery write, so every check should be `ok`; one that is not names what\ndrifted.\n`POST /items/sync` re-copies it.","operationId":"getItemReconciliation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ItemReconciliationCheck"},"type":"array"}}},"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":"Check the item mirror","tags":["Items"]}},"/stores/{store_id}/items/sync":{"post":{"description":"Copies the store's stock, movement history and recipes from the\ncomponent variants into the item tables (idempotent). Reads never need\nthis: stock and usage are read live. It exists to rehearse the cut-over\nand to repair a mirror after a bulk import.","operationId":"syncItems","parameters":[{"description":"Store id","in":"path","name":"store_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/ItemSyncResult"}}},"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":"Re-copy the mirror","tags":["Items"]}},"/stores/{store_id}/items/{item_id}":{"get":{"description":"One item with its packs, stock per location, and every product and\nvariant whose recipe uses it (with the base units one unit needs).","operationId":"getItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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":"`item_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 item","tags":["Items"]},"patch":{"description":"Sets what the item owns: its kind, whether it is counted, its base unit,\nits description and whether it ships as a single package. Omitted fields\nstay.","operationId":"updateItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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":"`item_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 an item","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/breakdown":{"get":{"description":"The item all the way down: for a made item its recipe and every recipe\nbelow it; for one that mirrors a kit variant, that variant's recipe.","operationId":"getItemBreakdown","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Breakdown"}}},"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":"`item_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":"Breakdown of an item","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/packs":{"post":{"description":"A named conversion to the base unit, such as \"Caixa c/ 4\" = 4 un. Packs\nare how a supplier's box and a recipe line can be written in their own\nunit while stock stays in the base unit.","operationId":"createItemPack","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_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/ItemPackRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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":"`item_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pack_name_taken`"},"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":"Add a pack to an item","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/packs/{pack_id}":{"delete":{"description":"Recipe lines and purchase lines written in this pack keep their base-unit\nquantity.","operationId":"deleteItemPack","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Pack id","in":"path","name":"pack_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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":"`item_not_found` or `pack_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 an item's pack","tags":["Items"]},"patch":{"description":"Omitted fields stay; null clears the barcode or the supplier's code.","operationId":"updateItemPack","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Pack id","in":"path","name":"pack_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPackUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDetail"}}},"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":"`item_not_found` or `pack_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pack_name_taken`"},"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 item's pack","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/production-runs":{"post":{"description":"Queues `quantity` base units of a made item. With `start`, the components\nleave stock right away (`build_consume`, reference `production_run`); a\ncomponent the shelf does not have is recorded as a shortage, and a\ncomponent with a recipe of its own is taken from its own components.","operationId":"createProductionRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_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/RunCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}},"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":"`item_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`inventory_managed_externally`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `item_not_made`, `location_not_in_store`, `no_inventory_location`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 production run","tags":["Manufacturing"]}},"/stores/{store_id}/items/{item_id}/recipe":{"get":{"description":"The components one base unit of the item is made from. Empty for a\npurchased item. An item that mirrors a variant with a recipe of its own\nis built from that recipe instead; this list is its own lines only.","operationId":"listItemRecipe","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ItemRecipeLine"},"type":"array"}}},"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":"`item_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 item's recipe","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/recipe/{component_item_id}":{"delete":{"operationId":"deleteItemRecipeLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The component item","in":"path","name":"component_item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ItemRecipeLine"},"type":"array"}}},"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":"`item_not_found`, `recipe_line_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 component from an item's recipe","tags":["Items"]},"put":{"description":"Adds a component to a made item's recipe or changes its quantity, in base\nunits (decimals allowed: 2.5 m of fabric) or in packs. The item becomes\n`made`. Refused when the component's own recipe reaches this item (422\n`bom_cycle`) or the component is the item itself.","operationId":"setItemRecipeLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The component item","in":"path","name":"component_item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRecipeLineRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ItemRecipeLine"},"type":"array"}}},"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":"`item_not_found`, `pack_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `bom_cycle`, `ambiguous_quantity`, `pack_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":"Set a component in an item's recipe","tags":["Items"]}},"/stores/{store_id}/items/{item_id}/stock/adjust":{"post":{"description":"Changes the units on hand at one location, in base units or in whole\npacks (10 boxes of 4 is +40 un). Same rules, ledger entry, webhooks and\nrefusals as `adjustVariantStock`. Answers with the item's new levels.","operationId":"adjustItemStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_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/ItemStockAdjust"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemStockResult"}}},"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":"`item_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock`, `multiple_locations`, `inventory_managed_externally`, `item_not_backed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ambiguous_adjustment`, `pack_required`, `pack_not_whole_units`, `location_not_in_store`, `no_inventory_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 an item's stock","tags":["Items"]}},"/stores/{store_id}/kb/articles":{"get":{"description":"Most recently edited first.","operationId":"listKbArticles","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_KbArticleSummary"}}},"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"]},"post":{"description":"A published article is indexed in the background (`indexed_at` fills\nin when the bot can read it).","operationId":"createKbArticle","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateKbArticleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbArticle"}}},"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"]}},"/stores/{store_id}/kb/articles/{article_id}":{"delete":{"operationId":"deleteKbArticle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"get":{"operationId":"getKbArticle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Article id","in":"path","name":"article_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbArticle"}}},"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"]},"patch":{"description":"Re-indexes it in the background when published.","operationId":"updateKbArticle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Article id","in":"path","name":"article_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKbArticleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbArticle"}}},"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"]}},"/stores/{store_id}/kb/collections":{"get":{"description":"Ordered by position, then name.","operationId":"listKbCollections","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]},"post":{"operationId":"createKbCollection","parameters":[{"description":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/kb/collections/{collection_id}":{"delete":{"description":"Its articles stay, without a collection.","operationId":"deleteKbCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"patch":{"operationId":"updateKbCollection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/kb/reindex":{"post":{"description":"Queues every published article for indexing again (after changing the\nembeddings configuration, for example).","operationId":"reindexKb","parameters":[{"description":"Store id","in":"path","name":"store_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/KbReindexResult"}}},"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":"Re-index the knowledge base","tags":["Knowledge Base"]}},"/stores/{store_id}/kb/search":{"post":{"description":"What the bot would read for a question: published articles only.","operationId":"searchKb","parameters":[{"description":"Store id","in":"path","name":"store_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/KbSearchRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbSearchResult"}}},"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":"Search the knowledge base","tags":["Knowledge Base"]}},"/stores/{store_id}/kits":{"get":{"description":"Variants with their own bill of materials, with how many can be built\nfrom what is available.","operationId":"listKits","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches SKU, name or product title.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Kit"}}},"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 kits","tags":["Manufacturing"]}},"/stores/{store_id}/kits/{variant_id}/bom":{"get":{"description":"The variant's own lines (a product's base lines are under\n`/products/{product_id}/base-bom`), with the stock of each part.","operationId":"listKitBom","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The kit's variant id","in":"path","name":"variant_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_BomLine"}}},"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 kit's bill of materials","tags":["Manufacturing"]},"post":{"description":"Adds a part to a kit, or changes its quantity. The part must be a variant\nof the same store and cannot be the kit itself or a kit built from this\none (bills of materials are one level deep). Marks the part as a\ncomponent and refreshes the kit's availability.","operationId":"setKitBomLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The kit's variant id","in":"path","name":"variant_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/BomLineRequest"}}},"required":true},"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":"`variant_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `component_not_in_store`, `bom_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":"Set a bill-of-materials line","tags":["Manufacturing"]}},"/stores/{store_id}/kits/{variant_id}/bom/{component_variant_id}":{"delete":{"operationId":"deleteKitBomLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The kit's variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The part's variant id","in":"path","name":"component_variant_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":"`variant_not_found`, `bom_line_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 bill-of-materials line","tags":["Manufacturing"]}},"/stores/{store_id}/legal-info":{"get":{"description":"The store's one record of who it is: the storefront footer and the\ngenerated privacy and returns pages, the NF-e emitter (CNPJ, IE,\naddress, regime), Melhor Envio's sender and document templates use it.\nUntil saved, it is prefilled from the organization (`source`).","operationId":"getStoreLegalInfo","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLegalInfoView"}}},"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 store's company profile","tags":["Storefront"]},"put":{"description":"The city is checked against IBGE's list and stored with its official\nname and code. While the store emits NF-e in production, the CNPJ and\nthe IE cannot change (`fiscal_identity_locked`): the numbering and the\ncertificate belong to that company.","operationId":"saveStoreLegalInfo","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLegalInfo"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLegalInfoView"}}},"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_identity_locked`: the CNPJ or IE changed while emitting NF-e in production"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a required field is empty or a value is 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":"Save the store's company profile","tags":["Storefront"]}},"/stores/{store_id}/locations":{"get":{"description":"By `position`, then name.","operationId":"listStoreLocations","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]},"post":{"operationId":"createStoreLocation","parameters":[{"description":"Store id","in":"path","name":"store_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/StoreLocationRequest"}}},"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"]}},"/stores/{store_id}/locations/{location_id}":{"delete":{"operationId":"deleteStoreLocation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"get":{"operationId":"getStoreLocation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"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":"updateStoreLocation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Location id","in":"path","name":"location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreLocationUpdateRequest"}}},"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"]}},"/stores/{store_id}/loyalty/import":{"post":{"description":"A CSV with one row per customer: who (e-mail, CPF/CNPJ or phone), a points\nbalance and/or a cashback balance, and the day the cashback expires. With\n`dry_run` (the default) nothing is written and the report says what each\nrow would become; send it again with `dry_run: false` to apply. Each row is\nrecorded as an adjustment naming the source (points in the points history,\ncashback as wallet credit that expires), and the same file sent again\nadds nothing (`duplicate`). Customers are not created: import them first\n(Clientes, Importar).","operationId":"importLoyaltyBalances","parameters":[{"description":"Store id","in":"path","name":"store_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/LoyaltyImportRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltyImportReport"}}},"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`: no source, no identifying column, no balance column, too many rows"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Bring loyalty balances from another programme","tags":["Loyalty"]}},"/stores/{store_id}/loyalty/imports":{"get":{"description":"Newest first, up to 100.","operationId":"listLoyaltyImports","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LoyaltyImport"},"type":"array"}}},"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 balance imports","tags":["Loyalty"]}},"/stores/{store_id}/loyalty/program":{"get":{"operationId":"getLoyaltyProgram","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"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":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"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"]}},"/stores/{store_id}/loyalty/referrals":{"get":{"description":"Newest first.","operationId":"listLoyaltyReferrals","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/loyalty/summary":{"get":{"operationId":"getLoyaltySummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoyaltySummary"}}},"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":"The loyalty program in numbers","tags":["Loyalty"]}},"/stores/{store_id}/loyalty/tiers":{"get":{"operationId":"getLoyaltyTiers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"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":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"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"]}},"/stores/{store_id}/mailboxes":{"get":{"operationId":"listStoreMailboxes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StoreMailbox"},"type":"array"}}},"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 connected mailboxes","tags":["Conversation Settings"]},"post":{"description":"Checks the login first, then creates the mailbox and its e-mail channel.\nIts unread mail starts arriving in Conversas within a minute.","operationId":"createStoreMailbox","parameters":[{"description":"Store id","in":"path","name":"store_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/StoreMailboxCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreMailbox"}}},"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":"`mailbox_exists`: the store already connected this address"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` or `mailbox_unreachable`: the server refused the login"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a mailbox","tags":["Conversation Settings"]}},"/stores/{store_id}/mailboxes/test":{"post":{"operationId":"testStoreMailbox","parameters":[{"description":"Store id","in":"path","name":"store_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/StoreMailboxCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreMailboxTestResult"}}},"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":"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":"Check a mailbox's login without saving it","tags":["Conversation Settings"]}},"/stores/{store_id}/mailboxes/{mailbox_id}":{"delete":{"description":"Stops reading it. The conversations it brought in stay; replying to them\nreports that the mailbox is gone.","operationId":"deleteStoreMailbox","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Mailbox id","in":"path","name":"mailbox_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":"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":"Disconnect a mailbox","tags":["Conversation Settings"]},"patch":{"operationId":"updateStoreMailbox","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Mailbox id","in":"path","name":"mailbox_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreMailboxUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreMailbox"}}},"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":"Update a mailbox","tags":["Conversation Settings"]}},"/stores/{store_id}/marketing/ad-insights":{"get":{"description":"Spend, impressions, clicks and the platforms' own conversions as stored\nby the nightly sync (Meta and Google Ads, one row per ad and day), grouped\nby day, campaign or ad, next to the paid orders the marketing dashboard\ncredits to the same campaigns (the same sales as its Meta and Google\nrows, with the chosen attribution model) and the ROAS from each side.\nAlso returns each platform's best campaign over the window and when the\ndata was last synced. Never calls the platforms.","operationId":"getAdInsights","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day (inclusive), `YYYY-MM-DD`.","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"Last day (inclusive), `YYYY-MM-DD`. At most 400 days after `from`.","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"Only one platform.","in":"query","name":"platform","required":false,"schema":{"$ref":"#/components/schemas/AdPlatform"}},{"description":"Only one campaign (the platform's id).","in":"query","name":"campaign_id","required":false,"schema":{"type":"string"}},{"description":"`day` (default), `campaign` or `ad`.","in":"query","name":"group_by","required":false,"schema":{"$ref":"#/components/schemas/AdInsightsGroupBy"}},{"description":"Which touch an order is credited to, as on the marketing dashboard.\nDefaults to `last_touch`.","in":"query","name":"touch","required":false,"schema":{"description":"Which touch of the visitor's journey an order is credited to.","enum":["first_touch","last_touch"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdInsights"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`to` before `from`, or a window over 400 days"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission`: needs `marketing.read`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 stored ad history","tags":["Analytics"]}},"/stores/{store_id}/marketing/catalog/sync":{"post":{"description":"Pushes every active variant of the store to its Meta catalog now (price\nand availability edits are also pushed as they happen). Answers Meta's\nresponse so catalog validation errors can be shown as they are.","operationId":"syncMetaCatalog","parameters":[{"description":"Store id","in":"path","name":"store_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/MetaCatalogSyncResult"}}},"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":"`meta_catalog_not_configured`: set the catalog id and access token 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_catalog_error`: Meta rejected the push or could not be reached"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sync the Meta catalog","tags":["Analytics"]}},"/stores/{store_id}/marketing/config":{"get":{"operationId":"getMarketingConfig","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConfig"}}},"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 tracking configuration","tags":["Analytics"]},"patch":{"description":"Partial update: only fields sent are written, `\"\"` clears one. Answers\nthe configuration as `getMarketingConfig` does, secrets masked.","operationId":"updateMarketingConfig","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMarketingConfigRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConfig"}}},"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":"Update the tracking configuration","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversation-events":{"get":{"description":"The latest business-messaging events sent to Meta (lead, qualified\nlead, purchase) for conversations that started from a click-to-WhatsApp\nor click-to-Instagram ad, with Meta's answer.","operationId":"listConversationConversionEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"At most 200; defaults to 50.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationConversionEvent"},"type":"array"}}},"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 conversation conversions","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversions":{"get":{"description":"Every order of the store, newest first, with the delivery state of its\nMeta Conversions API and Google Ads uploads. Errors are trimmed to\nMeta's human message.","operationId":"listConversionDeliveries","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConversionDelivery"}}},"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 conversion deliveries","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversions/health":{"get":{"description":"The last `days` (7 by default) of funnel events, refunds and corrections,\nand of every platform's purchases (Meta, Google Ads, TikTok, GA4),\ncounted by outcome: whether the store's server-side tracking is actually\nreaching each platform. Purchases also count those rejected (and\nretried), timed out and unreported.","operationId":"getConversionHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The last N days (1 to 90; 7 when absent).","in":"query","name":"days","required":false,"schema":{"format":"int32","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversionHealthRow"},"type":"array"}}},"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":"Server-side events by platform","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversions/unreported":{"get":{"description":"Paid orders whose purchase never reached a platform (Meta, Google Ads,\nTikTok, GA4): every retry spent, or a defect (not a rule like refused ad\ncookies). Grouped by platform and cause with their total value, and the\nnewest 200. A resend clears them.","operationId":"listUnreportedConversions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreportedSales"}}},"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":"Sales not reported to the ad platforms","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversions/unreported/resend":{"post":{"description":"Queues again the store's unreported sales (all, or of one platform and\ncause; up to 500), once the cause is fixed. Each starts over with its\nretries; what already reached a platform is not repeated.","operationId":"resendUnreportedConversions","parameters":[{"description":"Store id","in":"path","name":"store_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/ResendUnreportedRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendUnreportedResult"}}},"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":"Resend unreported sales","tags":["Analytics"]}},"/stores/{store_id}/marketing/conversions/{order_id}/resend":{"post":{"description":"Queues the Meta Conversions API, Google Ads, TikTok and GA4 uploads again for a\ncaptured order. Uploads already `sent` are not repeated, so this is safe\nto call more than once. An unreported sale, or one waiting for a spaced\nretry, starts over with its retries.","operationId":"resendOrderConversions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"202":{"description":"Queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`order_not_captured`: only orders with a captured payment send conversions"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Resend an order's conversions","tags":["Analytics"]}},"/stores/{store_id}/marketing/google-ads/campaigns":{"get":{"description":"The account's campaigns with spend, clicks and Google's conversions for\nthe window, next to the paid orders our attribution credits to each one\n(an auto-tagged click is matched to its campaign through Google's click\nreport), the ROAS from those, and a flag on campaigns spending without\nselling. Read live from Google Ads.","operationId":"getGoogleAdsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAdsReport"}}},"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":"`google_ads_not_configured`: save the customer id first (and OAuth credentials, unless Mobiari enabled its shared access for this store and account)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_refused`: Google's message"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the Google Ads report","tags":["Analytics"]},"post":{"description":"Runs the checklist of `preflightGoogleCampaign` again and refuses on a\n`fail`, then creates the budget, campaign, targeting, assets and asset\ngroup over the Merchant Center feed in one atomic request, paused unless\n`start_active`. The campaign then counts only the store's purchase\nconversion action (a custom goal; best effort, noted on the row when\nGoogle refuses). Send an `Idempotency-Key`: a retry with the same key\ngets the first answer back. When Google's answer is lost, the campaign is\nlooked up by name before giving up.","operationId":"createGoogleCampaign","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCampaignCreated"}}},"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":"`google_ads_not_configured`; `preflight_failed`: a check failed (the failed checks in `details.checks`, the problems in `details.problems`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: the problems in `details.problems` (and `details.fields`)"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_refused`: Google's errors in `details.problems`; nothing was created"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_unavailable`: Google did not answer; the campaign may exist, check Google Ads before retrying"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a Google Performance Max campaign","tags":["Analytics"]}},"/stores/{store_id}/marketing/google-ads/campaigns/preflight":{"post":{"description":"The account is enabled and can pay, Mobiari can sign in, a Merchant\nCenter is linked and has eligible products, the store's purchase\nconversion action is enabled and primary, purchases reached Google\nrecently, and Google accepts the exact campaign in a dry run\n(`validateOnly`). Takes the same body as creating one. A `fail` means\ncreating would be refused; problems point at the request fields. Nothing\nis created or spent.","operationId":"preflightGoogleCampaign","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleCampaignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePreflight"}}},"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":"Check a Google campaign before creating it","tags":["Analytics"]}},"/stores/{store_id}/marketing/google-ads/campaigns/setup":{"get":{"description":"Whether Google Ads is reachable, the account, the linked Merchant Center\nand how many of its products can be advertised, the store's address,\nname and logo, and the account's currency and time zone. Read live from\nGoogle; what cannot be read is null.","operationId":"getGoogleCampaignSetup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCampaignSetup"}}},"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 what the Google campaign wizard needs","tags":["Analytics"]}},"/stores/{store_id}/marketing/google-ads/campaigns/{campaign_id}":{"patch":{"description":"Works on any campaign of the store's Google Ads account, not only ones\nmade in Mobiari. A budget shared by several campaigns is refused rather\nthan changed for all of them. Takes effect on Google right away.","operationId":"updateGoogleCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Google's numeric campaign id","in":"path","name":"campaign_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCampaignUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCampaignUpdated"}}},"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 campaign in the account"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_not_configured`; `google_budget_shared`: the budget is shared with other campaigns, change it in Google Ads"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: nothing to change, or a budget under R$ 10"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_refused`: Google's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_ads_unavailable`: Google did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pause, resume or change the budget of a Google campaign","tags":["Analytics"]}},"/stores/{store_id}/marketing/google-ads/test-upload":{"post":{"description":"Builds the exact Data Manager request the purchase upload of `order_id`\nwould send (or, with null, of a made-up R$ 1,00 order with a placeholder\nclick id) and sends it with `validateOnly: true`: Google checks access,\naccounts, conversion action and fields, and records nothing. No order's\nstatus changes. `skipped` says why the real upload of that order would\nnot go (no click id, no ad consent, an incomplete setup); the test runs\nanyway, with a placeholder click id when there is none. Google does not\ncheck click ids in validation.","operationId":"testGoogleAdsUpload","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleAdsTestUpload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAdsTestResult"}}},"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":"Test the Google Ads upload","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/account":{"put":{"description":"Saves the account (and its manager) as the store's Google Ads account. It\nmust be one the connected login reaches.","operationId":"chooseGoogleAdsAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChooseGoogleAdsAccount"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnection"}}},"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":"`google_sign_in_disabled`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_not_connected`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_not_reachable`: the login does not reach that account"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the Google Ads account","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/accounts":{"get":{"description":"The accounts the store's Google login reaches, directly or through a\nmanager account, to choose the one the store uses.","operationId":"listGoogleAdsAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAdsAccounts"}}},"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":"`google_sign_in_disabled`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_not_connected`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`google_refused` or `google_unreachable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Google Ads accounts of the connected login","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/authorize":{"post":{"description":"Google's consent address for the store's own Google Ads and Merchant\nCenter access. The answer comes back to the marketing page, where the same\nuser confirms it from the same tab.","operationId":"authorizeGoogle","parameters":[{"description":"Store id","in":"path","name":"store_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/AuthorizeGoogle"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthorizeUrl"}}},"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":"`google_sign_in_disabled`: not switched on on this server"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_browser_nonce`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start signing in with Google","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/complete":{"post":{"description":"Links the Google login the admin just consented with to the store. Only\nthe user that started it, from the tab that started it, on the same store,\nonce; anything else drops it and revokes it at Google.","operationId":"completeGoogleSignIn","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleCompletion"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnection"}}},"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":"`google_completion_invalid` (unknown, used, expired, another user, store or tab) or `google_sign_in_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Confirm a Google sign-in","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/connection":{"delete":{"description":"Removes the store's Google sign-in and revokes it at Google. The chosen\naccount id stays, for the store's own credentials or Mobiari's access.","operationId":"disconnectGoogle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Disconnect Google","tags":["Analytics"]},"get":{"description":"Whether Sign in with Google is available, whether the store connected its\nown Google login (and its e-mail), and the Google Ads account chosen.","operationId":"getGoogleConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnection"}}},"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":"Google connection","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/discard":{"post":{"description":"The admin declined to link the Google login: the pending result is\ndeleted and its token revoked at Google.","operationId":"discardGoogleSignIn","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleCompletion"}}},"required":true},"responses":{"204":{"description":"Dropped (also when there was nothing to drop)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Drop a Google sign-in","tags":["Analytics"]}},"/stores/{store_id}/marketing/google/pending":{"post":{"description":"After Google's consent: the Google e-mail and the store a pending sign-in\nwould link, for the admin to confirm. Only the user that started it, from\nthe tab that started it, on the same store; otherwise it is dropped.","operationId":"getGooglePendingConnection","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleCompletion"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePendingConnection"}}},"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":"`google_completion_invalid` (unknown, expired, another user, store or tab) or `google_sign_in_disabled`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"See what a Google sign-in would link","tags":["Analytics"]}},"/stores/{store_id}/marketing/insights":{"get":{"description":"Paid and fulfilled orders created in the window, grouped by the\nsource / medium / campaign of their first or last touch, with the\nstore's totals as the denominator.","operationId":"getMarketingInsights","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Defaults to `last_touch`.","in":"query","name":"touch","required":false,"schema":{"description":"Which touch of the visitor's journey an order is credited to.","enum":["first_touch","last_touch"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingInsights"}}},"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 attribution report","tags":["Analytics"]}},"/stores/{store_id}/marketing/leads":{"get":{"description":"Conversations opened in the window by contacts who had not bought yet,\ngrouped by where they came from (`conversations.origin_*`) and the inbox\nchannel, with their stages and the paid orders sold in them.","operationId":"getLeadsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadsReport"}}},"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 leads report","tags":["Analytics"]}},"/stores/{store_id}/marketing/leads/list":{"get":{"description":"Conversations opened in the window by people who had not bought yet,\nnewest first, with where they came from (the ad, on click-to-chat), their\nstage and the paid orders that converted them.","operationId":"listMarketingLeads","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive), on the conversation's start.\nDefaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (exclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"description":"Where a lead is.","enum":["open","waiting","quoted","converted","lost"],"type":"string"}},{"description":"Only leads from this channel (`paid_social`, `direct` for unknown).","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"Name, phone or e-mail contains.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_LeadItem"}}},"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 leads","tags":["Analytics"]}},"/stores/{store_id}/marketing/links":{"get":{"description":"The store's links, newest first, with their clicks, the conversations\ncredited to them, leads won and revenue sold in those conversations.","operationId":"listMarketingLinks","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketingLink"},"type":"array"}}},"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 tracked links","tags":["Analytics"]},"post":{"description":"A new short link with a random code. WhatsApp targets need the number\nwith country code; Instagram ones the username.","operationId":"createMarketingLink","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingLink"}}},"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 field is missing or invalid (`details` 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 a tracked link","tags":["Analytics"]}},"/stores/{store_id}/marketing/links/{link_id}":{"delete":{"description":"The link stops being listed. Its address keeps working, so printed QR\ncodes and old posts do not break, and what it brought stays credited.","operationId":"archiveMarketingLink","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Link id","in":"path","name":"link_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`link_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":"Archive a tracked link","tags":["Analytics"]}},"/stores/{store_id}/marketing/overview":{"get":{"description":"Visitors, leads, sales and revenue over the window and the window of the\nsame length before it, a day-by-day series, the storefront funnel, the\nleads still waiting on the team, and what each channel brought in\n(visitors, leads, converted leads, paid orders and revenue).","operationId":"getMarketingOverview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Calendar days up to now in the store's time zone, today included\n(1 to 366): the window starts at midnight of the first one. The ad\nreports (`days`) cut theirs the same way, so spend and results cover\nthe same days. Ignored when `from` is set.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (exclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Which touch an order is credited to in `channels`. Defaults to\n`last_touch`.","in":"query","name":"touch","required":false,"schema":{"description":"Which touch of the visitor's journey an order is credited to.","enum":["first_touch","last_touch"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingOverview"}}},"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 marketing overview","tags":["Analytics"]}},"/stores/{store_id}/marketing/recent-events":{"get":{"description":"The store's raw tracking events, newest first.","operationId":"listRecentTrackingEvents","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TrackedEvent"}}},"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 recent events","tags":["Analytics"]}},"/stores/{store_id}/marketing/sales":{"get":{"description":"Paid orders created in the window, newest first, each with the touch\ncredited with it and the other one, whether it was sold in a\nconversation, and how long it took from the first touch.","operationId":"listMarketingSales","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (exclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Which touch `channel` / `source` / `campaign` are. Defaults to\n`last_touch`.","in":"query","name":"touch","required":false,"schema":{"description":"Which touch of the visitor's journey an order is credited to.","enum":["first_touch","last_touch"],"type":"string"}},{"description":"Only sales credited to this channel (`direct` included).","in":"query","name":"channel","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SaleItem"}}},"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 attributed sales","tags":["Analytics"]}},"/stores/{store_id}/marketing/stats":{"get":{"description":"Visitors, sessions, pageviews, events and attributed conversions in the\nwindow.","operationId":"getMarketingStats","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingStats"}}},"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 traffic totals","tags":["Analytics"]}},"/stores/{store_id}/marketing/top-events":{"get":{"description":"Tracked events other than pageviews (`identify` included), most\nfrequent first.","operationId":"listTopEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TopEvent"}}},"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 top events","tags":["Analytics"]}},"/stores/{store_id}/marketing/top-pages":{"get":{"description":"Storefront pages by pageviews in the window, most viewed first.","operationId":"listTopPages","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TopPage"}}},"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 most viewed pages","tags":["Analytics"]}},"/stores/{store_id}/marketing/top-referrers":{"get":{"description":"Referring hosts by pageviews in the window, busiest first.","operationId":"listTopReferrers","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TopReferrer"}}},"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 top referrers","tags":["Analytics"]}},"/stores/{store_id}/marketing/visitors":{"get":{"description":"Visitors with activity in the window, most recently seen first.","operationId":"listVisitors","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Matches the identified customer's e-mail or name, or the start of\nthe visitor id. `q` is accepted too.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_VisitorSummary"}}},"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 visitors","tags":["Analytics"]}},"/stores/{store_id}/marketing/visitors/{visitor_id}":{"get":{"operationId":"getVisitor","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Visitor id (the tracker's cookie)","in":"path","name":"visitor_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorDetail"}}},"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":"`visitor_not_found`: no visit, event or attributed order of this visitor in the 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 visitor","tags":["Analytics"]}},"/stores/{store_id}/marketing/whatsapp-funnel":{"get":{"description":"Taps on the storefront's WhatsApp button, numbers given or skipped,\nconversations started and sales, for handoffs made in the window.","operationId":"getWhatsappFunnel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Start of the window (inclusive). Defaults to 30 days ago.","in":"query","name":"from","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"End of the window (inclusive). Defaults to now.","in":"query","name":"to","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappFunnel"}}},"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 WhatsApp button funnel","tags":["Analytics"]}},"/stores/{store_id}/marketplaces":{"get":{"description":"Every marketplace Mobiari knows, what it does there, whether this server\ncan connect it, and the store's account on each.","operationId":"listMarketplaces","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceList"}}},"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 marketplaces","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}":{"delete":{"description":"Forgets the seller's tokens and stops syncing. Listings and orders\nalready brought in stay, with their history. The seller can also revoke\nMobiari on the marketplace.","operationId":"disconnectMarketplace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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":"`not_connected` or `unknown_marketplace`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Disconnect a marketplace","tags":["Marketplaces"]},"get":{"description":"Whether the platform can connect to the marketplace, and the connected\nseller account with its listings, imported orders and settings.","operationId":"getMarketplace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceStatus"}}},"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":"`unknown_marketplace`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Marketplace status","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/authorize":{"post":{"description":"Returns the marketplace's address where the seller authorizes Mobiari.\nThe marketplace sends the browser back to Mobiari, which returns to the\nadmin app to finish the connection.","operationId":"authorizeMarketplace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/AuthorizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeUrl"}}},"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":"`unknown_marketplace`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_not_configured`: this server has no application for the marketplace"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting a marketplace","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/categories":{"get":{"description":"The marketplace's categories under `parent` (the top of the tree without\nit), kept for a week; `refresh=true` reads them again.","operationId":"listMarketplaceCategories","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"The category whose children to list; the top of the tree when absent.","in":"query","name":"parent","required":false,"schema":{"type":"string"}},{"description":"Read from the marketplace again instead of the copy kept.","in":"query","name":"refresh","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceCategoryList"}}},"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":"`not_supported`: the marketplace does not publish through Mobiari 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List marketplace categories","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/categories/suggest":{"get":{"description":"The categories the marketplace suggests for a product's title, the likeliest first.","operationId":"suggestMarketplaceCategories","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"The title to read; the product's own when `product_id` is given instead.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceCategorySuggestions"}}},"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":"Suggest a category","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/categories/{category_id}":{"get":{"description":"What the category asks of a listing: its attributes (required or not,\ntheir values) and its rules. Kept for a day; `refresh=true` reads it again.","operationId":"getMarketplaceCategory","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"The marketplace's category id","in":"path","name":"category_id","required":true,"schema":{"type":"string"}},{"description":"Read from the marketplace again instead of the copy kept.","in":"query","name":"refresh","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceCategorySchemaView"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a category's attributes","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/claims":{"get":{"description":"Claims against the seller, the open ones first by deadline.","operationId":"listMarketplaceClaims","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"`opened` (default) or `closed`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Only the claims of this Mobiari order.","in":"query","name":"order_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MarketplaceClaim"}}},"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_connected` or `unknown_marketplace`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 marketplace claims","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/complete":{"post":{"description":"Called by the admin app with what the marketplace sent back. Only the\nperson who started the connection, for this store, can finish it. The\nerror `code` says why it failed: `invalid_state` (expired, used, or\nstarted by someone else), `grant_refused`, `exchange_failed`,\n`connected_elsewhere`, `store_has_account` (another seller account is\nconnected to this store: disconnect it first), `storage_failed`,\n`not_configured`.","operationId":"completeMarketplace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/CompleteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connected"}}},"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":"`unknown_marketplace`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_state`, `grant_refused`, `not_a_seller`, `exchange_failed`, `connected_elsewhere`, `store_has_account`, `storage_failed` or `not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Finish connecting a marketplace","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/keys":{"post":{"description":"For marketplaces whose seller connects by typing keys from the\nmarketplace's back office (`connect_mode` `keys`: Carrefour, Leroy Merlin\nand the other Mirakl marketplaces). The keys are checked by calling the\nmarketplace with them, then sealed on the account; they are never sent\nback. The error `code` says why it failed: `missing_keys` (`details`\nnames the fields), `keys_refused` (the marketplace refused them),\n`connected_elsewhere`, `store_has_account` (another seller account is\nconnected to this store: disconnect it first), `storage_failed`; 409\n`not_supported` for a marketplace that connects through its consent page.","operationId":"connectMarketplaceWithKeys","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/ConnectKeysRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connected"}}},"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":"`unknown_marketplace`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_supported`: the marketplace connects through its consent page (`authorize`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_keys`, `keys_refused`, `connected_elsewhere`, `store_has_account`, `storage_failed` or `marketplace_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_unreachable` or `marketplace_error`: the keys could not be checked now"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a marketplace with keys","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/listings":{"get":{"description":"Every listing brought in from the seller's account, tied or not to a\nvariant. Unlinked first, so the work waiting is on top.","operationId":"listMarketplaceListings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"`linked`, `unlinked` or `errors`.","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"Matches the title, the SKU or the item id.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Listing"}}},"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_connected`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 marketplace listings","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/listings/import":{"post":{"description":"Reads every listing of the seller's account in the background (a large\ncatalog takes minutes) and ties the ones whose SKU matches exactly one\nMobiari variant. Poll the status for progress. Running it again updates\nwhat changed and never undoes a link.","operationId":"importMarketplaceListings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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":{"202":{"description":"Started; `import_state` on the status tells how it goes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_connected`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Bring the listings in","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/listings/{listing_id}/link":{"delete":{"description":"The listing stays but is no longer synced, and orders for it will wait\nfor a variant. Matching by SKU leaves it alone from then on; only linking\nit by hand ties it again.","operationId":"unlinkMarketplaceListing","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Listing id","in":"path","name":"listing_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Listing"}}},"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":"`listing_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":"Untie a listing","tags":["Marketplaces"]},"put":{"description":"From then on the variant's stock is what the listing shows, and an order\nfor the listing takes that variant's stock.","operationId":"linkMarketplaceListing","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Listing id","in":"path","name":"listing_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Listing"}}},"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":"`listing_not_found` or `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":"Tie a listing to a variant","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/listings/{listing_id}/sync":{"post":{"description":"Writes the variant's stock (and the price, when price sync is on) to the\nmarketplace right away, whatever it showed before.","operationId":"syncMarketplaceListing","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Listing id","in":"path","name":"listing_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/Listing"}}},"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":"`listing_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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`: the marketplace refused the change"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Push one listing now","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/orders":{"get":{"description":"Orders received from the marketplace and the Mobiari order each became.","operationId":"listMarketplaceOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"`waiting` (held back for a link) or `attention` (has problems).","in":"query","name":"filter","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MarketplaceOrder"}}},"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_connected`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 marketplace orders","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/orders/sync":{"post":{"description":"Asks the marketplace for the orders changed in the last days and brings\nthem in, then retries the ones held back for a link. The notification\nfeed does this on its own; use it after connecting, or to catch up.","operationId":"syncMarketplaceOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/SyncOrdersRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncOrdersResult"}}},"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_connected`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Look for orders now","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications":{"get":{"description":"The products published (or being prepared) on the marketplace, the most\nrecently changed first.","operationId":"listMarketplacePublications","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"`draft`, `submitted`, `under_review`, `active`, `paused`, `rejected` or `closed`.","in":"query","name":"state","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MarketplacePublication"}}},"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 publications","tags":["Marketplaces"]},"post":{"description":"Saves the listing's choices and, unless `submit` is false, creates it on\nthe marketplace. Its variants are linked at once, so stock and price\nsync apply. A refusal keeps the publication with the marketplace's reasons\nand answers 422 `listing_incomplete` (Mobiari's or the preflight's\nproblems) or the marketplace's error. The state settles later through\nthe marketplace's notifications and the poll.","operationId":"createMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/MarketplacePublicationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublication"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`listing_incomplete`, with `details.problems`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`: the marketplace refused it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Publish a product on a marketplace","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications/check":{"post":{"description":"Mobiari's checks of the category's rules, then the marketplace's own\npreflight where it has one (Mercado Livre's validator). Nothing is created.","operationId":"checkMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"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/MarketplacePublicationForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublicationCheck"}}},"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":"Check a listing before sending it","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications/draft":{"get":{"description":"The form to publish a product in a category, filled from the product\n(brand, barcode, NCM, dimensions, options, specifications) and from what\nthe store chose before on this marketplace; or, with `publication_id`, a\npublication's own choices. Says what would keep it from going out.","operationId":"draftMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"in":"query","name":"product_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The category to fill the form for; a publication's own when absent.","in":"query","name":"category_id","required":false,"schema":{"type":"string"}},{"description":"An existing publication: its choices, with the category's attributes.","in":"query","name":"publication_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublicationDraft"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`category_required`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 `publication_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":"Prepare a listing","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications/{publication_id}":{"delete":{"description":"Only a publication never sent can be deleted; a listing on the\nmarketplace is closed instead.","operationId":"deleteMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Publication id","in":"path","name":"publication_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":"`publication_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`publication_published`: close 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 draft","tags":["Marketplaces"]},"get":{"description":"The publication with its state on the marketplace, the reasons, and each\nvariant's listing row.","operationId":"getMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Publication id","in":"path","name":"publication_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublication"}}},"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":"`publication_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 publication","tags":["Marketplaces"]},"put":{"description":"Saves new choices (title, description, photos, attributes, variants\nadded) and, unless `submit` is false, writes them to the marketplace.\nA draft is created there the first time it is sent.","operationId":"updateMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Publication id","in":"path","name":"publication_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublicationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublication"}}},"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":"`publication_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`publication_closed` or `publication_sending`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`listing_incomplete`, with `details.problems`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 publication","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications/{publication_id}/refresh":{"post":{"description":"Asks the marketplace where the listing stands now, with its reasons.","operationId":"refreshMarketplacePublication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Publication id","in":"path","name":"publication_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/MarketplacePublication"}}},"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":"`publication_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 a listing's state again","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/publications/{publication_id}/state":{"post":{"description":"Changes the listing's state on the marketplace and answers where it\nstands then. Closing ends it there for good.","operationId":"setMarketplacePublicationState","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}},{"description":"Publication id","in":"path","name":"publication_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/MarketplacePublicationStateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePublication"}}},"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":"`publication_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_published` or `publication_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`: the marketplace refused the change"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pause, reactivate or close a listing","tags":["Marketplaces"]}},"/stores/{store_id}/marketplaces/{provider}/settings":{"patch":{"description":"Which things Mobiari does for the account: push stock, push prices,\nbring in orders, the units kept back from the listing, and the markup\nadded to the price. Omitted fields keep their value.","operationId":"updateMarketplaceSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The marketplace: `mercado-livre`, `shopee`, `tiktok-shop`, `amazon`, `magalu`, `shein`, `carrefour` or `leroy-merlin`","in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}},"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_connected` or `unknown_marketplace`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 marketplace settings","tags":["Marketplaces"]}},"/stores/{store_id}/mcp/requests":{"get":{"description":"Writes AI clients connected over MCP asked for, newest first. Only\nrequests for operations you may run yourself are listed.","operationId":"listMcpRequests","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only requests in this state.","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/McpRequestStatus"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_McpRequest"}}},"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_a_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 MCP approval requests","tags":["Assistant"]}},"/stores/{store_id}/mcp/requests/{request_id}/approve":{"post":{"description":"Runs the operation now, as the API key's service account and within the\nkey's scope, and returns the request with its result. You need the\npermission the operation needs; the key must still be valid.","operationId":"approveMcpRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Request id","in":"path","name":"request_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"You confirmed a destructive, money or external change. Without it\nsuch requests answer 428.","in":"query","name":"confirmed","required":false,"schema":{"type":"boolean"}},{"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/McpRequest"}}},"description":"Decided: `applied` with the result, or `failed` with the error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`missing_permission`, or `approval_requires_person` for an API key or service account"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such request in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`request_not_pending`: already decided or expired"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`confirmation_required`: approve again with `confirmed=true`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an MCP request","tags":["Assistant"]}},"/stores/{store_id}/mcp/requests/{request_id}/decline":{"post":{"description":"Nothing runs; the client sees `declined`.","operationId":"declineMcpRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Request id","in":"path","name":"request_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/McpRequest"}}},"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":"`missing_permission` or `approval_requires_person`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such request in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`request_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":"Decline an MCP request","tags":["Assistant"]}},"/stores/{store_id}/me/notification-preferences":{"get":{"description":"Every kind of notification I can receive in this store, with the\nchannels it goes through (bell, push, e-mail, WhatsApp) and where they\nreach me. Until I change a kind, its defaults apply.","operationId":"getNotificationPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my notification preferences","tags":["Notifications"]},"patch":{"description":"Sets the channels of the kinds sent; everything else stays as it was.","operationId":"updateNotificationPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationPreferencesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my notification preferences","tags":["Notifications"]}},"/stores/{store_id}/me/notifications":{"get":{"description":"Newest first. Keyset-paged: walk it with `next_cursor`.","operationId":"listMyNotifications","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`true`: only unread; `false`: only read. Omit for both.","in":"query","name":"unread","required":false,"schema":{"type":"boolean"}},{"description":"Only this category.","in":"query","name":"category","required":false,"schema":{"$ref":"#/components/schemas/NotificationCategory"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Notification"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my notifications","tags":["Notifications"]}},"/stores/{store_id}/me/notifications/read":{"post":{"description":"By id, by category or all of them; returns the bell summary after.\nIdempotent.","operationId":"markMyNotificationsRead","parameters":[{"description":"Store id","in":"path","name":"store_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/MarkNotificationsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSummary"}}},"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`: not exactly one of ids, category, all"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my notifications read","tags":["Notifications"]}},"/stores/{store_id}/me/notifications/summary":{"get":{"description":"For the bell badge. Cheap enough to poll.","operationId":"getMyNotificationSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSummary"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Count my unread notifications","tags":["Notifications"]}},"/stores/{store_id}/me/notifications/unread":{"post":{"description":"The reverse of marking read, for \"keep this for later\". By id only.","operationId":"markMyNotificationsUnread","parameters":[{"description":"Store id","in":"path","name":"store_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/MarkNotificationsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSummary"}}},"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`: not exactly one of ids, category, all"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my notifications unread","tags":["Notifications"]}},"/stores/{store_id}/me/push-preferences":{"get":{"description":"Which of this store's alerts push to my devices. Until saved, the\ndefaults apply (`is_default`).","operationId":"getPushPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushPreferences"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my push preferences for a store","tags":["Push Notifications"]},"put":{"description":"Replaces the set of alerts that push to my devices for this store.\nApplies to every device I registered.","operationId":"updatePushPreferences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePushPreferencesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushPreferences"}}},"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_store_member`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my push preferences for a store","tags":["Push Notifications"]}},"/stores/{store_id}/members":{"get":{"description":"The owner first, then everyone an attachment reaches here, by name.","operationId":"listStoreMembers","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StoreMember"}}},"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"]}},"/stores/{store_id}/members/{user_id}":{"delete":{"description":"Takes away the attachments on the user that reach only this store\n(a store-wide attachment over several stores loses this one). Access\nthrough a group or over the whole organization is not removed here:\nthe answer says which, so the group or the attachment can be edited.\nThe store owner cannot be removed; transfer ownership first.","operationId":"removeStoreMember","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The member's user id","in":"path","name":"user_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Member 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":"Not a member of this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cannot_remove_owner`: the user owns the store; `via_group` / `via_organization`: access comes from a group or an organization-wide attachment (`details`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 member","tags":["Team"]}},"/stores/{store_id}/members/{user_id}/permissions":{"get":{"description":"The effective permission codes of a member or service account in this\nstore. For why one action is allowed or refused, see\n`GET /stores/{store_id}/access/explain`.","operationId":"getMemberPermissions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The member or service account","in":"path","name":"user_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPermissions"}}},"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_a_member`: nobody by that id reaches 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 member's permissions","tags":["Team"]}},"/stores/{store_id}/network":{"get":{"description":"The network this store owns (the brand's side), with how many members it\nhas. 404 `no_network` when it owns none.","operationId":"getNetwork","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseNetwork"}}},"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_network`: the store owns no network"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 store's network","tags":["Network"]},"patch":{"description":"Its name, who pays for member stores and the ceiling new invites\npropose. Members keep the ceiling they accepted.","operationId":"updateNetwork","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNetworkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseNetwork"}}},"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_network`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `ceiling_not_allowed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the network","tags":["Network"]},"post":{"description":"Makes this store the owner of a franchise network: the brand's store,\ncatalog source and online store. A store owns at most one network, and\na store that is a member of another network cannot own one.","operationId":"createNetwork","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateNetworkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseNetwork"}}},"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":"`network_exists`: the store already owns one; `store_in_network`: the store or its organization is a member of a network"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `ceiling_not_allowed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 network","tags":["Network"]}},"/stores/{store_id}/network/access-log":{"get":{"description":"Every use of network access in this store, newest first: who of the\nbrand asked for what, and whether the ceiling allowed it. Repeats of the\nsame check within a minute are one row.","operationId":"listNetworkAccessLog","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NetworkAccessEntry"}}},"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 brand's access to my store","tags":["Network"]}},"/stores/{store_id}/network/invites":{"get":{"description":"Every invite, newest first; a pending one past its date reads `expired`.","operationId":"listNetworkInvites","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NetworkInvite"}}},"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_network`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 network's invites","tags":["Network"]},"post":{"description":"E-mails a link to join the network. The franchise's owner accepts it\nwith an existing store, or signs up through it and gets a new\norganization with one store, already a member. The invite shows the\nceiling in plain words. When the e-mail fails, the answer carries the\nlink to pass on by hand.","operationId":"createNetworkInvite","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateNetworkInviteRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkInvite"}}},"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_network`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invite_pending`: an open invite to this e-mail exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `ceiling_not_allowed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Invite a franchise","tags":["Network"]}},"/stores/{store_id}/network/invites/{invite_id}":{"delete":{"operationId":"cancelNetworkInvite","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The network invite","in":"path","name":"invite_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Cancelled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: no pending invite by that id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an invite","tags":["Network"]}},"/stores/{store_id}/network/members":{"get":{"description":"Every franchise that joined, current members first, with the ceiling\neach accepted and the time-limited grants asked of it.","operationId":"listNetworkMembers","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NetworkMember"}}},"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_network`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 network's members","tags":["Network"]}},"/stores/{store_id}/network/members/{member_id}":{"delete":{"description":"The brand ends a franchise's membership: its network access ends at\nonce. The franchise keeps its store, orders and customers, and is told\nby e-mail.","operationId":"removeNetworkMember","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The membership (`network_members` row)","in":"path","name":"member_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":"`not_found`: no current member by that id"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 member","tags":["Network"]}},"/stores/{store_id}/network/members/{member_id}/grants":{"post":{"description":"Asks a member for codes beyond its ceiling for a limited time (a field\nsupervisor running a counter for a day). The member's owner approves or\ndeclines; once approved it lasts `duration_hours`.","operationId":"requestNetworkGrant","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The membership (`network_members` row)","in":"path","name":"member_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/RequestGrantRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessGrant"}}},"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":"`not_found`: no active member by that id"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`; `grant_not_allowed`: a code the brand can never hold"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Ask a member for more access","tags":["Network"]}},"/stores/{store_id}/network/membership":{"delete":{"description":"The franchise ends its membership: the brand's access ends at once. The\nstore keeps its orders, customers, stock and products. The brand is told\nby e-mail.","operationId":"leaveNetwork","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Left"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`owner_only`; `session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_in_network`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Leave the network","tags":["Network"]},"get":{"description":"The store's network as the franchise sees it: the brand, what it shares\n(the ceiling, in plain words, and the grants in force), who of the brand\nholds access, and who pays Mobiari. 404 `not_in_network` when the store\nis in none.","operationId":"getNetworkMembership","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyMembership"}}},"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_network`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my network membership","tags":["Network"]},"patch":{"description":"The franchise's owner suspends or resumes the brand's access, or changes\nwhat it shares. Takes effect on the brand's next request. To leave, use\n`DELETE`.","operationId":"updateNetworkMembership","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMembershipRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyMembership"}}},"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":"`owner_only`; `session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_in_network`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `left` is `DELETE`; `ceiling_not_allowed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 my network membership","tags":["Network"]}},"/stores/{store_id}/network/membership/grants/{grant_id}":{"patch":{"description":"The franchise's owner approves or declines a time-limited grant the\nbrand asked for, or revokes an approved one.","operationId":"decideNetworkGrant","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The time-limited grant","in":"path","name":"grant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideGrantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessGrant"}}},"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":"`owner_only`; `session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`grant_decided`: the grant is not in a state that allows this"},"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":"Decide on a grant","tags":["Network"]}},"/stores/{store_id}/network/roles":{"get":{"description":"Who of the brand holds what over the member stores (before each\nmember's ceiling cuts it down).","operationId":"listNetworkRoles","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NetworkRole"}}},"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_network`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 network roles","tags":["Network"]},"post":{"description":"Attaches a permission set to a brand person or group over the network's\nmember stores. In each member store it grants only what that member's\nceiling allows. The caller must hold the set's codes in the brand's\nstore.","operationId":"createNetworkRole","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateNetworkRoleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkRole"}}},"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":"`grant_exceeds_actor`: the set holds codes the caller does not"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_network`; the policy, person or group is not the brand's"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not a permission set, or an unknown principal 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":"Give network access","tags":["Network"]}},"/stores/{store_id}/network/roles/{attachment_id}":{"delete":{"operationId":"deleteNetworkRole","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The network role (an attachment with scope `network`)","in":"path","name":"attachment_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":"`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 network access","tags":["Network"]}},"/stores/{store_id}/nfse/documents":{"get":{"operationId":"listNfse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NfseDocument"},"type":"array"}}},"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"]},"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":"emitNfse","parameters":[{"description":"Store id","in":"path","name":"store_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/NfseRequest"}}},"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"]}},"/stores/{store_id}/nfse/documents/{document_id}":{"get":{"operationId":"getNfse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Note id","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseDocumentDetail"}}},"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"]}},"/stores/{store_id}/nfse/documents/{document_id}/cancel":{"post":{"operationId":"cancelNfse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/NfseCancelInput"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/nfse/documents/{document_id}/pdf":{"get":{"operationId":"downloadNfsePdf","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"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"]}},"/stores/{store_id}/nfse/documents/{document_id}/refresh":{"post":{"operationId":"refreshNfse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/nfse/documents/{document_id}/xml":{"get":{"operationId":"downloadNfseXml","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/nfse/environment":{"put":{"description":"Production is refused until every readiness item passes.","operationId":"setNfseEnvironment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseEnvironmentInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseSettings"}}},"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_ready`: the readiness list has open items"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Switch between homologação and produção.","tags":["NFS-e"]}},"/stores/{store_id}/nfse/numbering":{"post":{"operationId":"confirmNfseNumbering","parameters":[{"description":"Store id","in":"path","name":"store_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/NfseNumberingInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseSettingsView"}}},"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_number_used`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Confirm the next production number.","tags":["NFS-e"]}},"/stores/{store_id}/nfse/preview":{"post":{"description":"Runs the validation an emission runs and shows the DPS it would send. No\nnumber is spent.","operationId":"previewNfse","parameters":[{"description":"Store id","in":"path","name":"store_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/NfseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfsePreview"}}},"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":"Check a note without issuing it.","tags":["NFS-e"]}},"/stores/{store_id}/nfse/readiness":{"get":{"operationId":"getNfseReadiness","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseReadiness"}}},"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":"What production needs, item by item.","tags":["NFS-e"]}},"/stores/{store_id}/nfse/settings":{"get":{"operationId":"getNfseSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseSettingsView"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the NFS-e settings.","tags":["NFS-e"]},"put":{"operationId":"putNfseSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseSettingsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfseSettings"}}},"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":"Save the NFS-e settings.","tags":["NFS-e"]}},"/stores/{store_id}/notification-channels":{"get":{"description":"The store's customer-facing channels (abandoned-cart recovery, review\nrequests), oldest first. Secrets in `config_json` read as `__stored__`.","operationId":"listNotificationChannels","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NotificationChannel"}}},"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 notification channels","tags":["Notifications"]},"post":{"description":"Adds a channel the store's automations can message customers through.","operationId":"createNotificationChannel","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateNotificationChannelRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannel"}}},"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`: empty or long name, unknown `channel_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":"Create a notification channel","tags":["Notifications"]}},"/stores/{store_id}/notification-channels/{channel_id}":{"delete":{"description":"Its past sends stay in the log.","operationId":"deleteNotificationChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Notification channel id","in":"path","name":"channel_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 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":"Delete a notification channel","tags":["Notifications"]},"patch":{"description":"Changes the fields sent. A `config_json` replaces the stored config;\nsecrets sent back as `__stored__` keep their stored value.","operationId":"updateNotificationChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Notification channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationChannelRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannel"}}},"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"},"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 notification channel","tags":["Notifications"]}},"/stores/{store_id}/notification-channels/{channel_id}/test":{"post":{"description":"Sends the test message (in the channel's language) to the channel's\n`test_recipient` (e-mail, WhatsApp) or its chat/URL (Telegram, webhook),\nand records it in the log.","operationId":"testNotificationChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Notification channel id","in":"path","name":"channel_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":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`notification_send_failed`: the provider refused it or the channel is missing settings; `error` says why"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a test through a channel","tags":["Notifications"]}},"/stores/{store_id}/notification-logs":{"get":{"description":"Everything the store sent or tried to send, newest first. Keyset-paged:\nwalk it with `next_cursor`.","operationId":"listNotificationLogs","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_NotificationLog"}}},"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 notification logs","tags":["Notifications"]}},"/stores/{store_id}/nps":{"get":{"description":"Answers to the post-delivery survey in the period: the score, how many\npromoters (9-10), passives (7-8) and detractors (0-6), and the latest 50\nanswers.","operationId":"getNpsSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days back, 1 to 365. Defaults to 90.","in":"query","name":"days","required":false,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NpsSummary"}}},"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 store's NPS","tags":["Customers"]}},"/stores/{store_id}/onboarding":{"get":{"description":"What is left to set up in the store, step by step, read from its data:\nproducts, payments, freight, shipping sizes, NF-e in production, brand,\nWhatsApp, team, custom domain and the first order. A `service`\nworkspace has its own steps: help articles, tickets, WhatsApp, the\ncompany's system, team and the first conversation.","operationId":"getOnboardingChecklist","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingChecklist"}}},"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 setup checklist","tags":["Stores"]}},"/stores/{store_id}/onboarding/state":{"put":{"description":"Saves the first-run wizard's answers and screen, and hides, snoozes or\nbrings back the dashboard setup guide. Answers merge into what is saved.\nReturns the checklist with the new state.","operationId":"updateOnboardingState","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOnboardingState"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingChecklist"}}},"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`: wizard_step too long, snooze_days out of range or answers too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save setup progress","tags":["Stores"]}},"/stores/{store_id}/option-definition-values/{definition_value_id}":{"put":{"description":"A new `value` renames every product value linked to it and the variant\ntitles built from them, in one transaction; SKUs stay. Refused when a\nproduct already has another value with the new name. A new `color_hex`\nbecomes the swatch color of the linked values of color options.","operationId":"updateOptionDefinitionValue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library value id","in":"path","name":"definition_value_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionValueUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionValue"}}},"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_definition_value_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_value_taken`, `option_definition_code_taken`, or `option_value_taken_in_product` (`details.product_ids`: products with another value of the new name)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `invalid_code`, `invalid_color` or `file_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 a library value","tags":["Products"]}},"/stores/{store_id}/option-definition-values/{definition_value_id}/merge":{"post":{"description":"For duplicates (\"Azul\" and \"azul marinho\"): the value in the path is\narchived and its spellings become aliases of the survivor; the product\nvalues linked to it move to the survivor and take its name (variant\ntitles built from them follow; SKUs stay). A product whose option\nalready has the survivor keeps its value unlinked, listed in `unlinked`.","operationId":"mergeOptionDefinitionValue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library value id","in":"path","name":"definition_value_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/OptionDefinitionValueMergeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionValueMerge"}}},"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_definition_value_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_value_archived`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_mismatch`: the two values are of different options, or the same 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":"Merge a library value into another","tags":["Products"]}},"/stores/{store_id}/option-definitions":{"get":{"description":"The store's library options (Cor, Tamanho) with their values in the\ncanonical order, and how many product options and values link to each.","operationId":"listOptionDefinitions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Also the archived options and values. Default false.","in":"query","name":"include_archived","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_OptionDefinition"}}},"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 option library","tags":["Products"]},"post":{"description":"Product options named like it (ignoring case, accents and plural) made\nfrom now on link to it.","operationId":"createOptionDefinition","parameters":[{"description":"Store id","in":"path","name":"store_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/OptionDefinitionCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinition"}}},"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":"`option_definition_name_taken`: a live option has this name (or a form of it)"},"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 library option","tags":["Products"]}},"/stores/{store_id}/option-definitions/{definition_id}":{"get":{"operationId":"getOptionDefinition","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library option id","in":"path","name":"definition_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Also the archived options and values. Default false.","in":"query","name":"include_archived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinition"}}},"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_definition_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 library option","tags":["Products"]},"put":{"description":"Renaming it leaves the products' own option names alone. Archiving it\nstops new product options from linking to it; linked ones stay linked.","operationId":"updateOptionDefinition","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library option id","in":"path","name":"definition_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinition"}}},"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_definition_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_name_taken`"},"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 library option","tags":["Products"]}},"/stores/{store_id}/option-definitions/{definition_id}/values":{"post":{"operationId":"createOptionDefinitionValue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library option id","in":"path","name":"definition_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/OptionDefinitionValueCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionValue"}}},"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_definition_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_value_taken` (the value or a spelling of it is there), `option_definition_code_taken` or `option_definition_archived`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `invalid_code`, `invalid_color` or `file_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 value to a library option","tags":["Products"]}},"/stores/{store_id}/option-definitions/{definition_id}/values/reorder":{"put":{"description":"The linked values of every product follow: they take the places the\nlinked values held, in the library's order.","operationId":"reorderOptionDefinitionValues","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Library option id","in":"path","name":"definition_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinitionValuesReorderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionDefinition"}}},"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_definition_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":"Reorder a library option's values","tags":["Products"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/option-groups/{option_group_id}/definition":{"put":{"description":"Its values are linked to the library values they match (by value or\nalias, ignoring case and accents); values the library lacks are added\nto it. Linking changes no product text. `definition_id: null` unlinks\nthe option and its values.","operationId":"linkOptionGroupDefinition","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/OptionGroupLinkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/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":"`option_group_not_found` or `option_definition_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_archived`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 a product option to a library option","tags":["Products"]}},"/stores/{store_id}/option-groups/{option_group_id}/values":{"get":{"operationId":"listOptionValues","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/option-library/build":{"post":{"description":"Queues the job that groups the store's product options by name (Cor,\nCores and Color are one) and their values by spelling, adds what the\nlibrary lacks (values with codes, spellings as aliases) and links them.\nIt changes no product text, variant or SKU, and leaves what is linked\nalready alone. Answers at once; the job runs in the background.","operationId":"buildOptionLibrary","parameters":[{"description":"Store id","in":"path","name":"store_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":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionLibraryBuild"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Rebuild the option library from the products","tags":["Products"]}},"/stores/{store_id}/option-values/{option_value_id}":{"delete":{"description":"Refused while a variant carries it. Emits the `option_value.deleted`\nwebhook.","operationId":"deleteOptionValue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/option-values/{option_value_id}/definition-value":{"put":{"description":"The value must be of the library option the product option is linked\nto. Its text stays; a spelling the library value does not have becomes\none of its aliases. `definition_value_id: null` unlinks it.","operationId":"linkOptionValueDefinitionValue","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/OptionValueLinkRequest"}}},"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` or `option_definition_value_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_value_archived`, or `option_definition_value_in_use`: another value of the option is linked to it"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`option_definition_mismatch`: the product option is not linked to that value's library 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":"Link a product value to a library value","tags":["Products"]}},"/stores/{store_id}/order-imports":{"post":{"description":"Reads the file (the first sheet; one row per order line, the first row\nis the header) and keeps it, with a suggested field for each column.\nNothing is imported yet: preview and run it through `POST\n/stores/{store_id}/import-runs` with source `spreadsheet` and this id.","operationId":"uploadOrderImport","parameters":[{"description":"Store id","in":"path","name":"store_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/OrderImportUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderImportUpload"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: malformed upload or no `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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_sheet`: the file could not be read, is empty, or is too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an orders spreadsheet","tags":["Imports"]}},"/stores/{store_id}/order-imports/from-url":{"post":{"description":"Downloads the sheet (shared as \"Anyone with the link\") and keeps it as\nan upload does.","operationId":"uploadOrderImportFromUrl","parameters":[{"description":"Store id","in":"path","name":"store_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderImportUpload"}}},"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_sheet_link`: not a Google Sheets link; `sheet_not_shared`: Google asked to sign in (share the sheet as \"Anyone with the link\"); `invalid_sheet`: the file could not be read"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sheet_download_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Import orders from a Google Sheets link","tags":["Imports"]}},"/stores/{store_id}/order-imports/template":{"get":{"description":"A CSV (`;`, UTF-8 with BOM, opens in Excel) with every column the import\nknows and two example orders, one with two lines.","operationId":"orderImportTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{}},"description":"The CSV 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The orders spreadsheet template","tags":["Imports"]}},"/stores/{store_id}/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. Page-number tables may pass\n`offset` instead (with `include_total=true` for the page count).\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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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 /stores/{store_id}/orders/manual`.","operationId":"createOrder","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateOrderRequest"}}},"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"]}},"/stores/{store_id}/orders/export":{"get":{"description":"Every order the list's filters match (the same `status`, `customer_id`,\n`search`, `include_test`, `created_after`, `created_before`), newest\nfirst, up to 50,000, as a CSV a Brazilian spreadsheet opens as it is:\nUTF-8 with BOM, `;` between columns, Portuguese headers and statuses,\nmoney as `1.234,56`, dates in the store's timezone (`dd/mm/aaaa hh:mm`).","operationId":"exportOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"text/csv":{}},"description":"The CSV 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Export orders","tags":["Orders"]}},"/stores/{store_id}/orders/manual":{"post":{"description":"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":"createManualSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Strongly recommended: one key per sale the operator rings up (e.g. a UUID per cart attempt), so a retry after a timeout replays the sale instead of recording it twice.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualSaleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualSaleResponse"}}},"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; `quote_not_found`: `quote_id` is not a quote of 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`); `quote_already_paid`: the customer already paid the quote online; `quote_order_pending`: the quote's online order still waits for its payment (cancel it first)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (no items, bad quantity, unknown customer), `card_detail_not_applicable` (`card` on a sale not paid on the card machine), `invalid_installments`, `pix_qr_not_splittable` (a `pix_qr` payment sharing the sale), `payments_total_mismatch` (the payments do not add up to the total, `details.total_cents`), `invalid_discount_code` (not found, inactive, outside its dates, below its minimum or used up; `message` says which), `invalid_manual_discount`, `invalid_shipping`, `invalid_postal_code`, or `pix_intent_failed` (no gateway configured or the gateway refused)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 counter sale","tags":["Orders"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/orders/{order_id}/adjustments":{"get":{"description":"Oldest first.","operationId":"listOrderItemAdjustments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only this line's adjustments.","in":"query","name":"order_item_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_OrderItemAdjustment"}}},"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 item adjustments","tags":["Orders"]},"post":{"description":"Records an adjustment against one line of the order. Totals are not\nrecomputed. Emits the `order_item_adjustment.created` webhook.","operationId":"createOrderItemAdjustment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CreateOrderItemAdjustmentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItemAdjustment"}}},"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":"`validation_failed`: the line is not on this order, or a field is 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":"Add an item adjustment","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/cancel":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/orders/{order_id}/conversation":{"get":{"description":"The conversation the order was sold in, how the link was made, and where\nthe conversation came from. `null` when the order has none.","operationId":"getOrderConversation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderConversation"}]}}},"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":"The conversation of an order","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/credit":{"get":{"operationId":"getOrderCredit","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/orders/{order_id}/customer-email":{"get":{"operationId":"getOrderCustomerEmail","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCustomerEmail"}}},"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, or no e-mail for it: `no_customer_email` (no customer 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":"`GET .../orders/{order_id}/customer-email`: the payment confirmation as\nthe customer sees it (the store's template, brand, items, totals and\ndelivery), rendered now from the order. Nothing is sent. E-mails are\nnot stored, so the copy follows the template as it is today.","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/digital-delivery/resend":{"post":{"description":"Sends the e-mail for every digital item of a paid order, including the ones\nalready sent (the customer lost it, or the address was corrected).","operationId":"resendOrderDigitalDelivery","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendResult"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nothing_to_send` (no paid digital item) or `send_failed` (the e-mail could not go)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 an order's digital items again","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/emails":{"get":{"operationId":"listOrderEmails","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailMessageSummary"},"type":"array"}}},"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 .../orders/{order_id}/emails`: the e-mails the store sent about an\norder, newest first.","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/invoice":{"post":{"description":"Numbers, signs, stores and transmits it. A document whose answer is\npending keeps being retried in the background.","operationId":"emitOrderInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceRequest"}]}}},"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"]}},"/stores/{store_id}/orders/{order_id}/invoice/cancel":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CancelOrderInvoiceRequest"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/orders/{order_id}/invoice/corrections":{"get":{"operationId":"listOrderInvoiceCorrections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FiscalCorrection"},"type":"array"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CreateOrderInvoiceCorrectionRequest"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/orders/{order_id}/invoice/corrections/target":{"get":{"description":"The note it would correct and its environment, so the admin can say\nbefore sending whether the carta has fiscal value. Reads only.","operationId":"getOrderInvoiceCorrectionTarget","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A shipment with its own attached NF-e: the carta goes to that note instead of the order's.","in":"query","name":"shipment_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Another authorized note of the order (a return note): the carta goes to it.","in":"query","name":"document_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"The carrier Central do Frete will send: with it, the view says what\nthe note lacks for their rules, as the text of a carta.","in":"query","name":"carrier_name","required":false,"schema":{"type":["string","null"]}},{"description":"That carrier's CNPJ.","in":"query","name":"carrier_cnpj","required":false,"schema":{"type":["string","null"]}},{"description":"That freight goes by air.","in":"query","name":"air","required":false,"schema":{"type":["boolean","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoiceCorrectionTarget"}}},"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":"`order_without_nfe`, `fiscal_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Where the order's next carta de correção would go.","tags":["Fiscal"]}},"/stores/{store_id}/orders/{order_id}/invoice/preview":{"post":{"description":"Maps the order, validates it and returns the unsigned XML. Spends no\nnumber and contacts no one.","operationId":"previewOrderInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/OrderInvoiceRequest"}]}}},"description":"Optional; defaults to the sale NF-e"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoicePreview"}}},"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_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview the order's NF-e.","tags":["Fiscal"]}},"/stores/{store_id}/orders/{order_id}/invoices":{"get":{"operationId":"listOrderInvoices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FiscalDocument"},"type":"array"}}},"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"]}},"/stores/{store_id}/orders/{order_id}/items/{item_id}/use-stock":{"post":{"description":"For a made-to-order line whose product is in stock after all: holds free\nunits of it for the order and takes the same number of units off the\nline's queued build jobs (cancelled whole, oldest first, or reduced).\nStarted builds are left alone. Products with a parts list are refused:\ntheir builds hold parts this would not give back. Answers with the\nupdated timeline.","operationId":"useStockForOrderItem","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order item id","in":"path","name":"item_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/UseStockRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTimeline"}}},"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_item_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nothing_to_cover`: no queued builds, or no free stock; `order_not_active`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_quantity`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Fill a line from stock","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/marketplace":{"get":{"description":"The marketplace the order came from and what Mobiari does there (the NF-e,\nthe label, claims), for the order's screen. Needs only `orders.read`,\nunlike the list of marketplaces. 404 `not_marketplace_order` for an order\nthat did not come from one.","operationId":"getOrderMarketplace","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderMarketplace"}}},"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_marketplace_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 an order's marketplace","tags":["Marketplaces"]}},"/stores/{store_id}/orders/{order_id}/marketplace/invoice":{"post":{"description":"Sends the order's authorized NF-e to the marketplace the order came from.\nOn Mercado Livre this releases the label for the logistics that wait for\nit (`invoice_pending`). 409 `order_without_nfe` when the order has none;\n409 `invoice_not_accepted` with the marketplace's reason when it refuses\nthe note; 409 `invoiced_by_marketplace` when the marketplace issues it.","operationId":"sendMarketplaceInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The package, for an order the marketplace split into several (each\ngets its own NF-e and label). Required then; the order's packages are\nin the `package_required` error.","in":"query","name":"package","required":false,"schema":{"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/InvoiceSent"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_required`: the order ships in several packages"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_marketplace_order` or `not_connected`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`order_without_nfe`, `invoice_not_accepted`, `invoiced_by_marketplace`, `not_ready_to_ship` or `not_supported`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send the NF-e to the marketplace","tags":["Marketplaces"]}},"/stores/{store_id}/orders/{order_id}/marketplace/label":{"get":{"description":"The label of the order's shipment, as the marketplace the order came from\nmakes it, in PDF or ZPL. 409 `label_not_available` while the shipment is\nnot ready to print, or when its logistics have no seller label (Mercado\nLivre Full).","operationId":"getMarketplaceLabel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`pdf` (default) or `zpl`, for a Zebra thermal printer.","in":"query","name":"format","required":false,"schema":{"type":"string"}},{"description":"The package, for an order the marketplace split into several (each\ngets its own label). Required then; the order's packages are in the\n`package_required` error.","in":"query","name":"package","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"The label file"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`package_required`: the order ships in several packages"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_marketplace_order` or `not_connected`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`label_not_available`, `not_ready_to_ship` or `not_supported`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`marketplace_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Print the marketplace shipping label","tags":["Marketplaces"]}},"/stores/{store_id}/orders/{order_id}/nfe":{"post":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/AttachNfeRequest"}}},"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"]}},"/stores/{store_id}/orders/{order_id}/notes":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderNotesRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/orders/{order_id}/payments/manual":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/orders/{order_id}/refund":{"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\nPayments taken outside a gateway (cash, card machine, manual PIX) cannot\nbe refunded here; record them with `PATCH .../status` to `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.","operationId":"refundOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"$ref":"#/components/schemas/AdminRefundRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/orders/{order_id}/refunds/manual":{"post":{"description":"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 .../refund`.\n\nNeeds `orders.refund`.","operationId":"recordManualRefund","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"A unique key per refund 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/ManualRefundRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Refund"},"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"},"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_manual_payment`: nothing paid by hand is left to refund; `order_not_paid`: the order still awaits payment"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (amount below 1), `refund_exceeds_refundable` (`details.refundable_cents`) or `gift_card_partial_refund` (a gift card order is refunded whole, `details.refundable_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":"Record a manual refund","tags":["Payments"]}},"/stores/{store_id}/orders/{order_id}/returnable":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/orders/{order_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CreateReturnRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRequest"}}},"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"]}},"/stores/{store_id}/orders/{order_id}/shipping-address":{"put":{"description":"For orders made without a checkout (created in the admin, a counter sale\nswitched to delivery): the address the shipments, the freight quote, the\ncombined shipments and the NF-e recipient read. Replaces the whole address\nand leaves the contact's name, e-mail, phone and document alone. Refused\nonce a shipment of the order is booked, because the carrier already has the\nold address, or while the order is in a combined shipment (separate it first). A\nquote already made for a draft shipment is dropped, since it was for the old\ndestination. Needs `orders.edit`.","operationId":"setOrderShippingAddress","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetShippingAddressRequest"}}},"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":"`shipment_booked`: a shipment of the order is already booked; `shipment_combined`: the order is in a combined shipment"},"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 an order's delivery address","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/status":{"patch":{"description":"Moves the order by hand. Allowed moves (also in the order's\n`allowed_status_transitions`):\n\n| From | To |\n| --- | --- |\n| `draft` | `pending`, `paid`, `cancelled` |\n| `pending` | `paid`, `fulfilled`, `cancelled` |\n| `paid` | `fulfilled`, `cancelled`, `refunded` |\n| `fulfilled` | `cancelled`, `refunded` |\n| `cancelled`, `refunded` | nothing (terminal) |\n\nSetting the current status again is a no-op that returns the order, so\na retried call is safe. Any other move answers 409\n`invalid_status_transition` with `details.from`, `details.to` and\n`details.allowed`.\n\nSide effects: `cancelled` and `refunded` release reserved stock and\ncancel open production; nothing is refunded (use `POST .../cancel` with\n`refund`, or `POST .../refund`). `fulfilled` closes the order by hand:\nrefused with 409 `order_has_active_shipment` while a shipment is under\nway (the shipments close the order when they are delivered); it consumes\nthe stock, sets `fulfillment_status` to `fulfilled`, schedules the review\nrequest and, when the order has no shipment at all, announces\n`orders.shipped` (the \"Pedido enviado\" e-mail). `paid` records a payment\nby hand for what is still owed, as `POST .../payments/manual` with method\n`other` does (prefer that endpoint: it says how and when). `refunded` here\nonly records that money went back outside the platform. Shipping is not a\nstatus: it follows the shipments. Every change is kept in the order's\n`status_history`. Emits the `orders.updated` webhook and the matching\n`orders.paid` / `orders.fulfilled` / `orders.cancelled` /\n`orders.refunded` event.\n\nNeeds `orders.cancel` to cancel, `orders.refund` to mark refunded,\n`orders.manage_payments` to mark paid, `orders.fulfill` to fulfil, and\n`orders.edit` otherwise.","operationId":"updateOrderStatus","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderStatusRequest"}}},"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` (see the table), `order_has_active_shipment` (fulfilled while a shipment booked with a carrier that reports back is under way; drafts and hand-carried shipments do not count), `marketplace_order`, or `inventory_conflict` when reservations could not be released or consumed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`charge_not_voided`: cancelling an unpaid order whose open charge (a PIX code) could not be voided at the gateway; nothing changed"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Change an order's status","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/switch-to-delivery":{"post":{"description":"For a customer who chose \"Retirada na loja\" and whose order will leave\nwith another one after all. The order becomes a delivery order (the pickup\nlocation is dropped) and its draft shipment, made if there is none, loses\nthe pickup plan, so it can be combined with the other order's shipment.\nRefused once anything was handed over.","operationId":"switchOrderToDelivery","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"The order's draft shipment"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_pickup`, `order_closed`, `already_handed_over` or `combined_pickup`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Switch a pickup order to delivery","tags":["Shipments"]}},"/stores/{store_id}/orders/{order_id}/test":{"patch":{"description":"Test orders are hidden from the order list (unless `include_test=true`)\nand from reports. Payments, refunds and stock are not touched.","operationId":"setOrderTestFlag","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderTestRequest"}}},"required":true},"responses":{"204":{"description":"Flag set"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Flag an order as test data","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/timeline":{"get":{"description":"Where each line of the order stands: ordered, parts (made-to-order lines\nwith a parts list), production (made-to-order lines), shipped and\ndelivered, each done, current, blocked or ahead, with dates. Also the\nfacts behind it: build jobs, the parts the queued builds need with the\npurchase orders bringing them, and free stock.","operationId":"getOrderTimeline","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Order id","in":"path","name":"order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTimeline"}}},"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":"Order timeline","tags":["Orders"]}},"/stores/{store_id}/orders/{order_id}/unshipped-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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/pages":{"get":{"description":"The store's content pages, newest first.","operationId":"listStorefrontPages","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only published (`true`) or only draft (`false`) pages.","in":"query","name":"published","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StorefrontPage"}}},"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 pages","tags":["Storefront"]},"post":{"operationId":"createStorefrontPage","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateStorefrontPageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPage"}}},"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":"`page_slug_taken`: another page of the store has this slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty or too long title, slug or template"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 page","tags":["Storefront"]}},"/stores/{store_id}/pages/{page_id}":{"delete":{"operationId":"deleteStorefrontPage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page id","in":"path","name":"page_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 page 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 page","tags":["Storefront"]},"get":{"operationId":"getStorefrontPage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page id","in":"path","name":"page_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPage"}}},"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 page 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 page","tags":["Storefront"]},"put":{"description":"Changes the fields sent; absent or null fields keep their value, so\n`content` and `template` cannot be cleared through this call (send an\nempty string instead).","operationId":"updateStorefrontPage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page id","in":"path","name":"page_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStorefrontPageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPage"}}},"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 page in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`page_slug_taken`: another page of the store has this slug"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty or too long title, slug or template"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 page","tags":["Storefront"]}},"/stores/{store_id}/payables":{"get":{"description":"Open ones first by due date; paid and cancelled ones newest due first.","operationId":"listPayables","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/payables/summary":{"get":{"operationId":"getPayablesSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayablesSummary"}}},"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":"Summarise payables","tags":["Purchasing"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/payment-providers":{"get":{"description":"The store's configured gateways, the default first. Secret settings\n(access tokens, webhook secrets) come back as a mask; send the mask back\nunchanged on update to keep the stored value.","operationId":"listPaymentProviders","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_PaymentProvider"}}},"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 payment providers","tags":["Payments"]},"post":{"description":"Stores a gateway's settings for the store. `is_default: true` makes it\nthe default and clears the flag on the others.","operationId":"createPaymentProvider","parameters":[{"description":"Store id","in":"path","name":"store_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/CreatePaymentProviderRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProvider"}}},"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":"`payment_provider_exists`: the store already has this gateway"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect a payment provider","tags":["Payments"]}},"/stores/{store_id}/payment-providers/catalog":{"get":{"description":"Every gateway the platform supports, with the payment methods it offers\nand the fields its connect form needs. A small fixed list, not paged.","operationId":"listPaymentProviderCatalog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentProviderMeta"},"type":"array"}}},"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 payment gateway catalog","tags":["Payments"]}},"/stores/{store_id}/payment-providers/mercado-pago/authorize":{"post":{"description":"The Mercado Pago address to open: the store logs in, authorizes\nMobiari, and comes back to the integrations settings connected.","operationId":"authorizeMercadoPago","parameters":[{"description":"Store id","in":"path","name":"store_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/MercadoPagoAuthorizeUrl"}}},"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":"`mercado_pago_connect_not_configured`: this server has no Mercado Pago application"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting Mercado Pago","tags":["Payments"]}},"/stores/{store_id}/payment-providers/mercado-pago/complete":{"post":{"description":"Saves the credentials of a connection this same person started for\nthis store in the last minutes. Anyone else (another admin, another\nstore) gets 404.","operationId":"completeMercadoPagoConnect","parameters":[{"description":"Store id","in":"path","name":"store_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/CompleteMercadoPagoConnect"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MercadoPagoConnectStatus"}}},"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":"`attempt_not_found`: no pending connection of this person for 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":"Finish connecting Mercado Pago","tags":["Payments"]}},"/stores/{store_id}/payment-providers/mercado-pago/connect":{"get":{"operationId":"getMercadoPagoConnect","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MercadoPagoConnectStatus"}}},"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 Mercado Pago connect status","tags":["Payments"]}},"/stores/{store_id}/payment-providers/{provider_id}":{"put":{"description":"Omitted fields are kept. `config_json` is merged into the stored\nsettings; a secret sent back as the mask keeps its stored value.","operationId":"updatePaymentProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Payment provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentProviderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProvider"}}},"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 provider 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":"Update a payment provider","tags":["Payments"]}},"/stores/{store_id}/payment-providers/{provider_id}/health":{"get":{"description":"Reports whether the provider's required settings are all present (from\nthe gateway's registry spec). It does not call the gateway.","operationId":"checkPaymentProviderHealth","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Payment provider id","in":"path","name":"provider_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProviderHealth"}}},"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 provider 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":"Check a payment provider","tags":["Payments"]}},"/stores/{store_id}/pipelines":{"get":{"description":"Every pipeline with its stages in order. A store's first reading creates\nthe default \"Vendas\" pipeline.","operationId":"listPipelines","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Pipeline"},"type":"array"}}},"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":"Store id","in":"path","name":"store_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/PipelineCreateRequest"}}},"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"]}},"/stores/{store_id}/pipelines/{pipeline_id}":{"get":{"description":"With its stages in order.","operationId":"getPipeline","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Pipeline id","in":"path","name":"pipeline_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineUpdateRequest"}}},"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"]}},"/stores/{store_id}/platform-documents":{"get":{"description":"The documents Mobiari asks stores to sign, and whether this store\nsigned each one.","operationId":"listPlatformDocuments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlatformDocument"},"type":"array"}}},"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":"Documents from Mobiari","tags":["Documents"]}},"/stores/{store_id}/platform-documents/{key}/preview":{"get":{"description":"The PDF of its current version with this store's data (a draft is\nmarked as such).","operationId":"previewPlatformDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document key","in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"The 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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`platform_document_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 a document from Mobiari","tags":["Documents"]}},"/stores/{store_id}/platform-documents/{key}/sign":{"post":{"description":"Only the store's owner, signed in (not with an API token). Files the\nsigned copy in the store's library (folder \"Mobiari\"), sealed with the\nstore's A1 certificate when it has one.","operationId":"signPlatformDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Document key","in":"path","name":"key","required":true,"schema":{"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/PlatformSignInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformDocument"}}},"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":"`owner_only`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`platform_document_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_in_force` (a draft), `version_changed`, `already_signed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`consent_required`, `invalid_signature`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sign a document from Mobiari","tags":["Documents"]}},"/stores/{store_id}/popups":{"get":{"description":"Newest first, each with its numbers: views, signups, coupons used and\nthe paid revenue of the orders that used them.","operationId":"listStorePopups","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StorePopup"}}},"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 popups","tags":["Popups"]},"post":{"description":"With a template code, each signup gets its own single-use copy of it,\nkept in a batch made for the popup.","operationId":"createStorePopup","parameters":[{"description":"Store id","in":"path","name":"store_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/StorePopupInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePopup"}}},"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` with the fields to fix in `details`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 popup","tags":["Popups"]}},"/stores/{store_id}/popups/{popup_id}":{"delete":{"description":"Its signups go with it; the customers, their consents and the coupons\nalready handed out stay.","operationId":"deleteStorePopup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Popup id","in":"path","name":"popup_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":"`popup_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 popup","tags":["Popups"]},"get":{"operationId":"getStorePopup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Popup id","in":"path","name":"popup_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePopup"}}},"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":"`popup_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 popup","tags":["Popups"]},"put":{"description":"Send every field. Changing the template code starts a new batch; the\ncoupons already handed out keep working.","operationId":"updateStorePopup","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Popup id","in":"path","name":"popup_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePopupInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePopup"}}},"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":"`popup_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` with the fields to fix in `details`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 popup's settings","tags":["Popups"]}},"/stores/{store_id}/pos/devices":{"get":{"operationId":"listPosDevices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PosDevice"},"type":"array"}}},"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 POS devices","tags":["Sales Channels"]},"post":{"description":"Registers a terminal against one POS and returns its one-time pairing code\n(valid for 15 minutes). Needs `stores.write`.","operationId":"createPosDevice","parameters":[{"description":"Store id","in":"path","name":"store_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/CreatePosDevice"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosDevicePairing"}}},"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`: no name, or the channel is not an active POS of the 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":"Add a POS device","tags":["Sales Channels"]}},"/stores/{store_id}/pos/devices/{device_id}":{"delete":{"description":"The terminal and every operator session opened on it are refused at once.","operationId":"revokePosDevice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"POS device id","in":"path","name":"device_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":"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":"Revoke a POS device","tags":["Sales Channels"]}},"/stores/{store_id}/pos/devices/{device_id}/pairing-code":{"post":{"description":"For a terminal that was reset or replaced: the credential it holds stops\nworking and a new code (15 minutes) pairs it again.","operationId":"createPosDevicePairingCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"POS device id","in":"path","name":"device_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/PosDevicePairing"}}},"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":"New pairing code for a device","tags":["Sales Channels"]}},"/stores/{store_id}/pos/fiscal":{"get":{"operationId":"getPosFiscal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS (a `pos` sales channel): its sales are invoiced by the issuer\nof its location or its own, else by the store's default issuer.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosFiscal"}}},"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":"Whether the POS can issue the NFC-e for its sales.","tags":["Sales Channels"]}},"/stores/{store_id}/pos/kiosk-settings":{"get":{"operationId":"getPosKioskSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosKioskSettings"}}},"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":"The kiosk look of a store","tags":["Sales Channels"]},"put":{"description":"Every kiosk of the store picks it up the next time it opens a session (a\nfew hours at most). Blank fields go back to the stock look.","operationId":"setPosKioskSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosKioskSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosKioskSettings"}}},"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 kiosk look of a store","tags":["Sales Channels"]}},"/stores/{store_id}/pos/kiosk/cancel":{"post":{"description":"For a self-checkout kiosk's session: the sales it rang up that are still\nunpaid end (stock released, the Pix charge voided). The kiosk calls it when\na customer cancels or walks away. A sale already paid is untouched.","operationId":"cancelPosKioskSales","parameters":[{"description":"Store id","in":"path","name":"store_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/CancelKioskSales"}]}}},"description":"The sale to end; empty ends all unpaid ones"},"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":"`kiosk_only`: not a kiosk session"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the kiosk's unpaid sales","tags":["Sales Channels"]}},"/stores/{store_id}/pos/operators":{"get":{"operationId":"listPosOperators","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PosOperator"},"type":"array"}}},"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":"Team members and whether they have a POS PIN","tags":["Sales Channels"]}},"/stores/{store_id}/pos/operators/{user_id}/pin":{"delete":{"operationId":"removePosPin","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Member id","in":"path","name":"user_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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 member's POS PIN","tags":["Sales Channels"]},"put":{"description":"A member sets their own; setting someone else's needs `users.edit`. A new PIN\nalso clears a lock.","operationId":"setPosPin","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Member id","in":"path","name":"user_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPosPin"}}},"required":true},"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":"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":"Set a member's POS PIN","tags":["Sales Channels"]}},"/stores/{store_id}/pos/sales":{"get":{"description":"The sales of a point of sale that are parked (put aside), open or\nwaiting for their Pix, newest first.","operationId":"listPosSales","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The point of sale.","in":"query","name":"sales_channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"`open`, `parked`, `recording` or `awaiting_pix`; parked when left out.","in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"description":"Only the sales the caller started (a screen picking up where it was).","in":"query","name":"mine","required":false,"schema":{"type":["boolean","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PosSaleSummary"},"type":"array"}}},"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","tags":["Orders"]},"post":{"description":"Opens a sale at a point of sale, empty or from a saved quote (its lines\nat the quoted prices, its discount, its customer).","operationId":"createPosSale","parameters":[{"description":"Store id","in":"path","name":"store_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/PosSaleCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"`quote_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No point of sale (`pos_channel_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":"Start a sale","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}":{"get":{"description":"Everything about a sale, worked out now: lines and totals, payments\ntaken and what is left, problems that stop it being charged, the point\nof sale's rules, the order and its Pix, and every action with whether it\nis allowed now (and why not).","operationId":"getPosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"`pos_sale_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 sale","tags":["Orders"]},"patch":{"description":"Its customer (or a receipt document, or \"sem contato\"), its own\ndiscount, the discount code, delivery or pickup, the addresses and the\nnote. A receipt CPF/CNPJ that is exactly one customer's, with nobody\nattached, attaches that customer (the sale then earns their points and\ncashback). Refused once a payment is taken.","operationId":"updatePosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSaleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"The sale takes no edits now"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"A field out of range, an unknown customer, a freight the manual sale would refuse"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 sale","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/cancel":{"post":{"description":"One without payments taken (void them first).","operationId":"cancelPosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"Not allowed now; `code` says why"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 sale","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/credit-payments":{"post":{"description":"Spends the attached customer's wallet (`wallet: true`) or a gift card\n(`gift_card_code`) as one payment of the sale, at once: the balance is\ntaken now and given back if the payment is voided. A gift card sale cannot\nbe paid with credit.","operationId":"takePosSaleCreditPayment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSaleCreditPaymentCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"Not allowed now; `code` says why (`problem`, `drawer_closed`, `paid_in_full`…)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`customer_required`, `gift_card_not_found` (and the other gift card refusals), `credit_empty`, `credit_on_gift_cards`, `payment_over_total`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pay with store credit or a gift card","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/finish":{"post":{"description":"With what is left at zero: the payments taken become the order's, the\norder is recorded as `POST .../orders/manual` records it (stock, cash\nshift, `orders.paid`), and the sale is done. Finishing again returns the\nsame order.","operationId":"finishPosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"Not allowed now (`not_paid_in_full`, `problem`…), or the manual sale's 409s (`insufficient_stock`…)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The manual sale's 422s"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Finish a sale","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/lines":{"post":{"description":"At the catalog's price now (kept on the line: the order charges what the\nscreen showed). The same variant on a line without its own discount or\nprice gains the quantity instead.","operationId":"addPosSaleLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSaleLineCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"The sale takes no edits now (`payments_taken`, `done`, `parked`…)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`gift_card_cart_mixed` (gift cards are sold apart from goods) or a bad quantity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 item","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/lines/{line_id}":{"delete":{"operationId":"removePosSaleLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The line's id","in":"path","name":"line_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"The sale takes no edits now"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 line","tags":["Orders"]},"patch":{"operationId":"updatePosSaleLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The line's id","in":"path","name":"line_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSaleLineUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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 line"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The sale takes no edits now"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 line","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/park":{"post":{"description":"Put it aside to serve someone else; it is listed as parked and resumed later.","operationId":"parkPosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"Not allowed now; `code` says why"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Park a sale","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/payments":{"post":{"description":"Written the moment it is taken. Refused while the sale has a problem\n(a discount over the ceiling, an invalid code, no contact), with the\ndrawer closed on a POS that keeps cash, past what is left (cash gives\nchange instead) and past six payments.","operationId":"takePosSalePayment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSalePaymentCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"Not allowed now; `code` says why (`problem`, `drawer_closed`, `paid_in_full`…)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`payment_method_not_allowed`, `payment_over_total`, `use_pix_qr`, a card detail that does not fit"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Take a payment","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/payments/{payment_id}":{"delete":{"description":"Before the sale is finished: the payment is given back and taken off.","operationId":"voidPosSalePayment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The payment's id","in":"path","name":"payment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSale"}}},"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":"Not allowed now"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 payment","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/pix":{"post":{"description":"The whole sale, through the store's gateway: the order is recorded\npending with its QR code, and the sale waits for it (`awaiting_pix`).\nWhen the bank confirms the sale is done; when the charge is cancelled or\nexpires it is open again.","operationId":"chargePosSalePix","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"Not allowed now (`split`, `problem`, `not_allowed`…)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`pix_intent_failed` and the manual sale's 422s"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 sale by Pix","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/pix/cancel":{"post":{"description":"The charge is voided and its order cancelled (stock back), unless it\nwas paid meanwhile; the sale is open again to be paid another way.","operationId":"cancelPosSalePix","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"`no_pix`, or `pix_not_cancelled`: paid meanwhile or the gateway did not 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":"Cancel the Pix charge","tags":["Orders"]}},"/stores/{store_id}/pos/sales/{sale_id}/resume":{"post":{"operationId":"resumePosSale","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The POS sale's id","in":"path","name":"sale_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/PosSale"}}},"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":"Not allowed now; `code` says why"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Resume a parked sale","tags":["Orders"]}},"/stores/{store_id}/postal-codes/{postal_code}":{"get":{"description":"The street, neighborhood, city and state of a Brazilian postal code, so\na form asks only for the CEP, the number and the complement.","operationId":"lookupPostalCode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"CEP, with or without the dash","in":"path","name":"postal_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostalCodeAddress"}}},"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":"`postal_code_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_postal_code`: not 8 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"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`postal_code_lookup_unavailable`: the lookup service did not answer; type the address"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Look up a CEP","tags":["Customers"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]},"put":{"description":"Writes each price (a variant, from a quantity up); `price_cents: null` removes one. All or nothing.","operationId":"setPriceListPrices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/price-lists/{price_list_id}/prices/export":{"get":{"description":"A CSV (`;`, UTF-8 with BOM, opens in Excel) with every variant of the store: one line per price of its own\n(quantity tiers on their own lines), or one line with an empty price when the list prices it by its percent. Fill\nin the prices and import it back.","operationId":"exportPriceListPrices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Price list id","in":"path","name":"price_list_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{}},"description":"The CSV 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":"`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":"Export a list's prices","tags":["Discounts"]}},"/stores/{store_id}/price-lists/{price_list_id}/prices/import":{"post":{"description":"Reads a CSV like the export's. Each variant in the file keeps exactly the prices the file gives it (a line with an\nempty price leaves it to the list's percent); variants not in the file are left as they are. Lines that cannot be\nread are reported and skipped; the rest is saved.","operationId":"importPriceListPrices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Price list id","in":"path","name":"price_list_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/PriceListImport"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListImportResult"}}},"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`: no header, no price or variant column, or more than 20000 lines"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 list's prices","tags":["Discounts"]}},"/stores/{store_id}/pricing/quotes":{"post":{"description":"What each amount costs by card and by PIX, and the installments it\nallows, with the store's automatic discounts: the same calculation the\ncart and checkout use. For showing prices outside a cart.","operationId":"quotePrices","parameters":[{"description":"Store id","in":"path","name":"store_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/PriceQuoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PriceQuote"},"type":"array"}}},"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`: more than 200 amounts or a negative 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":"Price amounts","tags":["Discounts"]}},"/stores/{store_id}/privacy-requests":{"get":{"description":"Requests customers made from their account, open ones first by due date\n(15 days after the request).","operationId":"listPrivacyRequests","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`open` (default), `done`, `rejected` or `all`.","in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PrivacyRequest"},"type":"array"}}},"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 LGPD requests","tags":["Customers"]}},"/stores/{store_id}/privacy-requests/{request_id}":{"patch":{"description":"Marks it done or rejected with what was done (for a deletion, erase the\ncustomer's data first), or opens it again.","operationId":"updatePrivacyRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Request id","in":"path","name":"request_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyRequestUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyRequest"}}},"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 request in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown status, or a refusal without a reason"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Answer an LGPD request","tags":["Customers"]}},"/stores/{store_id}/product-categories":{"delete":{"operationId":"removeProductFromCategory","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCategoryRequest"}}},"required":true},"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`, `category_not_found`, or `not_found` when the product is not in the category"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 category","tags":["Categories"]},"post":{"description":"Idempotent.","operationId":"addProductToCategory","parameters":[{"description":"Store id","in":"path","name":"store_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/ProductCategoryRequest"}}},"required":true},"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`, `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":"Add a product to a category","tags":["Categories"]}},"/stores/{store_id}/product-feeds":{"get":{"operationId":"listProductFeeds","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductFeed"}}},"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 product feeds","tags":["Product Feeds"]},"post":{"description":"The feed gets its public URL (`endpoint_url`). A `generated` feed has\nno content until the first `POST .../generate`.","operationId":"createProductFeed","parameters":[{"description":"Store id","in":"path","name":"store_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/ProductFeedCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeed"}}},"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 product feed","tags":["Product Feeds"]}},"/stores/{store_id}/product-feeds/{feed_id}":{"delete":{"description":"Deletes its overrides too; the public URL stops answering. Emits the\n`product_feed.deleted` webhook.","operationId":"deleteProductFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_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":"`feed_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 feed","tags":["Product Feeds"]},"get":{"operationId":"getProductFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeed"}}},"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":"`feed_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 feed","tags":["Product Feeds"]},"put":{"operationId":"updateProductFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeedUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeed"}}},"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":"`feed_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 feed","tags":["Product Feeds"]}},"/stores/{store_id}/product-feeds/{feed_id}/generate":{"post":{"description":"Builds the feed from the store's active products now, stores it as the\nfeed's content (served at `endpoint_url`) and returns it: XML for\nGoogle, CSV for Meta and OMNIFEED, JSON for custom feeds.","operationId":"generateProductFeed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_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":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"The generated 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":"`feed_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":"Generate a product feed","tags":["Product Feeds"]}},"/stores/{store_id}/product-feeds/{feed_id}/overrides":{"get":{"operationId":"listProductFeedOverrides","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductFeedOverride"}}},"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":"`feed_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 feed's overrides","tags":["Product Feeds"]},"post":{"operationId":"createProductFeedOverride","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_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/ProductFeedOverrideCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeedOverride"}}},"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":"`feed_not_found`, `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":"Create a feed override","tags":["Product Feeds"]}},"/stores/{store_id}/product-feeds/{feed_id}/overrides/{override_id}":{"delete":{"operationId":"deleteProductFeedOverride","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Override id","in":"path","name":"override_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":"`feed_not_found`, `override_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 feed override","tags":["Product Feeds"]},"put":{"operationId":"updateProductFeedOverride","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Feed id","in":"path","name":"feed_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Override id","in":"path","name":"override_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeedOverrideUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFeedOverride"}}},"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":"`feed_not_found`, `override_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 a feed override","tags":["Product Feeds"]}},"/stores/{store_id}/product-imports":{"post":{"description":"Reads the file (CSV, XLSX, XLS or ODS; the first sheet; the first row is\nthe header), keeps it for the preview and the run, and returns its\ncolumns with sample values, a suggested target for each column and the\nmapping this store last used for the same columns. Nothing is imported\nyet.","operationId":"uploadProductImport","parameters":[{"description":"Store id","in":"path","name":"store_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/ProductImportUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportUpload"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: malformed upload or no `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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_sheet`: the file could not be read, is empty, or is too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 spreadsheet to import","tags":["Products"]}},"/stores/{store_id}/product-imports/from-url":{"post":{"description":"Downloads the sheet (shared as \"Anyone with the link\") and keeps it as\nan upload does: the answer and every next step are the upload's.","operationId":"uploadProductImportFromUrl","parameters":[{"description":"Store id","in":"path","name":"store_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/SheetLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportUpload"}}},"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_sheet_link`: not a Google Sheets link; `sheet_not_shared`: Google asked to sign in (share the sheet as \"Anyone with the link\"); `invalid_sheet`: the file could not be read, is empty, or is too large"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sheet_download_failed`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Import a spreadsheet from a Google Sheets link","tags":["Products"]}},"/stores/{store_id}/product-imports/template":{"get":{"description":"A CSV (`;`, UTF-8 with BOM, opens in Excel) with every column the\nimport knows and two example products: one with color variations, one\nmade to order.","operationId":"productImportTemplate","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/csv":{}},"description":"The CSV 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"The import template","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}":{"get":{"operationId":"getProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImport"}}},"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":"`import_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":"An import's progress and result","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}/ai-fixes":{"post":{"description":"For the values the preview of `mapping` cannot read (minus `skip`) (a price with words,\na weight with its unit, an unknown status), asks the model for the same\nvalue written the way the import reads it. Each proposal is checked\nagainst the import's own reading and lists every row with that value;\nnothing changes until the cells are saved.","operationId":"aiFixProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_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/ProductImportAiFixRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportAiFixes"}}},"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":"`import_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: one target per column, each field from one column"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_error`: the model failed or answered something unusable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: no model configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Fix unreadable values with AI","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}/ai-mapping":{"post":{"description":"Asks the model for a target for each column from its header and sample\nvalues, starting from the name-based suggestion, with why for each\ncolumn it answered. A proposal: nothing is saved until a preview or a\nrun uses it.","operationId":"aiMapProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_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/ProductImportAiMapping"}}},"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":"`import_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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_error`: the model failed or answered something unusable"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: no model configured on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Map the columns with AI","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}/apply":{"post":{"description":"Imports the products the preview of `mapping` would (products with an\nerror are left out), in the background: poll `GET` for progress and the\nresult. Each product is written whole or not at all; images are fetched\nafter their product. Running it again updates what already came in\n(matched by SKU) instead of duplicating it.","operationId":"applyProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_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/ProductImportMapping"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImport"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`import_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: this import is already running"},"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":"Run an import","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}/cells":{"patch":{"description":"Replaces the values of the given cells in the uploaded sheet; the next\npreview and the run read the new values. Not while the import runs.","operationId":"editProductImportCells","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportCellEdits"}}},"required":true},"responses":{"204":{"description":"The cells were saved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`import_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`import_running`: this import is running"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a row or column outside the sheet, or too many edits"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Correct cells of an import","tags":["Products"]}},"/stores/{store_id}/product-imports/{import_id}/preview":{"post":{"description":"Applies `mapping` to the uploaded rows without writing anything: which\nproducts would be created and which updated (matched by SKU in the\nstore), and every error and warning by row. A product with an error is\nleft out of the run. The mapping is remembered for sheets with the same\ncolumns.","operationId":"previewProductImport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Import id","in":"path","name":"import_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/ProductImportMapping"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImportPreview"}}},"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":"`import_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: one target per column, each field from one column"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview an import","tags":["Products"]}},"/stores/{store_id}/production-orders":{"get":{"description":"The OPs still in production, plus shipped and cancelled ones active in\nthe last `done_days` days, oldest promise first. Each carries its stage\n(the least advanced among its lines), lines and missing parts.","operationId":"listProductionOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only the OP of this order (whatever its stage).","in":"query","name":"order_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Keep shipped and cancelled OPs active in the last N days. Defaults\nto 7; 0 lists only OPs still in production.","in":"query","name":"done_days","required":false,"schema":{"format":"int32","type":"integer"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductionOrderSummary"}}},"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 production orders","tags":["Manufacturing"]}},"/stores/{store_id}/production-orders/{production_order_id}":{"get":{"description":"The OP with its jobs (live parts readiness included), the parts its\nqueued jobs still need with what purchase orders are bringing, and its\nfeed.","operationId":"getProductionOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Production order id","in":"path","name":"production_order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderDetail"}}},"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":"`production_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 production order","tags":["Manufacturing"]},"patch":{"description":"Sets the date promised for the whole OP, or clears it to follow the\nlatest job target again. Recorded in the feed.","operationId":"updateProductionOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Production order id","in":"path","name":"production_order_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderDetail"}}},"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":"`production_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":"Update a production order","tags":["Manufacturing"]}},"/stores/{store_id}/production-orders/{production_order_id}/comments":{"post":{"description":"Adds a note to the OP's feed, signed by the caller. Internal: customers\ndo not see it.","operationId":"addProductionOrderComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Production order id","in":"path","name":"production_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/ProductionOrderCommentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderEvent"}}},"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":"`production_order_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_comment`: empty or over 4000 characters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Comment on a production order","tags":["Manufacturing"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductListItem"}}},"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":"Store id","in":"path","name":"store_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/ProductCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetail"}}},"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"]}},"/stores/{store_id}/products/dedupe-drafts":{"post":{"description":"For each group of drafts sharing a title (case-insensitive), keeps the\nmost recently updated one and deletes the rest; a draft sharing its\ntitle with a product on sale is deleted too (the live product stays).\nDrafts that orders reference are kept. `dry_run=true` only counts.","operationId":"dedupeDraftProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only count what would happen.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"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/DedupeDraftsResult"}}},"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":"Remove duplicate drafts","tags":["Products"]}},"/stores/{store_id}/products/purge-archived":{"post":{"description":"Products that orders reference are kept and listed in\n`skipped_due_to_orders`. `dry_run=true` only counts.","operationId":"purgeArchivedProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only count what would happen.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"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/PurgeResult"}}},"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":"Delete every archived product","tags":["Products"]}},"/stores/{store_id}/products/purge-drafts":{"post":{"description":"Products that orders reference are kept and listed in\n`skipped_due_to_orders`. `dry_run=true` only counts.","operationId":"purgeDraftProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only count what would happen.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},{"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/PurgeResult"}}},"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":"Delete every draft product","tags":["Products"]}},"/stores/{store_id}/products/same-title":{"get":{"description":"The store's products (any status) whose title equals `title`, ignoring\ncase, so a screen can warn before a duplicate is created.","operationId":"findProductsWithTitle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The title to look for, compared ignoring case and surrounding spaces.","in":"query","name":"title","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SameTitleProduct"},"type":"array"}}},"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":"Find products with a title","tags":["Products"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetail"}}},"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"]},"put":{"description":"Partial: omitted fields keep their value. Send `{\"status\": \"archived\"}`\nto archive. Prices live on the variants (`PUT /stores/{store_id}/variants/{variant_id}`).\nThe slug is not changed here; use `PATCH .../slug`. Emits the\n`products.updated` webhook and purges the product's storefront cache.","operationId":"updateProduct","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetail"}}},"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"]}},"/stores/{store_id}/products/{product_id}/base-bom":{"get":{"description":"Lines shared by every variant of the product. A variant's own line for\nthe same part wins over the base line.","operationId":"listProductBaseBom","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_BomLine"}}},"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 base bill of materials","tags":["Manufacturing"]},"post":{"description":"Adds a part every variant of the product needs, or changes its quantity.\nThe part cannot be one of the product's own variants.","operationId":"setProductBaseBomLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/BomLineRequest"}}},"required":true},"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":"`product_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `component_not_in_store`, `bom_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":"Set a base bill-of-materials line","tags":["Manufacturing"]}},"/stores/{store_id}/products/{product_id}/base-bom/{component_variant_id}":{"delete":{"operationId":"deleteProductBaseBomLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The part's variant id","in":"path","name":"component_variant_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":"`product_not_found`, `bom_line_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 base bill-of-materials line","tags":["Manufacturing"]}},"/stores/{store_id}/products/{product_id}/bought-together":{"get":{"description":"The products the product page offers with it (\"compre junto\"): the\nmerchant's companions, else what is bought with it most often, and the\ndiscount on the set.","operationId":"getProductBundle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBundleSettings"}}},"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":"A product's compre junto","tags":["Products"]},"put":{"description":"Replaces the companions (up to 3 other products of the store) and the\ndiscount on the set. The discount is a `bundle` automatic discount named\nafter the product, created, changed or deleted here (it also lists under\nthe store's discounts); it needs `discounts.write`.","operationId":"setProductBundle","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBundleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBundleSettings"}}},"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`: more than 3 companions, the product itself, a product of another store, or a discount 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 a product's compre junto","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/categories":{"get":{"operationId":"listProductCategories","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"},"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 categories","tags":["Categories"]}},"/stores/{store_id}/products/{product_id}/collections":{"get":{"operationId":"listProductCollections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"},"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 collections","tags":["Collections"]}},"/stores/{store_id}/products/{product_id}/custom-fields":{"patch":{"description":"Merges into what the product has: keys not sent keep their value, `null`\nclears one (a `required` field cannot be cleared). Unknown keys and\nvalues of the wrong kind are refused together, by key, with\n`validation_failed`. Returns every value the product now has.","operationId":"setProductCustomFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldValues"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The product's values by field key"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 message per key"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 custom field values","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/digital-delivery":{"delete":{"operationId":"removeProductDigitalDelivery","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/products/{product_id}/dropship":{"get":{"operationId":"getProductDropship","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProductDropshipVariant"},"type":"array"}}},"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":"Who ships each variant of a product","tags":["Dropshipping"]}},"/stores/{store_id}/products/{product_id}/gift-card":{"get":{"operationId":"getProductGiftCard","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGiftCardProduct"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductImageWithVariants"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ImageUploadResponse"}}},"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"]}},"/stores/{store_id}/products/{product_id}/images/associate":{"post":{"description":"Copies an image from the tenant's file library into the product's\ngallery, with resized renditions.","operationId":"associateFileWithProduct","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/AssociateFileRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}},"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`, `variant_not_found`, or `file_not_found` (not in the store's tenant)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_not_image`: the file is not an image; `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":"Add a library file to a product's gallery","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/images/reorder":{"put":{"operationId":"reorderProductImages","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderProductImagesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProductImageWithVariants"},"type":"array"}}},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"gallery_changed"},"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":"Reorder a product's gallery","tags":["Products"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/UpdateProductImageRequest"}}},"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"]}},"/stores/{store_id}/products/{product_id}/images/{image_id}/file":{"put":{"operationId":"replaceProductImageFile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReplaceProductImageFileRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImageWithVariants"}}},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"image_changed"},"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":"Replace a product image from the file library","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/license-keys":{"get":{"operationId":"getProductLicenseKeys","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/products/{product_id}/marketplace-publications":{"get":{"description":"Every publication of the product, on every marketplace the store is connected to.","operationId":"listProductMarketplacePublications","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMarketplacePublications"}}},"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":"A product's marketplace listings","tags":["Marketplaces"]}},"/stores/{store_id}/products/{product_id}/model-studio":{"delete":{"description":"Puts back the model the 3D studio replaced and forgets the studio's\nsettings. A product the studio never changed is returned as it is.","operationId":"restoreProductModel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStudioResult"}}},"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 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":"Restore the original 3D model","tags":["Products"]},"post":{"description":"Stores the exported GLB in the media library (textures re-encoded:\nopaque PNG as JPEG, nothing over 2048 px) and makes it the product's\nmodel. The model it replaces is kept as `model_source_url`.","operationId":"saveProductModelStudio","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ModelStudioForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStudioResult"}}},"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 in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`no_model`: the product has no model to edit; `invalid_model`: not a GLB; `validation_failed`: no `file` 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":"Save the 3D studio's model","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/model-studio/source":{"get":{"description":"The original export while the product's model is the studio's output,\notherwise the current model: the file itself, whether or not it is\npublic yet (a draft product's files are not). 404 `external_model` when\nthe model is not a file of this store's library (the studio then loads\nits URL directly).","operationId":"getProductModelStudioSource","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"model/gltf-binary":{"schema":{"items":{"format":"int32","minimum":0,"type":"integer"},"type":"array"}}},"description":"The GLB"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_model`, `external_model`, or 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":"Download the model the 3D studio edits","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/option-groups":{"get":{"description":"In display order, each with its values.","operationId":"listOptionGroups","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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. Variants the product already has get a value of it when\nvariants are generated again (`POST .../variants/generate`). 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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/products/{product_id}/sales-channels":{"get":{"operationId":"getProductSalesChannels","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"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 sales channels","tags":["Products"]},"put":{"description":"`all: true` shows it on every channel; otherwise only on\n`sales_channel_ids`.","operationId":"setProductSalesChannels","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelAssignment"}}},"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`, `sales_channel_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":"Set a product's sales channels","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/shipping-profile":{"get":{"description":"The default for every variant of the product without its own profile.","operationId":"getProductShippingProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileView"}}},"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 shipping profile","tags":["Freight"]},"put":{"description":"The default for its variants. `mode: null` removes it.","operationId":"setProductShippingProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileView"}}},"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":"Set a product's shipping profile","tags":["Freight"]}},"/stores/{store_id}/products/{product_id}/slug":{"patch":{"description":"The previous slug becomes a 301 redirect to the product, so old links\nkeep working.","operationId":"updateProductSlug","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSlugUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSlugUpdate"}}},"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`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slug_taken`: another product uses the slug or holds it as a redirect"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: nothing usable in the slug"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 product's slug","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/slug-redirects":{"get":{"description":"Newest first.","operationId":"listProductSlugRedirects","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ProductSlugRedirect"}}},"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 slug redirects","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/slug-redirects/{redirect_id}":{"delete":{"description":"The old URL stops redirecting and the slug becomes free.","operationId":"deleteProductSlugRedirect","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Redirect id","in":"path","name":"redirect_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 redirect for this 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":"Delete a slug redirect","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/specs":{"get":{"description":"The whole spec sheet in one call: the global groups and fields, the\ntaxonomies with their terms, the values set on this product, and the\nstore's collections for `collection_ref` fields. Taxonomy values are in\n`term_ids` (plus `value_texts` for free-form entries); other kinds use\n`value_text`.","operationId":"getProductSpecs","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSpecsResponse"}}},"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 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 product's specifications","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/specs/{field_id}":{"put":{"description":"Sets, replaces or clears one field. An empty payload (no terms, no\ncollections, blank text) clears it and answers 204. The field's kind\ndecides what is accepted:\n\n- `taxonomy`: `term_ids` (at most one unless the field is `multiple`),\n  an optional `value_text` override, and `value_texts` when the field\n  has `allow_freeform`.\n- `collection_ref`: `collection_ids` of the store's collections; this\n  writes the product's collection membership.\n- anything else: `value_text`.","operationId":"setProductSpec","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Spec field id","in":"path","name":"field_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertSpecValueRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSpecValue"}}},"description":"The stored value"},"204":{"description":"The value was cleared"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 in this store, or no such field"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_spec_value`: the payload does not fit the field's 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":"Set a product's specification value","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/stock":{"get":{"description":"For kit products: how many kits the components on hand allow, and each\ncomponent's stock. Empty for products without components. For a\nproduct's own stock per location see `GET .../products/{product_id}`.","operationId":"getProductComponentStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStockResponse"}}},"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 kit's component stock","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/subscription-options":{"get":{"operationId":"getProductSubscriptionOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubscriptionOptions"}}},"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 subscription options","tags":["Recurring orders"]},"put":{"description":"The intervals customers may subscribe to it at (up to 6; empty turns it\noff). Subscriptions already made are not changed.","operationId":"setProductSubscriptionOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubscriptionOptions"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubscriptionOptions"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 subscription options","tags":["Recurring orders"]}},"/stores/{store_id}/products/{product_id}/suggested":{"get":{"operationId":"listSuggestedProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SuggestedProduct"}}},"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 suggested products","tags":["Products"]},"put":{"description":"Replaces the list.","operationId":"setSuggestedProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedProductsSetRequest"}}},"required":true},"responses":{"204":{"description":"Replaced"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Set a product's suggested products","tags":["Products"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_VariantWithOptions"}}},"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.\n\nAn integration that creates the variant first and assigns its options\nafter (the older two-step flow) sends `is_active: false`: an inactive\nvariant may be created without options. Then `PUT\n/stores/{store_id}/variants/{variant_id}/options` sets them and\n`PUT /stores/{store_id}/variants/{variant_id}` with `is_active: true`\nputs it on sale.","operationId":"createProductVariant","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/VariantCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductVariant"}}},"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"]}},"/stores/{store_id}/products/{product_id}/variants/bulk":{"put":{"description":"Applies every change or none. Field errors come back keyed by variant\nid and field (`details.fields[\"<id>.price_cents\"]`). On a product that\nis on sale the result must keep an active variant, and every active\nvariant a price above zero.","operationId":"bulkUpdateProductVariants","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantBulkUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VariantWithOptions"},"type":"array"}}},"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`, or `variant_not_found` (`details.variant_id`) for an id that is not one of the product's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sku_taken` (`details.variant_id`): another variant or item of the store already uses the SKU; `last_active_variant`: no active variant would be left on a product on sale"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` or `invalid_barcode`, with `details.fields` keyed `<variant id>.<field>`; `variant_price_required` (`details.variant_id`) or `variant_options_incomplete`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 several variants at once","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/variants/generate":{"post":{"description":"Creates one variant for each combination of the product's option values\nthat no variant has yet, all in one transaction: SKUs are the SKU root\nfollowed by each value (\"CAMISETA-AZUL-CLARO-M\"), with `-2`, `-3`… when\nthe store already uses one. Variants made before an option was added get\nthe first free combination extending the values they have (the variant\nof a simple product becomes the first combination, keeping its stock\nand orders); one that cannot is deactivated. `dry_run` shows the\noutcome without writing.","operationId":"generateProductVariants","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/GenerateVariantsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVariantsResult"}}},"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` (`price_cents` must be above zero), `no_option_values` (every option needs a value) or `too_many_combinations` (more than 250 combinations 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":"Generate a product's variants","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/variants/reorder":{"put":{"operationId":"reorderProductVariants","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Product id","in":"path","name":"product_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantReorderRequest"}}},"required":true},"responses":{"204":{"description":"Reordered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Reorder a product's variants","tags":["Products"]}},"/stores/{store_id}/products/{product_id}/videos":{"post":{"description":"By URL (YouTube, Vimeo or a video file). `provider` is detected from the\nURL when omitted. Emits the `product.image.created` webhook.","operationId":"attachProductVideo","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/AttachVideoRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductImage"}}},"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`, `variant_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: the URL is not http(s)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 video to a product's gallery","tags":["Products"]}},"/stores/{store_id}/purchase-orders":{"get":{"description":"Newest first, with supplier and totals. Keyset-paged; `offset` also\nworks for page-number tables.","operationId":"listPurchaseOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/PurchaseOrderCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetail"}}},"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"]}},"/stores/{store_id}/purchase-orders/{po_id}":{"get":{"operationId":"getPurchaseOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/PurchaseOrderDetail"}}},"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Purchase order id","in":"path","name":"po_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetail"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/PurchaseOrderDetail"}}},"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"]}},"/stores/{store_id}/purchase-orders/{po_id}/receive":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/quotes":{"get":{"description":"Newest first.","operationId":"listQuotes","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/quotes/{cart_id}/expire":{"post":{"description":"The link stops working right away. A quote the customer already paid is\nunaffected.","operationId":"expireQuote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/receivables":{"get":{"description":"Open ones first by expected day; received ones newest first.","operationId":"listReceivables","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/receivables/summary":{"get":{"operationId":"getReceivablesSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivablesSummary"}}},"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":"Summarise receivables","tags":["Finance"]}},"/stores/{store_id}/recipe-variants":{"get":{"description":"Every product variant whose recipe can be bought as parts\n(`kit-lines`), drafts and inactive variants included: what a store keeps\noff sale (a box of cushions built from its parts) is still bought.\nArchived products are left out. At most 50, by product title.","operationId":"listRecipeVariants","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Part of the product's title, the variant's title or its SKU.","in":"query","name":"search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeVariant"},"type":"array"}}},"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 variants with a recipe","tags":["Purchasing"]}},"/stores/{store_id}/records/catalog":{"get":{"description":"Every record type a `record_change` trigger (and record queries) can use:\nkey, labels, the record's customer field and its fields with kind and,\nfor enums, the allowed values.","operationId":"getRecordsCatalog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordsCatalog"}}},"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":"The records catalog","tags":["Workflows"]}},"/stores/{store_id}/recurring-expenses":{"get":{"operationId":"listRecurringExpenses","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecurringExpense"},"type":"array"}}},"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 recurring expenses","tags":["Purchasing"]},"post":{"description":"The first payable is made at once when its due day is within 10 days (or\npast); the others as their days come.","operationId":"createRecurringExpense","parameters":[{"description":"Store id","in":"path","name":"store_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/RecurringExpenseCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringExpense"}}},"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_interval`, `description_required`, `invalid_end`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 recurring expense","tags":["Purchasing"]}},"/stores/{store_id}/recurring-expenses/{expense_id}":{"patch":{"description":"Pause it with `active: false`. Payables already made are not changed.","operationId":"updateRecurringExpense","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Recurring expense id","in":"path","name":"expense_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringExpenseUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringExpense"}}},"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":"`invalid_category`, `amount_must_be_positive`, `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":"Change a recurring expense","tags":["Purchasing"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/reports/bookings":{"get":{"description":"The bookings that started in the range (São Paulo days): attended,\nno-shows, cancellations by whom, revenue of attended sessions and deposits\npaid, against the period just before, by provider and by service, with\nthe clients who missed most.","operationId":"getBookingsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day, São Paulo time. Defaults to 29 days before `to`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Last day, inclusive. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Only orders from this sales channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsReport"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 report","tags":["Reports"]}},"/stores/{store_id}/reports/customers":{"get":{"description":"Monthly acquisition cohorts with retention and revenue, repeat rate,\nlifetime value and the top customers. Counts every paid order ever (the\ncohorts show the last `months` months of first purchases).","operationId":"getCustomersReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"How many monthly cohorts to show, the current month included\n(default 12, at most 24).","in":"query","name":"months","required":false,"schema":{"format":"int32","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersReport"}}},"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":"Customers report","tags":["Reports"]}},"/stores/{store_id}/reports/export/{report}":{"get":{"description":"The same data as the report, as a spreadsheet file. Portuguese files use\n`;` and a decimal comma, English files `,` and a decimal point.","operationId":"exportReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Which report","in":"path","name":"report","required":true,"schema":{"$ref":"#/components/schemas/ReportKind"}},{"description":"Sales, products and bookings: first day. Defaults to 29 days before `to`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Sales, products and bookings: last day. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Sales and products: only this sales channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Sales: `day` (default), `week` or `month`.","in":"query","name":"interval","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Interval"}]}},{"description":"Products: only this collection.","in":"query","name":"collection_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Products: `revenue` (default), `units`, `profit` or `return_rate`.","in":"query","name":"sort","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductSort"}]}},{"description":"Customers: how many monthly cohorts (default 12).","in":"query","name":"months","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Inventory: days of sales that set the pace; wishlist: days that count as recent saves (default 90).","in":"query","name":"days","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Inventory: only this state.","in":"query","name":"status","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockStatus"}]}},{"description":"Wishlist: only products that cannot be bought now.","in":"query","name":"sold_out","required":false,"schema":{"type":["boolean","null"]}},{"description":"`pt` (default) or `en`: column names and number format.","in":"query","name":"lang","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Lang"}]}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"The CSV 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"},"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":"Download a report as CSV","tags":["Reports"]}},"/stores/{store_id}/reports/forecast":{"get":{"description":"What the next 7 to 90 days are likely to bring in, day by day, from how the same weekdays went over the last 56\ndays (net revenue, as in the sales report). A plain weekday average with a one-standard-deviation range: no trend,\nholidays or campaigns. `enough_history` is false with fewer than 14 selling days in the history.","operationId":"getSalesForecast","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"How many days ahead, 7 to 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Only orders from this sales channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesForecast"}}},"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_horizon`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sales forecast","tags":["Reports"]}},"/stores/{store_id}/reports/inventory":{"get":{"description":"Stock value at cost, days of cover and turnover, with the variants that\nare running out, out of stock or no longer selling listed first.","operationId":"getInventoryReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days of sales that set the pace (default 90, from 7 to 365).","in":"query","name":"days","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Only variants in this state.","in":"query","name":"status","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StockStatus"}]}},{"description":"At most this many variants (default 100, at most 1000). Worst first.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryReport"}}},"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":"Inventory report","tags":["Reports"]}},"/stores/{store_id}/reports/products":{"get":{"description":"Products ranked by what they sold in the range: units, revenue, cost,\nprofit, the share that came back and the stock left.","operationId":"getProductsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day, São Paulo time. Defaults to 29 days before `to`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Last day, inclusive. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Only orders from this sales channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Only products in this collection.","in":"query","name":"collection_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"`revenue` (default), `units`, `profit` or `return_rate`.","in":"query","name":"sort","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProductSort"}]}},{"description":"At most this many products (default 50, at most 500).","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsReport"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Products report","tags":["Reports"]}},"/stores/{store_id}/reports/sales":{"get":{"description":"Orders by the day they were paid, test orders left out. Revenue, cost and\nmargin follow the DRE's definitions; the one difference is that a refund\nstays with its order whatever its date (the DRE takes it in the month it\nwas paid out). Compared with the same number of days right before.","operationId":"getSalesReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"First day, São Paulo time. Defaults to 29 days before `to`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Last day, inclusive. Defaults to today.","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"Only orders from this sales channel.","in":"query","name":"channel_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Series bucket: `day` (default), `week` or `month`.","in":"query","name":"interval","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Interval"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesReport"}}},"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`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Sales report","tags":["Reports"]}},"/stores/{store_id}/reports/schedules":{"get":{"operationId":"listReportSchedules","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportSchedule"},"type":"array"}}},"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 report schedules","tags":["Reports"]},"post":{"description":"Sends the report as a CSV on Mondays (`weekly`) or the 1st (`monthly`) at\n08:00 São Paulo time.","operationId":"createReportSchedule","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateSchedule"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSchedule"}}},"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_email`, `invalid_recipients` or `too_many_schedules`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Schedule a report","tags":["Reports"]}},"/stores/{store_id}/reports/schedules/{schedule_id}":{"delete":{"operationId":"deleteReportSchedule","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Schedule id","in":"path","name":"schedule_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 schedule"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 report schedule","tags":["Reports"]},"patch":{"operationId":"updateReportSchedule","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Schedule id","in":"path","name":"schedule_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSchedule"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSchedule"}}},"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 schedule"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_email` or `invalid_recipients`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 report schedule","tags":["Reports"]}},"/stores/{store_id}/reports/schedules/{schedule_id}/send":{"post":{"description":"Sends the report to the recipients right away, for the period a send\ntoday would cover, without moving the schedule.","operationId":"sendReportSchedule","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Schedule id","in":"path","name":"schedule_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":"Sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 schedule"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`send_failed`: the mail provider refused it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a report schedule now","tags":["Reports"]}},"/stores/{store_id}/reports/views":{"get":{"description":"The store's saved filters, newest first; `report` narrows them to one tab.","operationId":"listReportViews","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only the views of one report.","in":"query","name":"report","required":false,"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReportKind"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportView"},"type":"array"}}},"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 saved report views","tags":["Reports"]},"post":{"description":"Names the filters of a report tab. The same name on the same report is\nreplaced, so saving again updates the view.","operationId":"saveReportView","parameters":[{"description":"Store id","in":"path","name":"store_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/SaveView"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportView"}}},"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":{"description":"Invalid name, too many filters or too many views"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Save a report view","tags":["Reports"]}},"/stores/{store_id}/reports/views/{view_id}":{"delete":{"operationId":"deleteReportView","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Saved view id","in":"path","name":"view_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":{"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 saved report view","tags":["Reports"]}},"/stores/{store_id}/reports/wishlist":{"get":{"description":"Products ranked by how many lists hold them, with recent saves, how many\nsigned-in savers bought afterwards, stock, price and the e-mail alerts\nwaiting. Use `sold_out` to list what people want and cannot buy.","operationId":"getWishlistReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days that count as recent saves (default 90, from 7 to 365).","in":"query","name":"days","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Only products that cannot be bought now.","in":"query","name":"sold_out","required":false,"schema":{"type":["boolean","null"]}},{"description":"At most this many products (default 100, at most 1000). Most saved first.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WishlistReport"}}},"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":"Wishlist report","tags":["Reports"]}},"/stores/{store_id}/reseller-applications":{"get":{"description":"Newest first; filter by `status` (`pending` is the queue).","operationId":"listResellerApplications","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/reseller-applications/{application_id}":{"get":{"operationId":"getResellerApplication","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/reservations":{"get":{"description":"Every held unit with its order attached, newest first. Keyset-paged;\n`offset` also works for page-number tables.","operationId":"listReservations","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Defaults to `active`.","in":"query","name":"status","required":false,"schema":{"description":"Which reservations to list: one status, or `all`.","enum":["active","released","consumed","expired","cancelled","all"],"type":"string"}},{"description":"Matches SKU, variant name or order number.","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Reservation"}}},"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 reservations","tags":["Inventory"]}},"/stores/{store_id}/reservations/{reservation_id}/consume":{"post":{"description":"The held units left the shelf: on-hand and reserved both drop. Writes a\n`consume` movement. Closing twice answers 409 `reservation_not_active`.","operationId":"consumeReservation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Reservation id","in":"path","name":"reservation_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/ReservationCloseResult"}}},"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":"`reservation_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reservation_not_active`: already closed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Consume a reservation","tags":["Inventory"]}},"/stores/{store_id}/reservations/{reservation_id}/release":{"post":{"description":"Gives the held units back to available stock; the physical units never\nmoved. Writes a `release` movement. Closing twice answers 409\n`reservation_not_active`, so a retry is harmless.","operationId":"releaseReservation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Reservation id","in":"path","name":"reservation_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/ReservationCloseResult"}}},"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":"`reservation_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reservation_not_active`: already closed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Release a reservation","tags":["Inventory"]}},"/stores/{store_id}/returns":{"get":{"description":"Open ones (requested, approved, received) first, oldest request first;\nclosed ones newest first.","operationId":"listReturns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ReturnRequest"}}},"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"]}},"/stores/{store_id}/returns/settings":{"get":{"operationId":"getReturnSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnSettings"}}},"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 return settings","tags":["Returns"]},"put":{"operationId":"setReturnSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnSettings"}}},"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_window`, `invalid_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 the return settings","tags":["Returns"]}},"/stores/{store_id}/returns/{return_id}":{"get":{"operationId":"getReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRequest"}}},"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"]}},"/stores/{store_id}/returns/{return_id}/approve":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/returns/{return_id}/cancel":{"post":{"operationId":"cancelReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/returns/{return_id}/correios-reverse":{"delete":{"description":"Cancels it at Correios while the package has not been posted, and takes\nits code off the return.","operationId":"cancelReturnCorreiosReverse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRequest"}}},"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":"`no_reverse`: no authorization to cancel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_provider_error`: Correios refused (posted already) or did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Cancel a return's Correios authorization","tags":["Returns"]},"post":{"description":"Asks Correios for a reverse authorization on the store's contract (PAC\nor SEDEX reverso): the customer posts the package at any agency with the\ncode, by the deadline, at no cost to them. The code, carrier and\ndeadline go on the return (`return_code`, `return_carrier`,\n`return_deadline`); a `requested` return is approved with them, and the\ncustomer gets them by e-mail and on their order page.","operationId":"requestReturnCorreiosReverse","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CorreiosReverseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRequest"}}},"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` (not requested or approved) or `reverse_exists`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `several_boxes` (give the package's size), `customer_document_required`, `customer_email_required`, `origin_required`, `sender_document_required`, `address_required`, or a freight error (Correios not active, no key with Pré-postagem)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`freight_provider_error`: Correios refused or did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send a return back through Correios","tags":["Returns"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/returns/{return_id}/invoice":{"get":{"description":"The note the goods left with, who issues the return note, the store's\nreturn notes, and the customer's own when the buyer is a contributor.","operationId":"getReturnInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnInvoiceState"}}},"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":"A return's fiscal standing","tags":["Returns"]},"post":{"description":"Numbers, signs, stores and transmits it; the order lists it beside its\nsale note. One live return note per return.","operationId":"emitReturnInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnInvoiceRequest"}]}}},"description":"The same request the last preview showed"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"Stored and transmitted once; `status` says where it stands"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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_document_exists`, `return_no_original_note`, `return_issued_by_customer`, `return_not_approved`, `return_closed`, `fiscal_production_locked`"},"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 return's NF-e de devolução","tags":["Returns"]}},"/stores/{store_id}/returns/{return_id}/invoice/customer-note":{"put":{"description":"A buyer that pays ICMS issues the return note itself; the store keeps its\nkey on the return. The key must be a valid NF-e key issued under the\nbuyer's CNPJ when the original named one.","operationId":"setReturnCustomerNote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Return id","in":"path","name":"return_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnCustomerNoteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnInvoiceState"}}},"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_access_key`, `customer_note_wrong_issuer`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the customer's own return note","tags":["Returns"]}},"/stores/{store_id}/returns/{return_id}/invoice/preview":{"post":{"description":"The store's entry note for the returned lines and quantities, referencing\nthe order's sale note, validated and serialized. Spends no number.","operationId":"previewReturnInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnInvoiceRequest"}]}}},"description":"Optional"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoicePreview"}}},"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":"`return_no_original_note`, `return_issued_by_customer`, `return_not_approved`, `return_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview the return's NF-e de devolução","tags":["Returns"]}},"/stores/{store_id}/returns/{return_id}/receive":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/returns/{return_id}/refund":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/returns/{return_id}/reject":{"post":{"operationId":"rejectReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/ReturnRequest"}}},"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"]}},"/stores/{store_id}/reviews":{"get":{"description":"Newest first, keyset-paged (`offset` also works). For the moderation\nqueue's badge, count pending reviews with\n`status=pending&limit=1&include_total=true`.","operationId":"listReviews","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ReviewWithProduct"}}},"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"]}},"/stores/{store_id}/reviews/settings":{"get":{"operationId":"getReviewSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSettings"}}},"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 review settings","tags":["Reviews"]},"put":{"description":"Partial: omitted fields keep their value. Answers with the settings.","operationId":"updateReviewSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSettings"}}},"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":"Update review settings","tags":["Reviews"]}},"/stores/{store_id}/reviews/{review_id}":{"delete":{"operationId":"deleteReview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/sales-channels":{"get":{"description":"By name.","operationId":"listSalesChannels","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]},"post":{"description":"Emits the `sales_channel.created` webhook.","operationId":"createSalesChannel","parameters":[{"description":"Store id","in":"path","name":"store_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/SalesChannelCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannel"}}},"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":"`web_channel_exists`: a store has one web channel"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty name; `location_requires_pos` or `location_not_found` for `location_id`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 sales channel","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}":{"delete":{"description":"The `web` channel is the storefront and cannot be deleted. Orders and\ncarts from the channel keep their records only if the database allows\nit; a channel that orders reference answers 409. Emits the\n`sales_channel.deleted` webhook.","operationId":"deleteSalesChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_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 channel in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`web_channel_protected`: the storefront channel; `sales_channel_managed`: linked to a connected inbox account; `sales_channel_in_use`: orders or carts reference it (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 sales channel","tags":["Sales Channels"]},"get":{"operationId":"getSalesChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Partial: omitted fields keep their value. Emits the\n`sales_channel.updated` webhook.","operationId":"updateSalesChannel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesChannelUpdateRequest"}}},"required":true},"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`web_channel_exists`: a store has one web channel"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_requires_pos` or `location_not_found` for `location_id`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 sales channel","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/cash-shifts":{"get":{"description":"Newest first.","operationId":"listCashShifts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_CashShift"}}},"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":"List a POS's cash shifts","tags":["Sales Channels"]},"post":{"description":"The cashier is whoever calls. A POS has one open shift at a time.","operationId":"openCashShift","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_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/OpenCashShift"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashShift"}}},"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 channel in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cash_accounting_off`: the POS keeps no cash accounting; `cash_shift_open`: one is already open"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a negative float"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Open the POS's cash shift","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/cash-shifts/current":{"get":{"description":"`null` when none is open.","operationId":"getCurrentCashShift","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CashShift"}]}}},"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":"The POS's open shift","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/cash-shifts/{shift_id}/close":{"post":{"description":"Writes what the drawer should hold next to what was counted, and the\ndifference (negative is cash missing).","operationId":"closeCashShift","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cash shift id","in":"path","name":"shift_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/CloseCashShift"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashShift"}}},"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 shift at this POS"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cash_shift_closed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a negative count"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Close the POS's cash shift","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/cash-shifts/{shift_id}/movements":{"post":{"description":"A supply (suprimento) or a withdrawal (sangria) on the open shift.","operationId":"addCashMovement","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Cash shift id","in":"path","name":"shift_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/CashMovementRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashShift"}}},"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 shift at this POS"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`cash_shift_closed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an amount of zero or less"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 cash in or out of the drawer","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/generate-api-key":{"post":{"description":"Mints a new `msc_live_…` key for the channel and replaces the previous\none, which stops working. The key is only returned here; the channel\nkeeps a hash and `api_key_prefix`.","operationId":"generateSalesChannelApiKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_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/SalesChannelApiKey"}}},"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":"Generate a sales channel API key","tags":["Sales Channels"]}},"/stores/{store_id}/sales-channels/{channel_id}/stock-sources":{"get":{"description":"The inventory locations a `pos` channel sells from, in selling order.\nEmpty means it sells from every location by priority.","operationId":"getPosStockSources","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/PosStockSources"}}},"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 point of sale's stock sources","tags":["Sales Channels"]},"put":{"description":"Replaces the list. One location is separate stock, the same location on\ntwo points of sale is shared stock, and several is \"this one first, then\nthe next\". An empty list sells from every location. Only `pos` channels\nhave one.","operationId":"setPosStockSources","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sales channel id","in":"path","name":"channel_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosStockSources"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosStockSources"}}},"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"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`location_requires_pos`: not a point of sale; `inventory_location_not_found`: a location that is not an active one of 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 point of sale's stock sources","tags":["Sales Channels"]}},"/stores/{store_id}/saved-views":{"get":{"description":"My views of a list and the team's shared ones, by name.","operationId":"listSavedViews","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`customers`, `tasks`, `conversations`, `orders` or `products`.","in":"query","name":"list","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedView"},"type":"array"}}},"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 saved views","tags":["Saved Views"]},"post":{"operationId":"createSavedView","parameters":[{"description":"Store id","in":"path","name":"store_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/SavedViewCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedView"}}},"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":"Save a view","tags":["Saved Views"]}},"/stores/{store_id}/saved-views/{view_id}":{"delete":{"description":"My own views, and shared ones I created.","operationId":"deleteSavedView","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"View id","in":"path","name":"view_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 view of mine 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 saved view","tags":["Saved Views"]}},"/stores/{store_id}/search":{"get":{"description":"Matches orders (number, customer name or e-mail), customers (name,\ne-mail, phone digits), products (title, slug, SKU), e-mail campaigns and\nconversations, returning up to `limit` of each. Groups the caller has\nno read permission for come back empty.","operationId":"searchStore","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Search text; at least 2 characters or every group comes back empty.","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"Hits per group, 1 to 20. Defaults to 5.","in":"query","name":"limit","required":false,"schema":{"format":"int64","maximum":20,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}},"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":"`missing_permission`: the caller may read none of the groups"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Search the store","tags":["Search"]}},"/stores/{store_id}/service-accounts":{"get":{"description":"The store's service accounts, oldest first, with their permission sets and how\nmany keys work now. Switched-off accounts are included.","operationId":"listServiceAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ServiceAccount"},"type":"array"}}},"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 service accounts","tags":["Team"]},"post":{"description":"A non-human member with the given permission sets. Issue keys for it with\n`POST /stores/{store_id}/service-accounts/{account_id}/keys`.","operationId":"createServiceAccount","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateServiceAccountRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccount"}}},"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":"`missing_permission`, or `grant_exceeds_actor`: a permission set carries a permission the caller does not hold"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: bad name or description"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 account","tags":["Team"]}},"/stores/{store_id}/service-accounts/{account_id}":{"delete":{"description":"Revokes its keys, takes its permission sets away and hides it. The account's\npast actions keep pointing at it in the audit log and on the records\nit touched.","operationId":"deleteServiceAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Service account 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":"No service account with this id in the 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 service account","tags":["Team"]},"patch":{"description":"Rename it, change its permission sets, or switch it off and on.","operationId":"updateServiceAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServiceAccountRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccount"}}},"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":"`missing_permission` or `grant_exceeds_actor`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No service account with this id in the 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 service account","tags":["Team"]}},"/stores/{store_id}/service-accounts/{account_id}/keys":{"get":{"description":"Its keys that are not revoked, newest first. Revoke one with\n`DELETE /stores/{store_id}/api-tokens/{token_id}`.","operationId":"listServiceAccountKeys","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service account id","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiTokenSummary"},"type":"array"}}},"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 service account with this id in the 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 service account's keys","tags":["API Tokens"]},"post":{"description":"Issues a key (`mobi_sa_…`) acting as the service account, bounded by\nits permission sets. The raw `token` is only in this response; store it.","operationId":"createServiceAccountKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Service 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/CreateServiceKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiTokenResponse"}}},"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":"`approval_requires_person`: an API key asked for `mcp_approval: none`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No service account with this id in the store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`service_account_disabled`: switch it on first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: bad 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 service account key","tags":["API Tokens"]}},"/stores/{store_id}/settings":{"get":{"description":"Stock reservation, dispatch time, abandoned-cart recovery, review\nrequests, card installments (interest-free and with interest), saved\ncards and price rounding.","operationId":"getStoreSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFulfillmentSettings"}}},"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 store settings","tags":["Stores"]},"patch":{"description":"Fields left out stay as they are.","operationId":"updateStoreSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStoreFulfillmentSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreFulfillmentSettings"}}},"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`: a value is 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 store settings","tags":["Stores"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/CreateShipmentRequest"}}},"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"]}},"/stores/{store_id}/shipments/{shipment_id}":{"delete":{"description":"Removes the box and frees its units to ship again. Nothing is cancelled\nat the carrier; use `POST .../cancel` for that.","operationId":"deleteShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShipmentRequest"}}},"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"]}},"/stores/{store_id}/shipments/{shipment_id}/book":{"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(`POST .../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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/shipments/{shipment_id}/boxes":{"put":{"description":"Replaces the boxes and what is in each, in order (box 1 first). They\nstop following the lines (`boxes_state` becomes `edited`). Contents\nmust be lines of this shipment. Every box must hold something, and no\nbox more of an item than the shipment ships; something may still be out\nof the boxes while packing (confirming then refuses it, see\n`Shipment.box_problems`). Refused once frozen, and while the shipment\nhas a live NF-e of its own (the note declares these volumes).","operationId":"setShipmentBoxes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetShipmentBoxesRequest"}}},"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_frozen` or `shipment_has_nfe` (cancel the note first)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a size or weight out of range, or contents outside the shipment; `box_empty`: a box holds nothing; `boxes_items_mismatch`: a box holds more of an item than the shipment ships, or an item it does not ship (`details.problems`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 boxes","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/boxes/recompute":{"post":{"description":"What the packing engine proposes for the shipment's lines now, next to\nthe current boxes. With `apply` the proposal replaces them. Applying is\nrefused once frozen, and while the shipment has a live NF-e of its own.","operationId":"recomputeShipmentBoxes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/RecomputeBoxesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentBoxesProposal"}}},"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_frozen` or `shipment_has_nfe`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Recompute a shipment's boxes","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/boxes/{box_id}/measures":{"patch":{"description":"Allowed on any shipment that is not cancelled, frozen ones included\n(booked or gone): only the weight and the sides change, never what the\nbox holds or how many boxes there are. The packaging weight is kept\n(net = gross - packaging). The box records who corrected it and when.\nThe carrier is not told: an order already made there keeps its volumes.\nWhile the shipment has a live NF-e of its own, the note declares these\nweights: the correction waits for a carta de correção registered for it\n(`box_measures_need_cce`).","operationId":"correctShipmentBoxMeasures","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Box id","in":"path","name":"box_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxMeasuresRequest"}}},"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 or box"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipment_cancelled`; `box_measures_need_cce`: the shipment's NF-e declares the volumes, register a carta de correção with the new weight first"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a side or the weight 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":"Correct a box's weight and sides","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/cancel":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/shipments/{shipment_id}/carrier-label.pdf":{"get":{"description":"The Correios rótulo of a shipment booked on the store's contract, as\nCorreios makes it (a PDF to print and stick on the box).","operationId":"printShipmentCarrierLabel","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"The carrier's label 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"},"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`: not booked with Correios"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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 carrier's label","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/combine":{"post":{"description":"Moves the other shipment's lines into this one and recomputes the boxes\ntogether, so one carrier order carries both orders. This shipment keeps\nits order as the lead (destination, recipient, the NF-e the carrier is\nsent); the other disappears. The saved quote is dropped: quote again.","operationId":"combineShipments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/CombineShipmentsRequest"}}},"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`) or `boxes_frozen`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`same_shipment`, `not_a_draft`, `order_closed`, `future_mismatch`, `pickup_mismatch`, `different_customer` or `different_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":"Combine shipments","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/combine-candidates":{"get":{"description":"Drafts of the same customer and delivery address (CEP, street, number and\ncomplement), not yet booked at a carrier and with the same kind of NF-e\n(both sold for future delivery, or neither).","operationId":"listCombineCandidates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CombineCandidate"},"type":"array"}}},"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":"Shipments that can join this one","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/confirm-collect":{"post":{"description":"Tells the carrier the goods were collected and moves the shipment to\n`collected`.","operationId":"confirmShipmentCollect","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/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_freight_order`: the shipment has no carrier 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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":"Confirm the carrier collected","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/invoice":{"post":{"description":"The remessa (default) or, with `purpose` `sale`, the sale note of what\nthe shipment carries. Numbers, signs, stores and transmits it; once\nauthorized (production) it is the NF-e the shipment's carrier booking\nsends.","operationId":"emitShipmentInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentInvoiceRequest"}]}}},"description":"Optional; defaults to the remessa"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiscalDocument"}}},"description":"Stored and transmitted once; `status` says where it stands"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`fiscal_document_exists` (also when the order is invoiced the other way, whole or per shipment), `order_has_external_nfe`, `shipment_has_external_nfe`, `order_is_test`, `fiscal_not_configured`, `fiscal_certificate_missing`, `fiscal_production_locked`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_validation_failed` with `details.issues` (`future_billing_required` until the faturamento is authorized)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 a shipment's NF-e.","tags":["Fiscal"]}},"/stores/{store_id}/shipments/{shipment_id}/invoice-check":{"get":{"description":"What Central do Frete will see at booking: whether the order's NF-e\nnames the chosen carrier with freight mode 2 and their text, the carta\nde correção that would fix it, and the carrier the customer chose at\ncheckout. Reads only; nothing is sent anywhere.","operationId":"checkShipmentInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentInvoiceCheck"}}},"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":"Check a shipment against the order's NF-e","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/invoice/preview":{"post":{"description":"The remessa (default): for an order sold for future delivery (its\nsimples faturamento authorized), what this shipment carries, at its\nshare of the sale, with the shipment's carrier and boxes and a reference\nto the faturamento. With `purpose` `sale`: the sale note of what this\nshipment carries, for an order invoiced per shipment. Spends no number\nand contacts no one.","operationId":"previewShipmentInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ShipmentInvoiceRequest"}]}}},"description":"Optional; defaults to the remessa"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoicePreview"}}},"description":"`future_billing_required` among a remessa's issues until the order's faturamento is authorized; `order_invoiced_whole` among a sale note's when the order has a note of its own"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`fiscal_not_configured`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview a shipment's NF-e.","tags":["Fiscal"]}},"/stores/{store_id}/shipments/{shipment_id}/label":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/shipments/{shipment_id}/labels.pdf":{"get":{"description":"One A6 label per box, four per A4 page: volume number of the total, the\nbox, the recipient, what is inside, and a QR code that opens the\nshipment's packing screen.","operationId":"printShipmentLabels","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"Labels 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"},"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":"Print volume labels","tags":["Shipments"]}},"/stores/{store_id}/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 .../unshipped-items`. Computed boxes follow; edited or\npacked boxes need `reset_boxes`.","operationId":"setShipmentLines","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/shipments/{shipment_id}/nfe":{"delete":{"description":"The shipment goes back to the order's NF-e. The saved quote is dropped.\nOnly while the shipment is a draft.","operationId":"removeShipmentNfe","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipment_not_draft`, `shipment_has_remessa` or `future_delivery_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":"Remove a shipment's own nota fiscal","tags":["Shipments"]},"post":{"description":"For a shipment that leaves with its own NF-e, such as the rest of an\norder whose first note covered only the lines already shipped. It is the\nnote the carrier receives, instead of the order's. The XML is parsed for\nthe access key, number and total; the saved quote is dropped, since the\ndeclared value follows the note: quote again. Only while the shipment is\na draft; a combined shipment must be combined first.","operationId":"attachShipmentNfe","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/AttachShipmentNfeRequest"}}},"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":"`shipment_not_draft`, `shipment_has_remessa` or `future_delivery_shipment`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` (empty XML) or `nfe_key_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":"Attach a nota fiscal to a shipment","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/pack":{"post":{"description":"Marks the boxes as checked (`boxes_state` `packed`). Needs at least one\nbox when the shipment carries anything physical, no empty box, and\neverything the shipment ships in the boxes, exactly.","operationId":"packShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/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_frozen` or `no_boxes`"},"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 the shipment ships (`details.problems`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Confirm a shipment's boxes","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/packing-list.pdf":{"get":{"description":"Every box of the shipment with what goes in it and a square to check\neach line off.","operationId":"printShipmentPackingList","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipment id","in":"path","name":"shipment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{}},"description":"Packing list 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"},"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":"Print the packing list","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/quote":{"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`POST .../quote/select`, then book it.","operationId":"quoteShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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"]}},"/stores/{store_id}/shipments/{shipment_id}/quote/select":{"post":{"description":"Keeps the chosen option on the shipment; booking uses it.","operationId":"selectShipmentQuote","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/shipments/{shipment_id}/separate":{"post":{"description":"The order's lines move to a new draft shipment and both shipments' boxes\nare recomputed. When the order is the lead, the next order takes the lead.\nOnly while the shipment is a draft: once a carrier order exists, cancel\nit first.","operationId":"separateOrderFromShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SeparateOrderRequest"}}},"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`) or `boxes_frozen`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_combined` (one order only), `order_not_in_shipment` or `remessa_issued`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Take an order out of a combined shipment","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/split":{"post":{"description":"The chosen boxes wait: they move, as they are (sizes, weights, what is\nin them), to a new draft shipment, and this shipment keeps the rest. A\nkit line whose boxes split goes on by parts (see\n`ShipmentItemInput.parts`), so stock, the order's fulfilment and each\nshipment's NF-e follow what really leaves. Refused once the boxes are\nbooked or gone.","operationId":"splitShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SplitShipmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitShipmentResult"}}},"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_frozen`: booked or already left; `shipment_has_nfe`: the shipment has a live NF-e"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`split_combined` (carries several orders: separate them first), `split_none` (no box chosen), `split_all` (every box chosen), `box_not_in_shipment`, `split_unmapped` (a box holds something that is not a line or a kit part of 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":"Ship only some boxes","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/sync":{"post":{"description":"Pulls the carrier's order detail now (a background job also polls):\nstatus, tracking events, carrier, cost and, when still empty, the\norder's NFe data.","operationId":"syncShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/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_freight_order`: the shipment has no carrier 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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":"Sync a shipment with the carrier","tags":["Shipments"]}},"/stores/{store_id}/shipments/{shipment_id}/unlink":{"post":{"description":"Clears the carrier linkage (order code, quotation, price, tracking) and\nresets the shipment to `draft`. Nothing is cancelled at the carrier; it\nis for a code linked by mistake. To cancel the freight order use\n`POST .../cancel`.","operationId":"unlinkShipment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 a shipment from its carrier order","tags":["Shipments"]}},"/stores/{store_id}/shipping-boxes":{"get":{"description":"The store's boxes, by name.","operationId":"listShippingBoxes","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ShippingBox"}}},"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 shipping boxes","tags":["Shipping Boxes"]},"post":{"description":"Emits the `shipping_box.created` webhook.","operationId":"createShippingBox","parameters":[{"description":"Store id","in":"path","name":"store_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/ShippingBoxCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingBox"}}},"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 shipping box","tags":["Shipping Boxes"]}},"/stores/{store_id}/shipping-boxes/{box_id}":{"delete":{"description":"Also removes it from every variant. Emits the `shipping_box.deleted`\nwebhook.","operationId":"deleteShippingBox","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipping box id","in":"path","name":"box_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":"`shipping_box_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 shipping box","tags":["Shipping Boxes"]},"get":{"operationId":"getShippingBox","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipping box id","in":"path","name":"box_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingBox"}}},"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":"`shipping_box_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 shipping box","tags":["Shipping Boxes"]},"put":{"description":"Changes the fields sent. Emits the `shipping_box.updated` webhook.","operationId":"updateShippingBox","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipping box id","in":"path","name":"box_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingBoxUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingBox"}}},"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":"`shipping_box_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 a shipping box","tags":["Shipping Boxes"]}},"/stores/{store_id}/shipping-rules":{"get":{"description":"In the order they run (`position`), inactive ones included.","operationId":"listShippingRules","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ShippingRule"}}},"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 shipping rules","tags":["Freight"]},"post":{"description":"It runs after the store's other rules; move it with\n`POST /stores/{store_id}/shipping-rules/reorder`. Applies to quotes made\nfrom now on, and to the open carts' quotes when they change or check out.","operationId":"createShippingRule","parameters":[{"description":"Store id","in":"path","name":"store_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/ShippingRuleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRule"}}},"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":"`shipping_rule_limit`: the store already has 100 rules"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: an empty name, an unknown UF, a bad CEP range, an inverted range or an action 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 a shipping rule","tags":["Freight"]}},"/stores/{store_id}/shipping-rules/reorder":{"post":{"description":"Sets the order rules run in: the first id runs first. Every rule of the\nstore must be listed, once.","operationId":"reorderShippingRules","parameters":[{"description":"Store id","in":"path","name":"store_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/ShippingRuleReorderRequest"}}},"required":true},"responses":{"204":{"description":"Reordered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: the ids are not exactly the store's rules"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reorder shipping rules","tags":["Freight"]}},"/stores/{store_id}/shipping-rules/simulate":{"post":{"description":"Quotes the items with the store's carriers and local delivery to the CEP,\nthen runs the active rules as a cart with these terms would see them: what\neach service would cost, which rule fired, which ones a rule hides, and\nwhat is left for free shipping. Nothing is saved.","operationId":"simulateShippingRules","parameters":[{"description":"Store id","in":"path","name":"store_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/ShippingRuleSimulationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRuleSimulation"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_request`: an invalid CEP, no item with a positive quantity, or items that cannot ship"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"A variant is not in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_not_configured`: the store has no carrier set up"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`shipping_unavailable`: the carriers did not answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Try the shipping rules","tags":["Freight"]}},"/stores/{store_id}/shipping-rules/{rule_id}":{"delete":{"description":"Open carts' quotes lose it when they change or check out.","operationId":"deleteShippingRule","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipping rule id","in":"path","name":"rule_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 rule 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 shipping rule","tags":["Freight"]},"put":{"description":"Replaces its name, conditions and action; `is_active` keeps its value when\nomitted. Its place in the order stays.","operationId":"updateShippingRule","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Shipping rule id","in":"path","name":"rule_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRuleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRule"}}},"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 rule in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: as on create"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 shipping rule","tags":["Freight"]}},"/stores/{store_id}/shipping/plan":{"post":{"description":"Runs the packing engine on any lines without saving anything: the boxes\ncheckout would quote and a shipment would start with. Each content's\n`line_key` is the line's variant id.","operationId":"planShipping","parameters":[{"description":"Store id","in":"path","name":"store_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/ShippingPlanRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingPlanView"}}},"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`: a variant outside the store or a bad quantity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pack lines into boxes","tags":["Freight"]}},"/stores/{store_id}/shipping/settings":{"get":{"description":"The store's shipping origin, cubing factor and default carton.","operationId":"getShippingSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingSettings"}}},"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 shipping settings","tags":["Shipments"]},"put":{"description":"Replaces the store's shipping settings. The origin wins over the\ncarrier integration's own config for quotes and bookings.","operationId":"setShippingSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingSettings"}}},"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`: a CEP that is not 8 digits, a UF that is not two letters, a factor outside 1 to 1000, or a carton outside the 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 shipping settings","tags":["Shipments"]}},"/stores/{store_id}/signature-requests":{"get":{"description":"Newest first. Requests on restricted documents only reach members with\n`documents.restricted`.","operationId":"listSignatureRequests","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`sent`, `completed`, `declined`, `cancelled` or `expired`.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"document_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SignatureRequestSummary"}}},"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 signature requests","tags":["Signatures"]}},"/stores/{store_id}/signature-requests/{request_id}":{"get":{"description":"With its signers and the full evidence trail.","operationId":"getSignatureRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Signature request id","in":"path","name":"request_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequestDetail"}}},"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":"`signature_request_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 signature request","tags":["Signatures"]}},"/stores/{store_id}/signature-requests/{request_id}/cancel":{"post":{"description":"Its links stop working. Signatures already given are kept in the trail.","operationId":"cancelSignatureRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Signature request id","in":"path","name":"request_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/SignatureRequestDetail"}}},"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":"`signature_request_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`signature_request_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 signature request","tags":["Signatures"]}},"/stores/{store_id}/signature-requests/{request_id}/remind":{"post":{"description":"E-mails a new link to every signer whose turn it is and who has not\nsigned (links sent before stop working). Signers without e-mail are\nlisted with their new link to share by other means.","operationId":"remindSignatureRequest","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Signature request id","in":"path","name":"request_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":{"items":{"$ref":"#/components/schemas/SignerLink"},"type":"array"}}},"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":"`signature_request_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`signature_request_closed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Remind pending signers","tags":["Signatures"]}},"/stores/{store_id}/signature-requests/{request_id}/signers/{signer_id}/link":{"post":{"description":"A new private link for one signer who has not signed, to share by other\nmeans (e.g. WhatsApp). Their previous link stops working.","operationId":"renewSignerLink","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Signature request id","in":"path","name":"request_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Signer id","in":"path","name":"signer_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/SignerLink"}}},"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":"`signature_request_not_found`, `signer_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`signature_request_closed`, `signer_done`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"New link for a signer","tags":["Signatures"]}},"/stores/{store_id}/signatures/capabilities":{"get":{"description":"Whether the store's A1 certificate can seal signed copies, and whether\ncodes can go by WhatsApp.","operationId":"getSignatureCapabilities","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureCapabilities"}}},"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":"What signing can use","tags":["Signatures"]}},"/stores/{store_id}/social/abilities":{"get":{"operationId":"getSocialAbilities","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAbilities"}}},"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 what I can do with posts","tags":["Social"]}},"/stores/{store_id}/social/accounts":{"get":{"description":"The Instagram accounts and Facebook Pages posts can be published on,\nand whether each was connected with the permissions publishing needs.","operationId":"listSocialAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccounts"}}},"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 social accounts","tags":["Social"]}},"/stores/{store_id}/social/ads/accounts":{"get":{"operationId":"listSocialAdAccounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdAccounts"}}},"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 ad accounts","tags":["Social"]}},"/stores/{store_id}/social/ads/accounts/{account_id}":{"delete":{"description":"Mobiari stops reading and changing it. Campaigns keep running on Meta.","operationId":"disconnectSocialAdAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account's id in Mobiari (`AdAccount.id`)","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 ad account 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":"Disconnect an ad account","tags":["Social"]}},"/stores/{store_id}/social/ads/ads/{ad_id}":{"patch":{"description":"Pause or resume one ad, or rename it. Pausing the weaker ad of a pair is\nhow a creative test ends.","operationId":"updateSocialAd","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Meta's ad id","in":"path","name":"ad_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Changed"}}},"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 ad account, or the ad is not in it"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an ad","tags":["Social"]}},"/stores/{store_id}/social/ads/adsets/{adset_id}":{"patch":{"description":"Pause or resume it, rename it, change its daily budget, end date or\naudience (age, gender, countries, regions, cities, ZIP codes, interests,\nsaved audiences). Takes\neffect on Meta right away; Meta may send an edited ad set back through\nreview.","operationId":"updateSocialAdSet","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Meta's ad set id","in":"path","name":"adset_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdSetRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Changed"}}},"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 ad account, or the ad set is not in it"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update an ad set","tags":["Social"]}},"/stores/{store_id}/social/ads/audiences":{"get":{"description":"The ad account's saved audiences (pixel, lookalike, customer lists),\nto target or exclude in a campaign.","operationId":"listSocialAdAudiences","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audiences"}}},"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 ad account in this store"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List audiences","tags":["Social"]},"post":{"description":"Builds a pixel audience (viewed, cart or bought, within a window) or a\nlookalike of an existing one. Meta fills pixel audiences from past events,\nso they can take a while to show a size.","operationId":"createSocialAdAudience","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateAudienceRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceCreated"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`audience_needs_pixel`: set the store's Meta pixel"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create an audience","tags":["Social"]}},"/stores/{store_id}/social/ads/authorize":{"post":{"description":"The Facebook Login address asking for ad permissions. Every active ad\naccount the person manages comes back connected to this store.","operationId":"authorizeSocialAds","parameters":[{"description":"Store id","in":"path","name":"store_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/AdsAuthorizeUrl"}}},"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":"`facebook_not_configured`: no Meta app on this server"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting ad accounts","tags":["Social"]}},"/stores/{store_id}/social/ads/boosts":{"post":{"description":"Creates a campaign, an ad set and an ad around one of the store's\npublished posts, **active right away**: it spends up to\n`daily_budget_cents` × `days`. Instagram posts need the Facebook Page\nlinked to that Instagram account connected under Social.","operationId":"createSocialBoost","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateBoostRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boost"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`instagram_needs_page`: connect the Facebook Page linked to the Instagram account; `account_unavailable`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: budget, days or link"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message (nothing is left running)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Boost a post","tags":["Social"]}},"/stores/{store_id}/social/ads/campaigns":{"get":{"description":"The account's campaigns (active and paused) with spend, reach, clicks\nand Meta's purchases for the window, next to the paid orders our\nattribution credits to each one, the ROAS from those, and a flag on\ncampaigns spending without selling. Read live from Meta.","operationId":"getSocialAdsReport","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdsReport"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`: connect it again"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get the ads report","tags":["Social"]},"post":{"description":"Builds a campaign, an ad set and an ad on Meta from one form: objective\n(traffic, sales, dynamic catalog ads, or messages that open WhatsApp or Instagram Direct), audience, daily budget, schedule and a link ad with\nan image. It is built paused and recorded; with `start_active` it is then\nswitched on, and `status` says whether that worked (`paused` means resume\nit from the campaign list). Sales campaigns need the store's Meta pixel set\nunder Marketing, as do catalog campaigns (which also need a catalog chosen); WhatsApp messages need a connected WhatsApp number. The checks of `preflightSocialAdCampaign` run first and any `fail` refuses the campaign. Nothing is left behind on Meta when a step fails.","operationId":"createSocialAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreated"}}},"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 ad account or Page in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sales_needs_pixel`: set the store's Meta pixel; `catalog_not_selected`: choose the Meta catalog first; `messages_need_whatsapp`: no WhatsApp number connected; `instagram_needs_page`: the Page has no linked Instagram account; `account_unavailable`; `preflight_failed`: a check of `preflightSocialAdCampaign` failed (the failed checks in `details.checks`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: budget, dates, link, image or text"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message (nothing is left on Meta); `whatsapp_not_linked`: the WhatsApp number is not linked to the Page"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a campaign","tags":["Social"]}},"/stores/{store_id}/social/ads/campaigns/{campaign_id}":{"get":{"description":"A campaign with its ad sets (budget, dates, audience) and ads\n(thumbnail), each with spend, reach, clicks and Meta's purchases and\nchats for the window, and per ad the chats and paid orders our\nattribution credits to it. Read live from Meta.","operationId":"getSocialAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Meta's campaign id","in":"path","name":"campaign_id","required":true,"schema":{"type":"string"}},{"description":"The ad account (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"7, 30 or 90 (default 30).","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}},"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 ad account, or the campaign is not in it"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Get a campaign","tags":["Social"]},"patch":{"description":"Pause or resume it, or change its daily budget (the campaign's, or its\nonly ad set's). Takes effect on Meta right away.","operationId":"updateSocialAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Meta's campaign id","in":"path","name":"campaign_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdated"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`budget_per_adset`: the budget is spread over several ad sets; `account_unavailable`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a campaign","tags":["Social"]}},"/stores/{store_id}/social/ads/campaigns/{campaign_id}/copies":{"post":{"description":"Duplicates the campaign with its ad sets and ads, **paused**, so a change\n(another audience, budget or creative) can run next to the original.","operationId":"copySocialAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Meta's campaign id","in":"path","name":"campaign_id","required":true,"schema":{"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/CopyCampaignRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCopied"}}},"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 ad account, or the campaign is not in it"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Copy a campaign","tags":["Social"]}},"/stores/{store_id}/social/ads/catalog":{"put":{"description":"Makes this the catalog the store's dynamic ads draw from. It has to be\none the ad account's login can see.","operationId":"selectSocialAdCatalog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectCatalogRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalogs"}}},"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 ad account, or the catalog is not visible to it"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Use a catalog","tags":["Social"]}},"/stores/{store_id}/social/ads/catalogs":{"get":{"description":"The Meta catalogs the ad account's login can use for dynamic ads, which\none the store uses, and the store's Meta feed address.","operationId":"listSocialAdCatalogs","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account to read with (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalogs"}}},"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 ad account in this store"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List catalogs","tags":["Social"]}},"/stores/{store_id}/social/ads/interests":{"get":{"description":"Meta's interests matching the text, to narrow a campaign's audience.","operationId":"searchSocialAdInterests","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account to search with (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"What to look for (\"madeira\", \"brinquedos\").","in":"query","name":"q","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Interests"}}},"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 ad account in this store"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Search interests","tags":["Social"]}},"/stores/{store_id}/social/ads/locations":{"get":{"description":"Meta's regions, cities and ZIP codes matching the text, to target a\ncampaign's audience narrower than a country.","operationId":"searchSocialAdLocations","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account to search with (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"What to look for (\"Campinas\", \"Minas\", a CEP).","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"The country to search in, two letters. Brazil by default.","in":"query","name":"country_code","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Locations"}}},"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 ad account in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`country_code` is not two letters"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Search locations","tags":["Social"]}},"/stores/{store_id}/social/ads/preflight":{"post":{"description":"What Meta needs for the campaign described by the form, checked live\nbefore anything is created: the ad account is active and can pay, the\nlogin works (and until when), the Page has the Instagram account\n(Instagram placements) or the store's WhatsApp number linked (WhatsApp\nmessages), the pixel sees purchases (sales and catalog), the catalog has\nproducts (catalog). Takes the same body as creating a campaign. A `fail`\nmeans creating it would be refused (`preflight_failed`); a `warn` does not\nstop it. Nothing is saved or spent.","operationId":"preflightSocialAdCampaign","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateCampaignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPreflight"}}},"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 ad account or Page in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`: connect the ad account again"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Check a campaign before publishing","tags":["Social"]}},"/stores/{store_id}/social/ads/previews":{"post":{"description":"How the ad described by a campaign form looks on Meta, before anything is\ncreated: the mobile feed, and Instagram when the Page has an Instagram\naccount. Takes the same body as creating a campaign. Nothing is saved or\nspent.","operationId":"previewSocialAd","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateCampaignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdPreviews"}}},"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 ad account or Page in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview an ad","tags":["Social"]}},"/stores/{store_id}/social/ads/product-sets":{"get":{"description":"The product sets of the store's catalog (\"All products\" and the ones\nmade for campaigns).","operationId":"listSocialAdProductSets","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ad account to read with (`AdAccount.id`).","in":"query","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSets"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`catalog_not_selected`"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"List product sets","tags":["Social"]},"post":{"description":"Makes a group of the catalog's products from chosen products and/or a\ncollection, to run a dynamic ad on. It is a snapshot: products added to\nthe collection later are not in it.","operationId":"createSocialAdProductSet","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateProductSetRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSet"}}},"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 ad account in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`catalog_not_selected`; `catalog_importing`: none of the products is in the catalog yet (Meta has not read the feed): try again in a few minutes"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: name, or no active product to put in it"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Meta's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Create a product set","tags":["Social"]}},"/stores/{store_id}/social/ai":{"get":{"operationId":"getSocialAiStatus","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAiStatus"}}},"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 AI helpers available","tags":["Social"]}},"/stores/{store_id}/social/ai/caption":{"post":{"description":"A caption in the brand's voice for a post, from a brief, the products it\nshows, or a draft to improve, with hashtags for Instagram. Nothing is\nsaved.","operationId":"writeSocialCaption","parameters":[{"description":"Store id","in":"path","name":"store_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/CaptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptionSuggestion"}}},"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":"`assistant_failed`: the AI did not answer; `assistant_not_configured`: no AI on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Write a caption","tags":["Social"]}},"/stores/{store_id}/social/ai/images":{"post":{"description":"Gemini makes the scene described (keeping the product of\n`source_file_id` as it is, when given), in the brand's photo style. Each\nimage is saved to the library and returned, ready for a post.","operationId":"generateSocialImages","parameters":[{"description":"Store id","in":"path","name":"store_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/ImageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedImages"}}},"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":"`missing_permission`: `marketing.write`, and `files.write` to save the images to the library; `session_required`: store API tokens cannot write to the tenant's library"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty prompt or unknown photo; `images_failed`: Gemini's message"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`images_quota`: Gemini refused on quota (the key's project needs billing); `rate_limited`: over the request budget, see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`images_not_configured`: no Gemini key on this server; `images_unavailable`: Gemini did not answer (try again)"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Make images","tags":["Social"]}},"/stores/{store_id}/social/ai/plan":{"post":{"description":"The AI plans a run of posts around a theme and products (formats, days,\ntimes, captions and an image idea each) and saves them as **drafts**\nwith a date, on every account that can publish. Nothing is published:\nadd the images and schedule them.","operationId":"planSocialPosts","parameters":[{"description":"Store id","in":"path","name":"store_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/PlanRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResult"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`assistant_failed`: the AI did not answer; `assistant_not_configured`: no AI on this server"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Plan posts","tags":["Social"]}},"/stores/{store_id}/social/comments":{"get":{"description":"Comments on the store's Instagram and Facebook posts, newest first, each\nwith its replies. Our own replies are inside their thread, not listed on\ntheir own. Keyset-paged: follow `next_cursor`.","operationId":"listSocialComments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`open` (needs an answer) or `done`; all when omitted.","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/CommentStatus"}},{"in":"query","name":"network","required":false,"schema":{"$ref":"#/components/schemas/Network"}},{"description":"One account (`SocialAccount.id`).","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only comments on ads (`true`) or only on regular posts (`false`).","in":"query","name":"is_ad","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SocialComment"}}},"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 comments","tags":["Social"]}},"/stores/{store_id}/social/comments/counts":{"get":{"operationId":"countSocialComments","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCounts"}}},"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":"Count open comments","tags":["Social"]}},"/stores/{store_id}/social/comments/{comment_id}":{"delete":{"description":"Deletes it on Instagram or Facebook (and its replies), and here.","operationId":"deleteSocialComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_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 comment in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`: the account is no longer connected"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Instagram or Facebook refused 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete a comment","tags":["Social"]},"patch":{"description":"Hide or show it on Instagram or Facebook, and mark it open or done.","operationId":"updateSocialComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialComment"}}},"description":"The thread"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 comment in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`: the account is no longer connected"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Instagram or Facebook refused 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Update a comment","tags":["Social"]}},"/stores/{store_id}/social/comments/{comment_id}/post":{"get":{"description":"The picture, caption and link of the post (or ad) the comment is on,\nread from Instagram or Facebook when asked. When Meta does not answer,\nwhat was stored with the comment comes back, without a picture.","operationId":"getSocialCommentPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentPost"}}},"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 comment 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 comment's post","tags":["Social"]}},"/stores/{store_id}/social/comments/{comment_id}/private-reply":{"post":{"description":"Sends the person who commented a private message about their comment\n(Instagram allows one, within 7 days of the comment). Their answer\narrives in the inbox as a conversation. Instagram only.","operationId":"privateReplySocialComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_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/CommentReplyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialComment"}}},"description":"The thread"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 comment in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`, or `instagram_only`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty message"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Instagram refused it (for example, already answered or past 7 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Answer by Instagram Direct","tags":["Social"]}},"/stores/{store_id}/social/comments/{comment_id}/reply":{"post":{"description":"Posts the reply under the comment on Instagram or Facebook (on Instagram\na reply to a reply goes under the first comment, as in the app) and\nmarks the thread done.","operationId":"replySocialComment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_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/CommentReplyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialComment"}}},"description":"The thread, with the reply"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 comment in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`account_unavailable`: the account is no longer connected"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty reply"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_refused`: Instagram or Facebook refused it (Meta's message)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_unavailable`: Meta is down, rate limiting or did not answer; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reply to a comment","tags":["Social"]}},"/stores/{store_id}/social/comments/{comment_id}/suggest":{"post":{"description":"A short public reply in the brand's voice, from the post, the thread and\nthe store's knowledge base. Nothing is posted.","operationId":"suggestSocialCommentReply","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comment id","in":"path","name":"comment_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/SuggestedCommentReply"}}},"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 comment 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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_failed`: the model call failed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_not_configured`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Suggest a reply to a comment","tags":["Social"]}},"/stores/{store_id}/social/facebook-pages/{page_id}":{"delete":{"description":"Mobiari stops publishing on it and forgets its token. Posts already\npublished stay on Facebook; scheduled ones lose this destination.","operationId":"disconnectSocialFacebookPage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The Page's id in Mobiari (`SocialAccount.id`)","in":"path","name":"page_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 Page 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":"Disconnect a Facebook Page","tags":["Social"]}},"/stores/{store_id}/social/facebook/authorize":{"post":{"description":"The Facebook Login address. The person picks the Pages Mobiari may\npublish on; each comes back connected to this store (a Page connected\nto another store stays there).","operationId":"authorizeSocialFacebook","parameters":[{"description":"Store id","in":"path","name":"store_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/SocialAuthorizeUrl"}}},"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":"`facebook_not_configured`: no Meta app on this server"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting Facebook Pages","tags":["Social"]}},"/stores/{store_id}/social/insights":{"get":{"description":"Followers, daily reach, views and interactions, the best posts of the\nwindow, and the paid orders our attribution credits to Instagram and\nFacebook (last touch). Numbers are refreshed from Meta every few hours.","operationId":"getSocialInsights","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The window, in days up to today: 7, 30 or 90. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialInsights"}}},"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 social insights","tags":["Social"]}},"/stores/{store_id}/social/insights/refresh":{"post":{"description":"Asks Meta for the store's numbers now instead of waiting for the next\nscheduled refresh. Accounts that fail keep their last numbers.","operationId":"refreshSocialInsights","parameters":[{"description":"Store id","in":"path","name":"store_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":"Refreshed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing permission"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Refresh social insights","tags":["Social"]}},"/stores/{store_id}/social/instagram-accounts/{account_id}":{"delete":{"description":"Mobiari stops publishing on it, stops receiving its messages and forgets\nits token. Posts already published stay on Instagram; scheduled ones lose\nthis destination. Its conversations stay, and connecting the same account\nagain picks them up.","operationId":"disconnectSocialInstagramAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The account's id in Mobiari (`SocialAccount.id`)","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 Instagram account 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":"Disconnect an Instagram account","tags":["Social"]}},"/stores/{store_id}/social/instagram/authorize":{"post":{"description":"The Instagram Business Login address, asking for messages, publishing,\ncomments and insights. The account comes back connected to the inbox\ntoo (or, if it already was, with the new permissions).","operationId":"authorizeSocialInstagram","parameters":[{"description":"Store id","in":"path","name":"store_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/SocialAuthorizeUrl"}}},"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":"`instagram_not_configured`: no Meta app on this server"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start connecting Instagram for publishing","tags":["Social"]}},"/stores/{store_id}/social/posts":{"get":{"description":"Newest date first, where a post's date is when it was published, else\nwhen it is scheduled, else when it was created. `after`/`before` pick a\nwindow (a calendar month).","operationId":"listSocialPosts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/PostStatus"}},{"description":"Posts whose date (published, else scheduled, else created) is at or\nafter this.","in":"query","name":"after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"... and before this.","in":"query","name":"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_SocialPost"}}},"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 posts","tags":["Social"]},"post":{"description":"A draft. Send it for review, or schedule it, when it is ready.","operationId":"createSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_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/CreatePostRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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 file or account 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":"Create a post","tags":["Social"]}},"/stores/{store_id}/social/posts/{post_id}":{"delete":{"description":"Removes it from Mobiari. Anything already published stays on Instagram\nand Facebook.","operationId":"deleteSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_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 post in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_not_editable`: it is being published right now"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 post","tags":["Social"]},"get":{"operationId":"getSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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 post 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 post","tags":["Social"]},"patch":{"description":"Drafts, posts in review and failed posts can be changed with\n`marketing.write`; a scheduled post only with `marketing.publish`.","operationId":"updateSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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 post in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_not_editable`: it is publishing, published or cancelled"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a file or account 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":"Update a post","tags":["Social"]}},"/stores/{store_id}/social/posts/{post_id}/return":{"post":{"description":"Withdraws it from review (its author, with `marketing.write`) or from\nthe schedule (`marketing.publish`), optionally with a note on what to\nchange. Not once any account started publishing it.","operationId":"returnSocialPostToDraft","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_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/ReturnPostRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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 post in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_not_editable`: not in review or scheduled, or already publishing"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 post back to draft","tags":["Social"]}},"/stores/{store_id}/social/posts/{post_id}/schedule":{"post":{"description":"Approves it and sets when it goes out (now when `scheduled_at` is\nomitted). Also retries a failed or partial post on the accounts that\nfailed. Needs `marketing.publish`.","operationId":"scheduleSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_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/SchedulePostRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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 post in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_not_editable`: it is publishing, published or cancelled"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_invalid`: `details.problems` says what to fix"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Schedule a post","tags":["Social"]}},"/stores/{store_id}/social/posts/{post_id}/submit":{"post":{"description":"A draft goes to the people with `marketing.publish`, who schedule it or\nsend it back.","operationId":"submitSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Post id","in":"path","name":"post_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/SocialPost"}}},"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 post in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_not_editable`: it is not a draft"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`post_invalid`: `details.problems` says what to fix"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 post for review","tags":["Social"]}},"/stores/{store_id}/social/posts/{post_id}/targets/{target_id}/published":{"delete":{"description":"Requires marketing.publish. Keeps the Mobiari history and all other\ndestinations. A Meta refusal never marks the copy as deleted.","operationId":"deletePublishedSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"post_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"target_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed Dependency"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Delete the selected published Facebook feed copy","tags":["Social"]},"patch":{"description":"Requires marketing.publish. Changes only the selected Facebook copy;\nthe original draft and other destinations remain unchanged.","operationId":"updatePublishedSocialPost","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"post_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"target_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublishedPostRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}},"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"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed Dependency"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Gateway"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Edit a published Facebook feed post's text","tags":["Social"]}},"/stores/{store_id}/spec-fields/{field_id}/suggestions":{"get":{"description":"Distinct free-form values this store has entered for the field, most\nrecently used first (the 100 most recent). Feeds autocomplete on text,\ndimension and weight inputs and the \"recently used\" section of\nfree-form taxonomy pickers.","operationId":"listSpecFieldSuggestions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Spec field id","in":"path","name":"field_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_String"}}},"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 values used for a spec field","tags":["Products"]}},"/stores/{store_id}/stock":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/stock-counts":{"get":{"description":"Count sheets, newest first, with how far along each is.","operationId":"listStockCounts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"description":"Where a count stands. `draft` and `counting` accept entries; `posted`\nand `cancelled` are closed.","enum":["draft","counting","posted","cancelled"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StockCount"}}},"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 counts","tags":["Inventory"]},"post":{"description":"Draws a count sheet for one location, snapshotting what the book says\neach active variant has there. Nothing moves until the count is posted.","operationId":"createStockCount","parameters":[{"description":"Store id","in":"path","name":"store_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/StockCountCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCount"}}},"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":"`location_not_in_store`, `no_inventory_location`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start a stock count","tags":["Inventory"]}},"/stores/{store_id}/stock-counts/{count_id}":{"get":{"description":"The sheet and its lines (up to 2000, by name), optionally only the\nvariances, only the uncounted lines, or those matching a search. To find\nthe line for a scanned barcode, pass it as `search`.","operationId":"getStockCount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Stock count id","in":"path","name":"count_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"filter","required":false,"schema":{"description":"Which lines of a count sheet to return.","enum":["all","variance","uncounted"],"type":"string"}},{"description":"Matches SKU, barcode or name.","in":"query","name":"search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCountDetail"}}},"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":"`stock_count_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 stock count","tags":["Inventory"]}},"/stores/{store_id}/stock-counts/{count_id}/cancel":{"post":{"description":"Abandons the sheet without moving stock. A posted count cannot be\ncancelled; cancelling a cancelled one is a no-op.","operationId":"cancelStockCount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Stock count id","in":"path","name":"count_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/StockCount"}}},"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":"`stock_count_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`count_closed`: already posted"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 stock count","tags":["Inventory"]}},"/stores/{store_id}/stock-counts/{count_id}/import":{"put":{"description":"Fills a count sheet from a spreadsheet: a column of SKUs (`sku`,\n`codigo`, `code`, `referencia`) and one of quantities (`quantidade`,\n`qtd`, `contagem`, `contado`, `quantity`, `counted`, `qty`, `em_maos`);\nwithout a recognisable header, the first two columns. Blank quantities\nstay uncounted; `3`, `3,0` and `3.0` all read as 3. Every line the file\nfills is counted as of the import, a figure it repeats included. Writes\ncounted quantities only: the sheet still has to be posted. SKUs not on the\nsheet are reported, not added.","operationId":"importStockCount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Stock count id","in":"path","name":"count_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"The spreadsheet as CSV","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCountImportResult"}}},"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":"`stock_count_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`count_closed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`empty_file`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 counted quantities from CSV","tags":["Inventory"]}},"/stores/{store_id}/stock-counts/{count_id}/items/{line_id}":{"patch":{"description":"Sets (or clears) what was counted on one line, and records that it was\ncounted now: posting applies the figure to the stock as it was at this\nmoment. Send a line only when it was counted. Sending the same figure\nagain says the shelf was counted again and still holds it. Absolute, so\nretrying is harmless. Moves no stock until the count is posted.","operationId":"setStockCountLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Stock count id","in":"path","name":"count_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Line id (`StockCountItem.id`)","in":"path","name":"line_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCountLineUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCountItem"}}},"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":"`stock_count_not_found`, `stock_count_line_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`count_closed`: posted or cancelled"},"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":"Enter a counted quantity","tags":["Inventory"]}},"/stores/{store_id}/stock-counts/{count_id}/post":{"post":{"description":"Applies the sheet, all in one transaction, and the count becomes\n`posted`. Each counted line corrects the book as it was when the line\nwas entered: on-hand at the location becomes the counted figure plus\nwhat physically moved since (sales, shipments, receipts, transfers,\nbuilds), so stock that moved between counting and posting is kept. A\nline that changes nothing writes no movement; the others write one\n`count` movement with the difference. A count can be posted once: a\nretry answers 409 `count_closed` (with an `Idempotency-Key` it replays\nthe first answer instead).","operationId":"postStockCount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Stock count id","in":"path","name":"count_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/StockCountPostRequest"}]}}},"description":"Optional"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockCountPostResult"}}},"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":"`stock_count_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`count_closed`, `inventory_managed_externally`, `logical_stock_readonly` (a kit on an old sheet; `details.variant_id`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Post a stock count","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation":{"get":{"description":"The last finished run of the stock checks for this store, the run in\nprogress if there is one, and how many findings are open. The checks run\nevery night and compare the stock book with what should explain it:\nreserved units with the holds behind them, units on hand with the last\nmovement, the item tables with the stock they mirror, holds with the state\nof their order, and recipes with their parts. A finding of class `drift`\nis a number that is wrong now; `informational` ones are old data and\nrecipe housekeeping. Nothing is corrected.","operationId":"getStockReconciliation","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockReconciliation"}}},"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 stock reconciliation","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/findings":{"get":{"description":"What the stock checks found: one row per subject (a variant or item, at a\nlocation when the check is per location) and check, with the number the\ncheck expected and the one it read. Open findings by default; `resolved`\nlists the ones a later run no longer saw. `class=drift` leaves out the\ninformational ones. Newest first.","operationId":"listStockReconciliationFindings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Defaults to `open`.","in":"query","name":"status","required":false,"schema":{"description":"Which findings to list.","enum":["open","ignored","resolved","all"],"type":"string"}},{"description":"Only findings of this class. Both when absent.","in":"query","name":"class","required":false,"schema":{"description":"How much a finding matters.\n\n- `drift`: a number in the stock book is wrong now, or a hold is where\n  none should be.\n- `informational`: old data or housekeeping that does not change what is\n  available today: stock from before the ledger, recipe lines that point\n  at retired parts or differ between the two recipe tables.","enum":["drift","informational"],"type":"string"}},{"description":"Only findings of this check.","in":"query","name":"check","required":false,"schema":{"description":"What a finding broke.\n\n- `reserved_below_order_holds`: at one location, `reserved` is less than\n  the active order holds placed there.\n- `reserved_total_mismatch`: across a variant's locations, `reserved` is\n  not the active order holds plus the cart holds.\n- `item_reserved_mismatch`: the same for an item that has no variant.\n- `quantity_null`, `quantity_negative`, `reserved_exceeds_on_hand`: a\n  stock row that cannot be right by itself.\n- `ledger_balance_mismatch`: the last movement's balance is not `on_hand`.\n- `stock_without_ledger`: units on hand that no movement accounts for.\n- `mirror_stock_mismatch`: the item tables disagree with the stock row\n  they mirror.\n- `mirror_check_failed`: a store total of the item mirror is off:\n  variants with no item, or recent movements with no mirrored movement\n  (`details.check_name` is `items` or `movements`).\n- `hold_on_closed_order`: an active hold on a cancelled, refunded or\n  fulfilled order.\n- `hold_on_erp_store`: a hold in a store whose stock an ERP owns.\n- `expired_cart_hold`: a cart hold still there long after it expired.\n- `recipe_part_inactive`, `recipe_part_other_store`: a recipe line whose\n  part is inactive or archived, or belongs to another store.\n- `recipe_mirror_missing`, `recipe_mirror_orphan`: the two recipe tables\n  disagree about a line.\n\nThe fiscal checks (`goods_reconciliation.sql`, the documents against the\nledger):\n\n- `goods_left_without_note`: a shipment left and took stock, and no\n  authorized note covers it.\n- `note_without_movement`: an authorized sale, remessa or bonificação note\n  whose goods never left stock; a devolução de compra that took nothing\n  out; a devolução de venda whose goods never came back.\n- `inbound_note_pending`: a supplier's note still not received.\n- `inbound_reversal_pending`: a received note the supplier cancelled, with\n  the reversal waiting for a decision.\n- `note_quantity_mismatch`: a note's units differ from what its receipt\n  booked or its shipment carried.\n- `third_party_overdue`: someone else's goods held past the store's limit.\n\nThe set may grow; tolerate unknown values.","enum":["reserved_below_order_holds","reserved_total_mismatch","item_reserved_mismatch","quantity_null","quantity_negative","reserved_exceeds_on_hand","ledger_balance_mismatch","stock_without_ledger","mirror_stock_mismatch","mirror_check_failed","hold_on_closed_order","hold_on_erp_store","expired_cart_hold","recipe_part_inactive","recipe_part_other_store","recipe_mirror_missing","recipe_mirror_orphan","goods_left_without_note","note_without_movement","inbound_note_pending","inbound_reversal_pending","note_quantity_mismatch","third_party_overdue"],"type":"string"}},{"description":"Only findings of this severity.","in":"query","name":"severity","required":false,"schema":{"description":"How much a finding matters, for the merchant: `high` is goods and papers\nthat disagree (a, b, d of the fiscal checks), `medium` a number of the\nstock book that is wrong now or a supplier's note waiting, `low` old data,\nhousekeeping and goods of others held long.","enum":["high","medium","low"],"type":"string"}},{"description":"`fiscal`: only the checks of documents against stock; `stock`: only\nthe checks of the stock book. Both when absent.","in":"query","name":"area","required":false,"schema":{"description":"Which family of checks.","enum":["fiscal","stock"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StockDriftFinding"}}},"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 reconciliation findings","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/findings/{finding_id}/ignore":{"post":{"description":"A member decides the divergence needs nothing (a note issued by another\nsystem, goods given away on purpose...) and says why. The finding leaves\nthe open list and the runs that still see it keep it ignored; when they\nstop seeing it, it closes like any other. 422 `reason_required` without\na reason of 3 to 500 characters; 409 `finding_state_changed` on a finding\nthat is not open.","operationId":"ignoreStockReconciliationFinding","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The finding.","in":"path","name":"finding_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/IgnoreFinding"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockDriftFinding"}}},"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":"`finding_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`finding_state_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`reason_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":"Ignore a reconciliation finding","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/findings/{finding_id}/reopen":{"post":{"description":"Undoes \"ignore\": the finding is open again. 409 `finding_state_changed`\non one that is not ignored (a resolved finding opens again only when a\nrun sees it).","operationId":"reopenStockReconciliationFinding","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The finding.","in":"path","name":"finding_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/StockDriftFinding"}}},"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":"`finding_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`finding_state_changed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reopen an ignored reconciliation finding","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/findings/{finding_id}/resolve":{"post":{"description":"A member says the divergence is dealt with (the note was issued, the\nshipment booked...). The finding closes now; if the next run still sees\nthe same divergence it opens again as a new finding. Works on an open or\nan ignored finding; 409 `finding_state_changed` on one already resolved.","operationId":"resolveStockReconciliationFinding","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The finding.","in":"path","name":"finding_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/StockDriftFinding"}}},"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":"`finding_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`finding_state_changed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 reconciliation finding resolved","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/runs":{"post":{"description":"Starts a check of the store now instead of waiting for the night and\nanswers at once with the run, `running`. The work goes on in the\nbackground: read `GET /stores/{store_id}/stock-reconciliation` until\n`current_run` is `null`; the run is then `latest_run` and its findings\nare in the list. It only reads stock and writes the report. One run at a\ntime per store: 409 `reconciliation_running` while another is in\nprogress.","operationId":"runStockReconciliation","parameters":[{"description":"Store id","in":"path","name":"store_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":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockReconciliationRun"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`reconciliation_running`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Run the stock reconciliation","tags":["Inventory"]}},"/stores/{store_id}/stock-reconciliation/settings":{"get":{"description":"How many days each fiscal check waits before a divergence is a finding:\na shipment without a note, a note whose goods did not move, a supplier's\nnote not received, and how long someone else's goods may stay\n(demonstração, conserto, consignação). The defaults until the store sets\nits own. `checks_start_on` is the day the fiscal checks start: what is\ndated before it is not compared (`null`: no limit).","operationId":"getStockReconciliationSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationSettings"}}},"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 reconciliation settings","tags":["Inventory"]},"put":{"description":"Replaces all six values. 1 to 60 days for the three waits, 1 to 730 for\nthe three limits of someone else's goods (422 `invalid_thresholds`).\n`checks_start_on`, when sent, moves the day the fiscal checks start; a\nday after today is refused (422 `checks_start_in_future`). The next run\nuses them, and closes the findings dated before the start.","operationId":"setStockReconciliationSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationSettings"}}},"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_thresholds`, `checks_start_in_future`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 reconciliation settings","tags":["Inventory"]}},"/stores/{store_id}/stock/away":{"get":{"description":"The store's goods sent for repair, demonstration or consignment that are\nstill out there, per counterparty, operation and item. They are not in\nstock (nothing sells them) and are still the store's.","operationId":"listOwnGoodsAway","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OwnGoodsAway"},"type":"array"}}},"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 own goods held by others","tags":["Inventory"]}},"/stores/{store_id}/stock/bulk-adjust":{"post":{"description":"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":"bulkAdjustStock","parameters":[{"description":"Store id","in":"path","name":"store_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/BulkStockAdjustRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$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"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`insufficient_stock`, `inventory_managed_externally`, `logical_stock_readonly` (`details.variant_id` names the line)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`items_out_of_range`, `ambiguous_adjustment`, `item_not_found_in_store` (`details.variant_id`), `location_not_in_store`, `no_inventory_location`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 stock in bulk","tags":["Inventory"]}},"/stores/{store_id}/stock/bulk-reorder":{"post":{"description":"Replaces the reorder point and quantity of many variants at once.","operationId":"bulkSetReorder","parameters":[{"description":"Store id","in":"path","name":"store_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/BulkReorderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkReorderResult"}}},"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 reorder points in bulk","tags":["Inventory"]}},"/stores/{store_id}/stock/export":{"get":{"description":"The whole filtered stock list (same filters as `listStock`, no paging)\nas a spreadsheet, columns `sku, nome, fisico, logico, em_maos,\nreservado, disponivel, montavel, gargalo_sku, ponto_reposicao,\nquantidade_reposicao`.","operationId":"exportStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV 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"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Export stock as CSV","tags":["Inventory"]}},"/stores/{store_id}/stock/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. Keyset-paged (`next_cursor`); `offset` also\nworks for page-number tables.","operationId":"listStockMovements","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/stock/movements/{movement_id}/reverse":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/stock/overview":{"get":{"description":"What needs attention today: out-of-stock and low-stock counts, totals,\nstock value at cost, open and overdue purchase orders, counts in\nprogress, and whether an ERP owns the numbers.","operationId":"getStockOverview","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockOverview"}}},"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 stock overview","tags":["Inventory"]}},"/stores/{store_id}/stock/parts":{"get":{"description":"Every part some product is built from, shortages first: its shelf, what\nthe queued builds of paid orders need and what is missing, what purchase\norders are bringing, and which products use it.","operationId":"listStockParts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the part's name, its product's title or its SKU.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Stock at this location only; omitted sums every location.","in":"query","name":"location_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["all","missing","low","out"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StockPartRow"}}},"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 parts","tags":["Inventory"]}},"/stores/{store_id}/stock/products":{"get":{"description":"One row per product with its variants, alphabetical. For products built\nfrom parts, each variant carries its parts: what one unit needs, the\nshelf, what the queued builds of paid orders still need and what is\nmissing, and what purchase orders are bringing. Every product is\nlisted; `is_part` marks those used in other products, which\n`listStockParts` also lists.","operationId":"listStockProducts","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches the product title, a variant title or a SKU.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Stock at this location only; omitted sums every location.","in":"query","name":"location_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["all","in_stock","low","out","missing_parts"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StockProductRow"}}},"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 by product","tags":["Inventory"]}},"/stores/{store_id}/stock/reorder-draft":{"post":{"description":"Creates a `draft` purchase order with one line per variant or stock item\nwhose available plus incoming units are at or below its reorder point:\n`reorder_quantity` units (or enough to reach the point), at the last\npurchase cost or the item's cost. Kits are left out: their parts are\nwhat is bought.","operationId":"createReorderDraft","parameters":[{"description":"Store id","in":"path","name":"store_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/ReorderDraftRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetail"}}},"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":"`nothing_below_reorder_point`, `supplier_not_found`, `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":"Draft a purchase order from low stock","tags":["Purchasing"]}},"/stores/{store_id}/stock/third-party":{"get":{"description":"What the store holds that someone else owns, per owner, operation and\nitem: goods received in consignment, for repair or for demonstration\n(their notes are received into this ledger, not into stock). Only what\nis still here (a balance other than zero).","operationId":"listThirdPartyStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ThirdPartyStockBalance"},"type":"array"}}},"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 goods held for others","tags":["Inventory"]}},"/stores/{store_id}/stock/transfer-route":{"get":{"description":"Whether moving goods between two locations crosses issuers (CNPJs) and\nso needs a transfer note. Needs only inventory read.","operationId":"getTransferRoute","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"from_location_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"to_location_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRoute"}}},"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":"`location_issuer_ambiguous`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Check how a transfer goes","tags":["Inventory"]}},"/stores/{store_id}/storefront-keys":{"get":{"description":"The store's live keys, oldest first. Revoked keys are not listed.","operationId":"listStorefrontKeys","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StorefrontKey"}}},"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 storefront keys","tags":["Sales Channels"]},"post":{"description":"Mints a `pk_live_…` key for the store's storefront channel. Send it as\n`X-Storefront-Key` on every storefront API call. Give each app its own\nkey so one can be revoked without touching the others.","operationId":"createStorefrontKey","parameters":[{"description":"Store id","in":"path","name":"store_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/StorefrontKeyCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontKey"}}},"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 bad name or origin"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 storefront key","tags":["Sales Channels"]}},"/stores/{store_id}/storefront-keys/{key_id}":{"delete":{"description":"The key stops working within seconds. Themes the store renders keep\nworking: they pick up another live key (one is created if none is left).","operationId":"revokeStorefrontKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Storefront key id","in":"path","name":"key_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 live key 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":"Revoke a storefront key","tags":["Sales Channels"]},"patch":{"description":"Rename it or change the browser origins that may use it. Takes effect\nwithin seconds.","operationId":"updateStorefrontKey","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Storefront key id","in":"path","name":"key_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontKeyUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontKey"}}},"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 live key in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a bad name or origin"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 storefront key","tags":["Sales Channels"]}},"/stores/{store_id}/storefront/deployments":{"get":{"description":"Builds of the store's connected theme repository, newest first, with\n`is_active` set on the one the production storefront serves.","operationId":"listStorefrontDeployments","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StorefrontDeployment"}}},"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 theme deployments","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/draft":{"post":{"description":"Snapshots the active deployment's files (or the baked-in default theme\nwhen the store has none) into a new `draft` deployment the assistant or\ntheme editor rewrites file by file. Drafts preview like any deployment\nonce ready and promote through the normal flow. The body is optional:\n`{\"message\": \"...\"}` says what the draft is for. The draft remembers the\nlive deployment it started from (`parent_deployment_id`) and who made it.","operationId":"createDraftDeployment","parameters":[{"description":"Store id","in":"path","name":"store_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/DeploymentNote"}]}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontDeployment"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: the body is not a JSON object"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`store_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_message`: over 500 characters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Start an AI theme draft","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/import":{"post":{"description":"`multipart/form-data` with the zip in `file` and, optionally, a `message`\nsaying what the import is. Entries are sanitized\n(directories, dotfiles, `__MACOSX` and `node_modules` skipped, 2000\nfiles and 20 MiB max) and validated like written files: Liquid must\nparse, JSON must parse, binaries must be images or fonts. The first\nproblem fails the whole import with 422 and nothing is created;\notherwise a new `manual` draft holds the files, ready to preview.","operationId":"importDeployment","parameters":[{"description":"Store id","in":"path","name":"store_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/ThemeImportForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontDeployment"}}},"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":"`store_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_theme_zip`: problems listed, nothing created"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 theme zip as a draft deployment","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/diff":{"get":{"description":"The files that differ between a deployment and another one of the same\nstore (added, modified, removed, with sizes), and, with `path`, the\nunified line diff of one text file. `against` defaults to the\ndeployment's parent (the live deployment it started from), else to the\nlive one. Use it before promoting a draft to see exactly what goes live.","operationId":"diffStorefrontDeployment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment to compare against (\"before\"). Defaults to the deployment's parent, else the live one.","in":"query","name":"against","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Theme path (starting with `/`) to get a unified line diff of.","in":"query","name":"path","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentDiff"}}},"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":"`deployment_not_found` / `file_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_not_text`: the file asked for is binary"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Compare two deployments","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/export":{"get":{"description":"Downloads every theme file of one deployment (any status) as\n`<store>-theme-<shortid>.zip`, paths relative. The counterpart of\nversion control for merchants: any version in the list can leave the\nplatform as files and come back through the import endpoint.","operationId":"exportDeployment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"$ref":"#/components/schemas/DeploymentExportFile"}}},"description":"The package"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`deployment_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":"Export a deployment as a zip","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/file":{"get":{"description":"Full content of a single file for the editor or the assistant, from any\ndeployment of the store (a draft, a ready build, the live one, an old\none). Binary files (images, fonts) answer 422 `file_not_text`.","operationId":"readDraftFile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Theme-relative path starting with `/`.","in":"query","name":"path","required":true,"schema":{"type":"string"}},{"description":"1-based first line, defaults to 1.","in":"query","name":"offset","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Max lines, defaults to 400, capped at 2000.","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftFileContent"}}},"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":"`deployment_not_found` / `file_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_not_text`: the file is binary"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 one deployment file","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/files":{"get":{"description":"Paths with sizes and content hashes, not contents; fetch one file at a\ntime for editing. Works for any deployment of the store (a draft, a\nready build, the live one, an old one); only drafts can be written.","operationId":"listDraftFiles","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DraftFile"},"type":"array"}}},"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":"`deployment_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 deployment's files","tags":["Storefront"]},"put":{"description":"Upserts up to 50 files per call. Every file is validated (path shape\nand size, Liquid templates must parse with the production parser, JSON\nmust parse); the first problem fails the whole call with 422 and\nnothing is written.","operationId":"writeDraftFiles","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftFilesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftValidation"}}},"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":"`deployment_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_draft_files`: nothing was written"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 files into a draft deployment","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/files/assets":{"post":{"description":"`multipart/form-data` with the file in `file` (PNG, JPEG, GIF, WebP,\nAVIF, ICO, SVG, WOFF/WOFF2/TTF/OTF, up to 5 MiB) and the theme path in\n`path` (must start with `/assets/`). Text files keep using the files\nendpoint; this one exists because images cannot travel as JSON.\nServed back through the normal asset path once written.","operationId":"uploadDraftAsset","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_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/DraftAssetUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAsset"}}},"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":"`deployment_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_draft_asset`: bad path, type or size"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 binary asset into a draft deployment","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/files/from-library":{"post":{"description":"Copies a file from the store's media library into the draft at the\ngiven theme path, so themes bundle their images instead of\nre-uploading them per draft. The file must belong to the store's\ntenant and be public (theme assets render to visitors).","operationId":"importLibraryFile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_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/FromLibraryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAsset"}}},"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":"`deployment_not_found` / `file_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_draft_asset`: not an asset type, or unreadable"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 library file into a draft deployment","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/promote":{"post":{"description":"Makes a `ready` deployment the one the production storefront serves\n(also the rollback button: promote an older one) and purges the CDN\ncache so the change is live at once.\n\nA draft that was never promoted is only promoted while the deployment it\nstarted from (`parent_deployment_id`) is still the live one; if someone\nelse promoted since, the answer is 409 `stale_base` and nothing changes\n(start a new draft from the live theme, or pass `force=true` to replace\nwhat was promoted). Rollbacks (a deployment promoted before) and\ndeployments without a parent (imports, older ones) are not checked.","operationId":"promoteStorefrontDeployment","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Promote even when the draft was made from a deployment that is no longer live,\nreplacing what was promoted since. Defaults to false.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"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":"Promoted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 deployment in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`deployment_not_ready`: the deployment is building, failed or archived; `stale_base`: the live deployment changed since this draft was made; `storefront_repo_not_connected`: the store has no live-theme row"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Promote a deployment","tags":["Storefront"]}},"/stores/{store_id}/storefront/deployments/{deployment_id}/ready":{"post":{"description":"Revalidates every file (templates must parse, JSON must parse),\nensures the store has a repository row for later promotion, then flips\nthe draft to `ready` so preview hosts and promote treat it like any\nbuild. Invalid drafts stay drafts with a 422 naming every problem.\nThe optional body `{\"message\": \"...\"}` sets (or replaces) the message\nthat says what this version changes.","operationId":"markDraftReady","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Deployment id","in":"path","name":"deployment_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/DeploymentNote"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftValidation"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`bad_request`: the body is not a JSON object"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`deployment_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`draft_not_ready`: problems listed, draft unchanged; `invalid_message`: over 500 characters"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 draft ready","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor":{"get":{"description":"The store's pages (the live theme's JSON templates) and section groups,\neach document as the editor shows it, and the sections that can be\nadded.","operationId":"getStorefrontEditor","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorState"}}},"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":"Open the storefront editor","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/discard":{"post":{"description":"Every document goes back to its published version (or the theme's).","operationId":"discardStorefrontEditor","parameters":[{"description":"Store id","in":"path","name":"store_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":"Discarded"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Discard the drafts","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/documents":{"put":{"description":"Replaces the document's draft. Pages and groups must name section and\nblock types that exist, the site's pages need free, valid addresses and\nmenus at most three levels (`invalid_document`). With `base_revision`,\na document changed elsewhere meanwhile is refused (`edit_conflict`,\ndetails carry the current content and revision).","operationId":"saveStorefrontEditorDocument","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveEditorDocumentRequest"}}},"required":true},"responses":{"204":{"description":"Saved; the `x-document-revision` header carries the new revision","headers":{"x-document-revision":{"description":"The document's revision after this save","schema":{"format":"int64","type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`edit_conflict`: changed elsewhere since `base_revision`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: not an editable path; `invalid_document`: what is wrong with 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":"Save a draft","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/frame":{"post":{"description":"A short-lived link that renders the draft for the editor's preview\nframe, outside the admin page's own restrictions.","operationId":"getStorefrontEditorFrame","parameters":[{"description":"Store id","in":"path","name":"store_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/EditorFrameLink"}}},"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 preview frame link","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/publish":{"post":{"description":"Every draft (or only those of `paths`) becomes the live version; the\npublish is kept with what each document became.","operationId":"publishStorefrontEditor","parameters":[{"description":"Store id","in":"path","name":"store_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/PublishEditorRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishEditorResult"}}},"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":"Publish the drafts","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/render":{"post":{"description":"The page as it will look once published, for the editor's preview: the\nHTML points at the store's address (`<base>`) and carries the script\nthat lets the editor select sections in it.","operationId":"renderStorefrontEditor","parameters":[{"description":"Store id","in":"path","name":"store_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/RenderEditorRequest"}}},"required":true},"responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"The page"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Render the draft","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/schedule":{"delete":{"operationId":"cancelStorefrontEditorPublish","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Cancelled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Cancel the scheduled publish","tags":["Storefront"]},"put":{"description":"The drafts go live at `run_at` (replaces a pending schedule). Publishing\nby hand before then cancels it.","operationId":"scheduleStorefrontEditorPublish","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEditorPublishRequest"}}},"required":true},"responses":{"204":{"description":"Scheduled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"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":"Schedule a publish","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/share":{"post":{"description":"A link that shows the unpublished site to anyone who has it, for 7\ndays, page to page, without the editor.","operationId":"shareStorefrontEditorDraft","parameters":[{"description":"Store id","in":"path","name":"store_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/EditorShareLink"}}},"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":"Share the draft","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/starters":{"get":{"description":"Ready-made sites (home, header, footer, menus, styles, pages) to start\nfrom in the editor.","operationId":"listStorefrontEditorStarters","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EditorStarter"},"type":"array"}}},"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 starter sites","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/starters/{starter_id}/apply":{"post":{"description":"Writes the starter to the draft: home page, header, footer, menus and\nstyles are replaced; its pages are added (a page at the same address\nkeeps its place and takes the starter's sections). Nothing goes live\nuntil you publish.","operationId":"applyStorefrontEditorStarter","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Starter id","in":"path","name":"starter_id","required":true,"schema":{"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/ApplyStarterResult"}}},"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":"Apply a starter site","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/versions":{"get":{"description":"The site's publishes, newest first (up to 100).","operationId":"listStorefrontEditorVersions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EditorVersion"},"type":"array"}}},"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 published versions","tags":["Storefront"]}},"/stores/{store_id}/storefront/editor/versions/{version_id}/restore":{"post":{"description":"Puts that version of the whole site in the draft (pages, menus,\nstyles...), to review and publish. Documents it did not have go back\nto the theme's.","operationId":"restoreStorefrontEditorVersion","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version","in":"path","name":"version_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":"In the draft"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`not_restorable`: an older version that only holds what changed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Restore a version","tags":["Storefront"]}},"/stores/{store_id}/storefront/preview-suffix":{"get":{"description":"The host suffix preview deployments are served under, for building\npreview links per deployment.","operationId":"getStorefrontPreviewSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPreviewSettings"}}},"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 preview settings","tags":["Storefront"]}},"/stores/{store_id}/storefront/routes":{"get":{"description":"Where a store's product, category, cart, search, wishlist and account\npages live. Pages the store did not change are at the platform's own\naddresses.","operationId":"getStorefrontRoutes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRoutes"}}},"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 addresses of the built-in pages","tags":["Storefront"]},"put":{"description":"Moves pages to the addresses sent (`/loja/{handle}` for a product, `/sacola`\nfor the cart). Links the platform prints, the sitemap and the e-mails\nfollow at once, the previous addresses (the platform's own, an English\nspelling, or an earlier choice) redirect permanently to the new one, and the\nstore's page cache is dropped. Addresses are lowercase words with `-` or\n`_`, may not start with a word the platform uses itself (`/v1`, `/images`,\n`/files`...), may not answer the same address as another page, and may not\nshadow a page made in the editor.","operationId":"updateStorefrontRoutes","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRoutesUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRoutes"}}},"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.<page>` says why an address was refused (`invalid_pattern`, `reserved_path`, `missing_placeholder`, `unexpected_placeholder`, `conflict`, `page_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":"Change the addresses of the built-in pages","tags":["Storefront"]}},"/stores/{store_id}/storefront/sign-in":{"get":{"description":"Google and Apple, each with its settings (never the secret) and the return\naddresses to register with the provider.","operationId":"listStorefrontSignInProviders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontSignInProviders"}}},"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 shopper sign-in providers","tags":["Storefront"]}},"/stores/{store_id}/storefront/sign-in/{provider}":{"delete":{"description":"Forgets the store's app with the provider; its button leaves the sign-in\npage. Customers who signed in with it keep their accounts and sign in by\ne-mail.","operationId":"deleteStorefrontSignInProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"google or apple","in":"path","name":"provider","required":true,"schema":{"$ref":"#/components/schemas/StorefrontSignInProviderKey"}}],"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":"Unknown provider"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 shopper sign-in provider","tags":["Storefront"]},"put":{"description":"Saves the store's app with Google or Apple. The secret (Google's client\nsecret, Apple's private key) is stored encrypted; leave it out to keep the\nsaved one. With `enabled`, the provider's button shows on the store's\nsign-in page.","operationId":"updateStorefrontSignInProvider","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"google or apple","in":"path","name":"provider","required":true,"schema":{"$ref":"#/components/schemas/StorefrontSignInProviderKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontSignInProviderUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontSignInProviders"}}},"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":"Unknown provider"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `details.fields` names what is missing or malformed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 up a shopper sign-in provider","tags":["Storefront"]}},"/stores/{store_id}/subscriptions":{"get":{"description":"Soonest next order first.","operationId":"listRecurringOrders","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_RecurringOrder"}}},"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"]},"post":{"operationId":"createRecurringOrder","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateRecurringOrder"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringOrder"}}},"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"]}},"/stores/{store_id}/subscriptions/summary":{"get":{"operationId":"getRecurringOrderSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringOrderSummary"}}},"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":"Subscriptions in numbers","tags":["Recurring orders"]}},"/stores/{store_id}/subscriptions/{subscription_id}":{"get":{"operationId":"getRecurringOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"RecurringOrder id","in":"path","name":"subscription_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringOrder"}}},"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"]},"patch":{"description":"Pause, resume, cancel, skip the next order, change the interval, the date\nor the lines.","operationId":"updateRecurringOrder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"RecurringOrder id","in":"path","name":"subscription_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringOrder"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringOrder"}}},"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"]}},"/stores/{store_id}/supplier-invoices":{"get":{"description":"Newest note first.","operationId":"listSupplierInvoices","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/supplier-invoices/not-goods":{"post":{"description":"For notes that are not goods for resale: an expense bought with the\nstore's CNPJ (supplies, food, a uniform). Each pending note becomes\n`not_goods` with the operation `use_consumption`: nothing enters stock,\nno payables are created, and the reconciliation stops waiting for it. It\nis still a purchase the accountant books, so it stays in the accountant's\npackage. A note of another store, one no longer pending or one its issuer\ncancelled is skipped, with the reason. 422 `invalid_invoice_ids` for an\nempty list or more than 200.","operationId":"markSupplierInvoicesNotGoods","parameters":[{"description":"Store id","in":"path","name":"store_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/SupplierInvoicesNotGoods"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoicesNotGoodsResult"}}},"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_invoice_ids`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 supplier invoices as not goods","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/sefaz":{"get":{"description":"Where the store stands in fetching its supplier notes from SEFAZ\n(Distribuição DF-e): whether it is set up and on, the last answer, when\nthe next query is allowed, and how many notes await their XML.","operationId":"getSupplierInvoiceSefazStatus","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DfeStatus"}}},"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":"SEFAZ sync status","tags":["Purchasing"]},"patch":{"operationId":"updateSupplierInvoiceSefaz","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DfeSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DfeStatus"}}},"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":"`fiscal_not_configured` (no fiscal profile with a certificate)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the SEFAZ sync or auto-receive on or off","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/sefaz/sync":{"post":{"description":"One run: documents after the last NSU (up to 250), full notes imported as\nsupplier invoices, ciência sent for new notes addressed to the store.\nRefused while SEFAZ's hour has not passed (`dfe_wait`, with\n`details.next_allowed_at`) or another run is going (`dfe_running`).","operationId":"syncSupplierInvoicesFromSefaz","parameters":[{"description":"Store id","in":"path","name":"store_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/DfeRunResult"}}},"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":"`dfe_wait`, `dfe_running`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_not_configured`, `fiscal_profile_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":"Fetch supplier notes from SEFAZ now","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}":{"get":{"operationId":"getSupplierInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/manifest":{"post":{"description":"Sends the store's manifestação do destinatário for the note to SEFAZ\n(Ambiente Nacional), signed with the store's A1 certificate:\n`confirmation` (confirmação da operação, 210200), `unknown`\n(desconhecimento, 210220) or `not_performed` (operação não realizada,\n210240, with a justification of 15 to 255 characters). The answer is kept\non the invoice (`manifest_*`). A refusal from SEFAZ is\n`manifestation_rejected` with `details.status` and `details.message`.","operationId":"manifestSupplierInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SupplierInvoiceManifest"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_not_configured`, `fiscal_profile_invalid`, `invalid_justification`, `manifestation_rejected` (`details.status`, `details.message`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`sefaz_unavailable`: no answer from SEFAZ; try again"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Manifest on a supplier invoice","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/receive":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/reopen":{"post":{"description":"Undoes [`mark_not_goods`] for one note: it is pending again, its\noperation back to what its CFOPs say. 409 `invoice_not_marked_not_goods`\nfor a note in any other state.","operationId":"reopenSupplierInvoice","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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_marked_not_goods`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Reopen a supplier invoice marked as not goods","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/returns":{"get":{"description":"What of the note can still go back to the supplier, line by line, its\nopen installments, and the returns already made with their NF-e and what\nthey booked.","operationId":"getSupplierReturns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SupplierReturnState"}}},"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":"A supplier note's returns","tags":["Purchasing"]},"post":{"description":"Emits the NF-e de devolução for the chosen lines and quantities of the\nsupplier's note (numbered, signed and transmitted once; the fiscal worker\nkeeps trying until SEFAZ answers). Once authorized in production, the\ngoods leave stock and the note's value comes off the note's open\ninstallments.","operationId":"createSupplierReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SupplierReturnRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierReturn"}}},"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":"`supplier_invoice_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_return_not_allowed`, `supplier_return_other_company`, `fiscal_production_locked`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`fiscal_validation_failed` with `details.issues` (`return_quantity_exceeds`, `supplier_return_st`...)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Return goods to the supplier","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/returns/preview":{"post":{"description":"The NF-e de devolução for the chosen lines and quantities, validated,\nwith what it would take out of stock and off the installments once\nauthorized. Spends no number.","operationId":"previewSupplierReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SupplierReturnRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierReturnPreview"}}},"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":"`supplier_return_not_allowed`, `supplier_return_other_company`, `invoice_xml_unreadable`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Preview a return to the supplier","tags":["Purchasing"]}},"/stores/{store_id}/supplier-invoices/{invoice_id}/reversal":{"post":{"description":"For a received note its issuer cancelled (`reversal_status = pending`).\n`apply` reverses the stock its receipt brought in (each `stock_in`\nmovement gets its opposite; units no longer on hand come back as\n`shortfalls`), takes the units off its purchase order lines and cancels\nits open installments (paid ones are left, in `paid_payables`); the\nmoving average cost is not rewound. `dismiss` keeps everything (the\nsupplier reissued the note for the same goods).","operationId":"decideSupplierInvoiceReversal","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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/SupplierInvoiceReversal"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierInvoiceReversalResult"}}},"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":"`reversal_not_pending` (no reversal waits: decided already, or the note was not cancelled after receipt), `invoice_has_returns` (a return to the supplier took goods out of this note: adjust the stock by hand), `inventory_managed_externally`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Decide a supplier invoice's reversal","tags":["Purchasing"]}},"/stores/{store_id}/supplier-returns/{return_id}/cancel":{"post":{"description":"Cancels its authorized NF-e at SEFAZ (within the state's deadline, 24\nhours in most), then puts the goods back in stock and the installments\nback as they were.","operationId":"cancelSupplierReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Supplier 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/SupplierReturnCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierReturn"}}},"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_return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_return_without_note`, `fiscal_not_authorized`, `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":"Cancel a return to the supplier","tags":["Purchasing"]}},"/stores/{store_id}/supplier-returns/{return_id}/refresh":{"post":{"description":"For a note still waiting: asks SEFAZ where it stands, then books or\nundoes the return's stock and installments to match.","operationId":"refreshSupplierReturn","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Supplier 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/SupplierReturn"}}},"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_return_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`supplier_return_without_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":"Ask SEFAZ about a return's note","tags":["Purchasing"]}},"/stores/{store_id}/suppliers":{"get":{"description":"Active suppliers first, then by name, with their open order counts.","operationId":"listSuppliers","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/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"]}},"/stores/{store_id}/suppliers/{supplier_id}":{"put":{"description":"Replaces every field (`is_active` omitted keeps the current value).","operationId":"updateSupplier","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/sync-connections":{"get":{"description":"The store's destinations with their streams' progress. Credentials are\nnever returned.","operationId":"listSyncConnections","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SyncConnectionDetail"},"type":"array"}}},"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 sync connections","tags":["Sync"]},"post":{"description":"Connects to the destination first (a Postgres URL must reach a public\nserver); the credentials are sealed and never returned.","operationId":"createSyncConnection","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateSyncConnection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncConnectionDetail"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sync_connection_failed` (with the reason) or `sync_kind_unknown`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Create a sync connection","tags":["Sync"]}},"/stores/{store_id}/sync-connections/google/authorize":{"post":{"description":"The Google address to open: the merchant signs in and allows Mobiari to\ncreate and update its own spreadsheet. Google sends the browser back to\nthe admin (`/automations?view=sync&google=complete|failed|cancelled`) with\nthe connection created. Works once, for ten minutes, for this person and store.","operationId":"authorizeGoogleSheetsSync","parameters":[{"description":"Store id","in":"path","name":"store_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/GoogleAuthorizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthorizeUrl"}}},"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":"`google_not_configured`: this server has no Google OAuth client"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Connect Google Sheets","tags":["Sync"]}},"/stores/{store_id}/sync-connections/google/service-account":{"get":{"description":"The e-mail of Mobiari's service account: the merchant gives it the\n\"BigQuery Data Editor\" role on the dataset to mirror into.","operationId":"getSyncGoogleServiceAccount","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleServiceAccount"}}},"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":"Mobiari's Google account for BigQuery","tags":["Sync"]}},"/stores/{store_id}/sync-connections/{connection_id}":{"delete":{"description":"Stops mirroring and forgets the credentials. What was written at the\ndestination stays there.","operationId":"deleteSyncConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync connection id","in":"path","name":"connection_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 connection 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 sync connection","tags":["Sync"]},"patch":{"description":"Rename it, pause or resume it, or replace its credentials (tested first).","operationId":"updateSyncConnection","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync connection id","in":"path","name":"connection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSyncConnection"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncConnectionDetail"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`sync_connection_failed`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 connection 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":"Update a sync connection","tags":["Sync"]}},"/stores/{store_id}/sync-connections/{connection_id}/streams":{"put":{"description":"The record types to keep in step. New ones start with a copy of the\nexisting records, then follow every change; dropped ones stop (what was\nwritten stays at the destination).","operationId":"setSyncStreams","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Sync connection id","in":"path","name":"connection_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSyncStreams"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncConnectionDetail"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unknown record type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Choose what a sync connection mirrors","tags":["Sync"]}},"/stores/{store_id}/tasks":{"get":{"description":"Open tasks by due time (no due time last), done ones newest first.\nCovers 500 tasks.","operationId":"listTasks","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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":"Store id","in":"path","name":"store_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/TaskCreateRequest"}}},"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"]}},"/stores/{store_id}/tasks/{task_id}":{"delete":{"operationId":"deleteTask","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Task id","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateRequest"}}},"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"]}},"/stores/{store_id}/tasks/{task_id}/invite":{"post":{"description":"E-mails the task's customer a calendar invite (`.ics`) for the meeting:\nits title, start, end (30 minutes when it has none) and place, organised\nby the task's assignee, whose address gets the replies. The task's notes\nstay with the team. Sending again after a change updates the same\ncalendar entry.","operationId":"sendMeetingInvite","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Task id","in":"path","name":"task_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/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":"`not_a_meeting` (another kind, no start, or done), `customer_without_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"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invite_not_sent`: the e-mail provider refused it"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Send the meeting invite","tags":["Tasks"]}},"/stores/{store_id}/ticket-fields":{"get":{"operationId":"listTicketFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TicketField"},"type":"array"}}},"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 ticket fields","tags":["Tickets"]},"put":{"description":"The workspace's ticket fields, in order, as a whole. Values already on\ntickets stay, under their key.","operationId":"replaceTicketFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TicketField"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TicketField"},"type":"array"}}},"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`: a bad key, a repeated key, an unknown kind, a select without options or more than 30 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 the ticket fields","tags":["Tickets"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":{"items":{"$ref":"#/components/schemas/Ticket"},"type":"array"}}},"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"]}},"/stores/{store_id}/tickets/summary":{"get":{"description":"Open tickets per view, and for the last 30 days: tickets opened, median\ntime to the first reply, share of first replies on time and the average\nrating.","operationId":"getTicketSummary","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketSummary"}}},"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 ticket numbers","tags":["Tickets"]}},"/stores/{store_id}/tickets/{conversation_id}":{"get":{"description":"A ticket by its conversation's id, with its deadline and where it stands.","operationId":"getTicket","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]}},"/stores/{store_id}/transfer-ownership":{"post":{"description":"Hands the store to another member. Only the current owner or the\ntenant owner may do this. The previous owner keeps access as Manager.","operationId":"transferStoreOwnership","parameters":[{"description":"Store id","in":"path","name":"store_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/TransferOwnershipRequest"}}},"required":true},"responses":{"204":{"description":"Ownership transferred"},"401":{"content":{"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_owner`: only the owner may transfer"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such store, or `not_a_member`: the target is not a member"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`owner_changed`: another transfer won"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`inactive_user`: the target cannot sign in"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 store ownership","tags":["Team"]}},"/stores/{store_id}/usage":{"get":{"description":"Daily counters of metered usage (e-mails sent, assistant use...) and\ntoday's marketing e-mail cap.","operationId":"getStoreUsage","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Days back, 1 to 365. Defaults to 30.","in":"query","name":"days","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreUsage"}}},"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 store's usage","tags":["Stores"]}},"/stores/{store_id}/variants/lookup":{"get":{"description":"For scanning: finds the variant whose SKU (case-insensitive) or barcode\nequals `code`, falling back to a product whose GTIN, EAN or UPC equals\nit. Returns the variant with its options and stock per location, and its\nproduct as a list row. Drafts and archived products are found too. When\nthe code is shared (`match_count` above 1), `matches` lists every\nmatch so the user can pick one.","operationId":"lookupVariant","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"An exact SKU (case-insensitive) or barcode/GTIN/EAN/UPC, as typed\nor scanned. Surrounding whitespace is ignored.","in":"query","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantLookup"}}},"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`: nothing in the store has this code"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty 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":"Look up a variant by SKU or barcode","tags":["Products"]}},"/stores/{store_id}/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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductVariantDetail"}}},"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"]},"put":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductVariant"}}},"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"]}},"/stores/{store_id}/variants/{variant_id}/breakdown":{"get":{"description":"The product all the way down: every item one unit is built from, each\nwith its stock, what it could still supply, its cost and its own recipe\nbelow it. For a combo (a product sold as two), the first level lists the\nsold variants with their prices and `components_price_cents` is what they\nwould cost bought separately.","operationId":"getVariantBreakdown","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Breakdown"}}},"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":"Breakdown of a variant","tags":["Items"]}},"/stores/{store_id}/variants/{variant_id}/custom-fields":{"patch":{"description":"Same rules as for a product (`setProductCustomFields`), with the fields\nthe store defined for variants.","operationId":"setVariantCustomFields","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldValues"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The variant's values by field key"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a message per key"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 variant's custom field values","tags":["Products"]}},"/stores/{store_id}/variants/{variant_id}/dropship":{"put":{"description":"A supplier of the store ships the variant: once an order with it is paid, the supplier is sent a link to ship it. `null`\ntakes it back. Needs `purchasing.write`.","operationId":"setVariantDropship","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDropship"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantDropship"}}},"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 variant or supplier 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 who ships a variant","tags":["Dropshipping"]}},"/stores/{store_id}/variants/{variant_id}/options":{"get":{"operationId":"getVariantOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWithOptions"}}},"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's options","tags":["Products"]},"post":{"description":"Sets the variant's value for that value's option, replacing the one it\nhad there. Refused when another variant of the product would then carry\nthe same combination. Prefer `PUT .../options`, which sets them all.","operationId":"assignVariantOption","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_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/VariantOptionAssignRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWithOptions"}}},"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`, or `option_value_not_found` when the value is not one of the product's"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_combination_taken`: another variant of the product has these 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":"Give a variant an option value","tags":["Products"]},"put":{"description":"Replaces the variant's option values with exactly one value of each of\nits product's options. Refused when a value is missing or repeated, or\nanother variant of the product has the same combination. A title that\nfollowed the old values follows the new ones.","operationId":"setVariantOptions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantOptionsSetRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWithOptions"}}},"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`, 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":"`variant_combination_taken`: another variant of the product has these options (`details.variant_id`, `details.sku`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`variant_options_incomplete` (`details.missing_option_group_ids`) or `option_group_repeated`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 variant's options","tags":["Products"]}},"/stores/{store_id}/variants/{variant_id}/recipe":{"get":{"description":"The items one unit of the variant is built from, each with the quantity\nin base units and, when it was written in a pack, in packs, plus stock and\nhow many units of the variant that item alone could supply.","operationId":"listVariantRecipe","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeLine"},"type":"array"}}},"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":"List a variant's recipe","tags":["Items"]}},"/stores/{store_id}/variants/{variant_id}/recipe/{item_id}":{"delete":{"operationId":"deleteVariantRecipeLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeLine"},"type":"array"}}},"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`, `item_not_found`, `bom_line_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 an item from a variant's recipe","tags":["Items"]},"put":{"description":"Adds the item to the variant's recipe or changes its quantity, in base\nunits or in whole packs (\"1 caixa\" of a 4-pack is 4 un). The line keeps the\npack it was written in. Same rules as `setKitBomLine`: the item cannot\nmake the variant depend on itself.","operationId":"setVariantRecipeLine","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeLineRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeLine"},"type":"array"}}},"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`, `item_not_found`, `pack_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `pack_required`, `pack_not_whole_units`, `whole_units_required`, `bom_cycle`, `ambiguous_quantity`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 item in a variant's recipe","tags":["Items"]}},"/stores/{store_id}/variants/{variant_id}/shipping":{"patch":{"description":"The outer size and weight of one unit, which freight quotes use for a\nvariant with no parts and no shipping box (and for a part, in the\nvariants built from it). Omitted fields stay; null clears. Answers with\nthe variant's freight data as `listFreightPackages` shows it.","operationId":"updateVariantShipping","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantShippingUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreightVariantRow"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a size or weight 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 a variant's size and weight","tags":["Freight"]}},"/stores/{store_id}/variants/{variant_id}/shipping-profile":{"get":{"description":"How one unit ships: the variant's own profile, the product's (which\napplies when the variant has none) and the boxes one unit works out to.","operationId":"getVariantShippingProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileView"}}},"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's shipping profile","tags":["Freight"]},"put":{"description":"Replaces the variant's profile. `mode: null` removes it, so the product's\nprofile (or the automatic rules) applies again. Fields that do not apply\nto the mode are ignored. Answers with the result.","operationId":"setVariantShippingProfile","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileView"}}},"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`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: a size or weight out of range, no boxes for own_boxes, or a reference outside the 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 variant's shipping profile","tags":["Freight"]}},"/stores/{store_id}/variants/{variant_id}/stock":{"get":{"description":"Totals, the stock at every active location of the store (zero-filled, so\na client can offer any location as a target), incoming purchase-order\nunits, the reorder settings, and who owns the store's stock. After a\nbarcode scan, `GET /stores/{store_id}/variants/lookup?code=` gives the\nvariant id.","operationId":"getVariantStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantStock"}}},"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's stock per location","tags":["Inventory"]}},"/stores/{store_id}/variants/{variant_id}/stock/adjust":{"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`).","operationId":"adjustVariantStock","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_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/StockAdjustRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAdjustResult"}}},"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"]}},"/stores/{store_id}/variants/{variant_id}/stock/movements":{"get":{"description":"Why a variant's quantity is what it is: its ledger entries, newest first,\nkeyset-paged. Same rows as `listStockMovements` filtered to the variant.","operationId":"listVariantStockMovements","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"location_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"},"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":"List a variant's stock movements","tags":["Inventory"]}},"/stores/{store_id}/variants/{variant_id}/stock/reorder":{"put":{"description":"Replaces the reorder point and quantity that drive the low-stock filter,\nthe overview's low-stock count and `createReorderDraft`.","operationId":"setVariantReorder","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderSettings"}}},"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`"},"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 a variant's reorder point","tags":["Inventory"]}},"/stores/{store_id}/variants/{variant_id}/stock/transfer":{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Variant id","in":"path","name":"variant_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/StockTransferRequest"}}},"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"]}},"/stores/{store_id}/wallet":{"get":{"description":"Whether customers are offered passes and of which kinds, the colours, which\nwallets Mobiari can issue to, and how many passes customers hold.","operationId":"getWalletSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOverview"}}},"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 store's wallet settings","tags":["Wallet"]},"put":{"description":"Turns passes on or off, chooses the kinds offered and the colours. Every\npass of the store is drawn again, and the wallets that hold one get the\nnew look within minutes.","operationId":"updateWalletSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletOverview"}}},"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`: a colour or a kind is not valid"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the store's wallet settings","tags":["Wallet"]}},"/stores/{store_id}/wallet/passes":{"get":{"description":"Newest first, withdrawn ones included, with where each one is held. Only\nthe kinds whose record the caller may read (loyalty and gift cards need\n`credit.read`, bookings `bookings.read`).","operationId":"listWalletPasses","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"kind","required":false,"schema":{"type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"source_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WalletPass"}}},"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 passes handed out","tags":["Wallet"]},"post":{"description":"Makes the pass of a record the first time (a customer's loyalty card, a\ngift card, a booking) and answers its link: a page where the customer\nadds it to Google Wallet or Apple Wallet. Asking again answers the same\nlink, and brings back a pass that was withdrawn.","operationId":"issueWalletPass","parameters":[{"description":"Store id","in":"path","name":"store_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/IssueWalletPass"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPass"}}},"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":"`wallet_source_not_found`: no such record in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`wallet_not_offered`: the store has passes off or this kind not chosen, or no wallet is set up"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 link to a pass","tags":["Wallet"]}},"/stores/{store_id}/wallet/passes/{pass_id}":{"delete":{"description":"The card stays in the customer's wallet marked as no longer valid, and its\nlink stops offering it. Asking for the record's link again brings it back.","operationId":"deleteWalletPass","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Pass id","in":"path","name":"pass_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Withdrawn"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 pass 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":"Withdraw a pass","tags":["Wallet"]}},"/stores/{store_id}/webhooks":{"get":{"description":"Newest first. `event` narrows to webhooks subscribed to that event.","operationId":"listWebhooks","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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. Subscribe to events with\n`events` here or `POST .../webhooks/{webhook_id}/events`.","operationId":"createWebhook","parameters":[{"description":"Store id","in":"path","name":"store_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/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 /events/catalog`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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"]}},"/stores/{store_id}/webhooks/{webhook_id}":{"delete":{"description":"Removes the webhook with its subscriptions and delivery log.","operationId":"deleteWebhook","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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"]},"put":{"description":"Fields left out stay as they are.","operationId":"updateWebhook","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}},"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"]}},"/stores/{store_id}/webhooks/{webhook_id}/deliveries":{"get":{"description":"Delivery attempts, newest first.","operationId":"listWebhookDeliveries","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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"]}},"/stores/{store_id}/webhooks/{webhook_id}/events":{"get":{"description":"The event names the webhook is subscribed to, alphabetically. Also on\nthe webhook itself as `events`.","operationId":"listWebhookEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WebhookEventRow"}}},"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 events","tags":["Webhooks"]},"post":{"description":"Adds event names to the webhook's subscriptions. Names already\nsubscribed are ignored.","operationId":"addWebhookEvents","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Webhook id","in":"path","name":"webhook_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/AddWebhookEventsRequest"}}},"required":true},"responses":{"204":{"description":"Subscribed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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`: an event name is not in `GET /events/catalog`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Subscribe a webhook to events","tags":["Webhooks"]}},"/stores/{store_id}/webhooks/{webhook_id}/events/{event}":{"delete":{"operationId":"removeWebhookEvent","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Webhook id","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Event name, e.g. `orders.paid`","in":"path","name":"event","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Unsubscribed (also when it was not subscribed)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Unsubscribe a webhook from an event","tags":["Webhooks"]}},"/stores/{store_id}/whatsapp-calls":{"get":{"description":"The store's recent WhatsApp calls, newest first (up to 100).","operationId":"listWhatsappCalls","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WhatsappCall"},"type":"array"}}},"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 WhatsApp calls","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}":{"get":{"description":"A call with its WebRTC offer while it still rings; the offer is gone once\nthe call ends.","operationId":"getWhatsappCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingingCall"}}},"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 call 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":"Open a call","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/accept":{"post":{"description":"Sends the browser's SDP answer to Meta. The first agent to answer gets\nthe call; anyone else gets 409 `call_not_ringing`. If Meta refuses, the\ncall is marked failed.","operationId":"acceptWhatsappCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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/AcceptCall"}}},"required":true},"responses":{"204":{"description":"Meta accepted the answer; the media starts flowing"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 call in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`call_not_ringing`: answered by someone else, or already over"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Answer a call","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/answer-relayed":{"post":{"description":"The first agent gets the call (409 `call_not_ringing` otherwise); Meta's\noffer goes to the relay, whose answer goes to Meta, and the answer here is\nthe relay's offer for this device. 503 `relay_unavailable`: no relay, or\nit did not answer; the call still rings, so answer it directly\n(`acceptWhatsappCall`).","operationId":"answerWhatsappCallRelayed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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/RelayLeg"}}},"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 call in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`call_not_ringing`: answered by someone else, or already over"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`: Meta refused the answer"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`relay_unavailable`: answer directly instead"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Answer a call through the media relay","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/reject":{"post":{"operationId":"rejectWhatsappCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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":"Declined"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`call_not_ringing`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Decline a ringing call","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/rejoin-relayed":{"post":{"description":"A new offer from the relay for this device (the page reloaded, the\nnetwork changed): the call goes on where it was.","operationId":"rejoinWhatsappCallRelayed","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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/RelayLeg"}}},"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 relayed call in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`call_not_active`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`relay_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Rejoin a relayed call","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/relay-answer":{"post":{"description":"This device's answer to the offer `answerWhatsappCallRelayed`,\n`startWhatsappCallRelayed` or `rejoinWhatsappCallRelayed` gave.","operationId":"answerWhatsappCallRelayOffer","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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/RelayAnswer"}}},"required":true},"responses":{"204":{"description":"Connected to the relay"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 relayed call in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`call_not_active`: over, or another agent's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"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":"`relay_unavailable`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Answer the relay's offer","tags":["Conversations"]}},"/stores/{store_id}/whatsapp-calls/{call_id}/terminate":{"post":{"description":"Ends an answered call from the store's side. Meta still sends the\n`terminate` webhook, which settles the call and its duration.","operationId":"terminateWhatsappCall","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Call id","in":"path","name":"call_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":"Asked Meta to end the call"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`call_not_active`: the call is not in progress"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`meta_error`"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Hang up","tags":["Conversations"]}},"/stores/{store_id}/wholesale/settings":{"get":{"description":"What visitors who are not signed in see (`visitor_prices`), whether the storefront takes \"Seja um revendedor\"\nrequests, and the group an approval proposes.","operationId":"getWholesaleSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WholesaleSettings"}}},"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 reseller settings","tags":["Customers"]},"put":{"description":"Hiding prices from visitors applies to the storefront's pages and API within a minute (pages kept at the edge are\npurged).","operationId":"updateWholesaleSettings","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WholesaleSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WholesaleSettings"}}},"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`: the default group is not one of the store's"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 reseller settings","tags":["Customers"]}},"/stores/{store_id}/workflow-issues":{"get":{"description":"Failed runs of the last days (not dismissed), grouped by automation and\nerror, and notices of runs the engine refused to start.","operationId":"listWorkflowIssues","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Look back this many days (1 to 90, default 7).","in":"query","name":"days","required":false,"schema":{"format":"int32","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowIssues"}}},"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 automation problems","tags":["Workflows"]}},"/stores/{store_id}/workflow-issues/dismiss":{"post":{"description":"Takes failed runs off the problems list (they stay in the run history).","operationId":"dismissWorkflowFailures","parameters":[{"description":"Store id","in":"path","name":"store_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/RunIdsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}},"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":"Dismiss failed runs","tags":["Workflows"]}},"/stores/{store_id}/workflow-issues/retry":{"post":{"description":"Starts each failed run again with the same trigger data, against the\nautomation's current published version (like retrying one by one).","operationId":"retryWorkflowFailures","parameters":[{"description":"Store id","in":"path","name":"store_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/RunIdsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"More than 500 runs"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Retry failed runs","tags":["Workflows"]}},"/stores/{store_id}/workflow-runs":{"get":{"description":"Runs of every workflow, newest first.","operationId":"listStoreWorkflowRuns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only runs in this state.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Only runs of this workflow.","in":"query","name":"workflow_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_StoreWorkflowRun"}}},"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 runs","tags":["Workflows"]}},"/stores/{store_id}/workflow-runs/{run_id}/approval":{"post":{"description":"Approves or rejects the approval step the run is waiting on; the run\ncontinues on the matching path. Also possible from the links in the\napprover's e-mail.","operationId":"decideWorkflowRunApproval","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Run id","in":"path","name":"run_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/WorkflowApprovalRequest"}}},"required":true},"responses":{"204":{"description":"Decided"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 run in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`run_not_awaiting_approval`: already decided, or not on an approval step"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Decide a run's approval","tags":["Workflows"]}},"/stores/{store_id}/workflow-runs/{run_id}/cancel":{"post":{"description":"Stops a pending, running, waiting or approval-waiting run where it is.","operationId":"cancelWorkflowRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Run id","in":"path","name":"run_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":"Cancelled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 run in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`run_not_active`: already finished"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 run","tags":["Workflows"]}},"/stores/{store_id}/workflow-runs/{run_id}/retry":{"post":{"description":"Starts a new run with the same trigger payload and customer (linked by\n`retry_of`); answers 202 with it.","operationId":"retryWorkflowRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Run id","in":"path","name":"run_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":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRun"}}},"description":"Started"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 run in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`run_active`: the run has not finished"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`run_not_retryable`: e.g. the workflow is gone or was never published"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Retry a run","tags":["Workflows"]}},"/stores/{store_id}/workflow-secrets":{"get":{"description":"Names only, alphabetically. Needs `workflows.read`.","operationId":"listWorkflowSecrets","parameters":[{"description":"Store id","in":"path","name":"store_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WorkflowSecret"}}},"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 workflow secrets","tags":["Workflows"]},"post":{"description":"Creates the secret, or replaces the value of the one with this name.\nValues are encrypted at rest and masked in run logs.","operationId":"saveWorkflowSecret","parameters":[{"description":"Store id","in":"path","name":"store_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/UpsertWorkflowSecretRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSecret"}}},"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`: bad name, or empty or too long 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":"Save a workflow secret","tags":["Workflows"]}},"/stores/{store_id}/workflow-secrets/{name}":{"delete":{"description":"Steps that still reference it no longer get its value.","operationId":"deleteWorkflowSecret","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Secret name (case-insensitive)","in":"path","name":"name","required":true,"schema":{"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 secret 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 workflow secret","tags":["Workflows"]}},"/stores/{store_id}/workflows":{"get":{"description":"The store's workflows and journeys, most recently edited first, each with\nrun counts over the last 7 days.","operationId":"listWorkflows","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only journeys or only workflows.","in":"query","name":"kind","required":false,"schema":{"$ref":"#/components/schemas/WorkflowKind"}},{"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WorkflowListItem"}}},"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 workflows","tags":["Workflows"]},"post":{"description":"Starts as a draft with the given graph and trigger (an empty graph and a\nmanual trigger by default). Nothing fires until it is published.","operationId":"createWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_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/CreateWorkflowRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"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`: empty 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 workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/catalog":{"get":{"description":"Every node type the editor offers with its fields, ports and outputs, the\nexpression roots (`trigger`, `customer`, `store`, step outputs) and the\nfilters expressions can use. The shape follows the editor and grows with\nnew node types.","operationId":"getWorkflowNodeCatalog","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"`{roots, nodes, ports, filters, ...}`"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 workflow node catalog","tags":["Workflows"]}},"/stores/{store_id}/workflows/draft":{"post":{"description":"A Claude model drafts the automation (name, trigger and steps) from the\nmerchant's description, using the node catalog, record types, store events\nand the most used admin operations. It is saved as a draft: nothing fires\nuntil it is published, and problems the model could not fix show in the\neditor.","operationId":"draftWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_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/DraftWorkflowRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"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`: empty or too long description; `ai_refused`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ai_failed`: the model did not answer or did not answer with an automation; `ai_too_long`"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`ai_unavailable`: no model configured"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Draft an automation from a description","tags":["Workflows"]}},"/stores/{store_id}/workflows/operations":{"get":{"description":"Every admin operation an \"Executar operação\" step can run, with its\nsummary, whether it changes something, whether it is risky (publishing\nasks for confirmation), the permissions that allow it, its path\nparameters and the JSON Schemas of its query and body.","operationId":"listWorkflowOperations","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowOperation"},"type":"array"}}},"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":"Operations automations can run","tags":["Workflows"]}},"/stores/{store_id}/workflows/templates":{"get":{"description":"Ready-made automations to start from: marketing journeys and operations\nautomations, each with its trigger and graph. Creating one is an\nordinary `POST .../workflows` with them.","operationId":"listWorkflowTemplates","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"`[{id, category, goal, kind, icon, name, name_en, description, description_en, trigger, graph}]`; goal is recover_sales, relationship, operations, stock, finance or team"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Automation templates","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}":{"delete":{"description":"Its runs, versions and history go with it.","operationId":"deleteWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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 workflow 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 workflow","tags":["Workflows"]},"get":{"operationId":"getWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"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 workflow 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 workflow","tags":["Workflows"]},"patch":{"description":"Changes the draft (name, description, graph, trigger) or sets it to\n`draft` / `paused`. What fires changes only on publish.","operationId":"updateWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"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 workflow 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":"Update a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/duplicate":{"post":{"description":"A draft copy of the current draft graph and trigger, named \"(cópia)\".\nWebhook tokens are not copied: the copy gets its own when configured.","operationId":"duplicateWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"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 workflow 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":"Duplicate a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/fire":{"post":{"description":"Starts a run of the published version with `payload` as its trigger\npayload; answers 202 with the run, which continues in the background. A\nworkflow that was never published runs its draft as a test (`dry_run`).","operationId":"runWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/FireWorkflowRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRun"}}},"description":"Started"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 workflow in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `customer_id` is not a customer of 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":"Run a workflow now","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/publish":{"post":{"description":"Freezes the draft as a new version and makes it fire (status `active`).\nRuns already in flight keep the version they started with.","operationId":"publishWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/PublishWorkflowRequest"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPublishResult"}}},"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":"`operation_not_permitted`: an operation step needs a permission the publisher lacks (`details.operations`)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such workflow in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`risky_operations_unconfirmed`: the graph runs operations that cancel, delete, move money or reach outside the store; publish again with `confirm_operations` (`details.operations`)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`workflow_invalid`: the draft has errors; `details.problems` lists them (`WorkflowProblem`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Publish a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/resume":{"post":{"description":"A paused workflow fires again with its last published version (the draft\nis not published).","operationId":"resumeWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/Workflow"}}},"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 workflow in this store"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`workflow_not_published`: nothing to resume; publish 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":"Resume a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/runs":{"get":{"description":"Newest first, test runs included.","operationId":"listWorkflowRuns","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only runs in this state (`pending`, `running`, `waiting`,\n`awaiting_approval`, `completed`, `failed`, `cancelled`).","in":"query","name":"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WorkflowRun"}}},"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 workflow's runs","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/runs/{run_id}":{"get":{"description":"The run with every step it executed, oldest first, and each step's\noutput.","operationId":"getWorkflowRun","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Run id","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunWithSteps"}}},"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 run of this workflow"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 run","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/test":{"post":{"description":"Starts a test run of the draft (waits skipped, messages and changes\ndescribed instead of done) with the payload the trigger would have built\nfor the chosen sample. Answers 202 with the run; poll it for the steps.","operationId":"testWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/StartTestRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedTest"}}},"description":"Started"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 workflow, record or event in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: the trigger needs a sample"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Test the draft","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/test-node":{"post":{"description":"Runs one step against real data without side effects: steps that send,\nwrite or call out describe what they would do; steps that read really\nread. Nothing the test writes persists.","operationId":"testWorkflowNode","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/TestWorkflowNodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowNodeTestResult"}}},"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 workflow (or `run_id` run of it) in this store"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: `customer_id` is not a customer of 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":"Test a workflow step","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/test-samples":{"get":{"description":"Recent records of the type the draft's trigger listens to (record change,\nrecord date), or recent events of its event; none for manual, schedule\nand webhook triggers.","operationId":"listWorkflowTestSamples","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSamples"}}},"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 workflow 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":"What the draft can be tested with","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/unpublish":{"post":{"description":"Stops firing (status `paused`) and clears the next scheduled fire. The\npublished version is kept; resume brings it back. Runs in flight carry on.","operationId":"unpublishWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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/Workflow"}}},"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 workflow 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":"Pause a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/validate":{"get":{"description":"Checks the current draft (graph and trigger) the way publishing does.","operationId":"validateWorkflow","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowValidation"}}},"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 workflow 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":"Validate a workflow","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/versions":{"get":{"description":"Every published version, newest first.","operationId":"listWorkflowVersions","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_WorkflowVersion"}}},"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 workflow's versions","tags":["Workflows"]}},"/stores/{store_id}/workflows/{workflow_id}/versions/{version}/restore":{"post":{"description":"Copies a past version's graph and trigger into the draft. Publish to make\nit fire.","operationId":"restoreWorkflowVersion","parameters":[{"description":"Store id","in":"path","name":"store_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Workflow id","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version number","in":"path","name":"version","required":true,"schema":{"format":"int32","type":"integer"}},{"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/Workflow"}}},"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 workflow or version"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Restore a workflow version","tags":["Workflows"]}},"/taxonomy/by-id":{"get":{"description":"By the provider's id, with its full path in the requested language.\nPublic.","operationId":"getTaxonomyCategory","parameters":[{"description":"The provider's category id.","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"Inferred when omitted: numeric ids are Google's.","in":"query","name":"provider","required":false,"schema":{"description":"Whose taxonomy.","enum":["google","facebook"],"type":"string"}},{"description":"`en-US` (default) or `pt-BR`.","in":"query","name":"locale","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyCategory"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`taxonomy_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"}},"security":[{}],"summary":"Get a marketplace category","tags":["Categories"]}},"/taxonomy/search":{"get":{"description":"Google product taxonomy and Meta product categories. Exact matches\nfirst, then prefix matches, then the rest alphabetically. Public.","operationId":"searchTaxonomy","parameters":[{"description":"Matches part of the category path, case-insensitively. Empty lists\neverything.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"One provider; both when omitted.","in":"query","name":"provider","required":false,"schema":{"description":"Whose taxonomy.","enum":["google","facebook"],"type":"string"}},{"description":"`en-US` (default) or `pt-BR`.","in":"query","name":"locale","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_TaxonomyCategory"}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"security":[{}],"summary":"Search marketplace categories","tags":["Categories"]}},"/tenants":{"get":{"description":"Tenants the caller owns or belongs to through an attachment in any of their\nstores, by name. An empty list means the user still has to create one.","operationId":"listTenants","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Tenant"}}},"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 tenants","tags":["Tenants"]},"post":{"description":"Creates an organization owned by the caller. Its slug is derived from\nthe name (plain ASCII; a taken one gets `-2`, `-3`…). It starts in BRL and São Paulo time, in the caller's language\n(`pt-BR` unless they use `en-US`); new stores inherit these. It also\nstarts a free trial of `plan_code` (14 days, no payment method) and its\nowner gets a welcome e-mail. The trial is once per account: an owner who\nalready had one on another organization (see `GET /tenants/trial-eligibility`)\nstarts without it, the first invoice due at once. Emits the\n`tenant.created` webhook.","operationId":"createTenant","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/CreateTenantRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}},"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`: a store API token cannot create tenants; `account_disabled`: the account was deactivated"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`slug_taken`: another organization took the same slug at the same moment; retry"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty name or a plan not 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":"Create a tenant","tags":["Tenants"]}},"/tenants/trial-eligibility":{"get":{"description":"For the \"create organization\" screens: say before creating whether the\nnew organization starts on a free trial or with its first invoice.","operationId":"getTrialEligibility","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialEligibility"}}},"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":"Can I get a free trial","tags":["Tenants"]}},"/tenants/{tenant_id}":{"get":{"operationId":"getTenant","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}},"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 tenant"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 tenant","tags":["Tenants"]},"patch":{"description":"Fields left out stay as they are. Store defaults changed here apply to\nstores created afterwards.","operationId":"updateTenant","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}},"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 tenant"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: unsupported currency or locale, or malformed feature flags"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 tenant","tags":["Tenants"]}},"/tenants/{tenant_id}/attachments":{"get":{"description":"The organization's attachments, oldest first, with the policy and\nthe person or group named. Filter by principal, policy or store.","operationId":"listAttachments","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`user` or `group`.","in":"query","name":"principal_kind","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"principal_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"in":"query","name":"policy_id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Attachments reaching this store (its own, and organization-wide ones).","in":"query","name":"store_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"}}},"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 attachments","tags":["Team"]},"post":{"description":"Attaches a policy to a person or a group over the organization or\nsome stores. The caller must hold, in every store it reaches, what a\npermission set or a free-form permit would grant.","operationId":"createAttachment","parameters":[{"description":"Organization id","in":"path","name":"tenant_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/CreateAttachmentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"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":"`missing_permission` or `grant_exceeds_actor`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such policy, group or person in the organization"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`, `not_in_organization` or `explanation_required` (a rule or Cedar policy without its explanation)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 attachment","tags":["Team"]}},"/tenants/{tenant_id}/attachments/{attachment_id}":{"delete":{"description":"The person or group loses what it gave them at once.","operationId":"deleteAttachment","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Attachment id","in":"path","name":"attachment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Attachment 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":"`missing_permission`: the caller must manage permissions in every store it reaches"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No attachment with this id in the organization"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`network_attachment`: a network role; remove it at `/stores/{store_id}/network/roles/{attachment_id}`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 attachment","tags":["Team"]},"patch":{"description":"Change where it reaches or when it ends.","operationId":"updateAttachment","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Attachment id","in":"path","name":"attachment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAttachmentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"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":"`missing_permission` (also when the caller does not manage permissions in every store it reaches) or `grant_exceeds_actor`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No attachment with this id in the organization"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`network_attachment`: a network role; change it at `/stores/{store_id}/network/roles`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 attachment","tags":["Team"]}},"/tenants/{tenant_id}/files":{"get":{"description":"Newest first.","operationId":"listFiles","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Only files in this folder.","in":"query","name":"folder_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only files at the root. Wins over `folder_id`.","in":"query","name":"root_only","required":false,"schema":{"type":"boolean"}},{"description":"Matches part of the name, the original name, the MIME type, the\ndescription or a tag, case-insensitively.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"file_type","required":false,"schema":{"description":"A family of MIME types.","enum":["image","video","document","archive"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MediaFile"}}},"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 files","tags":["Files"]}},"/tenants/{tenant_id}/files/bulk":{"post":{"description":"Move, star, unstar or delete up to 500 files of the organization at once.\nIds of other organizations are ignored.","operationId":"bulkUpdateFiles","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/MediaFileBulkRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFileBulkResult"}}},"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":"`folder_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: no ids or more than 500"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 several files","tags":["Files"]}},"/tenants/{tenant_id}/files/search":{"get":{"description":"Across the tenant's library, newest first.","operationId":"searchFiles","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Matches part of the name, the original name, the MIME type, the\ndescription or a tag, case-insensitively.","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Only files in this folder.","in":"query","name":"folder_id","required":false,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"file_type","required":false,"schema":{"description":"A family of MIME types.","enum":["image","video","document","archive"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MediaFile"}}},"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":"Search files","tags":["Files"]}},"/tenants/{tenant_id}/files/storage-summary":{"get":{"operationId":"getFileStorageSummary","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageSummary"}}},"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 tenant's storage use","tags":["Files"]}},"/tenants/{tenant_id}/files/tree":{"get":{"description":"Every folder of the tenant, and every file with whether the current\nuser starred it and how many products use it.","operationId":"getFileTree","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Defaults to true.","in":"query","name":"include_files","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFileTree"}}},"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 file tree","tags":["Files"]}},"/tenants/{tenant_id}/files/upload":{"post":{"description":"`multipart/form-data` with the bytes in `file`. Images get resized JPEG\nand WebP renditions; everything else (videos, 3D models, documents) is\nstored as-is.","operationId":"uploadFile","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/MediaFileUploadForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFileUpload"}}},"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":"`folder_not_found`"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_too_large`: over 50 MB"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`invalid_image`: an image that cannot be processed; `validation_failed`: no `file` 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 file","tags":["Files"]}},"/tenants/{tenant_id}/files/{file_id}":{"delete":{"description":"Removes the stored bytes and renditions. Product images copied from it\nare not affected. A file that live things use (an active product, the\nlive theme...) is refused with `file_in_use` unless `force=true`.","operationId":"deleteFile","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Delete even while live things use the file (they lose it).","in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"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":"`file_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`file_in_use`: live things use it; `force=true` deletes anyway"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 file","tags":["Files"]},"patch":{"description":"Rename it, move it to another folder (`folder_id: null` for the root)\nor change its alt text.","operationId":"updateFile","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFileUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFile"}}},"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":"`file_not_found`, `folder_not_found`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed`: empty 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 file","tags":["Files"]}},"/tenants/{tenant_id}/files/{file_id}/connected-products":{"get":{"description":"Products whose gallery was made from this file, by title.","operationId":"listFileConnectedProducts","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_ConnectedProduct"}}},"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":"`file_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 the products using a file","tags":["Files"]}},"/tenants/{tenant_id}/files/{file_id}/content/{variant}":{"get":{"description":"The bytes of a file in the organization's library, or one of its\nrenditions. Unlike the public `/files/{file_id}/{variant}` URL, this\nserves private files too, to signed-in members with `files.read`.\n`variant` is `original` or a rendition name such as `thumbnail_jpeg`.","operationId":"getFileContent","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"`original` or a rendition name such as `thumbnail_jpeg`","in":"path","name":"variant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"type":"string"}}},"description":"The file, with its own Content-Type"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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 file or rendition in this organization"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 file's content","tags":["Files"]}},"/tenants/{tenant_id}/files/{file_id}/star":{"delete":{"description":"For the current user. Idempotent.","operationId":"unstarFile","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Unstarred"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"Unstar a file","tags":["Files"]},"post":{"description":"For the current user. Idempotent.","operationId":"starFile","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_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":"Starred"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired 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":"`file_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":"Star a file","tags":["Files"]}},"/tenants/{tenant_id}/files/{file_id}/usages":{"get":{"description":"Everything that uses the file, live ones first. The file is public while\nat least one live owner uses it.","operationId":"listFileUsages","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"File id","in":"path","name":"file_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MediaFileUsage"},"type":"array"}}},"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":"`file_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":"Where a file is used","tags":["Files"]}},"/tenants/{tenant_id}/folders":{"post":{"operationId":"createFolder","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/MediaFolderCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolder"}}},"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":"`folder_not_found`: the parent is not in this tenant"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_exists`: a folder with this name already exists there"},"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 folder","tags":["Files"]}},"/tenants/{tenant_id}/folders/{folder_id}":{"patch":{"description":"Renaming updates the paths of the folder and everything under it.","operationId":"updateFolder","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Folder id","in":"path","name":"folder_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolderUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolder"}}},"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":"`folder_not_found`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`folder_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":"Update a folder","tags":["Files"]}},"/tenants/{tenant_id}/folders/{folder_id}/files":{"get":{"description":"By name.","operationId":"listFolderFiles","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Folder id","in":"path","name":"folder_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"file_type","required":false,"schema":{"description":"A family of MIME types.","enum":["image","video","document","archive"],"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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_MediaFile"}}},"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":"`folder_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 folder's files","tags":["Files"]}},"/tenants/{tenant_id}/groups":{"get":{"description":"The organization's groups, by name, with their member and policy\ncounts.","operationId":"listGroups","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Group"},"type":"array"}}},"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 groups","tags":["Team"]},"post":{"operationId":"createGroup","parameters":[{"description":"Organization id","in":"path","name":"tenant_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/CreateGroupRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"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":"`name_taken`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` or `not_in_organization`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 group","tags":["Team"]}},"/tenants/{tenant_id}/groups/{group_id}":{"delete":{"description":"Its members lose what the group's policies gave them.","operationId":"deleteGroup","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Group 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":"No group with this id in the organization"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 group","tags":["Team"]},"patch":{"operationId":"updateGroup","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"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 group with this id in the organization"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`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":"Update a group","tags":["Team"]}},"/tenants/{tenant_id}/groups/{group_id}/members":{"get":{"operationId":"listGroupMembers","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GroupMember"},"type":"array"}}},"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 group with this id in the organization"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 group's members","tags":["Team"]},"put":{"description":"Replaces the member list. Access follows at once.","operationId":"setGroupMembers","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Group id","in":"path","name":"group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGroupMembersRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GroupMember"},"type":"array"}}},"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":"`missing_permission` or `grant_exceeds_actor`: the group holds more than the caller may hand out"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No group with this id in the organization"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`not_in_organization`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 members","tags":["Team"]}},"/tenants/{tenant_id}/invoices":{"get":{"description":"The organization's invoices, newest first. Voided invoices (replaced\nafter a plan change) are left out.","operationId":"listInvoices","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_Invoice"}}},"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 invoices","tags":["Billing"]}},"/tenants/{tenant_id}/people":{"get":{"description":"Everyone who belongs to the organization through a store the caller\nmay read the team of: owners, members and service accounts, with the\nstores each reaches. The pool a group picks from.","operationId":"listTenantPeople","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Person"},"type":"array"}}},"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 organization's people","tags":["Team"]}},"/tenants/{tenant_id}/policies":{"get":{"description":"The platform's permission sets first, then the organization's\npolicies by kind and name, each with how many attachments it has.","operationId":"listPolicies","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Policy"},"type":"array"}}},"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 policies","tags":["Team"]},"post":{"description":"A permission set (codes), a rule or free-form Cedar. It grants or\nrestricts nothing until attached.","operationId":"createPolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_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/CreatePolicyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}},"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` or `invalid_policy` (the reason in `details.policy`)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 policy","tags":["Team"]}},"/tenants/{tenant_id}/policies/draft":{"post":{"description":"From a request in plain words to a validated policy (a permission\nset, a rule or Cedar), who to attach it to, where, its explanation and\na dry run on the store. Nothing is saved: the person reviews, then\ncreates the policy and its attachment.","operationId":"draftPolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The store the request is about: its channels, locations and\naccounts are offered to the assistant, and its decisions replayed.","in":"query","name":"store_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/DraftPolicyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDraft"}}},"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":"`draft_invalid`: the assistant could not produce a valid policy (`details.reason`, `details.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"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`assistant_unavailable`: no model configured"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Draft a policy with the assistant","tags":["Team"]}},"/tenants/{tenant_id}/policies/dry-run":{"post":{"description":"Replays the store's recent decisions (the last 30 days, owners left\nout) with today's policies and with this one attached to `subject`,\neach at its own time, and reports what it changes. Nothing is saved.","operationId":"dryRunPolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_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/DryRunRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"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":"`replaces_policy_id` is not a policy of this organization, or the store is not its"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` or `invalid_policy`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Dry-run a policy","tags":["Team"]}},"/tenants/{tenant_id}/policies/validate":{"post":{"description":"Checks codes, a rule or Cedar text against the catalog and the schema\nand returns the Cedar it renders to. Nothing is saved.","operationId":"validatePolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_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/PolicyBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyValidation"}}},"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":"Validate a policy","tags":["Team"]}},"/tenants/{tenant_id}/policies/{policy_id}":{"delete":{"description":"Its attachments go with it.","operationId":"deletePolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Policy id","in":"path","name":"policy_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Policy 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":"`managed_policy`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No policy with this id in the organization"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 policy","tags":["Team"]},"patch":{"description":"Rename it, change what it says (validated again; everyone it is\nattached to follows at once), or its explanation. The platform's\npermission sets cannot be changed; copy one.","operationId":"updatePolicy","parameters":[{"description":"Organization id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Policy id","in":"path","name":"policy_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}},"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":"`managed_policy`: the platform's, read-only; or `grant_exceeds_actor`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No policy with this id in the organization"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`validation_failed` or `invalid_policy`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 policy","tags":["Team"]}},"/tenants/{tenant_id}/sales-fees":{"get":{"description":"The sales fee of each of the organization's stores that has one: the\nterms in force, what accrued this month, the monthly statements (with a\nPix code to pay them) and the latest entries. Empty when no store has a\nsales fee.","operationId":"listSalesFees","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StoreSalesFee"},"type":"array"}}},"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"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 fees","tags":["Billing"]}},"/tenants/{tenant_id}/sandbox":{"post":{"description":"The tenant's test store (sandbox), made the first time: a store whose\norders are all test orders, that sends e-mail only to the tenant's own\npeople, and that refuses connecting payment, freight, channel,\nmarketplace, ad and fiscal production providers (`403\nsandbox_not_allowed`), so an integration can be tried end to end without\nreaching a customer, money or a partner. Webhooks are delivered. It does\nnot count against the plan's store limit. It starts with the Storefront\nsales channel and an inventory location. Use a store API key of it to\ncall the API.","operationId":"openSandboxStore","parameters":[{"description":"The tenant","in":"path","name":"tenant_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/Store"}}},"description":"The tenant's test store, which already existed"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}},"description":"The tenant's test store, made now"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unauthorized`: missing, expired or revoked credentials"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`subscription_inactive`: the subscription is suspended or canceled"},"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 tenant"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Open the tenant's test store","tags":["Stores"]}},"/tenants/{tenant_id}/subscription":{"get":{"description":"The organization's plan, where the subscription stands (trial, active,\noverdue, suspended, canceled), the invoice waiting for payment and what\nthe organization uses against the plan's limits.","operationId":"getSubscription","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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":"No such tenant"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 subscription","tags":["Billing"]},"put":{"description":"Moves the organization to another plan or billing cycle, and takes back\na pending cancellation. During the trial the change is immediate and\nfree. On a paid subscription an upgrade is immediate (the new price is\ncharged from the next invoice) and a downgrade waits for the renewal.\nOpen invoices are issued again at the new price. A subscription that\nnever paid (a partner organization) moving to a paid plan gets its\nfirst invoice, due today. Owner only.","operationId":"changePlan","parameters":[{"description":"Tenant id","in":"path","name":"tenant_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanRequest"}}},"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":"`owner_only`: only the organization's owner changes the plan"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`usage_exceeds_plan`: the organization has more stores or seats than the plan allows; `details` has `limit`, `max` and `used`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`unknown_plan`: not a plan 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":"Change the plan","tags":["Billing"]}},"/tenants/{tenant_id}/subscription/cancel":{"post":{"description":"The subscription ends when the paid period (or the trial) ends; nothing\nis charged after that. The organization is then restricted (read-only)\nand its store closes 30 days later; data stays stored and exportable.\nUndo with `resumeSubscription` or by choosing a plan. Owner only.","operationId":"cancelSubscription","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/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":"`owner_only`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 the subscription","tags":["Billing"]}},"/tenants/{tenant_id}/subscription/pay":{"post":{"description":"The invoice to pay now, issued if there is none open: during the trial\nit pays for the period that starts when the trial ends (paying early\nnever shortens the trial); a suspended or canceled subscription restarts\ntoday. The invoice carries a Pix \"copia e cola\" and/or a payment page.\nOwner only.","operationId":"paySubscription","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/Invoice"}}},"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":"`owner_only`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`nothing_to_pay`: the plan is free for this organization"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Pay the subscription","tags":["Billing"]}},"/tenants/{tenant_id}/subscription/resume":{"post":{"description":"Takes back a cancellation that has not taken effect yet. Owner only.","operationId":"resumeSubscription","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/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":"`owner_only`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the budget resets.","schema":{"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Any other error, in the standard error shape"}},"summary":"Resume the subscription","tags":["Billing"]}},"/tenants/{tenant_id}/transfer-ownership":{"post":{"description":"Hands the organization (its billing and every store in it) to someone\nwho is already a member of one of its stores. Only the organization's\nowner may do this. The previous owner keeps access as Manager in every\nstore they did not reach. Store owners do not change: transfer each\nstore on its own (`/stores/{store_id}/transfer-ownership`).","operationId":"transferTenantOwnership","parameters":[{"description":"Tenant id","in":"path","name":"tenant_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/TransferOwnershipRequest"}}},"required":true},"responses":{"204":{"description":"Ownership transferred"},"401":{"content":{"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_owner`: only the organization's owner may transfer"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such organization, or `not_a_member`: the target is in none of its stores"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`owner_changed`: another transfer won"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`inactive_user`: the target cannot sign in"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"`rate_limited`: over the request budget; see `Retry-After`","headers":{"RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the 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 organization ownership","tags":["Tenants"]}},"/users":{"get":{"description":"People who belong to the stores where the caller may read the team\n(`users.read`): members holding a role there and the store owners.\nOrdered by e-mail.","operationId":"listUsers","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":"Rows to skip, for UIs that jump to a page number. Ignored when\n`cursor` is set. Prefer `cursor` for walking a whole list.","in":"query","name":"offset","required":false,"schema":{"format":"int64","minimum":0,"type":"integer"}},{"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_User"}}},"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 users","tags":["Team"]}}},"security":[{"bearer_auth":[]}],"servers":[{"description":"Production","url":"https://api.mobiari.com/app"},{"description":"Local development","url":"http://localhost:4000/app"}],"tags":[{"description":"Sign-in, sessions, refresh tokens and two-factor authentication","name":"Auth"},{"description":"The signed-in user: profile, access, devices and preferences","name":"Me"},{"description":"Organizations that own stores","name":"Tenants"},{"description":"The organization's Mobiari subscription: plans and prices, the trial, plan changes, cancellation, invoices (paid by Pix) and usage against the plan's limits. Every plan includes every module; plans differ in size","name":"Billing"},{"description":"A store's bank account, read-only: connect a statement-only Banco Inter integration, and the deposits that arrive are read every few minutes, matched to a business and kept as an inbox. A deposit becomes a charge already received, ready to invoice. Nothing here moves money","name":"Bank"},{"description":"Stores and their settings","name":"Stores"},{"description":"Store members, invites, roles and permissions","name":"Team"},{"description":"Franchise networks: a brand's network and its members (each franchise its own organization), invites, the access a member accepts the brand to hold in its store (its ceiling), time-limited grants, and the log of that access","name":"Network"},{"description":"Store API tokens for scripts and integrations: each works for one store","name":"API Tokens"},{"description":"Outbound event subscriptions and deliveries","name":"Webhooks"},{"description":"Domain events: the store's outbox and the catalog of event names","name":"Events"},{"description":"Who changed what, and when","name":"Audit"},{"description":"One search across a store's orders, customers, products, campaigns and conversations","name":"Search"},{"description":"Address autocomplete and lookup (Brazil)","name":"Places"},{"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":"Google Merchant Center, Meta catalog and marketplace feeds, with per-product overrides","name":"Product Feeds"},{"description":"The organization's file library: folders, uploads, stars and search","name":"Files"},{"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":"Sales and margin over time and by channel and payment method, products ranked by what they earned and returned, monthly customer cohorts with retention and lifetime value, inventory turnover and slow movers, what shoppers save to wishlists; any of them as CSV, and as a scheduled e-mail. Built on the DRE's definitions, except that a refund stays with its order; money is integer cents; days are São Paulo days","name":"Reports"},{"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":"Selling on Mercado Livre from the panel: connecting the seller account, the listings and their link to variants (stock and price pushed out), and the orders brought in","name":"Marketplaces"},{"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":"The store's document library: folders (restricted ones only for members with `documents.restricted`), documents with every uploaded version, links to suppliers, customers, orders, purchase orders and team members, expiry reminders, and a history that records each view and download","name":"Documents"},{"description":"Electronic signatures on the store's documents: send a PDF to signers (all at once or in order), each confirming a one-time code sent to their e-mail or WhatsApp; the signed copy, with a signature page and the evidence trail, is sealed with the store's A1 certificate and filed as the document's locked new version","name":"Signatures"},{"description":"Contracts and terms written once with fields ({{fornecedor.razao_social}}, {{hoje.extenso}}, {{livre.prazo}}), filled from a supplier, customer, order, purchase order or team member into a PDF document filed in the library, ready to send for signature","name":"Document Templates"},{"description":"Components, kits and their bills of materials, and build jobs","name":"Manufacturing"},{"description":"The warehouse's items (purchased parts and made sub-assemblies): base units, packs, stock and where each is used","name":"Items"},{"description":"Box sizes the store packs orders in, and which boxes each variant ships in, for freight quotes","name":"Shipping Boxes"},{"description":"ERP connections (Tiny): OAuth, health, the link report, manual syncs and imports, and their logs. The scheduled sync runs on its own","name":"Integrations"},{"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":"Variants a supplier ships for the store: a paid order makes a dropship order per supplier, who gets a private link to see what to send and to enter the carrier and tracking code","name":"Dropshipping"},{"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":"Carrier integrations and the store's own delivery zones","name":"Freight"},{"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":"Bringing a store over from where it sells today: the sources, connections to other platforms, the orders spreadsheet, and import runs (dry run, progress, issues, cancel, retry). Products and customers spreadsheets are under Products and Customers","name":"Imports"},{"description":"Fields a store defines for its customers, products and variants","name":"Custom Fields"},{"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":"Named filters of the admin lists (customers, tasks, inbox, orders, products), personal or shared with the team","name":"Saved Views"},{"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 team's kanban boards: ordered columns and cards with an assignee and a due day, moved between columns","name":"Projects"},{"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":"Sales activity goals (quotas): a weekly or monthly target for calls made or talked, deals won, won value or tasks completed, for one team member or the team, and how each is doing against pro-rata pace in the store's time zone","name":"Goals"},{"description":"Calls of every provider (WhatsApp today, phone lines next) in the CRM: the list and its figures, the caller's context, the outcome the agent logs and the ways to call a customer. A finished call emits calls.missed or calls.completed; logging an outcome emits calls.logged","name":"Calls"},{"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"},{"description":"Instagram and Facebook publishing: the accounts posts go to (Instagram connected with publishing permissions, Facebook Pages), and posts written as drafts, sent for review, scheduled by someone with `marketing.publish` and published on every account picked","name":"Social"},{"description":"E-mail marketing: templates and the block editor, campaigns (broadcasts) with reports and A/B tests, segments, subscription forms, contact import and product \"let me know\" subscriptions","name":"Email"},{"description":"The e-mails the store sends on its own (order confirmation, shipping, password reset...) and the sending settings: sender identity, provider, reply routing","name":"Transactional Email"},{"description":"Sending domains (SES identities and their DNS records), the suppression list and deliverability health","name":"Email Deliverability"},{"description":"Advertising across providers: connected ad accounts (Meta and Google Ads), the campaign, ad group and ad mirror, the unified report next to the revenue Mobiari's attribution credits, and campaign controls (Meta writes today; Google Ads is read-only)","name":"Ads"},{"description":"Keep the store's records in step with an outside system: a connection (a Postgres database today) and the record types it mirrors, copied once then followed change by change","name":"Sync"},{"description":"Automations and customer journeys: a graph of steps started by a trigger (manual, customer event, webhook or schedule). Edit the draft, publish to make it fire; runs, approvals, step tests and the secrets steps use","name":"Workflows"},{"description":"Answers from the Mobiari documentation: a public, rate-limited question endpoint the docs site and the admin's help panel use","name":"Help"},{"description":"The AI assistant: a chat that reads the store and proposes writes (applied only after approval, recorded as undoable actions), streamed as server-sent events; also over WhatsApp from linked numbers","name":"Assistant"},{"description":"Each member's notifications (the bell) and their preferences per kind and channel (bell, push, e-mail, WhatsApp), the store's customer-facing notification channels and the log of everything sent","name":"Notifications"},{"description":"Google Wallet and Apple Wallet passes: the store's settings, and a customer's loyalty card, a gift card or a booking as a card in their phone, kept current as the record changes","name":"Wallet"},{"description":"Push to the Mobiari mobile apps: registering a device (`/me/devices`), per-store push preferences and test pushes. Payloads and deep links are described in the push notifications guide","name":"Push Notifications"},{"description":"Brand system: logo, palette, typography and assets","name":"Brand"},{"description":"Storefront pages, themes, domains and deployments","name":"Storefront"},{"description":"Storefront popups that ask for an e-mail or WhatsApp number with consent and hand out a single-use copy of a template coupon: their texts, trigger, pages and results","name":"Popups"},{"description":"CMS collections and documents that storefront themes render","name":"Content"},{"description":"The store dashboard; storefront traffic from the built-in tracker (visitors, sessions, pages, referrers, events) and revenue attribution by source; and the ad-platform tracking setup: Meta pixel and Conversions API, Google Ads conversions, the per-order conversion delivery log and the Meta catalog sync","name":"Analytics"}]}