> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/developers/public-api/models.md).

# Models

## The HttpErrorBody object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"HttpErrorBody":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["id","code","title","detail"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"}}}}}}}}}
```

## The Account object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Account":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["accounts"]},"attributes":{"type":"object","required":["id","name","domain","currency"],"properties":{"id":{"type":"string","description":"ID of the account"},"name":{"type":"string","description":"Name of the account as shown in the Recart dashboard"},"domain":{"type":"string","description":"Storefront domain of the account"},"currency":{"type":"string","description":"Currency of the account as an ISO 4217 code"},"timezone":{"type":["string","null"],"description":"Time zone of the account as an IANA time zone name, null when the account has not set one"}}}}}}}}
```

## The Flow object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Flow":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flows"]},"attributes":{"type":"object","required":["id","name","tags","status"],"properties":{"id":{"type":"string","description":"ID of flow"},"name":{"type":"string","description":"Name of flow"},"tags":{"type":"array","items":{"type":"string"},"description":"Flow tags"},"status":{"type":"string","description":"Status of flow","enum":["draft","active","inactive","cancelled"]}}}}}}}}
```

## The AutomatedFlowAttributes object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AutomatedFlowAttributes":{"type":"object","required":["id","name","status","tags"],"properties":{"id":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"},"status":{"type":"string","description":"Status of the automated flow","enum":["draft","active","inactive","cancelled"]},"tags":{"type":"array","items":{"type":"string"},"description":"Flow tags"},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this flow are held during the subscriber's quiet hours"},"isSmartSendingEnabled":{"type":"boolean","description":"Whether Smart Sending is enabled, suppressing sends to recently-messaged subscribers"},"segmentId":{"type":"string","description":"ID of the segment gating entry into the flow, if configured"},"triggerDiscountId":{"type":"string","description":"ID of the discount code associated with the flow's trigger, if configured"},"createdAt":{"type":"string","format":"date-time","description":"When the flow was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the flow was last updated"}}}}}}
```

## The AutomatedFlow object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AutomatedFlow":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["automated-flows"]},"attributes":{"$ref":"#/components/schemas/AutomatedFlowAttributes"}}},"AutomatedFlowAttributes":{"type":"object","required":["id","name","status","tags"],"properties":{"id":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"},"status":{"type":"string","description":"Status of the automated flow","enum":["draft","active","inactive","cancelled"]},"tags":{"type":"array","items":{"type":"string"},"description":"Flow tags"},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this flow are held during the subscriber's quiet hours"},"isSmartSendingEnabled":{"type":"boolean","description":"Whether Smart Sending is enabled, suppressing sends to recently-messaged subscribers"},"segmentId":{"type":"string","description":"ID of the segment gating entry into the flow, if configured"},"triggerDiscountId":{"type":"string","description":"ID of the discount code associated with the flow's trigger, if configured"},"createdAt":{"type":"string","format":"date-time","description":"When the flow was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the flow was last updated"}}}}}}
```

## The AutomatedFlowDetail object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AutomatedFlowDetail":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["automated-flows"]},"attributes":{"allOf":[{"$ref":"#/components/schemas/AutomatedFlowAttributes"},{"type":"object","required":["entryFlowItemId","items"],"properties":{"entryFlowItemId":{"type":"string","description":"ID of the first item in the flow"},"items":{"type":"array","description":"Every item of the flow, linked by resolved ids","items":{"$ref":"#/components/schemas/FlowItem"}}}}]}}},"AutomatedFlowAttributes":{"type":"object","required":["id","name","status","tags"],"properties":{"id":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"},"status":{"type":"string","description":"Status of the automated flow","enum":["draft","active","inactive","cancelled"]},"tags":{"type":"array","items":{"type":"string"},"description":"Flow tags"},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this flow are held during the subscriber's quiet hours"},"isSmartSendingEnabled":{"type":"boolean","description":"Whether Smart Sending is enabled, suppressing sends to recently-messaged subscribers"},"segmentId":{"type":"string","description":"ID of the segment gating entry into the flow, if configured"},"triggerDiscountId":{"type":"string","description":"ID of the discount code associated with the flow's trigger, if configured"},"createdAt":{"type":"string","format":"date-time","description":"When the flow was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the flow was last updated"}}},"FlowItem":{"type":"object","description":"One item of the flow's item graph. The resource `type` is always\n`flow-item`; the shape is picked by `attributes.type`.\nItems link to each other by resolved ids — `nextItemId` (or a\nbranch's `nextItemId`) — rather than nesting; null means end of\nbranch. An internal item type this API doesn't model is returned\nwith `attributes.type` \"unsupported\" and only its id.\n","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flow-item"]},"attributes":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","description":"Kind of item","enum":["sms","delay","conditional-split","random-split","adaptive-test","user-input","unsupported"]},"id":{"type":"string","description":"ID of the item"},"name":{"type":"string","description":"Item's display name (sms only)"},"messages":{"type":"array","description":"Messages to send (sms only)","items":{"$ref":"#/components/schemas/FlowMessage"}},"discountCodes":{"type":"array","description":"Static discount codes attached to the message (sms only)","items":{"type":"string"}},"discounts":{"type":"array","description":"Discounts attached to the message (sms only)","items":{"type":"object"}},"discountCodePoolId":{"type":"string","description":"ID of the discount code pool the message draws a unique code from (sms only)"},"uniqueDiscountIssuanceType":{"type":"string","description":"How a unique discount code is issued to the subscriber (sms only)"},"replyKeywordSettings":{"type":"object","description":"Keyword auto-reply configuration for this message (sms only)"},"delayType":{"type":"string","description":"Kind of delay (delay only)","enum":["delay","delay-until","delay-scheduled"]},"durationInSeconds":{"type":"integer","description":"Length of the delay, in seconds (delay only)"},"branches":{"type":"array","description":"Outgoing branches (conditional-split, random-split)","items":{"$ref":"#/components/schemas/FlowItemBranch"}},"defaultNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when no branch matches (conditional-split only)"},"isSticky":{"type":"boolean","description":"Whether a returning subscriber is kept on the same arm (random-split only)"},"adaptiveTest":{"type":"object","description":"Adaptive test configuration (adaptive-test only)","properties":{"variants":{"type":"array","description":"Variant flow items under test","items":{"type":"object","properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item"}}}},"evaluation":{"type":"object","description":"Evaluation configuration used to pick a winner"},"audienceSplitPercentage":{"type":"number","description":"Share of the audience sampled before picking a winner"}}},"fieldName":{"type":"string","description":"Name of the captured field. LEGACY: user-input items are\nno longer creatable; existing flows may still contain\none.\n"},"validationRule":{"type":"string","description":"Validation applied to the subscriber's reply. LEGACY:\nuser-input items are no longer creatable; existing flows\nmay still contain one.\n"},"skippedNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when the subscriber doesn't respond.\nLEGACY: user-input items are no longer creatable;\nexisting flows may still contain one.\n"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item; null means end of branch (sms, delay, user-input)"}}}}},"FlowMessage":{"type":"object","description":"One SMS/MMS message of an sms flow item","properties":{"text":{"type":"string","description":"Message body"},"imageUrl":{"type":"string","nullable":true,"description":"MMS image attached to the message"}}},"FlowItemBranch":{"type":"object","description":"One outgoing branch of a split item. conditional-split branches\nuse conditions or expression with nextItemId; random-split\nbranches use percentage with nextItemId.\n","properties":{"conditions":{"type":"array","items":{"type":"object"},"description":"v1 conditional split conditions"},"expression":{"type":"object","description":"v2 conditional split expression: `and[].or[]` of conditions,\neach with a `slug`, `type`, `operator` and, depending on the\nslug, a `value`, a `dateFilter` (time window the condition\napplies to) and `filters` (occurrence or count). A condition\nnarrows its match with either one `subcondition` or, for\n`visited-page`, a `subconditions` list whose rows all apply to\nthe same page view; each row has `slug`, `category`, `operator`\nand a `value`, absent when the operator is `exist`. Conditions\nand subcondition rows whose value is a list of IDs carry\n`values` instead of `value`: one `{ id, name }` entry per ID,\nwhere `name` is the current name of the referenced segment,\nflow, opt-in tool, product, variant or Klaviyo list, or an\nempty string when it could not be resolved. This applies to\n`member-of-a-segment` (segment ids, on the condition), and on\nthe subcondition row for the flow subcondition (flow IDs),\n`subscription-source`/`optin-tool-id` (opt-in tool ids),\n`product`/`product-id` and `product-variant` (Shopify ids),\n`klaviyo-segment-or-list` (Klaviyo ids).\n"},"percentage":{"type":"number","description":"Share of traffic sent down this arm (random split)"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item on this branch; null means end of branch (dead arm)"}}}}}}
```

## The CampaignAttributes object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CampaignAttributes":{"type":"object","required":["id","name","status","campaignType"],"properties":{"id":{"type":"string","description":"ID of the campaign"},"name":{"type":"string","description":"Name of the campaign"},"status":{"type":"string","description":"The dashboard's send status of the campaign","enum":["draft","scheduled","processing","sending","sent","failed","cancelled","evaluating","noWinner"]},"campaignType":{"type":"string","description":"Whether the campaign sends one message or runs an adaptive test across variants","enum":["standard","adaptive"]},"scheduledFor":{"type":"string","format":"date-time","nullable":true,"description":"When the campaign is scheduled to send; null when not scheduled"},"scheduleType":{"type":"string","description":"Whether scheduledFor is interpreted in the site's timezone or in each subscriber's own timezone","enum":["siteTimezone","subscriberTimezone"]},"sentAt":{"type":"string","format":"date-time","description":"When the campaign was actually sent"},"deliveredSubscriberCount":{"type":"integer","description":"Number of subscribers the campaign was delivered to"},"includeSegments":{"type":"array","description":"Segments the campaign audience includes","items":{"$ref":"#/components/schemas/Segment"}},"excludeSegments":{"type":"array","description":"Segments the campaign audience excludes","items":{"$ref":"#/components/schemas/Segment"}},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this campaign are held during the subscriber's quiet hours"},"adaptiveTest":{"description":"Adaptive test state (campaignType=adaptive only)","$ref":"#/components/schemas/CampaignAdaptiveTest"},"discountUsage":{"type":"array","description":"Discounts the campaign's messages reference. referenceCount is the\nnumber of places in the campaign that reference the discount —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"discountCodePoolUsage":{"type":"array","description":"Discount code pools the campaign's messages reference. referenceCount\nis the number of places in the campaign that reference the pool —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"failedReason":{"type":"string","description":"Why the campaign send failed (status=failed only)"},"failedAt":{"type":"string","format":"date-time","description":"When the campaign send failed (status=failed only)"},"cancelledAt":{"type":"string","format":"date-time","description":"When the campaign was cancelled (status=cancelled only)"},"createdAt":{"type":"string","format":"date-time","description":"When the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the campaign was last updated"}}},"Segment":{"type":"object","description":"A segment of the campaign audience. name is the segment's current\nname, or an empty string when it could not be resolved (for\nexample a deleted segment).\n","required":["id","name"],"properties":{"id":{"type":"string","description":"ID of the segment"},"name":{"type":"string","description":"Current name of the segment, empty when unresolved"}}},"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}}}}}
```

## The Segment object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Segment":{"type":"object","description":"A segment of the campaign audience. name is the segment's current\nname, or an empty string when it could not be resolved (for\nexample a deleted segment).\n","required":["id","name"],"properties":{"id":{"type":"string","description":"ID of the segment"},"name":{"type":"string","description":"Current name of the segment, empty when unresolved"}}}}}}
```

## The Campaign object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Campaign":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["campaigns"]},"attributes":{"$ref":"#/components/schemas/CampaignAttributes"}}},"CampaignAttributes":{"type":"object","required":["id","name","status","campaignType"],"properties":{"id":{"type":"string","description":"ID of the campaign"},"name":{"type":"string","description":"Name of the campaign"},"status":{"type":"string","description":"The dashboard's send status of the campaign","enum":["draft","scheduled","processing","sending","sent","failed","cancelled","evaluating","noWinner"]},"campaignType":{"type":"string","description":"Whether the campaign sends one message or runs an adaptive test across variants","enum":["standard","adaptive"]},"scheduledFor":{"type":"string","format":"date-time","nullable":true,"description":"When the campaign is scheduled to send; null when not scheduled"},"scheduleType":{"type":"string","description":"Whether scheduledFor is interpreted in the site's timezone or in each subscriber's own timezone","enum":["siteTimezone","subscriberTimezone"]},"sentAt":{"type":"string","format":"date-time","description":"When the campaign was actually sent"},"deliveredSubscriberCount":{"type":"integer","description":"Number of subscribers the campaign was delivered to"},"includeSegments":{"type":"array","description":"Segments the campaign audience includes","items":{"$ref":"#/components/schemas/Segment"}},"excludeSegments":{"type":"array","description":"Segments the campaign audience excludes","items":{"$ref":"#/components/schemas/Segment"}},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this campaign are held during the subscriber's quiet hours"},"adaptiveTest":{"description":"Adaptive test state (campaignType=adaptive only)","$ref":"#/components/schemas/CampaignAdaptiveTest"},"discountUsage":{"type":"array","description":"Discounts the campaign's messages reference. referenceCount is the\nnumber of places in the campaign that reference the discount —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"discountCodePoolUsage":{"type":"array","description":"Discount code pools the campaign's messages reference. referenceCount\nis the number of places in the campaign that reference the pool —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"failedReason":{"type":"string","description":"Why the campaign send failed (status=failed only)"},"failedAt":{"type":"string","format":"date-time","description":"When the campaign send failed (status=failed only)"},"cancelledAt":{"type":"string","format":"date-time","description":"When the campaign was cancelled (status=cancelled only)"},"createdAt":{"type":"string","format":"date-time","description":"When the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the campaign was last updated"}}},"Segment":{"type":"object","description":"A segment of the campaign audience. name is the segment's current\nname, or an empty string when it could not be resolved (for\nexample a deleted segment).\n","required":["id","name"],"properties":{"id":{"type":"string","description":"ID of the segment"},"name":{"type":"string","description":"Current name of the segment, empty when unresolved"}}},"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}}}}}
```

## The CampaignDetail object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CampaignDetail":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["campaigns"]},"attributes":{"allOf":[{"$ref":"#/components/schemas/CampaignAttributes"},{"type":"object","required":["entryFlowItemId","items"],"properties":{"entryFlowItemId":{"type":"string","description":"ID of the first item in the flow"},"items":{"type":"array","description":"Every item of the flow, linked by resolved ids","items":{"$ref":"#/components/schemas/FlowItem"}}}}]}}},"CampaignAttributes":{"type":"object","required":["id","name","status","campaignType"],"properties":{"id":{"type":"string","description":"ID of the campaign"},"name":{"type":"string","description":"Name of the campaign"},"status":{"type":"string","description":"The dashboard's send status of the campaign","enum":["draft","scheduled","processing","sending","sent","failed","cancelled","evaluating","noWinner"]},"campaignType":{"type":"string","description":"Whether the campaign sends one message or runs an adaptive test across variants","enum":["standard","adaptive"]},"scheduledFor":{"type":"string","format":"date-time","nullable":true,"description":"When the campaign is scheduled to send; null when not scheduled"},"scheduleType":{"type":"string","description":"Whether scheduledFor is interpreted in the site's timezone or in each subscriber's own timezone","enum":["siteTimezone","subscriberTimezone"]},"sentAt":{"type":"string","format":"date-time","description":"When the campaign was actually sent"},"deliveredSubscriberCount":{"type":"integer","description":"Number of subscribers the campaign was delivered to"},"includeSegments":{"type":"array","description":"Segments the campaign audience includes","items":{"$ref":"#/components/schemas/Segment"}},"excludeSegments":{"type":"array","description":"Segments the campaign audience excludes","items":{"$ref":"#/components/schemas/Segment"}},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this campaign are held during the subscriber's quiet hours"},"adaptiveTest":{"description":"Adaptive test state (campaignType=adaptive only)","$ref":"#/components/schemas/CampaignAdaptiveTest"},"discountUsage":{"type":"array","description":"Discounts the campaign's messages reference. referenceCount is the\nnumber of places in the campaign that reference the discount —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"discountCodePoolUsage":{"type":"array","description":"Discount code pools the campaign's messages reference. referenceCount\nis the number of places in the campaign that reference the pool —\nconfiguration, not code consumption.\n","items":{"type":"object","required":["id","referenceCount"],"properties":{"id":{"type":"string"},"referenceCount":{"type":"integer"}}}},"failedReason":{"type":"string","description":"Why the campaign send failed (status=failed only)"},"failedAt":{"type":"string","format":"date-time","description":"When the campaign send failed (status=failed only)"},"cancelledAt":{"type":"string","format":"date-time","description":"When the campaign was cancelled (status=cancelled only)"},"createdAt":{"type":"string","format":"date-time","description":"When the campaign was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the campaign was last updated"}}},"Segment":{"type":"object","description":"A segment of the campaign audience. name is the segment's current\nname, or an empty string when it could not be resolved (for\nexample a deleted segment).\n","required":["id","name"],"properties":{"id":{"type":"string","description":"ID of the segment"},"name":{"type":"string","description":"Current name of the segment, empty when unresolved"}}},"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}},"FlowItem":{"type":"object","description":"One item of the flow's item graph. The resource `type` is always\n`flow-item`; the shape is picked by `attributes.type`.\nItems link to each other by resolved ids — `nextItemId` (or a\nbranch's `nextItemId`) — rather than nesting; null means end of\nbranch. An internal item type this API doesn't model is returned\nwith `attributes.type` \"unsupported\" and only its id.\n","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flow-item"]},"attributes":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","description":"Kind of item","enum":["sms","delay","conditional-split","random-split","adaptive-test","user-input","unsupported"]},"id":{"type":"string","description":"ID of the item"},"name":{"type":"string","description":"Item's display name (sms only)"},"messages":{"type":"array","description":"Messages to send (sms only)","items":{"$ref":"#/components/schemas/FlowMessage"}},"discountCodes":{"type":"array","description":"Static discount codes attached to the message (sms only)","items":{"type":"string"}},"discounts":{"type":"array","description":"Discounts attached to the message (sms only)","items":{"type":"object"}},"discountCodePoolId":{"type":"string","description":"ID of the discount code pool the message draws a unique code from (sms only)"},"uniqueDiscountIssuanceType":{"type":"string","description":"How a unique discount code is issued to the subscriber (sms only)"},"replyKeywordSettings":{"type":"object","description":"Keyword auto-reply configuration for this message (sms only)"},"delayType":{"type":"string","description":"Kind of delay (delay only)","enum":["delay","delay-until","delay-scheduled"]},"durationInSeconds":{"type":"integer","description":"Length of the delay, in seconds (delay only)"},"branches":{"type":"array","description":"Outgoing branches (conditional-split, random-split)","items":{"$ref":"#/components/schemas/FlowItemBranch"}},"defaultNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when no branch matches (conditional-split only)"},"isSticky":{"type":"boolean","description":"Whether a returning subscriber is kept on the same arm (random-split only)"},"adaptiveTest":{"type":"object","description":"Adaptive test configuration (adaptive-test only)","properties":{"variants":{"type":"array","description":"Variant flow items under test","items":{"type":"object","properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item"}}}},"evaluation":{"type":"object","description":"Evaluation configuration used to pick a winner"},"audienceSplitPercentage":{"type":"number","description":"Share of the audience sampled before picking a winner"}}},"fieldName":{"type":"string","description":"Name of the captured field. LEGACY: user-input items are\nno longer creatable; existing flows may still contain\none.\n"},"validationRule":{"type":"string","description":"Validation applied to the subscriber's reply. LEGACY:\nuser-input items are no longer creatable; existing flows\nmay still contain one.\n"},"skippedNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when the subscriber doesn't respond.\nLEGACY: user-input items are no longer creatable;\nexisting flows may still contain one.\n"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item; null means end of branch (sms, delay, user-input)"}}}}},"FlowMessage":{"type":"object","description":"One SMS/MMS message of an sms flow item","properties":{"text":{"type":"string","description":"Message body"},"imageUrl":{"type":"string","nullable":true,"description":"MMS image attached to the message"}}},"FlowItemBranch":{"type":"object","description":"One outgoing branch of a split item. conditional-split branches\nuse conditions or expression with nextItemId; random-split\nbranches use percentage with nextItemId.\n","properties":{"conditions":{"type":"array","items":{"type":"object"},"description":"v1 conditional split conditions"},"expression":{"type":"object","description":"v2 conditional split expression: `and[].or[]` of conditions,\neach with a `slug`, `type`, `operator` and, depending on the\nslug, a `value`, a `dateFilter` (time window the condition\napplies to) and `filters` (occurrence or count). A condition\nnarrows its match with either one `subcondition` or, for\n`visited-page`, a `subconditions` list whose rows all apply to\nthe same page view; each row has `slug`, `category`, `operator`\nand a `value`, absent when the operator is `exist`. Conditions\nand subcondition rows whose value is a list of IDs carry\n`values` instead of `value`: one `{ id, name }` entry per ID,\nwhere `name` is the current name of the referenced segment,\nflow, opt-in tool, product, variant or Klaviyo list, or an\nempty string when it could not be resolved. This applies to\n`member-of-a-segment` (segment ids, on the condition), and on\nthe subcondition row for the flow subcondition (flow IDs),\n`subscription-source`/`optin-tool-id` (opt-in tool ids),\n`product`/`product-id` and `product-variant` (Shopify ids),\n`klaviyo-segment-or-list` (Klaviyo ids).\n"},"percentage":{"type":"number","description":"Share of traffic sent down this arm (random split)"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item on this branch; null means end of branch (dead arm)"}}}}}}
```

## The FlowMessage object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowMessage":{"type":"object","description":"One SMS/MMS message of an sms flow item","properties":{"text":{"type":"string","description":"Message body"},"imageUrl":{"type":"string","nullable":true,"description":"MMS image attached to the message"}}}}}}
```

## The FlowItemBranch object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowItemBranch":{"type":"object","description":"One outgoing branch of a split item. conditional-split branches\nuse conditions or expression with nextItemId; random-split\nbranches use percentage with nextItemId.\n","properties":{"conditions":{"type":"array","items":{"type":"object"},"description":"v1 conditional split conditions"},"expression":{"type":"object","description":"v2 conditional split expression: `and[].or[]` of conditions,\neach with a `slug`, `type`, `operator` and, depending on the\nslug, a `value`, a `dateFilter` (time window the condition\napplies to) and `filters` (occurrence or count). A condition\nnarrows its match with either one `subcondition` or, for\n`visited-page`, a `subconditions` list whose rows all apply to\nthe same page view; each row has `slug`, `category`, `operator`\nand a `value`, absent when the operator is `exist`. Conditions\nand subcondition rows whose value is a list of IDs carry\n`values` instead of `value`: one `{ id, name }` entry per ID,\nwhere `name` is the current name of the referenced segment,\nflow, opt-in tool, product, variant or Klaviyo list, or an\nempty string when it could not be resolved. This applies to\n`member-of-a-segment` (segment ids, on the condition), and on\nthe subcondition row for the flow subcondition (flow IDs),\n`subscription-source`/`optin-tool-id` (opt-in tool ids),\n`product`/`product-id` and `product-variant` (Shopify ids),\n`klaviyo-segment-or-list` (Klaviyo ids).\n"},"percentage":{"type":"number","description":"Share of traffic sent down this arm (random split)"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item on this branch; null means end of branch (dead arm)"}}}}}}
```

## The FlowItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowItem":{"type":"object","description":"One item of the flow's item graph. The resource `type` is always\n`flow-item`; the shape is picked by `attributes.type`.\nItems link to each other by resolved ids — `nextItemId` (or a\nbranch's `nextItemId`) — rather than nesting; null means end of\nbranch. An internal item type this API doesn't model is returned\nwith `attributes.type` \"unsupported\" and only its id.\n","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flow-item"]},"attributes":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","description":"Kind of item","enum":["sms","delay","conditional-split","random-split","adaptive-test","user-input","unsupported"]},"id":{"type":"string","description":"ID of the item"},"name":{"type":"string","description":"Item's display name (sms only)"},"messages":{"type":"array","description":"Messages to send (sms only)","items":{"$ref":"#/components/schemas/FlowMessage"}},"discountCodes":{"type":"array","description":"Static discount codes attached to the message (sms only)","items":{"type":"string"}},"discounts":{"type":"array","description":"Discounts attached to the message (sms only)","items":{"type":"object"}},"discountCodePoolId":{"type":"string","description":"ID of the discount code pool the message draws a unique code from (sms only)"},"uniqueDiscountIssuanceType":{"type":"string","description":"How a unique discount code is issued to the subscriber (sms only)"},"replyKeywordSettings":{"type":"object","description":"Keyword auto-reply configuration for this message (sms only)"},"delayType":{"type":"string","description":"Kind of delay (delay only)","enum":["delay","delay-until","delay-scheduled"]},"durationInSeconds":{"type":"integer","description":"Length of the delay, in seconds (delay only)"},"branches":{"type":"array","description":"Outgoing branches (conditional-split, random-split)","items":{"$ref":"#/components/schemas/FlowItemBranch"}},"defaultNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when no branch matches (conditional-split only)"},"isSticky":{"type":"boolean","description":"Whether a returning subscriber is kept on the same arm (random-split only)"},"adaptiveTest":{"type":"object","description":"Adaptive test configuration (adaptive-test only)","properties":{"variants":{"type":"array","description":"Variant flow items under test","items":{"type":"object","properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item"}}}},"evaluation":{"type":"object","description":"Evaluation configuration used to pick a winner"},"audienceSplitPercentage":{"type":"number","description":"Share of the audience sampled before picking a winner"}}},"fieldName":{"type":"string","description":"Name of the captured field. LEGACY: user-input items are\nno longer creatable; existing flows may still contain\none.\n"},"validationRule":{"type":"string","description":"Validation applied to the subscriber's reply. LEGACY:\nuser-input items are no longer creatable; existing flows\nmay still contain one.\n"},"skippedNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when the subscriber doesn't respond.\nLEGACY: user-input items are no longer creatable;\nexisting flows may still contain one.\n"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item; null means end of branch (sms, delay, user-input)"}}}}},"FlowMessage":{"type":"object","description":"One SMS/MMS message of an sms flow item","properties":{"text":{"type":"string","description":"Message body"},"imageUrl":{"type":"string","nullable":true,"description":"MMS image attached to the message"}}},"FlowItemBranch":{"type":"object","description":"One outgoing branch of a split item. conditional-split branches\nuse conditions or expression with nextItemId; random-split\nbranches use percentage with nextItemId.\n","properties":{"conditions":{"type":"array","items":{"type":"object"},"description":"v1 conditional split conditions"},"expression":{"type":"object","description":"v2 conditional split expression: `and[].or[]` of conditions,\neach with a `slug`, `type`, `operator` and, depending on the\nslug, a `value`, a `dateFilter` (time window the condition\napplies to) and `filters` (occurrence or count). A condition\nnarrows its match with either one `subcondition` or, for\n`visited-page`, a `subconditions` list whose rows all apply to\nthe same page view; each row has `slug`, `category`, `operator`\nand a `value`, absent when the operator is `exist`. Conditions\nand subcondition rows whose value is a list of IDs carry\n`values` instead of `value`: one `{ id, name }` entry per ID,\nwhere `name` is the current name of the referenced segment,\nflow, opt-in tool, product, variant or Klaviyo list, or an\nempty string when it could not be resolved. This applies to\n`member-of-a-segment` (segment ids, on the condition), and on\nthe subcondition row for the flow subcondition (flow IDs),\n`subscription-source`/`optin-tool-id` (opt-in tool ids),\n`product`/`product-id` and `product-variant` (Shopify ids),\n`klaviyo-segment-or-list` (Klaviyo ids).\n"},"percentage":{"type":"number","description":"Share of traffic sent down this arm (random split)"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item on this branch; null means end of branch (dead arm)"}}}}}}
```

## The CampaignAdaptiveTest object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}}}}}
```

## The AdaptiveTestVariantEvaluationStats object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AdaptiveTestVariantEvaluationStats":{"type":"object","description":"The variant's totals frozen at the moment its adaptive test was\nevaluated — the numbers the winner was picked on. The evaluation\nruns once, when the evaluation window closes\n(testVariantsDispatchedAt plus the window), and takes each\nvariant's lifetime totals as they stood then. It is a snapshot,\nnot a range query: clicks, orders and opt-outs that arrive later\nare not added, and the winner's rollout to the rest of the\naudience is not included. Amounts are keyed by ISO 4217 code: USD\nalways, the store currency additionally when it is not USD. Rates\nwith a zero denominator are 0.\n","required":["sent","clickRate","sales","spent","roi","optOutRate"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent to the test audience by this variant"},"clickRate":{"type":"number","description":"Clicks / sent"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the variant / sent"}}}}}}
```

## The AdaptiveFlowSummary object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AdaptiveFlowSummary":{"type":"object","description":"One adaptive campaign's test, as evaluated and as it stands now.\nEach variant carries evaluationStats — the snapshot the winner was\npicked on, present once the test has completed — next to\nallTimeStats, the variant's lifetime totals computed at request\ntime, which keep growing with late activity and, for the winner,\ninclude the rollout to the rest of the audience.\n","required":["id","name","adaptiveTest","variants"],"properties":{"id":{"type":"string","description":"ID of the campaign"},"name":{"type":"string","description":"Name of the campaign"},"adaptiveTest":{"$ref":"#/components/schemas/CampaignAdaptiveTest"},"variants":{"type":"array","description":"The variants under test, in the order of the adaptive-test item","items":{"type":"object","required":["flowItemId","allTimeStats"],"properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item — the same id as items[] on the campaign detail and the keys of flow-items-summary"},"evaluationStats":{"$ref":"#/components/schemas/AdaptiveTestVariantEvaluationStats"},"allTimeStats":{"description":"The variant's lifetime totals at request time; recipients equals sent","$ref":"#/components/schemas/FlowStatistics"}}}}}},"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}},"AdaptiveTestVariantEvaluationStats":{"type":"object","description":"The variant's totals frozen at the moment its adaptive test was\nevaluated — the numbers the winner was picked on. The evaluation\nruns once, when the evaluation window closes\n(testVariantsDispatchedAt plus the window), and takes each\nvariant's lifetime totals as they stood then. It is a snapshot,\nnot a range query: clicks, orders and opt-outs that arrive later\nare not added, and the winner's rollout to the rest of the\naudience is not included. Amounts are keyed by ISO 4217 code: USD\nalways, the store currency additionally when it is not USD. Rates\nwith a zero denominator are 0.\n","required":["sent","clickRate","sales","spent","roi","optOutRate"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent to the test audience by this variant"},"clickRate":{"type":"number","description":"Clicks / sent"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the variant / sent"}}},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The FlowStatistics object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The FlowGroupStatisticsItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowGroupStatisticsItem":{"allOf":[{"type":"object","required":["group"],"properties":{"group":{"type":"string","description":"Flow group tag"}}},{"$ref":"#/components/schemas/FlowStatistics"}]},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The AutomatedFlowStatisticsItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AutomatedFlowStatisticsItem":{"allOf":[{"type":"object","required":["flowId","name"],"properties":{"flowId":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"}}},{"$ref":"#/components/schemas/FlowStatistics"}]},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The CampaignFlowStatisticsItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CampaignFlowStatisticsItem":{"allOf":[{"type":"object","required":["flowId","name"],"properties":{"flowId":{"type":"string","description":"The campaign's flow id"},"name":{"type":"string","description":"Name of the campaign"}}},{"$ref":"#/components/schemas/FlowStatistics"}]},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The FlowViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FlowViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flow-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"sms-summary":{"description":"SMS channel totals for the range, optionally narrowed by tags","$ref":"#/components/schemas/FlowStatistics"},"flow-groups-summary":{"type":"array","description":"Totals per flow group, campaigns included as blast","items":{"$ref":"#/components/schemas/FlowGroupStatisticsItem"}},"automated-flows-summary":{"type":"array","description":"Totals per automated flow of the site","items":{"$ref":"#/components/schemas/AutomatedFlowStatisticsItem"}},"campaign-flows-summary":{"type":"array","description":"Totals per campaign with activity in the range","items":{"$ref":"#/components/schemas/CampaignFlowStatisticsItem"}}}}}},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}},"FlowGroupStatisticsItem":{"allOf":[{"type":"object","required":["group"],"properties":{"group":{"type":"string","description":"Flow group tag"}}},{"$ref":"#/components/schemas/FlowStatistics"}]},"AutomatedFlowStatisticsItem":{"allOf":[{"type":"object","required":["flowId","name"],"properties":{"flowId":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"}}},{"$ref":"#/components/schemas/FlowStatistics"}]},"CampaignFlowStatisticsItem":{"allOf":[{"type":"object","required":["flowId","name"],"properties":{"flowId":{"type":"string","description":"The campaign's flow id"},"name":{"type":"string","description":"Name of the campaign"}}},{"$ref":"#/components/schemas/FlowStatistics"}]}}}}
```

## The AutomatedFlowViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AutomatedFlowViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["automated-flow-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"flow-summary":{"description":"The flow's totals for the range","$ref":"#/components/schemas/FlowStatistics"},"flow-items-summary":{"type":"object","description":"Totals per message item, keyed by flowItemId — the same id as\nitems[] on the flow detail. Only items that recorded activity\nin the range appear; a missing key means no activity. Per\nitem, recipients equals sent (a message reaches a subscriber\nat most once), so revenuePerRecipient equals revenuePerMessage.\n","additionalProperties":{"$ref":"#/components/schemas/FlowStatistics"}}}}}},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}}}}}
```

## The CampaignFlowViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CampaignFlowViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["campaign-flow-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"flow-summary":{"description":"The campaign's totals for the range","$ref":"#/components/schemas/FlowStatistics"},"flow-items-summary":{"type":"object","description":"Totals per message item, keyed by flowItemId — the same id as\nitems[] on the campaign detail; adaptive-test variants are\nmessage items, so each variant is its own key. Only items\nthat recorded activity in the range appear. Per item,\nrecipients equals sent, so revenuePerRecipient equals\nrevenuePerMessage.\n","additionalProperties":{"$ref":"#/components/schemas/FlowStatistics"}},"adaptive-flow-summary":{"description":"The campaign's adaptive test with per-variant evaluation and lifetime statistics (adaptive campaigns only)","$ref":"#/components/schemas/AdaptiveFlowSummary"}}}}},"FlowStatistics":{"type":"object","description":"Range totals of one flow, campaign, group or message — the same\nnumbers as the dashboard. Rates with a zero denominator are 0.\nAmounts are keyed by ISO 4217 code: USD always, the store currency\nadditionally when it is not USD.\n\nrecipients and revenuePerRecipient are present on every view except\nsms-summary: the SMS channel total is aggregated without the\nfirst-message cohort that defines recipients, and its sent counts\nevery message of every flow, so the number cannot be derived from\nit. The dashboard's Automated Flows header, built on the same data,\nshows RPM and no recipients for the same reason. Where the\ndashboard shows Recipients and RPR — the Campaigns header — read\nthe blast entry of flow-groups-summary.\n","required":["sent","clicked","clickRate","converted","sales","spent","roi","optOutRate","spamRate","revenuePerMessage"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent"},"recipients":{"type":"integer","description":"Subscribers who received the flow's first message. Present on\nflow-groups-summary, automated-flows-summary,\ncampaign-flows-summary, flow-summary and flow-items-summary\n(where it equals the item's sent — a message reaches a subscriber\nat most once); absent on sms-summary.\n"},"clicked":{"type":"integer","description":"Clicks on a link in one of the flow's messages"},"clickRate":{"type":"number","description":"Clicks / sent"},"converted":{"type":"integer","description":"Attributed orders"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the flow / recipients"},"spamRate":{"type":"number","description":"Carrier spam rejections / sent"},"revenuePerRecipient":{"type":"number","description":"sales.USD / recipients — the dashboard's RPR. Present wherever\nrecipients is; absent on sms-summary. Equals revenuePerMessage\non flow-items-summary.\n"},"revenuePerMessage":{"type":"number","description":"sales.USD / sent — the dashboard's RPM"}}},"AdaptiveFlowSummary":{"type":"object","description":"One adaptive campaign's test, as evaluated and as it stands now.\nEach variant carries evaluationStats — the snapshot the winner was\npicked on, present once the test has completed — next to\nallTimeStats, the variant's lifetime totals computed at request\ntime, which keep growing with late activity and, for the winner,\ninclude the rollout to the rest of the audience.\n","required":["id","name","adaptiveTest","variants"],"properties":{"id":{"type":"string","description":"ID of the campaign"},"name":{"type":"string","description":"Name of the campaign"},"adaptiveTest":{"$ref":"#/components/schemas/CampaignAdaptiveTest"},"variants":{"type":"array","description":"The variants under test, in the order of the adaptive-test item","items":{"type":"object","required":["flowItemId","allTimeStats"],"properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item — the same id as items[] on the campaign detail and the keys of flow-items-summary"},"evaluationStats":{"$ref":"#/components/schemas/AdaptiveTestVariantEvaluationStats"},"allTimeStats":{"description":"The variant's lifetime totals at request time; recipients equals sent","$ref":"#/components/schemas/FlowStatistics"}}}}}},"CampaignAdaptiveTest":{"type":"object","description":"Adaptive test state of a campaign","properties":{"adaptiveTestStatus":{"type":"string","description":"running while the test variants are being evaluated;\ncomplete_with_winner when a variant won and was rolled out;\ncomplete_no_winner when no variant stood out; complete_control_kept\nwhen the control message beat every variant and was kept.\n","enum":["running","complete_with_winner","complete_no_winner","complete_control_kept"]},"adaptiveTestResult":{"type":"object","description":"Outcome of the test, present once evaluated","properties":{"winnerFlowItemId":{"type":"string","description":"ID of the winning variant's flow item"},"wasTiebroken":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"testVariantsDispatchedAt":{"type":"string","format":"date-time","description":"When the test variants were sent to the sample audience"}}},"AdaptiveTestVariantEvaluationStats":{"type":"object","description":"The variant's totals frozen at the moment its adaptive test was\nevaluated — the numbers the winner was picked on. The evaluation\nruns once, when the evaluation window closes\n(testVariantsDispatchedAt plus the window), and takes each\nvariant's lifetime totals as they stood then. It is a snapshot,\nnot a range query: clicks, orders and opt-outs that arrive later\nare not added, and the winner's rollout to the rest of the\naudience is not included. Amounts are keyed by ISO 4217 code: USD\nalways, the store currency additionally when it is not USD. Rates\nwith a zero denominator are 0.\n","required":["sent","clickRate","sales","spent","roi","optOutRate"],"properties":{"sent":{"type":"integer","description":"SMS and MMS messages sent to the test audience by this variant"},"clickRate":{"type":"number","description":"Clicks / sent"},"sales":{"type":"object","additionalProperties":{"type":"number"},"description":"Attributed order value per currency (ISO 4217 code)"},"spent":{"type":"object","additionalProperties":{"type":"number"},"description":"SMS and MMS cost per currency (ISO 4217 code)"},"roi":{"type":"number","description":"sales.USD / spent.USD"},"optOutRate":{"type":"number","description":"Opt-outs attributed to the variant / sent"}}}}}}
```

## The OptinTool object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinTool":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tools"]},"attributes":{"type":"object","required":["id","name","type","status","devices","channels"],"properties":{"id":{"type":"string","description":"ID of the opt-in tool"},"name":{"type":"string","description":"Name of the opt-in tool"},"type":{"type":"string","description":"Type of the opt-in tool","enum":["popup","landing-page","embedded-form","keyword"]},"status":{"type":"string","description":"Status of the opt-in tool","enum":["active","draft","inactive"]},"devices":{"type":"array","description":"Devices the tool targets","items":{"type":"string","enum":["mobile","desktop"]}},"channels":{"type":"array","description":"Channels the tool collects","items":{"type":"string","enum":["email","sms"]}},"statusSchedule":{"type":"object","description":"Upcoming scheduled status transitions. UTC Date and time in ISO 8601 format","properties":{"activateAt":{"type":"string","format":"date-time"},"inactivateAt":{"type":"string","format":"date-time"}}},"optinMethod":{"type":"object","description":"What handles a new opt-in","required":["type"],"properties":{"type":{"type":"string","description":"Type of the message handler","enum":["flow","integration"]},"flowId":{"type":"string","description":"ID of the flow the tool feeds (type flow only)"}}},"experimentIds":{"type":"array","description":"IDs of A/B experiments the tool participates in","items":{"type":"string"}},"steps":{"type":"array","description":"Steps of the tool (popup only)","items":{"type":"string","enum":["teaser","email","sms","smsWithEmail","oneTimePassword","oneClickVerification","oneClickOptin","success"]}},"messagingType":{"type":"string","description":"Messaging type of the tool (popup only)","enum":["two-way","one-way"]},"settings":{"type":"object","description":"Full tool settings (type-dependent). Returned only by getOptinTool;\nthe collection endpoint omits it.\n"}}}}}}}}
```

## The RevenueMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}}}}}
```

## The OptinToolOptinSummaryData object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolOptinSummaryData":{"type":"object","description":"Opt-in performance totals for the range. Counts are unique sessions.\nEmail/SMS fields appear only when the tool collects that channel.\nFields are never null: a range without data returns 0 counts and\n0 rates.\n","required":["impression","teaserConfirm","teaserConfirmRate","teaserDecline"],"properties":{"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed"},"teaserConfirm":{"type":"integer","description":"Unique sessions that clicked the teaser and opened the popup"},"teaserConfirmRate":{"type":"number","description":"teaserConfirm / impression"},"teaserDecline":{"type":"integer","description":"Unique sessions that dismissed the teaser"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address on the popup"},"emailOptinRate":{"type":"number","description":"emailOptin / impression"},"phoneNumberSubmitted":{"type":"integer","description":"Unique sessions that submitted a phone number on the popup"},"phoneNumberSubmittedRate":{"type":"number","description":"phoneNumberSubmitted / impression"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in"},"smsOptinRate":{"type":"number","description":"smsOptin / impression"}}}}}}
```

## The OptinToolOptinHistoryBucket object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolOptinHistoryBucket":{"type":"object","required":["timestamp","impression"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"},"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed within the bucket"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address within the bucket"},"emailOptinRate":{"type":"number","description":"emailOptin / impression within the bucket"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in within the bucket"},"smsOptinRate":{"type":"number","description":"smsOptin / impression within the bucket"}}}}}}
```

## The OptinToolRevenueHistoryBucket object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolRevenueHistoryBucket":{"allOf":[{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}}}}}
```

## The OptinToolRevenueByOptinSegmentsItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolRevenueByOptinSegmentsItem":{"allOf":[{"type":"object","required":["optinSegmentType","optinSegmentCount"],"properties":{"optinSegmentType":{"type":"string","description":"The deepest opt-in stage the sessions in this row reached\n(noOptin / emailOptin / smsOptin / emailAndSMSOptin); the\ntotal row sums the whole funnel\n","enum":["noOptin","emailOptin","smsOptin","emailAndSMSOptin","total"]},"optinSegmentCount":{"type":"integer","description":"Unique sessions whose deepest opt-in stage is this segment"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}}}}}
```

## The OptinToolRevenueByCountriesItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolRevenueByCountriesItem":{"allOf":[{"type":"object","required":["countryCode","impressionCount"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the visitors;\n"},"impressionCount":{"type":"integer","description":"Unique sessions in which the popup was displayed in this country"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}}}}}
```

## The OptinToolSubscriptionsHistoryBucket object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolSubscriptionsHistoryBucket":{"type":"object","required":["timestamp","subscriptions"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"},"subscriptions":{"type":"integer","description":"New SMS subscribers the opt-in tool collected within the bucket"}}}}}}
```

## The OptinToolViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tool-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key for a\nsingle view, all seven for name=all. History and breakdown values\nare arrays (one element per bucket / country / segment).\n","minProperties":1,"properties":{"optin-summary":{"description":"Opt-in performance totals for the range","$ref":"#/components/schemas/OptinToolOptinSummaryData"},"optin-history":{"type":"array","description":"Opt-in performance per bucket; one bucket per targetResolution unit, gaps zero-filled","items":{"$ref":"#/components/schemas/OptinToolOptinHistoryBucket"}},"revenue-summary":{"description":"Revenue attributed to the tool, totals for the range","$ref":"#/components/schemas/RevenueMetrics"},"revenue-history":{"type":"array","description":"Attributed revenue per bucket; one bucket per targetResolution unit, gaps zero-filled","items":{"$ref":"#/components/schemas/OptinToolRevenueHistoryBucket"}},"revenue-by-optin-segments":{"type":"array","description":"Attributed revenue split by opt-in segment; one element per segment plus a total row","items":{"$ref":"#/components/schemas/OptinToolRevenueByOptinSegmentsItem"}},"revenue-by-countries":{"type":"array","description":"Impressions and attributed revenue per country, sorted desc by associatedRevenue; UNKNOWN_COUNTRY included","items":{"$ref":"#/components/schemas/OptinToolRevenueByCountriesItem"}},"subscriptions-history":{"type":"array","description":"New SMS subscribers collected by the tool per bucket; one bucket per targetResolution unit, gaps zero-filled","items":{"$ref":"#/components/schemas/OptinToolSubscriptionsHistoryBucket"}}}}}},"OptinToolOptinSummaryData":{"type":"object","description":"Opt-in performance totals for the range. Counts are unique sessions.\nEmail/SMS fields appear only when the tool collects that channel.\nFields are never null: a range without data returns 0 counts and\n0 rates.\n","required":["impression","teaserConfirm","teaserConfirmRate","teaserDecline"],"properties":{"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed"},"teaserConfirm":{"type":"integer","description":"Unique sessions that clicked the teaser and opened the popup"},"teaserConfirmRate":{"type":"number","description":"teaserConfirm / impression"},"teaserDecline":{"type":"integer","description":"Unique sessions that dismissed the teaser"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address on the popup"},"emailOptinRate":{"type":"number","description":"emailOptin / impression"},"phoneNumberSubmitted":{"type":"integer","description":"Unique sessions that submitted a phone number on the popup"},"phoneNumberSubmittedRate":{"type":"number","description":"phoneNumberSubmitted / impression"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in"},"smsOptinRate":{"type":"number","description":"smsOptin / impression"}}},"OptinToolOptinHistoryBucket":{"type":"object","required":["timestamp","impression"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"},"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed within the bucket"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address within the bucket"},"emailOptinRate":{"type":"number","description":"emailOptin / impression within the bucket"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in within the bucket"},"smsOptinRate":{"type":"number","description":"smsOptin / impression within the bucket"}}},"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}},"OptinToolRevenueHistoryBucket":{"allOf":[{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"OptinToolRevenueByOptinSegmentsItem":{"allOf":[{"type":"object","required":["optinSegmentType","optinSegmentCount"],"properties":{"optinSegmentType":{"type":"string","description":"The deepest opt-in stage the sessions in this row reached\n(noOptin / emailOptin / smsOptin / emailAndSMSOptin); the\ntotal row sums the whole funnel\n","enum":["noOptin","emailOptin","smsOptin","emailAndSMSOptin","total"]},"optinSegmentCount":{"type":"integer","description":"Unique sessions whose deepest opt-in stage is this segment"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"OptinToolRevenueByCountriesItem":{"allOf":[{"type":"object","required":["countryCode","impressionCount"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the visitors;\n"},"impressionCount":{"type":"integer","description":"Unique sessions in which the popup was displayed in this country"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"OptinToolSubscriptionsHistoryBucket":{"type":"object","required":["timestamp","subscriptions"],"properties":{"timestamp":{"type":"string","format":"date","description":"Start of the bucket, in UTC (weeks start on Monday)"},"subscriptions":{"type":"integer","description":"New SMS subscribers the opt-in tool collected within the bucket"}}}}}}
```

## The OptinToolsSummaryItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolsSummaryItem":{"type":"object","description":"One opt-in tool's totals for the range — the tool's identity, then its\nraw metric-event unique-session counts merged with the new SMS\nsubscriptions it collected. Besides optinToolId, optinToolName,\noptinToolType and smsSubscriptions, every key is a MetricEvent value\n(see the MetricEvent schema) with its count; only events that occurred\nappear, a missing key means 0.\n","required":["optinToolId","optinToolName","optinToolType","smsSubscriptions"],"properties":{"optinToolId":{"type":"string"},"optinToolName":{"type":"string","description":"Name of the opt-in tool"},"optinToolType":{"type":"string","description":"Type of the opt-in tool","enum":["popup","landing-page","embedded-form","keyword"]},"smsSubscriptions":{"type":"integer","description":"New SMS subscriptions collected by the tool in the range"}},"additionalProperties":{"type":"integer","description":"MetricEvent → number of unique sessions the event occurred in"}}}}}
```

## The OptinToolListViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolListViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tool-list-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"optin-tools-summary":{"type":"array","description":"One entry per opt-in tool that recorded any metric event or\ncollected any SMS subscription in the range.\n","items":{"$ref":"#/components/schemas/OptinToolsSummaryItem"}}}}}},"OptinToolsSummaryItem":{"type":"object","description":"One opt-in tool's totals for the range — the tool's identity, then its\nraw metric-event unique-session counts merged with the new SMS\nsubscriptions it collected. Besides optinToolId, optinToolName,\noptinToolType and smsSubscriptions, every key is a MetricEvent value\n(see the MetricEvent schema) with its count; only events that occurred\nappear, a missing key means 0.\n","required":["optinToolId","optinToolName","optinToolType","smsSubscriptions"],"properties":{"optinToolId":{"type":"string"},"optinToolName":{"type":"string","description":"Name of the opt-in tool"},"optinToolType":{"type":"string","description":"Type of the opt-in tool","enum":["popup","landing-page","embedded-form","keyword"]},"smsSubscriptions":{"type":"integer","description":"New SMS subscriptions collected by the tool in the range"}},"additionalProperties":{"type":"integer","description":"MetricEvent → number of unique sessions the event occurred in"}}}}}
```

## The OptinToolExperiment object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolExperiment":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tool-experiments"]},"attributes":{"type":"object","required":["id","name","status","dateFrom","dateTo","optinToolIds","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"ID of the experiment"},"name":{"type":"string","description":"Name of the experiment"},"status":{"type":"string","description":"Status of the experiment. A scheduled experiment has no\nstatistics yet, so its views return 400.\n","enum":["scheduled","running","ended"]},"dateFrom":{"type":"string","format":"date-time","description":"Start of the experiment window. UTC date and time in ISO 8601 format"},"dateTo":{"type":"string","format":"date-time","description":"End of the experiment window, exclusive. UTC date and time in\nISO 8601 format. For a running experiment this is the planned\nend; statistics stop at the current time instead.\n"},"optinToolIds":{"type":"array","description":"IDs of the opt-in tools taking part in the experiment — its\nvariants. Statistics views return one entry per ID.\n","items":{"type":"string"}},"winnerOptinToolId":{"type":"string","description":"ID of the variant Recart picked as the winner, present once the\nexperiment has ended. Picked on opt-in rate alone — this is not\na statistical significance test.\n"},"winnerOptinRate":{"type":"number","description":"Opt-in rate of the winning variant"},"createdAt":{"type":"string","format":"date-time","description":"Creation time of the experiment. UTC date and time in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Last modification time of the experiment. UTC date and time in ISO 8601 format"}}}}}}}}
```

## The OptinToolExperimentOptinSummaryData object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolExperimentOptinSummaryData":{"description":"Opt-in performance totals of one variant for the experiment's window —\nthe same fields as an opt-in tool's optin-summary, plus the subscribers\nthe variant collected.\n","allOf":[{"$ref":"#/components/schemas/OptinToolOptinSummaryData"},{"type":"object","required":["subscriptions"],"properties":{"subscriptions":{"type":"integer","description":"New SMS subscribers the variant collected"}}}]},"OptinToolOptinSummaryData":{"type":"object","description":"Opt-in performance totals for the range. Counts are unique sessions.\nEmail/SMS fields appear only when the tool collects that channel.\nFields are never null: a range without data returns 0 counts and\n0 rates.\n","required":["impression","teaserConfirm","teaserConfirmRate","teaserDecline"],"properties":{"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed"},"teaserConfirm":{"type":"integer","description":"Unique sessions that clicked the teaser and opened the popup"},"teaserConfirmRate":{"type":"number","description":"teaserConfirm / impression"},"teaserDecline":{"type":"integer","description":"Unique sessions that dismissed the teaser"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address on the popup"},"emailOptinRate":{"type":"number","description":"emailOptin / impression"},"phoneNumberSubmitted":{"type":"integer","description":"Unique sessions that submitted a phone number on the popup"},"phoneNumberSubmittedRate":{"type":"number","description":"phoneNumberSubmitted / impression"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in"},"smsOptinRate":{"type":"number","description":"smsOptin / impression"}}}}}}
```

## The MetricEvent object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"MetricEvent":{"type":"string","description":"Raw popup metric event identifier. Revenue is carried only by\nimpressionRevenue, emailClickRevenue and smsOptinRevenue; orderValueUSD\nis 0 for every other event.\n","enum":["teaserConfirmation","teaserDecline","smsClick","emailClick","closePopup","openMinimized","closeMinimized","impression","minimizedImpression","close","smsOptin","optinRequestSent","successClick","engagement","emailAutofill","smsAutofill","oneTimePasswordAutofill","oneTimePasswordClick","oneTimePasswordResend","oneClickVerificationClick","oneClickVerificationAutofill","oneClickVerificationResend","oneClickThisIsntMe","impressionRevenue","emailClickRevenue","smsOptinRevenue","oneClickReturningVisitorSMSClick","oneClickReturningVisitorEmailClick","oneClickReturningVisitorSuccessClick","oneClickReturningVisitorClose","oneClickReturningVisitorClosePopup","oneClickReturningVisitorCloseMinimized","oneClickReturningVisitorImpression","oneClickReturningVisitorMinimizedImpression","oneClickReturningVisitorVerificationClick","oneClickReturningVisitorVerificationAutofill","oneClickReturningVisitorVerificationResend","oneClickReturningVisitorThisIsntMe","oneClickReturningVisitorTeaserDecline","oneClickReturningVisitorTeaserConfirmation","oneClickReturningVisitorOpenMinimized","oneClickReturningVisitorAutofill","oneClickNewVisitorSMSClick","oneClickNewVisitorEmailClick","oneClickNewVisitorSuccessClick","oneClickNewVisitorClose","oneClickNewVisitorClosePopup","oneClickNewVisitorCloseMinimized","oneClickNewVisitorImpression","oneClickNewVisitorMinimizedImpression","oneClickNewVisitorVerificationClick","oneClickNewVisitorVerificationAutofill","oneClickNewVisitorVerificationResend","oneClickNewVisitorThisIsntMe","oneClickNewVisitorTeaserDecline","oneClickNewVisitorTeaserConfirmation","oneClickNewVisitorOpenMinimized","oneClickNewVisitorAutofill"]}}}}
```

## The MetricEventStatistic object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"MetricEventStatistic":{"type":"object","description":"Raw count and attributed order value of a single metric event","required":["count","orderValueUSD"],"properties":{"count":{"type":"integer","description":"Number of times the event occurred"},"orderValueUSD":{"type":"number","description":"Value of the orders attributed to the event, in USD, rounded to 2\ndecimal places. 0 for every event other than impressionRevenue,\nemailClickRevenue and smsOptinRevenue.\n"}}}}}}
```

## The OptinToolExperimentViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OptinToolExperimentViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tool-experiments-views"]},"attributes":{"type":"object","description":"The requested section under its name — exactly one key for a single\nview, all four for name=all. Every section is an object keyed by the\nvariant's opt-in tool ID, holding that variant's totals for the\nexperiment's window.\n","minProperties":1,"properties":{"optin-summary":{"type":"object","description":"Opt-in performance totals per variant","additionalProperties":{"$ref":"#/components/schemas/OptinToolExperimentOptinSummaryData"}},"revenue-summary":{"type":"object","description":"Attributed revenue totals per variant","additionalProperties":{"$ref":"#/components/schemas/RevenueMetrics"}},"revenue-by-optin-segments":{"type":"object","description":"Attributed revenue split by opt-in segment per variant; one\nelement per segment plus a total row\n","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/OptinToolRevenueByOptinSegmentsItem"}}},"metric-event-summary":{"type":"object","description":"Raw metric event counts per variant, available for significance\nmath. Each variant holds a sparse map whose keys are MetricEvent\nvalues — only events that occurred within the experiment's\nwindow appear, and a missing key means 0.\n","additionalProperties":{"type":"object","propertyNames":{"$ref":"#/components/schemas/MetricEvent"},"additionalProperties":{"$ref":"#/components/schemas/MetricEventStatistic"}}}}}}},"OptinToolExperimentOptinSummaryData":{"description":"Opt-in performance totals of one variant for the experiment's window —\nthe same fields as an opt-in tool's optin-summary, plus the subscribers\nthe variant collected.\n","allOf":[{"$ref":"#/components/schemas/OptinToolOptinSummaryData"},{"type":"object","required":["subscriptions"],"properties":{"subscriptions":{"type":"integer","description":"New SMS subscribers the variant collected"}}}]},"OptinToolOptinSummaryData":{"type":"object","description":"Opt-in performance totals for the range. Counts are unique sessions.\nEmail/SMS fields appear only when the tool collects that channel.\nFields are never null: a range without data returns 0 counts and\n0 rates.\n","required":["impression","teaserConfirm","teaserConfirmRate","teaserDecline"],"properties":{"impression":{"type":"integer","description":"Unique sessions in which the popup was displayed"},"teaserConfirm":{"type":"integer","description":"Unique sessions that clicked the teaser and opened the popup"},"teaserConfirmRate":{"type":"number","description":"teaserConfirm / impression"},"teaserDecline":{"type":"integer","description":"Unique sessions that dismissed the teaser"},"emailOptin":{"type":"integer","description":"Unique sessions that submitted an email address on the popup"},"emailOptinRate":{"type":"number","description":"emailOptin / impression"},"phoneNumberSubmitted":{"type":"integer","description":"Unique sessions that submitted a phone number on the popup"},"phoneNumberSubmittedRate":{"type":"number","description":"phoneNumberSubmitted / impression"},"smsOptin":{"type":"integer","description":"Unique sessions that completed the SMS opt-in"},"smsOptinRate":{"type":"number","description":"smsOptin / impression"}}},"RevenueMetrics":{"type":"object","description":"Revenue attributed to the opt-in tool: orders placed within 7 days\nof an interaction with the tool in the same session. Amounts are in\nUSD, rounded to 2 decimal places. Fields are never null: a range\nwithout attributed orders returns 0 amounts, and rates are 0 when\nthe denominator is 0.\n","required":["associatedRevenue","orders","averageOrderValue","revenuePerVisitor","orderConversionRate"],"properties":{"associatedRevenue":{"type":"number","description":"Total value of the orders attributed to the opt-in tool, in USD"},"orders":{"type":"integer","description":"Number of orders attributed to the opt-in tool"},"averageOrderValue":{"type":"number","description":"associatedRevenue / orders, in USD"},"revenuePerVisitor":{"type":"number","description":"associatedRevenue / impressions, in USD"},"orderConversionRate":{"type":"number","description":"orders / impressions"}}},"OptinToolRevenueByOptinSegmentsItem":{"allOf":[{"type":"object","required":["optinSegmentType","optinSegmentCount"],"properties":{"optinSegmentType":{"type":"string","description":"The deepest opt-in stage the sessions in this row reached\n(noOptin / emailOptin / smsOptin / emailAndSMSOptin); the\ntotal row sums the whole funnel\n","enum":["noOptin","emailOptin","smsOptin","emailAndSMSOptin","total"]},"optinSegmentCount":{"type":"integer","description":"Unique sessions whose deepest opt-in stage is this segment"}}},{"$ref":"#/components/schemas/RevenueMetrics"}]},"MetricEvent":{"type":"string","description":"Raw popup metric event identifier. Revenue is carried only by\nimpressionRevenue, emailClickRevenue and smsOptinRevenue; orderValueUSD\nis 0 for every other event.\n","enum":["teaserConfirmation","teaserDecline","smsClick","emailClick","closePopup","openMinimized","closeMinimized","impression","minimizedImpression","close","smsOptin","optinRequestSent","successClick","engagement","emailAutofill","smsAutofill","oneTimePasswordAutofill","oneTimePasswordClick","oneTimePasswordResend","oneClickVerificationClick","oneClickVerificationAutofill","oneClickVerificationResend","oneClickThisIsntMe","impressionRevenue","emailClickRevenue","smsOptinRevenue","oneClickReturningVisitorSMSClick","oneClickReturningVisitorEmailClick","oneClickReturningVisitorSuccessClick","oneClickReturningVisitorClose","oneClickReturningVisitorClosePopup","oneClickReturningVisitorCloseMinimized","oneClickReturningVisitorImpression","oneClickReturningVisitorMinimizedImpression","oneClickReturningVisitorVerificationClick","oneClickReturningVisitorVerificationAutofill","oneClickReturningVisitorVerificationResend","oneClickReturningVisitorThisIsntMe","oneClickReturningVisitorTeaserDecline","oneClickReturningVisitorTeaserConfirmation","oneClickReturningVisitorOpenMinimized","oneClickReturningVisitorAutofill","oneClickNewVisitorSMSClick","oneClickNewVisitorEmailClick","oneClickNewVisitorSuccessClick","oneClickNewVisitorClose","oneClickNewVisitorClosePopup","oneClickNewVisitorCloseMinimized","oneClickNewVisitorImpression","oneClickNewVisitorMinimizedImpression","oneClickNewVisitorVerificationClick","oneClickNewVisitorVerificationAutofill","oneClickNewVisitorVerificationResend","oneClickNewVisitorThisIsntMe","oneClickNewVisitorTeaserDecline","oneClickNewVisitorTeaserConfirmation","oneClickNewVisitorOpenMinimized","oneClickNewVisitorAutofill"]},"MetricEventStatistic":{"type":"object","description":"Raw count and attributed order value of a single metric event","required":["count","orderValueUSD"],"properties":{"count":{"type":"integer","description":"Number of times the event occurred"},"orderValueUSD":{"type":"number","description":"Value of the orders attributed to the event, in USD, rounded to 2\ndecimal places. 0 for every event other than impressionRevenue,\nemailClickRevenue and smsOptinRevenue.\n"}}}}}}
```

## The UpdateCart object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"UpdateCart":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["carts"]},"attributes":{"type":"object","required":["totalPrice","recoveryUrl","lineItems"],"properties":{"totalPrice":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of cart"},"currency":{"type":"string","description":"Currency of the cart"}}},"recoveryUrl":{"type":"string","format":"uri","description":"URL of the cart recovery page"},"lineItems":{"type":"array","items":{"type":"object","required":["productId","name","quantity","price"],"properties":{"productId":{"type":"string","format":"int64","description":"ID of the product"},"variantId":{"type":"string","format":"int64","description":"ID of the product variant"},"name":{"type":"string","description":"Name of the product"},"quantity":{"type":"integer","format":"int32","description":"Quantity of the product"},"price":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of cartItem"},"currency":{"type":"string","description":"Currency of the cartItem"}}}}}}}}}}}}}
```

## The FulfillOrder object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"FulfillOrder":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["fulfillments"]},"attributes":{"type":"object","required":["orderNumber","orderId","createdAt"],"properties":{"orderNumber":{"type":"string","format":"int64","description":"Order number"},"orderId":{"type":"string","format":"int64","description":"Order ID"},"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"sessionId":{"type":"string","description":"Recart identifier of the purchase session. Use `_recart.getSessionId()` on the merchant's store when Recart script is running."},"createdAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"},"trackingCompany":{"type":"string","description":"Name of the tracking company"},"trackingNumber":{"type":"string","description":"Tracking number"},"trackingUrl":{"type":"string","format":"uri","description":"Tracking URL"}}}}}}}}
```

## The AbandonCart object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AbandonCart":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["abandonments"]},"attributes":{"type":"object","required":["type","sessionId"],"properties":{"type":{"type":"string","description":"Type of the abandonment, \"cart\" and \"browse\" are supported"},"sessionId":{"type":"string","description":"Recart identifier of the purchase session. Use `_recart.getSessionId()` on the merchant's store when Recart script is running."},"productId":{"type":"string","format":"int64","description":"ID of the product"}}}}}}}}
```

## The PostSubscription object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"PostSubscription":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscriptions"]},"attributes":{"type":"object","description":"Attributes of the subscriber","required":["phoneNumber","source"],"properties":{"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"source":{"type":"object","required":["category","name"],"properties":{"category":{"type":"string","description":"Source category"},"name":{"type":"string","description":"Source name"},"externalId":{"type":"string","description":"Optional identifier"}}},"browser":{"type":"object","properties":{"userAgent":{"type":"string","description":"User agent of the browser"},"language":{"type":"string","description":"Language of the browser"},"url":{"type":"string","format":"uri","description":"URL of the browser page"}}},"sessionId":{"type":"string","description":"Recart identifier of the purchase session.  Use `_recart.getSessionId()` on the merchant's store when Recart script is running."},"shopperId":{"type":"string","deprecated":true,"description":"Deprecated: the `_recart.getShopperId()` method used to source this value has been removed and there is no replacement. This field is retained for backward compatibility but should no longer be relied upon."},"firstName":{"type":"string","description":"First name of the subscriber"},"lastName":{"type":"string","description":"Last name of the subscriber"},"timezone":{"type":"string","description":"Timezone of the subscriber"},"location":{"type":"object","properties":{"city":{"type":"string","description":"City"},"province":{"type":"string","description":"Province"},"zip":{"type":"string","description":"ZIP code"},"country":{"type":"string","description":"Country"},"ipAddress":{"type":"string","format":"ipv4","description":"IP address of the subscriber"}}}}}}}}}}
```

## The SubscriptionSource object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscriptionSource":{"type":"object","description":"Where a subscription or an opt-out came from. For a subscription or\nan optin event `type` is the acquiring source — an opt-in tool type\n(popup, landing-page, embedded-form, keyword) or a non-tool source\n(import, custom-integration, public-api, shopify_checkout, …). For an\noptout event it is the reason: keyword, ai, opt_out_link, manual\n(dashboard), public-api, or a cleaning reason (deactivated_number,\nknown_litigator, landline, reassigned). `id` and `name` are present\nwhen the source is an entity: the opt-in tool (its name) or the\nimport (its file name); name is an empty string when it could not\nbe resolved.\n","required":["type"],"properties":{"type":{"type":"string","description":"Source slug or opt-out reason"},"id":{"type":"string","description":"ID of the opt-in tool or import behind the source"},"name":{"type":"string","description":"Name of the opt-in tool, or file name of the import; empty when unresolved"}}}}}}
```

## The Optin object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Optin":{"type":"object","description":"One opt-in or opt-out event of a channel.","required":["type","createdAt"],"properties":{"type":{"type":"string","description":"optin = the subscriber joined the channel; optout = the subscriber left it","enum":["optin","optout"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened"},"source":{"$ref":"#/components/schemas/SubscriptionSource"},"sourceUrl":{"type":"string","description":"optin only — the page the opt-in happened on, query string included"},"integrationSlug":{"type":"string","description":"optin only — the integration that created the subscription"}}},"SubscriptionSource":{"type":"object","description":"Where a subscription or an opt-out came from. For a subscription or\nan optin event `type` is the acquiring source — an opt-in tool type\n(popup, landing-page, embedded-form, keyword) or a non-tool source\n(import, custom-integration, public-api, shopify_checkout, …). For an\noptout event it is the reason: keyword, ai, opt_out_link, manual\n(dashboard), public-api, or a cleaning reason (deactivated_number,\nknown_litigator, landline, reassigned). `id` and `name` are present\nwhen the source is an entity: the opt-in tool (its name) or the\nimport (its file name); name is an empty string when it could not\nbe resolved.\n","required":["type"],"properties":{"type":{"type":"string","description":"Source slug or opt-out reason"},"id":{"type":"string","description":"ID of the opt-in tool or import behind the source"},"name":{"type":"string","description":"Name of the opt-in tool, or file name of the import; empty when unresolved"}}}}}}
```

## The Subscriber object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Subscriber":{"type":"object","description":"One subscriber — no phone number, email or name. Channel data sits\nunder the channel key; only the channels selected with `channel`\nare present.\n","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscribers"]},"attributes":{"type":"object","required":["id","segments","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Internal ID of the subscriber"},"timezone":{"type":"string","description":"IANA timezone name assigned to the subscriber"},"segments":{"type":"array","description":"Segments the subscriber is a member of right now — no membership history","items":{"type":"object","required":["id","name","type"],"properties":{"id":{"type":"string","description":"ID of the segment"},"name":{"type":"string","description":"Name of the segment as shown in the dashboard"},"type":{"type":"string","description":"segment = dynamic, rule-based; list = manually managed","enum":["segment","list"]}}}},"createdAt":{"type":"string","format":"date-time","description":"When the subscriber record was created — the first time the subscriber was seen on any channel"},"updatedAt":{"type":"string","format":"date-time","description":"Last change to the subscriber record"},"sms":{"type":"object","description":"The subscriber's SMS channel","required":["status","subscriptionSource","optinHistory"],"properties":{"status":{"type":"string","description":"subscribed while the number receives SMS; unsubscribed after any opt-out or cleaning removal","enum":["subscribed","unsubscribed"]},"subscribedAt":{"type":"string","format":"date-time","description":"When the current SMS subscription started; reset by a re-subscribe"},"lastInteractionAt":{"type":"string","format":"date-time","description":"Last inbound event on the channel — the opt-in, a STOP or START keyword reply, or an import touching the record"},"subscriptionSource":{"$ref":"#/components/schemas/SubscriptionSource"},"country":{"type":"string","description":"Country code of the phone number from the carrier lookup"},"optinHistory":{"type":"array","description":"Every opt-in and opt-out event of the channel, oldest first","items":{"$ref":"#/components/schemas/Optin"}}}}}}}},"SubscriptionSource":{"type":"object","description":"Where a subscription or an opt-out came from. For a subscription or\nan optin event `type` is the acquiring source — an opt-in tool type\n(popup, landing-page, embedded-form, keyword) or a non-tool source\n(import, custom-integration, public-api, shopify_checkout, …). For an\noptout event it is the reason: keyword, ai, opt_out_link, manual\n(dashboard), public-api, or a cleaning reason (deactivated_number,\nknown_litigator, landline, reassigned). `id` and `name` are present\nwhen the source is an entity: the opt-in tool (its name) or the\nimport (its file name); name is an empty string when it could not\nbe resolved.\n","required":["type"],"properties":{"type":{"type":"string","description":"Source slug or opt-out reason"},"id":{"type":"string","description":"ID of the opt-in tool or import behind the source"},"name":{"type":"string","description":"Name of the opt-in tool, or file name of the import; empty when unresolved"}}},"Optin":{"type":"object","description":"One opt-in or opt-out event of a channel.","required":["type","createdAt"],"properties":{"type":{"type":"string","description":"optin = the subscriber joined the channel; optout = the subscriber left it","enum":["optin","optout"]},"createdAt":{"type":"string","format":"date-time","description":"When the event happened"},"source":{"$ref":"#/components/schemas/SubscriptionSource"},"sourceUrl":{"type":"string","description":"optin only — the page the opt-in happened on, query string included"},"integrationSlug":{"type":"string","description":"optin only — the integration that created the subscription"}}}}}}
```

## The SubscriptionSourcesItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscriptionSourcesItem":{"type":"object","description":"New SMS subscriptions collected from one source in the range. A\nsource is either an opt-in tool type (popup, landing-page,\nembedded-form, keyword) or a non-tool source slug (import,\ncustom-integration, public-api, shopify_checkout, …).\n","required":["source","smsSubscriptions"],"properties":{"source":{"type":"string"},"smsSubscriptions":{"type":"integer"}}}}}}
```

## The SubscriberListStatistics object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscriberListStatistics":{"type":"object","description":"List statistics of one period, grouped by channel — only the\nchannels selected with `channel` are present.\n","properties":{"sms":{"type":"object","description":"SMS list statistics — list size at the end of the period, and\nthe subscriptions, opt-outs and cleaning removals within it.\n","required":["subscribers","subscriptions","unsubscriptions","cleaning"],"properties":{"subscribers":{"type":"integer","description":"SMS subscribers at the end of the period (list size)."},"subscriptions":{"type":"integer","description":"New SMS subscriptions in the period, gross — re-subscribes included."},"unsubscriptions":{"type":"object","description":"Subscriber-initiated SMS opt-outs in the period, by how the opt-out arrived.","required":["keyword","ai","optOutLink","dashboard","publicApi","integration"],"properties":{"keyword":{"type":"integer","description":"STOP or another unsubscribe keyword texted in (AI-detected replies excluded)."},"ai":{"type":"integer","description":"Free-text replies the AI intent classifier recognized as an opt-out."},"optOutLink":{"type":"integer","description":"The opt-out link in a message."},"dashboard":{"type":"integer","description":"Unsubscribed by the merchant in the dashboard."},"publicApi":{"type":"integer","description":"Unsubscribed through the public API (DELETE /subscriptions)."},"integration":{"type":"integer","description":"Opt-outs synced from an integration such as Klaviyo."}}},"cleaning":{"type":"object","description":"Automated list cleaning in the period, by reason.","required":["deactivatedNumber","knownLitigator","landline","reassigned"],"properties":{"deactivatedNumber":{"type":"integer","description":"The carrier reported the number as deactivated."},"knownLitigator":{"type":"integer","description":"The number is on the known-litigator list."},"landline":{"type":"integer","description":"Landline number, cannot receive SMS."},"reassigned":{"type":"integer","description":"The number was reassigned to a new owner."}}}}}}}}}}
```

## The SubscriberListHistoryItem object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscriberListHistoryItem":{"allOf":[{"type":"object","required":["date"],"properties":{"date":{"type":"string","format":"date","description":"The UTC calendar day the statistics belong to."}}},{"$ref":"#/components/schemas/SubscriberListStatistics"}]},"SubscriberListStatistics":{"type":"object","description":"List statistics of one period, grouped by channel — only the\nchannels selected with `channel` are present.\n","properties":{"sms":{"type":"object","description":"SMS list statistics — list size at the end of the period, and\nthe subscriptions, opt-outs and cleaning removals within it.\n","required":["subscribers","subscriptions","unsubscriptions","cleaning"],"properties":{"subscribers":{"type":"integer","description":"SMS subscribers at the end of the period (list size)."},"subscriptions":{"type":"integer","description":"New SMS subscriptions in the period, gross — re-subscribes included."},"unsubscriptions":{"type":"object","description":"Subscriber-initiated SMS opt-outs in the period, by how the opt-out arrived.","required":["keyword","ai","optOutLink","dashboard","publicApi","integration"],"properties":{"keyword":{"type":"integer","description":"STOP or another unsubscribe keyword texted in (AI-detected replies excluded)."},"ai":{"type":"integer","description":"Free-text replies the AI intent classifier recognized as an opt-out."},"optOutLink":{"type":"integer","description":"The opt-out link in a message."},"dashboard":{"type":"integer","description":"Unsubscribed by the merchant in the dashboard."},"publicApi":{"type":"integer","description":"Unsubscribed through the public API (DELETE /subscriptions)."},"integration":{"type":"integer","description":"Opt-outs synced from an integration such as Klaviyo."}}},"cleaning":{"type":"object","description":"Automated list cleaning in the period, by reason.","required":["deactivatedNumber","knownLitigator","landline","reassigned"],"properties":{"deactivatedNumber":{"type":"integer","description":"The carrier reported the number as deactivated."},"knownLitigator":{"type":"integer","description":"The number is on the known-litigator list."},"landline":{"type":"integer","description":"Landline number, cannot receive SMS."},"reassigned":{"type":"integer","description":"The number was reassigned to a new owner."}}}}}}}}}}
```

## The SubscribersByCountry object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscribersByCountry":{"type":"object","description":"Currently subscribed numbers by country, grouped by channel.","properties":{"sms":{"type":"array","description":"Sorted by subscribers, descending.","items":{"type":"object","required":["countryCode","subscribers"],"properties":{"countryCode":{"type":"string","description":"Country code of the phone number from the carrier lookup."},"subscribers":{"type":"integer","description":"Currently subscribed SMS subscribers with a number in this country."}}}}}}}}}
```

## The SubscribersViews object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscribersViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscribers-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"subscription-sources":{"type":"array","description":"One entry per subscription source, sorted descending by\nsmsSubscriptions.\n","items":{"$ref":"#/components/schemas/SubscriptionSourcesItem"}},"list-summary":{"$ref":"#/components/schemas/SubscriberListStatistics"},"list-history":{"type":"array","description":"One entry per UTC calendar day of the range.","items":{"$ref":"#/components/schemas/SubscriberListHistoryItem"}},"countries-summary":{"$ref":"#/components/schemas/SubscribersByCountry"}}}}},"SubscriptionSourcesItem":{"type":"object","description":"New SMS subscriptions collected from one source in the range. A\nsource is either an opt-in tool type (popup, landing-page,\nembedded-form, keyword) or a non-tool source slug (import,\ncustom-integration, public-api, shopify_checkout, …).\n","required":["source","smsSubscriptions"],"properties":{"source":{"type":"string"},"smsSubscriptions":{"type":"integer"}}},"SubscriberListStatistics":{"type":"object","description":"List statistics of one period, grouped by channel — only the\nchannels selected with `channel` are present.\n","properties":{"sms":{"type":"object","description":"SMS list statistics — list size at the end of the period, and\nthe subscriptions, opt-outs and cleaning removals within it.\n","required":["subscribers","subscriptions","unsubscriptions","cleaning"],"properties":{"subscribers":{"type":"integer","description":"SMS subscribers at the end of the period (list size)."},"subscriptions":{"type":"integer","description":"New SMS subscriptions in the period, gross — re-subscribes included."},"unsubscriptions":{"type":"object","description":"Subscriber-initiated SMS opt-outs in the period, by how the opt-out arrived.","required":["keyword","ai","optOutLink","dashboard","publicApi","integration"],"properties":{"keyword":{"type":"integer","description":"STOP or another unsubscribe keyword texted in (AI-detected replies excluded)."},"ai":{"type":"integer","description":"Free-text replies the AI intent classifier recognized as an opt-out."},"optOutLink":{"type":"integer","description":"The opt-out link in a message."},"dashboard":{"type":"integer","description":"Unsubscribed by the merchant in the dashboard."},"publicApi":{"type":"integer","description":"Unsubscribed through the public API (DELETE /subscriptions)."},"integration":{"type":"integer","description":"Opt-outs synced from an integration such as Klaviyo."}}},"cleaning":{"type":"object","description":"Automated list cleaning in the period, by reason.","required":["deactivatedNumber","knownLitigator","landline","reassigned"],"properties":{"deactivatedNumber":{"type":"integer","description":"The carrier reported the number as deactivated."},"knownLitigator":{"type":"integer","description":"The number is on the known-litigator list."},"landline":{"type":"integer","description":"Landline number, cannot receive SMS."},"reassigned":{"type":"integer","description":"The number was reassigned to a new owner."}}}}}}},"SubscriberListHistoryItem":{"allOf":[{"type":"object","required":["date"],"properties":{"date":{"type":"string","format":"date","description":"The UTC calendar day the statistics belong to."}}},{"$ref":"#/components/schemas/SubscriberListStatistics"}]},"SubscribersByCountry":{"type":"object","description":"Currently subscribed numbers by country, grouped by channel.","properties":{"sms":{"type":"array","description":"Sorted by subscribers, descending.","items":{"type":"object","required":["countryCode","subscribers"],"properties":{"countryCode":{"type":"string","description":"Country code of the phone number from the carrier lookup."},"subscribers":{"type":"integer","description":"Currently subscribed SMS subscribers with a number in this country."}}}}}}}}}
```

## The PatchSubscriber object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"PatchSubscriber":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscribers"]},"attributes":{"type":"object","description":"Attributes of the subscriber to update","required":["customAttributes"],"properties":{"customAttributes":{"type":"object","description":"Merchant-defined custom attributes as key/value pairs. PATCH/merge semantics: keys included in the request are set or overwritten; a key with a `null` value is deleted; keys not included are left unchanged.\n\nLimits: maximum 30 attributes per subscriber; the entire `customAttributes` object must not exceed 16 KB (enforced by the API server). Keys must match `^(?!recart_)[A-Za-z][A-Za-z0-9_]{0,63}$` (start with a letter, alphanumeric or underscore, max 64 characters, no spaces; the `recart_` prefix is reserved). Values must be a string (max 1024 characters), number, boolean, an array of up to 100 strings (each max 255 characters), or `null` to delete the attribute. Nested objects are not allowed.\n","maxProperties":30,"propertyNames":{"pattern":"^(?!recart_)[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"oneOf":[{"type":"string","maxLength":1024},{"type":"number"},{"type":"boolean"},{"type":"array","maxItems":100,"items":{"type":"string","maxLength":255}},{"type":"null"}]}}}}}}}}}
```

## The Webhook object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"Webhook":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["webhooks"]},"attributes":{"type":"object","required":["topic","address"],"properties":{"topic":{"type":"string","description":"Event type, messages/incoming, messages/outgoing, subscribers/unsubscribe, subscribers/subscribe"},"address":{"type":"string","format":"uri","description":"Destination URL for webhook delivery"}}}}}}}}
```

## The PostMessages object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"PostMessages":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["messages"]},"attributes":{"type":"object","required":["phoneNumber","messages"],"properties":{"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"messages":{"type":"array","items":{"type":"object","required":["type","body"],"properties":{"type":{"type":"string","description":"Type of the message, only promotional is supported"},"body":{"type":"string","description":"Content of the message, maximum 1024 characters"},"attachment":{"type":"string","format":"uri","description":"URL of the attachment, extension must be .jpg, .jpeg, .png, or .gif"}}}}}}}}}}}
```

## The IncomingMessage object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"IncomingMessage":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["messages"]},"attributes":{"type":"object","properties":{"id":{"type":"string","description":"Id"},"body":{"type":"string","description":"Content of the message"},"hasAttachment":{"type":"boolean","description":"Returns true if the message has an attachment"},"from":{"type":"string","description":"from"},"to":{"type":"string","description":"to"},"receivedAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"}}}}}}}}
```

## The AcceptedMessage object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"AcceptedMessage":{"type":"object","description":"A message accepted for delivery by `POST /messages`.","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["messages"]},"attributes":{"type":"object","required":["id","message"],"properties":{"id":{"type":"string","description":"ID of the queued message. Use it with `GET /messages/{id}` to follow the delivery status."},"message":{"type":"string","description":"Content of the message, echoed back from the request"}}}}}}}}
```

## The OutgoingMessage object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"OutgoingMessage":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["messages"]},"attributes":{"type":"object","properties":{"id":{"type":"string","description":"Id"},"status":{"type":"string","description":"Status of the message. It can be processing, sent or error"},"body":{"type":"string","description":"Content of the message"},"sentAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"},"from":{"type":"string","description":"Phone number of the sender in E.164 format"},"to":{"type":"string","description":"Phone number of the recipient in E.164 format"}}}}}}}}
```

## The SubscribersUnsubscribe object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscribersUnsubscribe":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscriptions"]},"attributes":{"type":"object","properties":{"subscriberId":{"type":"string","description":"Recart identifier of the subscriber"},"phoneNumber":{"type":"string","description":"Preferably E.164 format"}}}}}}}}
```

## The SubscribersSubscribe object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"SubscribersSubscribe":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscriptions"]},"attributes":{"type":"object","properties":{"subscriberId":{"type":"string","description":"Recart identifier of the subscriber"},"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"source":{"type":"string","description":"Source of the subscription"},"sourceId":{"type":"string","description":"Recart identifier of the source"},"subscribedAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"},"optinType":{"type":"string","description":"Subscription optin level"}}}}}}}}
```

## The CreateOrder object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"CreateOrder":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string"},"attributes":{"type":"object","required":["orderStatusUrl","orderNumber","orderId","totalPrice","lineItems","createdAt"],"properties":{"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"sessionId":{"type":"string","description":"Recart identifier of the purchase session. Use `_recart.getSessionId()` on the merchant's store when Recart script is running."},"orderStatusUrl":{"type":"string","format":"uri","description":"URL of the order status page"},"orderNumber":{"type":"string","format":"int64","description":"Order number"},"orderId":{"type":"string","format":"int64","description":"Order ID"},"totalPrice":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of order"},"currency":{"type":"string","description":"Currency of the order"}}},"createdAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"},"lineItems":{"type":"array","items":{"type":"object","required":["productId","name","quantity","price"],"properties":{"productId":{"type":"string","format":"int64","description":"ID of the product"},"variantId":{"type":"string","format":"int64","description":"ID of the product variant"},"name":{"type":"string","description":"Name of the product"},"quantity":{"type":"integer","format":"int32","description":"Quantity of the product"},"price":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of orderItem"},"currency":{"type":"string","description":"Currency of the orderItem"}}}}}},"discountCodes":{"type":"array","items":{"type":"object","required":["code","amount"],"properties":{"code":{"type":"string","description":"Discount code"},"amount":{"type":"number","format":"double","description":"Value of discount"}}}}}}}}}}}
```

## The UpdateOrder object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"UpdateOrder":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string"},"attributes":{"type":"object","required":["phoneNumber","orderStatusUrl","totalPrice","lineItems","updatedAt"],"properties":{"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"orderStatusUrl":{"type":"string","format":"uri","description":"URL of the order status page"},"totalPrice":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of order"},"currency":{"type":"string","description":"Currency of the order"}}},"updatedAt":{"type":"string","description":"UTC Date and time in ISO 8601 format"},"lineItems":{"type":"array","items":{"type":"object","required":["productId","name","quantity","price"],"properties":{"productId":{"type":"string","format":"int64","description":"ID of the product"},"variantId":{"type":"string","format":"int64","description":"ID of the product variant"},"name":{"type":"string","description":"Name of the product"},"quantity":{"type":"integer","format":"int32","description":"Quantity of the product"},"price":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double","description":"Value of orderItem"},"currency":{"type":"string","description":"Currency of the orderItem"}}}}}},"discountCodes":{"type":"array","items":{"type":"object","required":["code","amount"],"properties":{"code":{"type":"string","description":"Discount code"},"amount":{"type":"number","format":"double","description":"Value of discount"}}}}}}}}}}}
```

## The PostEvent object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"PostEvent":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["events"]},"attributes":{"type":"object","required":["phoneNumber","source"],"properties":{"phoneNumber":{"type":"string","description":"Preferably E.164 format"},"source":{"type":"object","required":["category","name"],"properties":{"category":{"type":"string","description":"Source category"},"name":{"type":"string","description":"Source name"}}},"properties":{"type":"object","description":"Data of the event, as flat key/value pairs. At most 10 properties are\nallowed; more than that is rejected with `400`.\n\nProperties are not automatically available to the flow. Only properties that\nRecart already supports are delivered to messages, where the message inserts\none from the flow editor's variable picker. Contact Support to find out which\nproperties your account can use, or to request support for a new one.\n\nAny other property is accepted and then discarded. The request still returns\n`200` and the flow is still triggered, but the value never reaches the\nmessage, so a discarded property is indistinguishable from a delivered one.\nDo not design a message around a property you have not confirmed is\nsupported. To personalise or target on your own data, store it on the\nsubscriber with `PATCH /subscribers` and use it as a segment condition\ninstead.\n"}}}}}}}}
```

## The PostEventSource object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"PostEventSource":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["events"]},"attributes":{"type":"object","required":["category","name","type"],"properties":{"category":{"type":"string","description":"Source category"},"name":{"type":"string","description":"Source name"},"type":{"type":"string","enum":["custom","optin"],"description":"Type of source"}}}}}}}}
```

## The ModifyListMembersRequest object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"ModifyListMembersRequest":{"type":"object","description":"Add or remove phone numbers to a list","required":["type","attributes"],"properties":{"type":{"enum":["lists"]},"attributes":{"required":["phoneNumbers","operation"],"type":"object","properties":{"phoneNumbers":{"type":"array","items":{"type":"string"}},"operation":{"enum":["add","remove"]}}}}}}}}
```

## The ModifyListMembersResponse object

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"components":{"schemas":{"ModifyListMembersResponse":{"title":"ModifyListMembers Response","type":"object","required":["type","attributes"],"properties":{"type":{"enum":["lists"]},"attributes":{"type":"object","required":["phoneNumber","status"],"properties":{"phoneNumber":{"type":"string"},"status":{"enum":["added","removed","not_found"]}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.recart.com/developers/public-api/models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
