{
    "info": {
        "_postman_id": "3607dff6-da1c-4655-85ec-97ff5837f403",
        "name": "Guper · Order",
        "description": "Guper Order API reference. Generated from the documentation portal.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Campaign",
            "item": [
                {
                    "name": "List Campaign Attributions",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/campaign",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "campaign"
                            ]
                        },
                        "description": "Campaigns a sale is attributed to. Answers both directions: filter by `order` for\n\"which campaigns is this sale attributed to\", or by `campaign` for \"which sales did\nthis campaign generate\".\n\nA sale is attributed to a campaign in two ways: the customer **redeemed** balance from\nit (`cashback`, `point`, `coupon`), or the customer **received a message** from it and\nbought within the attribution window (`notification`). A campaign that *rewarded* the\nsale is not an attribution — the reward is a consequence of the sale, not its cause.\n\nThe same sale may be attributed to the same campaign through more than one origin, and\nthrough more than one redeemed card. Each is a separate row. Count distinct orders, not\nrows, to measure conversion.\n\nThis mirrors `customerCampaignAttribution` in loyalty, which is the authoritative\nrecord — the redemption attribution is written by a database trigger when the redemption\nis confirmed. Rows arrive here right after that, through a call from loyalty."
                    },
                    "response": [
                        {
                            "name": "OK",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/campaign",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "campaign"
                                    ]
                                },
                                "description": "Campaigns a sale is attributed to. Answers both directions: filter by `order` for\n\"which campaigns is this sale attributed to\", or by `campaign` for \"which sales did\nthis campaign generate\".\n\nA sale is attributed to a campaign in two ways: the customer **redeemed** balance from\nit (`cashback`, `point`, `coupon`), or the customer **received a message** from it and\nbought within the attribution window (`notification`). A campaign that *rewarded* the\nsale is not an attribution — the reward is a consequence of the sale, not its cause.\n\nThe same sale may be attributed to the same campaign through more than one origin, and\nthrough more than one redeemed card. Each is a separate row. Count distinct orders, not\nrows, to measure conversion.\n\nThis mirrors `customerCampaignAttribution` in loyalty, which is the authoritative\nrecord — the redemption attribution is written by a database trigger when the redemption\nis confirmed. Rows arrive here right after that, through a call from loyalty."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"list\": [\n        {\n            \"order\": 6021077,\n            \"campaign\": 457,\n            \"origin\": \"notification\",\n            \"assetId\": \"B1BCBD0518B3F93C9E47A59971C0E304FD7BEA806E01A6A45CC438F692232684\",\n            \"campaignType\": \"monetary\",\n            \"value\": 0,\n            \"attributedAt\": \"2026-08-13 16:11:03\",\n            \"notifiedAt\": \"2026-07-31 23:21:30\",\n            \"windowEndsAt\": \"2026-09-01 02:59:59\",\n            \"createdAt\": \"2026-08-13 16:11:03\"\n        },\n        {\n            \"order\": 6021077,\n            \"campaign\": 457,\n            \"origin\": \"cashback\",\n            \"assetId\": \"CD24D2E0AF5DDF020BCCEE84195226DF0813CB7563B2ECFF8A23D6D2A95049C6C3\",\n            \"campaignType\": \"monetary\",\n            \"value\": 76485,\n            \"attributedAt\": \"2026-08-13 16:11:02\",\n            \"notifiedAt\": null,\n            \"windowEndsAt\": null,\n            \"createdAt\": \"2026-08-13 16:11:03\"\n        }\n    ],\n    \"total\": 2,\n    \"pages\": 1,\n    \"page\": 1\n}"
                        }
                    ]
                },
                {
                    "name": "Campaign Revenue Report",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/report/campaign/{{campaignId}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "report",
                                "campaign",
                                "{{campaignId}}"
                            ]
                        },
                        "description": "How many sales a campaign was attributed and how much they were worth.\n\nAttribution means the customer **redeemed** balance from the campaign (`cashback`,\n`point`, `coupon`), or **received a message** from it and bought within the attribution\nwindow (`notification`). Sales the campaign merely rewarded are not counted — the reward\nis a consequence of the sale, not its cause.\n\nThis lives in the order service because the sale value does. The loyalty campaign report\nmeasures the *benefit* (credited, redeemed, outstanding balance); this one measures the\n*revenue*. They answer different questions and will not match.\n\n**`byOrigin` does not add up to `total`, by design.** A sale attributed through more than\none origin counts once in each. `total` counts distinct orders, so it is always less than\nor equal to the sum of `byOrigin`.\n\n**Attribution is not incrementality.** These sales may have happened anyway — the customer\nhad balance and used it, but might have bought regardless. Read this as *influenced*\nrevenue, not generated. Measuring real impact requires a control group.\n\nCancelled orders are excluded — revenue from a reverted sale is not revenue.\n\nAll monetary values are integers in cents, in the organization's currency. `revenueGross`\nis the order total **before** the redeemed balance is taken out; `revenueNet` subtracts it\nand is what came in as money. `avgDiscount` is `redeemed / revenueGross` (a ratio),\n`averageTicketGross` is `revenueGross / orders` and `averageTicketNet` is\n`revenueNet / orders`, all over distinct orders; the gap between the two tickets is the\naverage balance applied per order.\n\n`baseline` is the ruler: orders **not** attributed to this campaign, in the same window and\norganization. Without it an absolute revenue figure always looks good. It is cached (the\nquery is expensive and the value moves slowly), so it carries its own `computedAt` and is\nnot from the same instant as the rest of the payload.\n\nWhen no period is given, the window runs from the first to the last attributed order —\ncomparing against all-time would fill the baseline with periods when the campaign did not\nexist. `period.explicit` tells which of the two happened.\n\nThe date range is all-or-nothing. Informing only one of the two returns `404` — the route\nitself does not match with a single date. Half a window silently ignored would return\nall-time numbers wearing the requested period's face."
                    },
                    "response": [
                        {
                            "name": "OK",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/campaign/{{campaignId}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "campaign",
                                        "{{campaignId}}"
                                    ]
                                },
                                "description": "How many sales a campaign was attributed and how much they were worth.\n\nAttribution means the customer **redeemed** balance from the campaign (`cashback`,\n`point`, `coupon`), or **received a message** from it and bought within the attribution\nwindow (`notification`). Sales the campaign merely rewarded are not counted — the reward\nis a consequence of the sale, not its cause.\n\nThis lives in the order service because the sale value does. The loyalty campaign report\nmeasures the *benefit* (credited, redeemed, outstanding balance); this one measures the\n*revenue*. They answer different questions and will not match.\n\n**`byOrigin` does not add up to `total`, by design.** A sale attributed through more than\none origin counts once in each. `total` counts distinct orders, so it is always less than\nor equal to the sum of `byOrigin`.\n\n**Attribution is not incrementality.** These sales may have happened anyway — the customer\nhad balance and used it, but might have bought regardless. Read this as *influenced*\nrevenue, not generated. Measuring real impact requires a control group.\n\nCancelled orders are excluded — revenue from a reverted sale is not revenue.\n\nAll monetary values are integers in cents, in the organization's currency. `revenueGross`\nis the order total **before** the redeemed balance is taken out; `revenueNet` subtracts it\nand is what came in as money. `avgDiscount` is `redeemed / revenueGross` (a ratio),\n`averageTicketGross` is `revenueGross / orders` and `averageTicketNet` is\n`revenueNet / orders`, all over distinct orders; the gap between the two tickets is the\naverage balance applied per order.\n\n`baseline` is the ruler: orders **not** attributed to this campaign, in the same window and\norganization. Without it an absolute revenue figure always looks good. It is cached (the\nquery is expensive and the value moves slowly), so it carries its own `computedAt` and is\nnot from the same instant as the rest of the payload.\n\nWhen no period is given, the window runs from the first to the last attributed order —\ncomparing against all-time would fill the baseline with periods when the campaign did not\nexist. `period.explicit` tells which of the two happened.\n\nThe date range is all-or-nothing. Informing only one of the two returns `404` — the route\nitself does not match with a single date. Half a window silently ignored would return\nall-time numbers wearing the requested period's face."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"meta\": {\n        \"unit\": \"cents\",\n        \"attribution\": {\n            \"rule\": \"Venda atribuida a campanha cujo saldo foi resgatado (cashback/point/coupon), ou cuja mensagem o cliente recebeu e comprou dentro da janela (notification). Campanha que apenas premiou a venda NAO entra.\",\n            \"caveat\": \"Atribuicao nao e incrementalidade: a venda pode ter acontecido de qualquer forma. Ler como receita INFLUENCIADA, nao gerada. Medir impacto real exige grupo de controle.\"\n        },\n        \"notes\": {\n            \"revenueGross\": \"total_order dos pedidos atribuidos. Bruto: o resgate NAO esta descontado.\",\n            \"revenueNet\": \"revenueGross - redeemed. O que entrou como dinheiro.\",\n            \"returnOnBenefit\": \"revenueGross / redeemed. Sobre o RESGATADO, nao o creditado.\",\n            \"baseline\": \"Pedidos NAO atribuidos a esta campanha, mesma janela e organizacao.\",\n            \"byOrigin\": \"Nao soma com total: pedido atribuido por mais de uma origem conta uma vez em cada.\"\n        }\n    },\n    \"campaign\": 361,\n    \"period\": {\n        \"start\": \"2025-12-06\",\n        \"end\": \"2026-08-17\",\n        \"explicit\": false\n    },\n    \"total\": {\n        \"orders\": 10254,\n        \"clients\": 8538,\n        \"revenueGross\": 1904183642,\n        \"redeemed\": 333571751,\n        \"revenueNet\": 1570611891,\n        \"averageTicket\": 185702,\n        \"avgDiscount\": 0.1752,\n        \"averageTicketGross\": 185702,\n        \"averageTicketNet\": 153171,\n        \"returnOnBenefit\": 5.71\n    },\n    \"baseline\": {\n        \"orders\": 185201,\n        \"averageTicket\": 280407,\n        \"ticketDeltaPct\": -33.8,\n        \"computedAt\": \"2026-08-17 18:02:09\"\n    },\n    \"repeat\": {\n        \"clients\": 8538,\n        \"repeatClients\": 1330,\n        \"repeatRate\": 15.6,\n        \"ordersPerClient\": 1.2\n    },\n    \"byOrigin\": [\n        {\n            \"origin\": \"cashback\",\n            \"orders\": 10254,\n            \"revenueGross\": 1904183642,\n            \"averageTicket\": 185702\n        }\n    ]\n}"
                        },
                        {
                            "name": "dateStart is after dateEnd.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/campaign/{{campaignId}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "campaign",
                                        "{{campaignId}}"
                                    ]
                                },
                                "description": "How many sales a campaign was attributed and how much they were worth.\n\nAttribution means the customer **redeemed** balance from the campaign (`cashback`,\n`point`, `coupon`), or **received a message** from it and bought within the attribution\nwindow (`notification`). Sales the campaign merely rewarded are not counted — the reward\nis a consequence of the sale, not its cause.\n\nThis lives in the order service because the sale value does. The loyalty campaign report\nmeasures the *benefit* (credited, redeemed, outstanding balance); this one measures the\n*revenue*. They answer different questions and will not match.\n\n**`byOrigin` does not add up to `total`, by design.** A sale attributed through more than\none origin counts once in each. `total` counts distinct orders, so it is always less than\nor equal to the sum of `byOrigin`.\n\n**Attribution is not incrementality.** These sales may have happened anyway — the customer\nhad balance and used it, but might have bought regardless. Read this as *influenced*\nrevenue, not generated. Measuring real impact requires a control group.\n\nCancelled orders are excluded — revenue from a reverted sale is not revenue.\n\nAll monetary values are integers in cents, in the organization's currency. `revenueGross`\nis the order total **before** the redeemed balance is taken out; `revenueNet` subtracts it\nand is what came in as money. `avgDiscount` is `redeemed / revenueGross` (a ratio),\n`averageTicketGross` is `revenueGross / orders` and `averageTicketNet` is\n`revenueNet / orders`, all over distinct orders; the gap between the two tickets is the\naverage balance applied per order.\n\n`baseline` is the ruler: orders **not** attributed to this campaign, in the same window and\norganization. Without it an absolute revenue figure always looks good. It is cached (the\nquery is expensive and the value moves slowly), so it carries its own `computedAt` and is\nnot from the same instant as the rest of the payload.\n\nWhen no period is given, the window runs from the first to the last attributed order —\ncomparing against all-time would fill the baseline with periods when the campaign did not\nexist. `period.explicit` tells which of the two happened.\n\nThe date range is all-or-nothing. Informing only one of the two returns `404` — the route\nitself does not match with a single date. Half a window silently ignored would return\nall-time numbers wearing the requested period's face."
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\"error\":true,\"message\":\"dateStart must not be after dateEnd\"}"
                        },
                        {
                            "name": "Only one of dateStart / dateEnd was informed — no route matches a single date.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/campaign/{{campaignId}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "campaign",
                                        "{{campaignId}}"
                                    ]
                                },
                                "description": "How many sales a campaign was attributed and how much they were worth.\n\nAttribution means the customer **redeemed** balance from the campaign (`cashback`,\n`point`, `coupon`), or **received a message** from it and bought within the attribution\nwindow (`notification`). Sales the campaign merely rewarded are not counted — the reward\nis a consequence of the sale, not its cause.\n\nThis lives in the order service because the sale value does. The loyalty campaign report\nmeasures the *benefit* (credited, redeemed, outstanding balance); this one measures the\n*revenue*. They answer different questions and will not match.\n\n**`byOrigin` does not add up to `total`, by design.** A sale attributed through more than\none origin counts once in each. `total` counts distinct orders, so it is always less than\nor equal to the sum of `byOrigin`.\n\n**Attribution is not incrementality.** These sales may have happened anyway — the customer\nhad balance and used it, but might have bought regardless. Read this as *influenced*\nrevenue, not generated. Measuring real impact requires a control group.\n\nCancelled orders are excluded — revenue from a reverted sale is not revenue.\n\nAll monetary values are integers in cents, in the organization's currency. `revenueGross`\nis the order total **before** the redeemed balance is taken out; `revenueNet` subtracts it\nand is what came in as money. `avgDiscount` is `redeemed / revenueGross` (a ratio),\n`averageTicketGross` is `revenueGross / orders` and `averageTicketNet` is\n`revenueNet / orders`, all over distinct orders; the gap between the two tickets is the\naverage balance applied per order.\n\n`baseline` is the ruler: orders **not** attributed to this campaign, in the same window and\norganization. Without it an absolute revenue figure always looks good. It is cached (the\nquery is expensive and the value moves slowly), so it carries its own `computedAt` and is\nnot from the same instant as the rest of the payload.\n\nWhen no period is given, the window runs from the first to the last attributed order —\ncomparing against all-time would fill the baseline with periods when the campaign did not\nexist. `period.explicit` tells which of the two happened.\n\nThe date range is all-or-nothing. Informing only one of the two returns `404` — the route\nitself does not match with a single date. Half a window silently ignored would return\nall-time numbers wearing the requested period's face."
                            },
                            "status": "Not Found",
                            "code": 404,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Cancellation",
            "request": {
                "method": "PATCH",
                "header": [
                    {
                        "key": "x-guper-authorization",
                        "value": "{{x-guper-authorization}}",
                        "type": "text",
                        "description": "User token issued by Guper."
                    },
                    {
                        "key": "Content-Type",
                        "value": "{{Content-Type}}",
                        "type": "text",
                        "description": "Always `application/json` for endpoints that accept a JSON body."
                    }
                ],
                "url": {
                    "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/cancellation",
                    "protocol": "https",
                    "host": [
                        "{{organization}}",
                        "myguper",
                        "com"
                    ],
                    "path": [
                        "api",
                        "order",
                        "{{orderId}}",
                        "cancellation"
                    ]
                },
                "description": "Marks an order as cancelled. Triggers cancellation of any related loyalty transactions."
            },
            "response": [
                {
                    "name": "Success",
                    "originalRequest": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/cancellation",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "{{orderId}}",
                                "cancellation"
                            ]
                        },
                        "description": "Marks an order as cancelled. Triggers cancellation of any related loyalty transactions."
                    },
                    "status": "OK",
                    "code": 200,
                    "_postman_previewlanguage": "json",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application/json"
                        }
                    ],
                    "body": "{\n    \"id\": 1672059,\n    \"interface\": \"generic\",\n    \"refId\": \"362\",\n    \"store\": 32,\n    \"cashier\": null,\n    \"salesperson\": null,\n    \"client\": 431969,\n    \"status\": \"cancelled\",\n    \"paidValue\": 0,\n    \"total_order\": 97390,\n    \"total_item\": 96390,\n    \"total_shipping\": 20000,\n    \"total_taxes\": 0,\n    \"total_discounts\": 1000,\n    \"order_date\": {\n        \"date\": \"2024-09-27 11:54:57.000000\",\n        \"timezone_type\": 3,\n        \"timezone\": \"America/Sao_Paulo\"\n    },\n    \"createAt\": {\n        \"date\": \"2024-09-27 11:55:02.000000\",\n        \"timezone_type\": 3,\n        \"timezone\": \"America/Sao_Paulo\"\n    },\n    \"updateAt\": {\n        \"date\": \"2024-09-27 11:55:02.000000\",\n        \"timezone_type\": 3,\n        \"timezone\": \"America/Sao_Paulo\"\n    }\n}"
                }
            ]
        },
        {
            "name": "Complete",
            "request": {
                "method": "PATCH",
                "header": [
                    {
                        "key": "x-guper-authorization",
                        "value": "{{x-guper-authorization}}",
                        "type": "text",
                        "description": "User token issued by Guper."
                    },
                    {
                        "key": "Content-Type",
                        "value": "{{Content-Type}}",
                        "type": "text",
                        "description": "Always `application/json` for endpoints that accept a JSON body."
                    }
                ],
                "url": {
                    "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/complete",
                    "protocol": "https",
                    "host": [
                        "{{organization}}",
                        "myguper",
                        "com"
                    ],
                    "path": [
                        "api",
                        "order",
                        "{{orderId}}",
                        "complete"
                    ]
                },
                "description": "Marks an order as completed (delivered / fulfilled / finalised). Settles any pending loyalty transactions tied to it."
            },
            "response": [
                {
                    "name": "Completed",
                    "originalRequest": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/complete",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "{{orderId}}",
                                "complete"
                            ]
                        },
                        "description": "Marks an order as completed (delivered / fulfilled / finalised). Settles any pending loyalty transactions tied to it."
                    },
                    "status": "OK",
                    "code": 200,
                    "_postman_previewlanguage": "json",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application/json"
                        }
                    ],
                    "body": "{\n    \"orderId\": 121212,\n    \"status\": \"completed\",\n    \"completedAt\": \"2026-05-01T12:34:56-03:00\"\n}"
                }
            ]
        },
        {
            "name": "CSAT",
            "item": [
                {
                    "name": "Update by Interface and RefId",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/{{refId}}/csat",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "{{interface}}",
                                "{{refId}}",
                                "csat"
                            ]
                        },
                        "description": "Updates the customer satisfaction (CSAT) score for an order, identified by external `interface` + `refId`.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"csat\": 5\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/{{refId}}/csat",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "{{interface}}",
                                        "{{refId}}",
                                        "csat"
                                    ]
                                },
                                "description": "Updates the customer satisfaction (CSAT) score for an order, identified by external `interface` + `refId`.",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"csat\": 5\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"id\": 3833678,\n    \"organization\": \"xpto\",\n    \"interface\": \"generic\",\n    \"refId\": \"id-97.897.466\",\n    \"csat\": 5\n}"
                        }
                    ]
                },
                {
                    "name": "Update by Order Id",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/csat",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "{{orderId}}",
                                "csat"
                            ]
                        },
                        "description": "Updates the customer satisfaction (CSAT) score for an order, identified by internal `orderId`.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"csat\": 5\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/{{orderId}}/csat",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "{{orderId}}",
                                        "csat"
                                    ]
                                },
                                "description": "Updates the customer satisfaction (CSAT) score for an order, identified by internal `orderId`.",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"csat\": 5\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"id\": 3833678,\n    \"organization\": \"xpto\",\n    \"interface\": \"generic\",\n    \"refId\": \"id-97.897.466\",\n    \"csat\": 5\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Feed",
            "item": [
                {
                    "name": "Commit items",
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/feed",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "feed"
                            ]
                        },
                        "description": "Acknowledges consumption of order feed entries by sending the tokens back. Once acknowledged, those entries no longer appear in subsequent reads.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\r\n    \"tokens\": [\r\n        \"94d1499024f3d14a8d4376ecae6b20e09bf909e7\"\r\n    ]\r\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Acknowledged",
                            "originalRequest": {
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/feed",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "feed"
                                    ]
                                },
                                "description": "Acknowledges consumption of order feed entries by sending the tokens back. Once acknowledged, those entries no longer appear in subsequent reads.",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"tokens\": [\r\n        \"94d1499024f3d14a8d4376ecae6b20e09bf909e7\"\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"acknowledged\": 2\n}"
                        }
                    ]
                },
                {
                    "name": "Retrieve items",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/feed",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "feed"
                            ]
                        },
                        "description": "Retrieves pending entries from the order feed (orders that were created, modified, cancelled or had rewards applied since the last acknowledgement)."
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/feed",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "feed"
                                    ]
                                },
                                "description": "Retrieves pending entries from the order feed (orders that were created, modified, cancelled or had rewards applied since the last acknowledgement)."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "[\n    {\n        \"confirmToken\": \"2A0067C7FECB11EFAAC602B02E860C9532173\",\n        \"subscriber\": \"cloe-acme-TARQTDBN\",\n        \"module\": \"order\",\n        \"key\": 71918412,\n        \"confirmedAt\": null,\n        \"createdAt\": \"2025-03-11T16:50:00-03:00\"\n    },\n    {\n        \"confirmToken\": \"409FBC97FED111EFAAC602B02E860C9578560\",\n        \"subscriber\": \"cloe-acme-TARQTDBN\",\n        \"module\": \"order\",\n        \"key\": 71928432,\n        \"confirmedAt\": null,\n        \"createdAt\": \"2025-03-11T17:33:35-03:00\"\n    },\n    {\n        \"confirmToken\": \"65as4d6as85d49qd51q69we54q9w58de496sa\",\n        \"subscriber\": \"cloe-acme-TARQTDBN\",\n        \"module\": \"order\",\n        \"key\": 71896943,\n        \"confirmedAt\": null,\n        \"createdAt\": \"2025-03-11T14:41:14-03:00\"\n    },\n    {\n        \"confirmToken\": \"8374E01DFEC111EFAAC602B02E860C9555273\",\n        \"subscriber\": \"cloe-acme-TARQTDBN\",\n        \"module\": \"order\",\n        \"key\": 71906811,\n        \"confirmedAt\": null,\n        \"createdAt\": \"2025-03-11T15:40:55-03:00\"\n    }\n]"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Order",
            "item": [
                {
                    "name": "Import",
                    "item": [
                        {
                            "name": "Batch Import",
                            "request": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/import",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "import"
                                    ]
                                },
                                "description": "Imports multiple purchase orders in a single request. Use this endpoint to push large datasets — each\nitem in `purchases` is processed independently and the response is a parallel array with the outcome\nof each one (success or per-row error).\n\n**Single or batch, same endpoint.** When the body has no `purchases` array, the whole body is\ntreated as one purchase (`$perLot = array_key_exists('purchases', $body)`), so there is no\nseparate route for importing a single order.\n\nIdentification of an order is the pair `interface` + `refId` (or `interface` + `id`, treated as alias).\nThe optional `config.mode` controls what happens when the order already exists in the organization:\n\n| Mode | Behaviour |\n| --- | --- |\n| `append` *(default)* | Fail if order already exists. |\n| `upsert` | Update if exists, create otherwise. |\n| `update-unmatched` | Update if exists; if not, create with status `orphaned_import`. |\n| `replace` | *(planned — currently throws)* |\n| `skip-duplicates` | *(planned — currently throws)* |\n\nThe first import for a refId is also stored as the `originalOrderData`, so the original payload is\npreserved even if the order is later updated.\n\nMonetary fields are always **integer cents**. See [Monetary values](/guides/monetary-values).",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"config\": { \"mode\": \"upsert\" },\n    \"purchases\": [\n        {\n            \"interface\": \"generic\",\n            \"storeId\": \"1\",\n            \"id\": \"908192165\",\n            \"creationDate\": \"2023-01-15 10:45:37\",\n            \"status\": \"completed\",\n            \"client\": {\n                \"id\": \"123123\",\n                \"name\": \"tintin\",\n                \"email\": \"tintin@gmail.com\",\n                \"cellphone\": \"11112356549\"\n            },\n            \"items\": [\n                {\n                    \"skuId\": \"47142\",\n                    \"name\": \"Sandalia Salto Alto 38\",\n                    \"categoryId\": 1186,\n                    \"brandId\": 69367,\n                    \"quantity\": 1,\n                    \"price\": 4448,\n                    \"listPrice\": 4448,\n                    \"tax\": 0\n                }\n            ],\n            \"payments\": [\n                {\n                    \"paymentSystem\": \"4fa\",\n                    \"paymentSystemName\": \"Mastercard\",\n                    \"type\": \"creditCard\",\n                    \"value\": 5447,\n                    \"installments\": 3,\n                    \"firstDigits\": \"550209\",\n                    \"lastDigits\": \"2569\"\n                }\n            ],\n            \"shipping\": [\n                {\n                    \"id\": \"AA123456785BR\",\n                    \"courierId\": \"correios-br\",\n                    \"courierName\": \"Correios\",\n                    \"price\": 999,\n                    \"listPrice\": 999\n                }\n            ],\n            \"total_item\": 4448,\n            \"total_discounts\": 0,\n            \"total_shipping\": 999,\n            \"total_tax\": 0\n        }\n    ]\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "response": [
                                {
                                    "name": "One result per purchase. Successful rows return `{ id, refId, status }`; failed rows return\n`{ id, error: true, code, message }`. Both shapes can appear in the same response.",
                                    "originalRequest": {
                                        "method": "POST",
                                        "header": [
                                            {
                                                "key": "x-guper-authorization",
                                                "value": "{{x-guper-authorization}}",
                                                "type": "text",
                                                "description": "User token issued by Guper."
                                            },
                                            {
                                                "key": "Content-Type",
                                                "value": "{{Content-Type}}",
                                                "type": "text",
                                                "description": "Always `application/json` for endpoints that accept a JSON body."
                                            }
                                        ],
                                        "url": {
                                            "raw": "https://{{organization}}.myguper.com/api/order/import",
                                            "protocol": "https",
                                            "host": [
                                                "{{organization}}",
                                                "myguper",
                                                "com"
                                            ],
                                            "path": [
                                                "api",
                                                "order",
                                                "import"
                                            ]
                                        },
                                        "description": "Imports multiple purchase orders in a single request. Use this endpoint to push large datasets — each\nitem in `purchases` is processed independently and the response is a parallel array with the outcome\nof each one (success or per-row error).\n\n**Single or batch, same endpoint.** When the body has no `purchases` array, the whole body is\ntreated as one purchase (`$perLot = array_key_exists('purchases', $body)`), so there is no\nseparate route for importing a single order.\n\nIdentification of an order is the pair `interface` + `refId` (or `interface` + `id`, treated as alias).\nThe optional `config.mode` controls what happens when the order already exists in the organization:\n\n| Mode | Behaviour |\n| --- | --- |\n| `append` *(default)* | Fail if order already exists. |\n| `upsert` | Update if exists, create otherwise. |\n| `update-unmatched` | Update if exists; if not, create with status `orphaned_import`. |\n| `replace` | *(planned — currently throws)* |\n| `skip-duplicates` | *(planned — currently throws)* |\n\nThe first import for a refId is also stored as the `originalOrderData`, so the original payload is\npreserved even if the order is later updated.\n\nMonetary fields are always **integer cents**. See [Monetary values](/guides/monetary-values).",
                                        "body": {
                                            "mode": "raw",
                                            "raw": "{\n    \"config\": { \"mode\": \"upsert\" },\n    \"purchases\": [\n        {\n            \"interface\": \"generic\",\n            \"storeId\": \"1\",\n            \"id\": \"908192165\",\n            \"creationDate\": \"2023-01-15 10:45:37\",\n            \"status\": \"completed\",\n            \"client\": {\n                \"id\": \"123123\",\n                \"name\": \"tintin\",\n                \"email\": \"tintin@gmail.com\",\n                \"cellphone\": \"11112356549\"\n            },\n            \"items\": [\n                {\n                    \"skuId\": \"47142\",\n                    \"name\": \"Sandalia Salto Alto 38\",\n                    \"categoryId\": 1186,\n                    \"brandId\": 69367,\n                    \"quantity\": 1,\n                    \"price\": 4448,\n                    \"listPrice\": 4448,\n                    \"tax\": 0\n                }\n            ],\n            \"payments\": [\n                {\n                    \"paymentSystem\": \"4fa\",\n                    \"paymentSystemName\": \"Mastercard\",\n                    \"type\": \"creditCard\",\n                    \"value\": 5447,\n                    \"installments\": 3,\n                    \"firstDigits\": \"550209\",\n                    \"lastDigits\": \"2569\"\n                }\n            ],\n            \"shipping\": [\n                {\n                    \"id\": \"AA123456785BR\",\n                    \"courierId\": \"correios-br\",\n                    \"courierName\": \"Correios\",\n                    \"price\": 999,\n                    \"listPrice\": 999\n                }\n            ],\n            \"total_item\": 4448,\n            \"total_discounts\": 0,\n            \"total_shipping\": 999,\n            \"total_tax\": 0\n        }\n    ]\n}",
                                            "options": {
                                                "raw": {
                                                    "language": "json"
                                                }
                                            }
                                        }
                                    },
                                    "status": "OK",
                                    "code": 200,
                                    "_postman_previewlanguage": "json",
                                    "header": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application/json"
                                        }
                                    ],
                                    "body": "[\n    {\n        \"id\": 2138,\n        \"refId\": \"908192165\",\n        \"status\": \"pending\"\n    },\n    {\n        \"id\": \"767378586\",\n        \"error\": true,\n        \"code\": 409,\n        \"message\": \"Order already exists\"\n    }\n]"
                                },
                                {
                                    "name": "Body is not valid JSON or required top-level fields are missing.",
                                    "originalRequest": {
                                        "method": "POST",
                                        "header": [
                                            {
                                                "key": "x-guper-authorization",
                                                "value": "{{x-guper-authorization}}",
                                                "type": "text",
                                                "description": "User token issued by Guper."
                                            },
                                            {
                                                "key": "Content-Type",
                                                "value": "{{Content-Type}}",
                                                "type": "text",
                                                "description": "Always `application/json` for endpoints that accept a JSON body."
                                            }
                                        ],
                                        "url": {
                                            "raw": "https://{{organization}}.myguper.com/api/order/import",
                                            "protocol": "https",
                                            "host": [
                                                "{{organization}}",
                                                "myguper",
                                                "com"
                                            ],
                                            "path": [
                                                "api",
                                                "order",
                                                "import"
                                            ]
                                        },
                                        "description": "Imports multiple purchase orders in a single request. Use this endpoint to push large datasets — each\nitem in `purchases` is processed independently and the response is a parallel array with the outcome\nof each one (success or per-row error).\n\n**Single or batch, same endpoint.** When the body has no `purchases` array, the whole body is\ntreated as one purchase (`$perLot = array_key_exists('purchases', $body)`), so there is no\nseparate route for importing a single order.\n\nIdentification of an order is the pair `interface` + `refId` (or `interface` + `id`, treated as alias).\nThe optional `config.mode` controls what happens when the order already exists in the organization:\n\n| Mode | Behaviour |\n| --- | --- |\n| `append` *(default)* | Fail if order already exists. |\n| `upsert` | Update if exists, create otherwise. |\n| `update-unmatched` | Update if exists; if not, create with status `orphaned_import`. |\n| `replace` | *(planned — currently throws)* |\n| `skip-duplicates` | *(planned — currently throws)* |\n\nThe first import for a refId is also stored as the `originalOrderData`, so the original payload is\npreserved even if the order is later updated.\n\nMonetary fields are always **integer cents**. See [Monetary values](/guides/monetary-values).",
                                        "body": {
                                            "mode": "raw",
                                            "raw": "{\n    \"config\": { \"mode\": \"upsert\" },\n    \"purchases\": [\n        {\n            \"interface\": \"generic\",\n            \"storeId\": \"1\",\n            \"id\": \"908192165\",\n            \"creationDate\": \"2023-01-15 10:45:37\",\n            \"status\": \"completed\",\n            \"client\": {\n                \"id\": \"123123\",\n                \"name\": \"tintin\",\n                \"email\": \"tintin@gmail.com\",\n                \"cellphone\": \"11112356549\"\n            },\n            \"items\": [\n                {\n                    \"skuId\": \"47142\",\n                    \"name\": \"Sandalia Salto Alto 38\",\n                    \"categoryId\": 1186,\n                    \"brandId\": 69367,\n                    \"quantity\": 1,\n                    \"price\": 4448,\n                    \"listPrice\": 4448,\n                    \"tax\": 0\n                }\n            ],\n            \"payments\": [\n                {\n                    \"paymentSystem\": \"4fa\",\n                    \"paymentSystemName\": \"Mastercard\",\n                    \"type\": \"creditCard\",\n                    \"value\": 5447,\n                    \"installments\": 3,\n                    \"firstDigits\": \"550209\",\n                    \"lastDigits\": \"2569\"\n                }\n            ],\n            \"shipping\": [\n                {\n                    \"id\": \"AA123456785BR\",\n                    \"courierId\": \"correios-br\",\n                    \"courierName\": \"Correios\",\n                    \"price\": 999,\n                    \"listPrice\": 999\n                }\n            ],\n            \"total_item\": 4448,\n            \"total_discounts\": 0,\n            \"total_shipping\": 999,\n            \"total_tax\": 0\n        }\n    ]\n}",
                                            "options": {
                                                "raw": {
                                                    "language": "json"
                                                }
                                            }
                                        }
                                    },
                                    "status": "Bad Request",
                                    "code": 400,
                                    "_postman_previewlanguage": "json",
                                    "header": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application/json"
                                        }
                                    ],
                                    "body": "{ \"error\": \"Json parameters are missing: ( interface, refId ) or ( interface, id ) or ( purchases )\" }"
                                },
                                {
                                    "name": "`purchases` array is empty.",
                                    "originalRequest": {
                                        "method": "POST",
                                        "header": [
                                            {
                                                "key": "x-guper-authorization",
                                                "value": "{{x-guper-authorization}}",
                                                "type": "text",
                                                "description": "User token issued by Guper."
                                            },
                                            {
                                                "key": "Content-Type",
                                                "value": "{{Content-Type}}",
                                                "type": "text",
                                                "description": "Always `application/json` for endpoints that accept a JSON body."
                                            }
                                        ],
                                        "url": {
                                            "raw": "https://{{organization}}.myguper.com/api/order/import",
                                            "protocol": "https",
                                            "host": [
                                                "{{organization}}",
                                                "myguper",
                                                "com"
                                            ],
                                            "path": [
                                                "api",
                                                "order",
                                                "import"
                                            ]
                                        },
                                        "description": "Imports multiple purchase orders in a single request. Use this endpoint to push large datasets — each\nitem in `purchases` is processed independently and the response is a parallel array with the outcome\nof each one (success or per-row error).\n\n**Single or batch, same endpoint.** When the body has no `purchases` array, the whole body is\ntreated as one purchase (`$perLot = array_key_exists('purchases', $body)`), so there is no\nseparate route for importing a single order.\n\nIdentification of an order is the pair `interface` + `refId` (or `interface` + `id`, treated as alias).\nThe optional `config.mode` controls what happens when the order already exists in the organization:\n\n| Mode | Behaviour |\n| --- | --- |\n| `append` *(default)* | Fail if order already exists. |\n| `upsert` | Update if exists, create otherwise. |\n| `update-unmatched` | Update if exists; if not, create with status `orphaned_import`. |\n| `replace` | *(planned — currently throws)* |\n| `skip-duplicates` | *(planned — currently throws)* |\n\nThe first import for a refId is also stored as the `originalOrderData`, so the original payload is\npreserved even if the order is later updated.\n\nMonetary fields are always **integer cents**. See [Monetary values](/guides/monetary-values).",
                                        "body": {
                                            "mode": "raw",
                                            "raw": "{\n    \"config\": { \"mode\": \"upsert\" },\n    \"purchases\": [\n        {\n            \"interface\": \"generic\",\n            \"storeId\": \"1\",\n            \"id\": \"908192165\",\n            \"creationDate\": \"2023-01-15 10:45:37\",\n            \"status\": \"completed\",\n            \"client\": {\n                \"id\": \"123123\",\n                \"name\": \"tintin\",\n                \"email\": \"tintin@gmail.com\",\n                \"cellphone\": \"11112356549\"\n            },\n            \"items\": [\n                {\n                    \"skuId\": \"47142\",\n                    \"name\": \"Sandalia Salto Alto 38\",\n                    \"categoryId\": 1186,\n                    \"brandId\": 69367,\n                    \"quantity\": 1,\n                    \"price\": 4448,\n                    \"listPrice\": 4448,\n                    \"tax\": 0\n                }\n            ],\n            \"payments\": [\n                {\n                    \"paymentSystem\": \"4fa\",\n                    \"paymentSystemName\": \"Mastercard\",\n                    \"type\": \"creditCard\",\n                    \"value\": 5447,\n                    \"installments\": 3,\n                    \"firstDigits\": \"550209\",\n                    \"lastDigits\": \"2569\"\n                }\n            ],\n            \"shipping\": [\n                {\n                    \"id\": \"AA123456785BR\",\n                    \"courierId\": \"correios-br\",\n                    \"courierName\": \"Correios\",\n                    \"price\": 999,\n                    \"listPrice\": 999\n                }\n            ],\n            \"total_item\": 4448,\n            \"total_discounts\": 0,\n            \"total_shipping\": 999,\n            \"total_tax\": 0\n        }\n    ]\n}",
                                            "options": {
                                                "raw": {
                                                    "language": "json"
                                                }
                                            }
                                        }
                                    },
                                    "status": "Bad Request",
                                    "code": 400,
                                    "_postman_previewlanguage": "json",
                                    "header": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application/json"
                                        }
                                    ],
                                    "body": "{ \"error\": \"Purchases empty\" }"
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "List Orders — a customer's orders",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/data",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "data"
                            ]
                        },
                        "description": "Returns a paginated list of orders, and **filters through the shared listing grammar**\n`q[column][operator]=value` - see [List query parameters](/docs/{lang}/guides/list-query-parameters)\nfor the full operator table.\n\n**Only these columns are filterable** (an unlisted column returns `400 Coluna nao\npermitida`): `status` (registered | completed | canceled), `orderStatus`, `client`,\n`store`, `interface`, `refId`, `id`, `customerTags`, `attempt`, `createdAt`,\n`updatedAt`. There is **no `order_date` or amount/`total` filter here** — to sum or\nbreak down sales by **date, store or campaign**, use `order.report.sales`, not this\nlist.\n\n```\nGET /api/order/data?q[status][E]=completed\nGET /api/order/data?q[store][E]=207&q[client][E]=12345&e=20\n```"
                    },
                    "response": [
                        {
                            "name": "Paginated list",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/data",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "data"
                                    ]
                                },
                                "description": "Returns a paginated list of orders, and **filters through the shared listing grammar**\n`q[column][operator]=value` - see [List query parameters](/docs/{lang}/guides/list-query-parameters)\nfor the full operator table.\n\n**Only these columns are filterable** (an unlisted column returns `400 Coluna nao\npermitida`): `status` (registered | completed | canceled), `orderStatus`, `client`,\n`store`, `interface`, `refId`, `id`, `customerTags`, `attempt`, `createdAt`,\n`updatedAt`. There is **no `order_date` or amount/`total` filter here** — to sum or\nbreak down sales by **date, store or campaign**, use `order.report.sales`, not this\nlist.\n\n```\nGET /api/order/data?q[status][E]=completed\nGET /api/order/data?q[store][E]=207&q[client][E]=12345&e=20\n```"
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"list\": [\n        {\n            \"id\": 121212,\n            \"refId\": \"ord-2026-001\",\n            \"status\": \"paid\",\n            \"total\": 19990,\n            \"createdAt\": \"2026-05-01T11:00:00-03:00\"\n        }\n    ],\n    \"total\": 1,\n    \"pagination\": { \"entries\": 20, \"currentPage\": 1, \"totalPages\": 1 }\n}"
                        }
                    ]
                },
                {
                    "name": "List Orders (full)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/data/full",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "data",
                                "full"
                            ]
                        },
                        "description": "Same listing as `GET /api/order/data` - same filters, ordering and pagination - but every\nrow carries the **complete order payload**, the same one `GET /api/order/data/{idOrder}`\nreturns: items, payments, campaigns, customer tags, history, reward, store and customer.\n\nUse it to read a whole page in detail without one request per order.\n\n```\nGET /api/order/data/full?q[status][E]=paid&e=20\n```\n\nCapped at 50 rows per page: each row carries its items, payments and history, so `e=0`\nwould mean the organization's whole history in one response. Anything above 50 - or `e=0` -\nis served as 50."
                    },
                    "response": [
                        {
                            "name": "Paginated list, each row with the full order payload",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/data/full",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "data",
                                        "full"
                                    ]
                                },
                                "description": "Same listing as `GET /api/order/data` - same filters, ordering and pagination - but every\nrow carries the **complete order payload**, the same one `GET /api/order/data/{idOrder}`\nreturns: items, payments, campaigns, customer tags, history, reward, store and customer.\n\nUse it to read a whole page in detail without one request per order.\n\n```\nGET /api/order/data/full?q[status][E]=paid&e=20\n```\n\nCapped at 50 rows per page: each row carries its items, payments and history, so `e=0`\nwould mean the organization's whole history in one response. Anything above 50 - or `e=0` -\nis served as 50."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"list\": [\n        {\n            \"id\": 1672118,\n            \"refId\": \"ord-2026-001\",\n            \"interface\": \"mystore\",\n            \"store\": {\n                \"id\": 124,\n                \"refId\": \"SP-01\",\n                \"name\": \"mystore\"\n            },\n            \"cashier\": \"6977\",\n            \"salesperson\": \"2367\",\n            \"client\": {\n                \"id\": 6497,\n                \"name\": \"Tintim\",\n                \"email\": \"tintim@tintim.com.br\",\n                \"countryCallingCode\": 55,\n                \"cellphone\": \"19966659986\",\n                \"document\": null\n            },\n            \"clientValidation\": null,\n            \"processStatus\": \"processed\",\n            \"orderStatus\": \"completed\",\n            \"paidValue\": 25000,\n            \"customerTag\": [\n                12,\n                34\n            ],\n            \"campaigns\": [\n                {\n                    \"campaign\": 656,\n                    \"value\": 2500,\n                    \"type\": \"monetary\"\n                }\n            ],\n            \"items\": [\n                {\n                    \"id\": 138876,\n                    \"productId\": null,\n                    \"productRefId\": \"9912\",\n                    \"productName\": \"Tenis Casual Feminino\",\n                    \"skuId\": null,\n                    \"skuRefId\": \"9912-34\",\n                    \"skuName\": \"Tenis Casual Feminino 34\",\n                    \"categoryId\": 659,\n                    \"brandId\": 987,\n                    \"quantity\": 1,\n                    \"quantityCanceled\": 0,\n                    \"price\": 25000,\n                    \"listPrice\": 26200,\n                    \"redemption\": 1200\n                }\n            ],\n            \"payments\": [\n                {\n                    \"id\": 55321,\n                    \"value\": 25000,\n                    \"type\": \"credit-card\",\n                    \"paymentSystem\": \"my-payment\",\n                    \"paymentSystemName\": \"My Payment\",\n                    \"installments\": 1,\n                    \"firstDigits\": \"4569\",\n                    \"lastDigits\": \"1236\"\n                }\n            ],\n            \"total_order\": 25000,\n            \"total_item\": 25000,\n            \"total_shipping\": 0,\n            \"total_taxes\": 0,\n            \"total_discounts\": 1200,\n            \"histories\": [\n                {\n                    \"status\": \"order-create\",\n                    \"reason\": \"Order Create\",\n                    \"date\": \"2026-09-01T10:35:00-03:00\"\n                }\n            ],\n            \"reward\": {\n                \"tid\": \"4fa1a7fa876a80ec025184e7786fd51f\",\n                \"rewardable\": 23800,\n                \"redeemable\": 0\n            },\n            \"createdAt\": \"2026-09-01T10:35:06-03:00\",\n            \"integratedAt\": \"2026-09-01T10:35:06-03:00\",\n            \"indexedAt\": \"2026-09-01T10:36:02-03:00\",\n            \"updatedAt\": \"2026-09-01T11:25:46-03:00\"\n        }\n    ],\n    \"total\": 348,\n    \"pagination\": {\n        \"entries\": 20,\n        \"order\": {\n            \"createdAt\": \"desc\"\n        },\n        \"totalPages\": 18,\n        \"currentPage\": 1,\n        \"isInitial\": true,\n        \"isEnd\": false,\n        \"totalPrevPages\": 0,\n        \"totalNextPages\": 17\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get Order",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/data/{{idOrder}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "data",
                                "{{idOrder}}"
                            ]
                        },
                        "description": "Returns a single the order matching the given identifier."
                    },
                    "response": [
                        {
                            "name": "Success",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/data/{{idOrder}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "data",
                                        "{{idOrder}}"
                                    ]
                                },
                                "description": "Returns a single the order matching the given identifier."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"id\": 1672118,\n    \"store\": {\n        \"id\": 124,\n        \"name\": \"mystore\"\n        },\n    \"cashier\": {\n            \"id\": 6977,\n            \"name\": \"Serafim Lampião\"\n        },\n    \"salesperson\": {\n            \"id\": 2367,\n            \"name\": \"Oliveira da Figueira\"\n        },\n    \"client\":  {\n            \"id\": 6497,\n            \"name\": \"Tintim\",\n            \"email\": \"tintim@tintim.com.br\",\n            \"countryCallingCode\": 55,\n            \"cellphone\": \"19966659986\",\n            \"document\": null\n        },\n    \"orderStatus\": \"canceled\",\n    \"paidValue\": 0,\n    \"customerTag\": [],\n    \"items\": [\n        {\n            \"id\": \"138876\",\n            \"productId\": null,\n            \"name\": \"Tênis Casual Feminino 34\",\n            \"categoryId\": 659,    \n            \"brandId\": 987,\n            \"quantity\": 1,\n            \"price\": 25000,\n            \"listPrice\": 26200,\n            \"redemption\":  1200 \n            \n        }\n    ],\n    \"payments\": [\n        {\n            \"value\": 25000,\n            \"type\": \"promissory\",\n            \"paymentSystem\": \"my-payment\",\n            \"paymentSystemName\": \"My Payment\",\n            \"installments\": 1,\n            \"firstDigits\": \"4569\",\n            \"lastDigits\": \"1236\"\n        }\n    ],\n    \"total_order\": 25000,\n    \"total_item\": 25000,\n    \"total_shipping\": 0,\n    \"total_taxes\": 0,\n    \"total_discounts\": 1200,\n    \"histories\": [\n        {\n            \"status\": \"order-create\",\n            \"reason\": \"Order Create\",\n            \"date\": \"2024-09-27T07:35:00-03:00\"\n        }\n    ],\n    \"createdAt\": \"2024-09-27T10:35:06-03:00\",\n    \"integratedAt\": \"2024-09-27T10:35:06-03:00\",\n    \"indexedAt\": \"2024-09-27T10:36:02-03:00\",\n    \"updatedAt\": \"2024-12-02T11:25:46-03:00\"\n}"
                        }
                    ]
                },
                {
                    "name": "Using interface",
                    "item": [
                        {
                            "name": "List Orders by Interface (full)",
                            "request": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/data/full",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "{{interface}}",
                                        "data",
                                        "full"
                                    ]
                                },
                                "description": "Same listing as `GET /api/order/{interface}/data`, with the complete order payload on every\nrow - the same one `GET /api/order/{interface}/data/{refId}` returns, already mapped to the\ninterface refIds (order, store, customer, products and payment systems).\n\nCapped at 50 rows per page."
                            },
                            "response": [
                                {
                                    "name": "Paginated list, each row with the full order payload, mapped to the interface refIds",
                                    "originalRequest": {
                                        "method": "GET",
                                        "header": [
                                            {
                                                "key": "x-guper-authorization",
                                                "value": "{{x-guper-authorization}}",
                                                "type": "text",
                                                "description": "User token issued by Guper."
                                            },
                                            {
                                                "key": "Content-Type",
                                                "value": "{{Content-Type}}",
                                                "type": "text",
                                                "description": "Always `application/json` for endpoints that accept a JSON body."
                                            }
                                        ],
                                        "url": {
                                            "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/data/full",
                                            "protocol": "https",
                                            "host": [
                                                "{{organization}}",
                                                "myguper",
                                                "com"
                                            ],
                                            "path": [
                                                "api",
                                                "order",
                                                "{{interface}}",
                                                "data",
                                                "full"
                                            ]
                                        },
                                        "description": "Same listing as `GET /api/order/{interface}/data`, with the complete order payload on every\nrow - the same one `GET /api/order/{interface}/data/{refId}` returns, already mapped to the\ninterface refIds (order, store, customer, products and payment systems).\n\nCapped at 50 rows per page."
                                    },
                                    "status": "OK",
                                    "code": 200,
                                    "_postman_previewlanguage": "json",
                                    "header": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application/json"
                                        }
                                    ],
                                    "body": "{\n    \"list\": [\n        {\n            \"id\": \"ord-2026-001\",\n            \"interface\": \"mystore\",\n            \"store\": {\n                \"id\": \"SP-01\",\n                \"name\": \"mystore\"\n            },\n            \"cashier\": \"6977\",\n            \"salesperson\": \"2367\",\n            \"client\": {\n                \"id\": \"cli-8891\",\n                \"name\": \"Tintim\",\n                \"email\": \"tintim@tintim.com.br\",\n                \"countryCallingCode\": 55,\n                \"cellphone\": \"19966659986\",\n                \"document\": null\n            },\n            \"clientValidation\": null,\n            \"orderStatus\": \"completed\",\n            \"paidValue\": 25000,\n            \"customerTag\": [\n                12,\n                34\n            ],\n            \"items\": [\n                {\n                    \"id\": 138876,\n                    \"productId\": \"9912\",\n                    \"productName\": \"Tenis Casual Feminino\",\n                    \"skuId\": \"9912-34\",\n                    \"skuName\": \"Tenis Casual Feminino 34\",\n                    \"categoryId\": 659,\n                    \"brandId\": 987,\n                    \"quantity\": 1,\n                    \"quantityCanceled\": 0,\n                    \"price\": 25000,\n                    \"listPrice\": 26200,\n                    \"redemption\": 1200\n                }\n            ],\n            \"payments\": [\n                {\n                    \"value\": 25000,\n                    \"type\": \"credit-card\",\n                    \"paymentSystem\": \"my-payment\",\n                    \"paymentSystemName\": \"My Payment\",\n                    \"installments\": 1,\n                    \"firstDigits\": \"4569\",\n                    \"lastDigits\": \"1236\"\n                }\n            ],\n            \"total_order\": 25000,\n            \"total_item\": 25000,\n            \"total_shipping\": 0,\n            \"total_taxes\": 0,\n            \"total_discounts\": 1200,\n            \"histories\": [\n                {\n                    \"status\": \"order-create\",\n                    \"reason\": \"Order Create\",\n                    \"date\": \"2026-09-01T10:35:00-03:00\"\n                }\n            ],\n            \"reward\": {\n                \"tid\": \"4fa1a7fa876a80ec025184e7786fd51f\",\n                \"rewardable\": 23800,\n                \"redeemable\": 0\n            },\n            \"createdAt\": \"2026-09-01T10:35:06-03:00\",\n            \"integratedAt\": \"2026-09-01T10:35:06-03:00\",\n            \"indexedAt\": \"2026-09-01T10:36:02-03:00\",\n            \"updatedAt\": \"2026-09-01T11:25:46-03:00\"\n        }\n    ],\n    \"total\": 348,\n    \"pagination\": {\n        \"entries\": 20,\n        \"order\": {\n            \"createdAt\": \"desc\"\n        },\n        \"totalPages\": 18,\n        \"currentPage\": 1,\n        \"isInitial\": true,\n        \"isEnd\": false,\n        \"totalPrevPages\": 0,\n        \"totalNextPages\": 17\n    }\n}"
                                }
                            ]
                        },
                        {
                            "name": "Get Order by Interface",
                            "request": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/data/{{idOrder}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "{{interface}}",
                                        "data",
                                        "{{idOrder}}"
                                    ]
                                },
                                "description": "Returns a single the order matching the given identifier."
                            },
                            "response": [
                                {
                                    "name": "Success",
                                    "originalRequest": {
                                        "method": "GET",
                                        "header": [
                                            {
                                                "key": "x-guper-authorization",
                                                "value": "{{x-guper-authorization}}",
                                                "type": "text",
                                                "description": "User token issued by Guper."
                                            },
                                            {
                                                "key": "Content-Type",
                                                "value": "{{Content-Type}}",
                                                "type": "text",
                                                "description": "Always `application/json` for endpoints that accept a JSON body."
                                            }
                                        ],
                                        "url": {
                                            "raw": "https://{{organization}}.myguper.com/api/order/{{interface}}/data/{{idOrder}}",
                                            "protocol": "https",
                                            "host": [
                                                "{{organization}}",
                                                "myguper",
                                                "com"
                                            ],
                                            "path": [
                                                "api",
                                                "order",
                                                "{{interface}}",
                                                "data",
                                                "{{idOrder}}"
                                            ]
                                        },
                                        "description": "Returns a single the order matching the given identifier."
                                    },
                                    "status": "OK",
                                    "code": 200,
                                    "_postman_previewlanguage": "json",
                                    "header": [
                                        {
                                            "key": "Content-Type",
                                            "value": "application/json"
                                        }
                                    ],
                                    "body": "{\n    \"id\": \"303030308\",\n    \"store\": {\n        \"id\": \"365-66\",\n        \"name\": \"mystore\"\n        },\n    \"cashier\": {\n            \"name\": \"Serafim Lampião\"\n        },\n    \"salesperson\": {\n            \"name\": \"Oliveira da Figueira\"\n        },\n    \"client\":  {\n            \"id\": \"69657\",\n            \"name\": \"Tintim\",\n            \"email\": \"tintim@tintim.com.br\",\n            \"countryCallingCode\": 55,\n            \"cellphone\": \"19966659986\",\n            \"document\": null\n        },\n    \"orderStatus\": \"canceled\",\n    \"paidValue\": 0,\n    \"customerTag\": [],\n    \"items\": [\n        {\n            \"id\": \"138876\",\n            \"productId\": null,\n            \"name\": \"Tênis Casual Feminino 34\",\n            \"categoryId\": \"210002\",    \n            \"brandId\": \"29300\",\n            \"quantity\": 1,\n            \"price\": 25000,\n            \"listPrice\": 26200,\n            \"redemption\":  1200 \n            \n        }\n    ],\n    \"payments\": [\n        {\n            \"value\": 25000,\n            \"type\": \"promissory\",\n            \"paymentSystem\": \"my-payment\",\n            \"paymentSystemName\": \"My Payment\",\n            \"installments\": 1,\n            \"firstDigits\": \"4569\",\n            \"lastDigits\": \"1236\"\n        }\n    ],\n    \"total_order\": 25000,\n    \"total_item\": 25000,\n    \"total_shipping\": 0,\n    \"total_taxes\": 0,\n    \"total_discounts\": 1200,\n    \"histories\": [\n        {\n            \"status\": \"order-create\",\n            \"reason\": \"Order Create\",\n            \"date\": \"2024-09-27T07:35:00-03:00\"\n        }\n    ],\n    \"createdAt\": \"2024-09-27T10:35:06-03:00\",\n    \"integratedAt\": \"2024-09-27T10:35:06-03:00\",\n    \"indexedAt\": \"2024-09-27T10:36:02-03:00\",\n    \"updatedAt\": \"2024-12-02T11:25:46-03:00\"\n}"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "name": "Ping",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "x-guper-authorization",
                        "value": "{{x-guper-authorization}}",
                        "type": "text",
                        "description": "User token issued by Guper."
                    },
                    {
                        "key": "Content-Type",
                        "value": "{{Content-Type}}",
                        "type": "text",
                        "description": "Always `application/json` for endpoints that accept a JSON body."
                    }
                ],
                "url": {
                    "raw": "https://{{organization}}.myguper.com/api/order/ping",
                    "protocol": "https",
                    "host": [
                        "{{organization}}",
                        "myguper",
                        "com"
                    ],
                    "path": [
                        "api",
                        "order",
                        "ping"
                    ]
                },
                "description": "Returns `pong` to confirm the service is reachable."
            },
            "response": [
                {
                    "name": "Success",
                    "originalRequest": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/ping",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "ping"
                            ]
                        },
                        "description": "Returns `pong` to confirm the service is reachable."
                    },
                    "status": "OK",
                    "code": 200,
                    "_postman_previewlanguage": "json",
                    "header": [
                        {
                            "key": "Content-Type",
                            "value": "application/json"
                        }
                    ],
                    "body": "{\n    \"organization\": \"acme\",\n    \"response\": \"Server online\",\n    \"dateTime\": \"2023-08-11T13:50:08-03:00\"\n}"
                }
            ]
        },
        {
            "name": "Product",
            "item": [
                {
                    "name": "Search products by name",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/product/search",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "product",
                                "search"
                            ]
                        },
                        "description": "> **Superseded by `GET /api/register/event/search`** (register). The audience\n> builder now matches the product name directly via the generic `event` filter\n> (`type=buy_product`) — no name→SKU step. This endpoint still works, but the\n> `boughtSku` / `person_order_item` path is legacy (removed at cutover).\n\nResolves free-text product-name terms into the set of SKUs (`skuRefId`) that\nwere sold under matching names. Powers the **audience builder**: the matched\nSKUs feed the `boughtSku` audience filter in the register service.\n\n`terms` is free text — **whitespace-separated terms are ANDed** (accepts a\nspace-separated string `terms=a b` or repeated `terms[]=a&terms[]=b`).\n`sandalia salto` returns only SKUs whose product name contains *both* words\n(same name string). Matching is case- and accent-insensitive (collation\n`utf8mb4_general_ci`), so `tenis` matches `TÊNIS`.\n\nThe product name comes from `order_item.productName` (a per-line snapshot —\nGuper has no separate product catalog). Results are grouped by `skuRefId`;\neach entry returns a representative `name` and the matched-line count\n(`hits`), ordered by `hits` desc. There is **no `interface` scoping** —\n`skuRefId` is the organization's canonical SKU reference.\n\nAuth: service-to-service RSA `signature` (see *Internal › Integração ›\nSignature*). Organization is taken from the request context.\n\n### Worked example\n\n**1. Search** — find the SKUs named \"sandalia salto\":\n\n```\nGET /api/order/product/search?terms=sandalia%20salto\n```\n```json\n{\n    \"terms\": [\"sandalia\", \"salto\"],\n    \"total\": 1,\n    \"products\": [\n        { \"sku\": \"47142\", \"name\": \"Sandalia Salto Alto 38\", \"hits\": 14 }\n    ]\n}\n```\n\n**2. Build the audience** — feed the returned `sku` values into the register\naudience query as a `boughtSku` filter (here: bought it in the last 3 months):\n\n```json\n[\n    [\"boughtSku\", \"in\", { \"list\": [\"47142\"] }, { \"int\": 3 }]\n]\n```\n\nCombine with other filters via `AND` — e.g. men who bought it: prepend\n`[\"gender\",\"equals\",{\"string\":\"male\"}], \"AND\",`. See *Internal › Services ›\nRegister › Audiência por produto* for the full `boughtSku` reference."
                    },
                    "response": [
                        {
                            "name": "Matched SKUs grouped by `skuRefId`, ordered by `hits` desc.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/product/search",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "product",
                                        "search"
                                    ]
                                },
                                "description": "> **Superseded by `GET /api/register/event/search`** (register). The audience\n> builder now matches the product name directly via the generic `event` filter\n> (`type=buy_product`) — no name→SKU step. This endpoint still works, but the\n> `boughtSku` / `person_order_item` path is legacy (removed at cutover).\n\nResolves free-text product-name terms into the set of SKUs (`skuRefId`) that\nwere sold under matching names. Powers the **audience builder**: the matched\nSKUs feed the `boughtSku` audience filter in the register service.\n\n`terms` is free text — **whitespace-separated terms are ANDed** (accepts a\nspace-separated string `terms=a b` or repeated `terms[]=a&terms[]=b`).\n`sandalia salto` returns only SKUs whose product name contains *both* words\n(same name string). Matching is case- and accent-insensitive (collation\n`utf8mb4_general_ci`), so `tenis` matches `TÊNIS`.\n\nThe product name comes from `order_item.productName` (a per-line snapshot —\nGuper has no separate product catalog). Results are grouped by `skuRefId`;\neach entry returns a representative `name` and the matched-line count\n(`hits`), ordered by `hits` desc. There is **no `interface` scoping** —\n`skuRefId` is the organization's canonical SKU reference.\n\nAuth: service-to-service RSA `signature` (see *Internal › Integração ›\nSignature*). Organization is taken from the request context.\n\n### Worked example\n\n**1. Search** — find the SKUs named \"sandalia salto\":\n\n```\nGET /api/order/product/search?terms=sandalia%20salto\n```\n```json\n{\n    \"terms\": [\"sandalia\", \"salto\"],\n    \"total\": 1,\n    \"products\": [\n        { \"sku\": \"47142\", \"name\": \"Sandalia Salto Alto 38\", \"hits\": 14 }\n    ]\n}\n```\n\n**2. Build the audience** — feed the returned `sku` values into the register\naudience query as a `boughtSku` filter (here: bought it in the last 3 months):\n\n```json\n[\n    [\"boughtSku\", \"in\", { \"list\": [\"47142\"] }, { \"int\": 3 }]\n]\n```\n\nCombine with other filters via `AND` — e.g. men who bought it: prepend\n`[\"gender\",\"equals\",{\"string\":\"male\"}], \"AND\",`. See *Internal › Services ›\nRegister › Audiência por produto* for the full `boughtSku` reference."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n    \"terms\": [\"sandalia\", \"salto\"],\n    \"total\": 1,\n    \"products\": [\n        { \"sku\": \"47142\", \"name\": \"Sandalia Salto Alto 38\", \"hits\": 14 }\n    ]\n}"
                        },
                        {
                            "name": "No terms supplied (`terms` empty) — empty result.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/product/search",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "product",
                                        "search"
                                    ]
                                },
                                "description": "> **Superseded by `GET /api/register/event/search`** (register). The audience\n> builder now matches the product name directly via the generic `event` filter\n> (`type=buy_product`) — no name→SKU step. This endpoint still works, but the\n> `boughtSku` / `person_order_item` path is legacy (removed at cutover).\n\nResolves free-text product-name terms into the set of SKUs (`skuRefId`) that\nwere sold under matching names. Powers the **audience builder**: the matched\nSKUs feed the `boughtSku` audience filter in the register service.\n\n`terms` is free text — **whitespace-separated terms are ANDed** (accepts a\nspace-separated string `terms=a b` or repeated `terms[]=a&terms[]=b`).\n`sandalia salto` returns only SKUs whose product name contains *both* words\n(same name string). Matching is case- and accent-insensitive (collation\n`utf8mb4_general_ci`), so `tenis` matches `TÊNIS`.\n\nThe product name comes from `order_item.productName` (a per-line snapshot —\nGuper has no separate product catalog). Results are grouped by `skuRefId`;\neach entry returns a representative `name` and the matched-line count\n(`hits`), ordered by `hits` desc. There is **no `interface` scoping** —\n`skuRefId` is the organization's canonical SKU reference.\n\nAuth: service-to-service RSA `signature` (see *Internal › Integração ›\nSignature*). Organization is taken from the request context.\n\n### Worked example\n\n**1. Search** — find the SKUs named \"sandalia salto\":\n\n```\nGET /api/order/product/search?terms=sandalia%20salto\n```\n```json\n{\n    \"terms\": [\"sandalia\", \"salto\"],\n    \"total\": 1,\n    \"products\": [\n        { \"sku\": \"47142\", \"name\": \"Sandalia Salto Alto 38\", \"hits\": 14 }\n    ]\n}\n```\n\n**2. Build the audience** — feed the returned `sku` values into the register\naudience query as a `boughtSku` filter (here: bought it in the last 3 months):\n\n```json\n[\n    [\"boughtSku\", \"in\", { \"list\": [\"47142\"] }, { \"int\": 3 }]\n]\n```\n\nCombine with other filters via `AND` — e.g. men who bought it: prepend\n`[\"gender\",\"equals\",{\"string\":\"male\"}], \"AND\",`. See *Internal › Services ›\nRegister › Audiência por produto* for the full `boughtSku` reference."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{ \"terms\": [], \"total\": 0, \"products\": [] }"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Report",
            "item": [
                {
                    "name": "Audience by product — how many clients bought a product or category",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/report/by-product/{{dateStart}}/{{dateEnd}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "report",
                                "by-product",
                                "{{dateStart}}",
                                "{{dateEnd}}"
                            ]
                        },
                        "description": "Clients who **bought a given product** in a window — matched by product name\npattern or SKU — the audience the QON builder can't express, because it has no\nitem, SKU, category or brand column at all. Answers \"who bought luggage over\n$500 this semester\", \"buyers of these SKUs\", in a **single call** instead of\npaging hundreds of thousands of line items and grouping client-side.\n\nMatch by `productNameLike` (a list of patterns, **OR** between them, **case- and\naccent-insensitive**, contains) and/or `skuRefId` (exact). At least one is\nrequired. Narrow by unit price (`unitPriceMin`/`unitPriceMax`) and by pieces\n(`minQuantity`, net of cancellation).\n\n**`price` is the unit price, net of discount** — so `unitPriceMin`/`Max` filter\nthe **unit** directly, not `price/quantity`. This is what separates a real\nproduct from a 1-cent promo gift in the same family. `value` is\n`SUM(price × net quantity)` — money spent on the matching items, in **cents**.\n\nPer row: `pieces` (net quantity bought), `value`, `lastDate`, and\n**`matchedPatterns`** — which of your `productNameLike` patterns the client hit,\nso you can show **why** each one is in the audience. The window and `lastDate`\nare in the **org timezone**. Rows are paginated (`e`/`p`); `total` is the full\naudience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these lists\"\nand \"must have contact\" filters. Enrich and filter with the register operations,\nand close the loop with `register.audience-list.person.create` (which takes the\nclient ids).\n\n**Name matching inherits the POS naming mess.** `category`/`categoryRefId` come\nin empty or inconsistent on some orgs (Cloe included), so name is the reliable\nkey today — but it carries legacy spellings and external-ref patterns. Widen\n`productNameLike` when in doubt, and read `matchedPatterns` to see what actually\ncaught."
                    },
                    "response": [
                        {
                            "name": "OK — luggage buyers, unit over $500",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/by-product/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "by-product",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Clients who **bought a given product** in a window — matched by product name\npattern or SKU — the audience the QON builder can't express, because it has no\nitem, SKU, category or brand column at all. Answers \"who bought luggage over\n$500 this semester\", \"buyers of these SKUs\", in a **single call** instead of\npaging hundreds of thousands of line items and grouping client-side.\n\nMatch by `productNameLike` (a list of patterns, **OR** between them, **case- and\naccent-insensitive**, contains) and/or `skuRefId` (exact). At least one is\nrequired. Narrow by unit price (`unitPriceMin`/`unitPriceMax`) and by pieces\n(`minQuantity`, net of cancellation).\n\n**`price` is the unit price, net of discount** — so `unitPriceMin`/`Max` filter\nthe **unit** directly, not `price/quantity`. This is what separates a real\nproduct from a 1-cent promo gift in the same family. `value` is\n`SUM(price × net quantity)` — money spent on the matching items, in **cents**.\n\nPer row: `pieces` (net quantity bought), `value`, `lastDate`, and\n**`matchedPatterns`** — which of your `productNameLike` patterns the client hit,\nso you can show **why** each one is in the audience. The window and `lastDate`\nare in the **org timezone**. Rows are paginated (`e`/`p`); `total` is the full\naudience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these lists\"\nand \"must have contact\" filters. Enrich and filter with the register operations,\nand close the loop with `register.audience-list.person.create` (which takes the\nclient ids).\n\n**Name matching inherits the POS naming mess.** `category`/`categoryRefId` come\nin empty or inconsistent on some orgs (Cloe included), so name is the reliable\nkey today — but it carries legacy spellings and external-ref patterns. Widen\n`productNameLike` when in doubt, and read `matchedPatterns` to see what actually\ncaught."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"meta\": {\n    \"unit\": \"cents\", \"timezone\": \"America/Mexico_City\",\n    \"filters\": {\n      \"productNameLike\": [\"EQUIPAJE VERTICAL\",\"EQUIPAJE VIAJE\",\"SET DE VIAJE\",\"MALETA\"],\n      \"skuRefId\": [], \"unitPriceMin\": 50000, \"unitPriceMax\": null,\n      \"minQuantity\": 1, \"status\": \"completed\"\n    }\n  },\n  \"rows\": [\n    { \"client\": 4134488, \"pieces\": 5, \"value\": 958795715, \"lastDate\": \"2026-06-01\",\n      \"matchedPatterns\": [\"EQUIPAJE VERTICAL\",\"EQUIPAJE VIAJE\",\"SET DE VIAJE\"] }\n  ],\n  \"total\": 4624,\n  \"pagination\": { \"entries\": 100, \"currentPage\": 1, \"totalPages\": 47, \"isInitial\": true, \"isEnd\": false }\n}"
                        },
                        {
                            "name": "Neither productNameLike nor skuRefId given, invalid `status`, unitPriceMin > unitPriceMax, or dateStart after dateEnd.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/by-product/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "by-product",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Clients who **bought a given product** in a window — matched by product name\npattern or SKU — the audience the QON builder can't express, because it has no\nitem, SKU, category or brand column at all. Answers \"who bought luggage over\n$500 this semester\", \"buyers of these SKUs\", in a **single call** instead of\npaging hundreds of thousands of line items and grouping client-side.\n\nMatch by `productNameLike` (a list of patterns, **OR** between them, **case- and\naccent-insensitive**, contains) and/or `skuRefId` (exact). At least one is\nrequired. Narrow by unit price (`unitPriceMin`/`unitPriceMax`) and by pieces\n(`minQuantity`, net of cancellation).\n\n**`price` is the unit price, net of discount** — so `unitPriceMin`/`Max` filter\nthe **unit** directly, not `price/quantity`. This is what separates a real\nproduct from a 1-cent promo gift in the same family. `value` is\n`SUM(price × net quantity)` — money spent on the matching items, in **cents**.\n\nPer row: `pieces` (net quantity bought), `value`, `lastDate`, and\n**`matchedPatterns`** — which of your `productNameLike` patterns the client hit,\nso you can show **why** each one is in the audience. The window and `lastDate`\nare in the **org timezone**. Rows are paginated (`e`/`p`); `total` is the full\naudience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these lists\"\nand \"must have contact\" filters. Enrich and filter with the register operations,\nand close the loop with `register.audience-list.person.create` (which takes the\nclient ids).\n\n**Name matching inherits the POS naming mess.** `category`/`categoryRefId` come\nin empty or inconsistent on some orgs (Cloe included), so name is the reliable\nkey today — but it carries legacy spellings and external-ref patterns. Widen\n`productNameLike` when in doubt, and read `matchedPatterns` to see what actually\ncaught."
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": ""
                        }
                    ]
                },
                {
                    "name": "Top products sold",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/report/products/{{dateStart}}/{{dateEnd}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "report",
                                "products",
                                "{{dateStart}}",
                                "{{dateEnd}}"
                            ]
                        },
                        "description": "The answer to \"what sold most\", \"top products by revenue\", \"units per SKU\",\nin a **single call** — instead of paging line items and grouping client-side.\nRanks sold items (`order_item`) by product, SKU, category or brand, in the\n**same scope as the sales report** (org, window in the org timezone, store,\nstatus).\n\nPer row: `units` (quantity sold), `unitsCanceled`, `revenue`, `orders` (how\nmany orders included it) and `lines`. Rows are the **top N by revenue**\n(`limit`, default 50); the `total` covers **every** item in the period, not\njust the top.\n\n**Break it down by store or time in one call.** `groupBy` takes a comma list:\nthe first token is the item dimension (`product`/`sku`/`category`/`brand`) and\nyou may add `store` and/or one time grain (`day`/`week`/`month`) — e.g.\n`groupBy=product,store`, `sku,week`, `product,store,month`. With a breakdown the\n`limit` picks the **top items for the whole period** and each row is one cell\n(item × store × period), so you get the per-store or weekly split without one\ncall per store. Each row then carries `storeId`, `day` (YYYY-MM-DD), `week`\n(YYYY-Www, ISO) or `month` (YYYY-MM) as applicable; a cell with no sales is not\nemitted.\n\n**`revenue` is line revenue** — `SUM(price × quantity)`, where `price` is the\nitem's unit price net of the item discount. It is **not** the order total, and\ndoes **not** match the sales report's revenue: order-level discounts and\nadjustments are not pushed down to the item price, so the sum of the lines runs\nhigher (≈+20% measured). Use this for **product ranking**; use\n`order.report.sales` for revenue/billing. Values are in **cents**.\n\n`category` and `brand` come from **partial ingestion** and are sparse today\n(single-digit % on some orgs). The endpoint is ready for them now and fills in\nas ingestion improves — read `meta.coverage` (the fraction of items and revenue\nthat carry a category/brand) so a breakdown covering 5% of the period is not\nmistaken for the whole. Rows with a null id are the items missing that field.\n`order_item` stores no category/brand **name**, only the id and external refId."
                    },
                    "response": [
                        {
                            "name": "OK — with `groupBy=product`",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/products/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "products",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "The answer to \"what sold most\", \"top products by revenue\", \"units per SKU\",\nin a **single call** — instead of paging line items and grouping client-side.\nRanks sold items (`order_item`) by product, SKU, category or brand, in the\n**same scope as the sales report** (org, window in the org timezone, store,\nstatus).\n\nPer row: `units` (quantity sold), `unitsCanceled`, `revenue`, `orders` (how\nmany orders included it) and `lines`. Rows are the **top N by revenue**\n(`limit`, default 50); the `total` covers **every** item in the period, not\njust the top.\n\n**Break it down by store or time in one call.** `groupBy` takes a comma list:\nthe first token is the item dimension (`product`/`sku`/`category`/`brand`) and\nyou may add `store` and/or one time grain (`day`/`week`/`month`) — e.g.\n`groupBy=product,store`, `sku,week`, `product,store,month`. With a breakdown the\n`limit` picks the **top items for the whole period** and each row is one cell\n(item × store × period), so you get the per-store or weekly split without one\ncall per store. Each row then carries `storeId`, `day` (YYYY-MM-DD), `week`\n(YYYY-Www, ISO) or `month` (YYYY-MM) as applicable; a cell with no sales is not\nemitted.\n\n**`revenue` is line revenue** — `SUM(price × quantity)`, where `price` is the\nitem's unit price net of the item discount. It is **not** the order total, and\ndoes **not** match the sales report's revenue: order-level discounts and\nadjustments are not pushed down to the item price, so the sum of the lines runs\nhigher (≈+20% measured). Use this for **product ranking**; use\n`order.report.sales` for revenue/billing. Values are in **cents**.\n\n`category` and `brand` come from **partial ingestion** and are sparse today\n(single-digit % on some orgs). The endpoint is ready for them now and fills in\nas ingestion improves — read `meta.coverage` (the fraction of items and revenue\nthat carry a category/brand) so a breakdown covering 5% of the period is not\nmistaken for the whole. Rows with a null id are the items missing that field.\n`order_item` stores no category/brand **name**, only the id and external refId."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"meta\": {\n    \"unit\": \"cents\", \"timezone\": \"Etc/GMT+6\",\n    \"groupBy\": \"product\", \"breakdown\": [], \"limit\": 50,\n    \"filters\": { \"store\": null, \"status\": \"all except canceled (default)\" },\n    \"coverage\": {\n      \"category\": { \"items\": 0.049, \"revenue\": 0.065 },\n      \"brand\":    { \"items\": 0.049, \"revenue\": 0.061 }\n    }\n  },\n  \"rows\": [\n    { \"productId\": 0, \"productName\": \"I-2 BILLETERA CLOE P25 564 ROSA /FLAP GR\",\n      \"units\": 256, \"unitsCanceled\": 0, \"revenue\": 122482432, \"orders\": 115, \"lines\": 121 }\n  ],\n  \"total\": { \"units\": 60663, \"unitsCanceled\": 0, \"revenue\": 6124205576, \"orders\": 24815, \"lines\": 56403 }\n}"
                        },
                        {
                            "name": "Invalid `groupBy` (unknown dimension/breakdown, or more than one time grain), invalid `status`, or `dateStart` after `dateEnd`.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/products/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "products",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "The answer to \"what sold most\", \"top products by revenue\", \"units per SKU\",\nin a **single call** — instead of paging line items and grouping client-side.\nRanks sold items (`order_item`) by product, SKU, category or brand, in the\n**same scope as the sales report** (org, window in the org timezone, store,\nstatus).\n\nPer row: `units` (quantity sold), `unitsCanceled`, `revenue`, `orders` (how\nmany orders included it) and `lines`. Rows are the **top N by revenue**\n(`limit`, default 50); the `total` covers **every** item in the period, not\njust the top.\n\n**Break it down by store or time in one call.** `groupBy` takes a comma list:\nthe first token is the item dimension (`product`/`sku`/`category`/`brand`) and\nyou may add `store` and/or one time grain (`day`/`week`/`month`) — e.g.\n`groupBy=product,store`, `sku,week`, `product,store,month`. With a breakdown the\n`limit` picks the **top items for the whole period** and each row is one cell\n(item × store × period), so you get the per-store or weekly split without one\ncall per store. Each row then carries `storeId`, `day` (YYYY-MM-DD), `week`\n(YYYY-Www, ISO) or `month` (YYYY-MM) as applicable; a cell with no sales is not\nemitted.\n\n**`revenue` is line revenue** — `SUM(price × quantity)`, where `price` is the\nitem's unit price net of the item discount. It is **not** the order total, and\ndoes **not** match the sales report's revenue: order-level discounts and\nadjustments are not pushed down to the item price, so the sum of the lines runs\nhigher (≈+20% measured). Use this for **product ranking**; use\n`order.report.sales` for revenue/billing. Values are in **cents**.\n\n`category` and `brand` come from **partial ingestion** and are sparse today\n(single-digit % on some orgs). The endpoint is ready for them now and fills in\nas ingestion improves — read `meta.coverage` (the fraction of items and revenue\nthat carry a category/brand) so a breakdown covering 5% of the period is not\nmistaken for the whole. Rows with a null id are the items missing that field.\n`order_item` stores no category/brand **name**, only the id and external refId."
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": ""
                        }
                    ]
                },
                {
                    "name": "Audience by purchase frequency",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/report/purchase-frequency/{{dateStart}}/{{dateEnd}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "report",
                                "purchase-frequency",
                                "{{dateStart}}",
                                "{{dateEnd}}"
                            ]
                        },
                        "description": "Clients who bought **N times in a window**, with an optional **value floor per\npurchase** — the audience the QON builder can't express, because its RFM is\n**lifetime** (no window) and has no notion of a purchase *day*. Answers \"who\nbought 3+ times over $X this semester\", \"high-value repeat buyers\", \"spent more\nthan $Y since January\", in a **single call** instead of paging orders and\naggregating client-side.\n\nAn **occurrence** is an order (`groupBy=order`) or a **purchase day**\n(`groupBy=purchase_day`), where the tickets of the same day are **summed** —\nretail splits one purchase across several tickets, so the day, not the order, is\nthe unit the campaign means. On Cloe's 2026 this is 14% of the audience.\n\n`valueMode` sets the floor: `all` = **every** occurrence ≥ `valueMin` (recurring\nhigh value); `any` = at least one; `sum` = the window total. `valueMin` is in\n**cents**, inclusive. `minOccurrences` is the minimum count of orders/days.\n\nPer row: `occurrences` (count), `value` (window total), `minValue`/`maxValue`\n(smallest/largest occurrence) and `lastDate` — the diagnostics that let you show\n**why** each client qualified. Values are in **cents**; the window and the day\nare cut from `order_date` in the **org timezone**, like the sales report. Rows\nare paginated (`e`/`p`); `total` is the full audience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these\nexperiment lists\" and \"must have contact\" filters. Enrich and filter with the\nregister operations, and close the loop with\n`register.audience-list.person.create` (which takes the client ids) — no CSV in\nthe middle."
                    },
                    "response": [
                        {
                            "name": "OK — `groupBy=purchase_day`, `minOccurrences=2`, `valueMin=300000`, `valueMode=all`",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/purchase-frequency/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "purchase-frequency",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Clients who bought **N times in a window**, with an optional **value floor per\npurchase** — the audience the QON builder can't express, because its RFM is\n**lifetime** (no window) and has no notion of a purchase *day*. Answers \"who\nbought 3+ times over $X this semester\", \"high-value repeat buyers\", \"spent more\nthan $Y since January\", in a **single call** instead of paging orders and\naggregating client-side.\n\nAn **occurrence** is an order (`groupBy=order`) or a **purchase day**\n(`groupBy=purchase_day`), where the tickets of the same day are **summed** —\nretail splits one purchase across several tickets, so the day, not the order, is\nthe unit the campaign means. On Cloe's 2026 this is 14% of the audience.\n\n`valueMode` sets the floor: `all` = **every** occurrence ≥ `valueMin` (recurring\nhigh value); `any` = at least one; `sum` = the window total. `valueMin` is in\n**cents**, inclusive. `minOccurrences` is the minimum count of orders/days.\n\nPer row: `occurrences` (count), `value` (window total), `minValue`/`maxValue`\n(smallest/largest occurrence) and `lastDate` — the diagnostics that let you show\n**why** each client qualified. Values are in **cents**; the window and the day\nare cut from `order_date` in the **org timezone**, like the sales report. Rows\nare paginated (`e`/`p`); `total` is the full audience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these\nexperiment lists\" and \"must have contact\" filters. Enrich and filter with the\nregister operations, and close the loop with\n`register.audience-list.person.create` (which takes the client ids) — no CSV in\nthe middle."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"meta\": {\n    \"unit\": \"cents\", \"timezone\": \"America/Mexico_City\",\n    \"groupBy\": \"purchase_day\",\n    \"filters\": { \"minOccurrences\": 2, \"valueMin\": 300000, \"valueMode\": \"all\", \"status\": \"completed\" },\n    \"notes\": { \"occurrence\": \"...\", \"valueMode\": \"...\", \"scope\": \"...\" }\n  },\n  \"rows\": [\n    { \"client\": 363050, \"occurrences\": 11, \"value\": 546004833,\n      \"minValue\": 2512579, \"maxValue\": 166735504, \"lastDate\": \"2026-08-25\" }\n  ],\n  \"total\": 1339,\n  \"pagination\": { \"entries\": 100, \"currentPage\": 1, \"totalPages\": 14, \"isInitial\": true, \"isEnd\": false }\n}"
                        },
                        {
                            "name": "Invalid `groupBy`, `valueMode` or `status`, or `dateStart` after `dateEnd`.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/purchase-frequency/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "purchase-frequency",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Clients who bought **N times in a window**, with an optional **value floor per\npurchase** — the audience the QON builder can't express, because its RFM is\n**lifetime** (no window) and has no notion of a purchase *day*. Answers \"who\nbought 3+ times over $X this semester\", \"high-value repeat buyers\", \"spent more\nthan $Y since January\", in a **single call** instead of paging orders and\naggregating client-side.\n\nAn **occurrence** is an order (`groupBy=order`) or a **purchase day**\n(`groupBy=purchase_day`), where the tickets of the same day are **summed** —\nretail splits one purchase across several tickets, so the day, not the order, is\nthe unit the campaign means. On Cloe's 2026 this is 14% of the audience.\n\n`valueMode` sets the floor: `all` = **every** occurrence ≥ `valueMin` (recurring\nhigh value); `any` = at least one; `sum` = the window total. `valueMin` is in\n**cents**, inclusive. `minOccurrences` is the minimum count of orders/days.\n\nPer row: `occurrences` (count), `value` (window total), `minValue`/`maxValue`\n(smallest/largest occurrence) and `lastDate` — the diagnostics that let you show\n**why** each client qualified. Values are in **cents**; the window and the day\nare cut from `order_date` in the **org timezone**, like the sales report. Rows\nare paginated (`e`/`p`); `total` is the full audience size.\n\n**This is the order side only — `client` id + metrics.** Name, email, phone,\nlast store and store group live in **register**; so do the \"exclude these\nexperiment lists\" and \"must have contact\" filters. Enrich and filter with the\nregister operations, and close the loop with\n`register.audience-list.person.create` (which takes the client ids) — no CSV in\nthe middle."
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": ""
                        }
                    ]
                },
                {
                    "name": "Sales & revenue report: by day/store, dashboard, campaign attribution",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "x-guper-authorization",
                                "value": "{{x-guper-authorization}}",
                                "type": "text",
                                "description": "User token issued by Guper."
                            },
                            {
                                "key": "Content-Type",
                                "value": "{{Content-Type}}",
                                "type": "text",
                                "description": "Always `application/json` for endpoints that accept a JSON body."
                            }
                        ],
                        "url": {
                            "raw": "https://{{organization}}.myguper.com/api/order/report/sales/{{dateStart}}/{{dateEnd}}",
                            "protocol": "https",
                            "host": [
                                "{{organization}}",
                                "myguper",
                                "com"
                            ],
                            "path": [
                                "api",
                                "order",
                                "report",
                                "sales",
                                "{{dateStart}}",
                                "{{dateEnd}}"
                            ]
                        },
                        "description": "Aggregated sales/revenue for a period, broken down by day, month, store or\nintegration channel (`interface`) — the answer to \"how much did I sell\nyesterday\", \"revenue by store this month\", \"sales per channel\", \"average\nticket per period\". Returns totals plus a per-status breakdown; each row/total\ncarries `revenue` and `discounts`. Filter to a cohort with `client`.\n\n**Revenue is net of cancellations by default** (canceled orders are excluded\nfrom the total). The `byStatus` block always reports every status, including\ncanceled, so what was left out stays auditable.\n\nEvery total carries **`mix`**, the revenue broken down from list price to what\nactually came in — the answer to \"what is my net revenue\", \"how much did I\ngive away in discount\", \"what did the loyalty program cost me\":\n\n| field | meaning |\n|---|---|\n| `listRevenue` | list price — `revenue + discounts` |\n| `discount` | what the store gave up |\n| `incentive` | balance the program paid (`null` without `withAttribution`) |\n| `netRevenue` | what came in — `revenue − incentive` (`null` without `withAttribution`) |\n| `averageTicket` | **ASP**, the average price actually charged |\n| `listAverageTicket` | **OSP**, the average list price, before discount |\n\n⚠️ **`revenue` is already net of the commercial discount** — an item's `price`\nis the unit price after discount. So list price is `revenue` **plus**\n`discounts`, not minus. Subtracting the discount from `revenue` counts it\ntwice, and it is the most common way to get this number wrong.\n\n⚠️ Do **not** confuse `mix` with `attribution.revenueGross` / `revenueNet`:\nthose are scoped to the attributed orders only, while `mix` is the whole\nbusiness.\n\n⚠️ `listRevenue` and `listAverageTicket` are only as good as `total_discounts`.\nWhere the integration does not send \"list price minus sale price\" the number\ndoes not hold — `ordersDiscountOverRevenue`, in the same total, counts the\norders whose discount is bigger than the sale itself.\n\nEvery total and row also carries the headline counts: **`orders`**, **`revenue`**,\n**`averageTicket`**, and **`customersIdentified`** — the number of **unique\nbuyers** (distinct customers, `COUNT(DISTINCT client)`): how many different\npeople bought — plus **`ordersIdentified`** / **`ordersAnonymous`** (orders with\nvs. without an identified customer). So \"sales by day with average ticket and\nunique buyers\" is a single call: this report with `groupBy=day` (add\n`membership=member` for members only). `customersIdentified` counts identified\nbuyers only — an anonymous order has no customer to count.\n\nPass **`compareWith`** to get a period-over-period comparison: the response\nadds a `comparison` block with the baseline period's total and the `delta`\n(absolute and percent) on orders, revenue and average ticket — so you can\nanswer \"sold X, +12% vs last month\".\n\nPass **`withAttribution`** for revenue **attributed to campaigns** — the total\nvalue of the **sales where a campaign's cashback / balance was redeemed** or\nwhose message drove the purchase, and the same broken down **per campaign**\n(`topCampaigns=N`), so you can answer \"how much did campaign X's cashback\ngenerate\" and the **ticket per campaign**. This is influenced revenue, not\nincremental. The block also splits **attributed** sales (balance redeemed),\n**influenced** ones (only got the message and bought) and the **impacted**\ntotal (the sum) in `split`. Within the attributed sales, `split` also separates\n**cashback** (redeemed, no push) from **push** (redeemed *and* a push\nnotification — push wins the tie), so you can read the push-assisted revenue\napart from organic cashback; `cashback + push = attributed`. The split is in\n`byDay` and in the `byStore`/`byInterface` breakdowns too (cashback vs push by\nchannel and month).\n\nValues are in **cents**. The day is cut from `order_date` (the business date)\nconverted to the organization timezone, so a sale rings up on the day it\nhappened, not the day it synced. `updatedThrough` is the newest `createAt`\nthat entered the calculation — because orders arrive after the sale,\n\"yesterday\" is a moving number; use it to decide whether to refetch.\n\nSupersedes `financeSumary`, which summed cancellations, dropped the last day\nof the period and grouped in UTC."
                    },
                    "response": [
                        {
                            "name": "OK — with `compareWith=previous&groupBy=month`",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/sales/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "sales",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Aggregated sales/revenue for a period, broken down by day, month, store or\nintegration channel (`interface`) — the answer to \"how much did I sell\nyesterday\", \"revenue by store this month\", \"sales per channel\", \"average\nticket per period\". Returns totals plus a per-status breakdown; each row/total\ncarries `revenue` and `discounts`. Filter to a cohort with `client`.\n\n**Revenue is net of cancellations by default** (canceled orders are excluded\nfrom the total). The `byStatus` block always reports every status, including\ncanceled, so what was left out stays auditable.\n\nEvery total carries **`mix`**, the revenue broken down from list price to what\nactually came in — the answer to \"what is my net revenue\", \"how much did I\ngive away in discount\", \"what did the loyalty program cost me\":\n\n| field | meaning |\n|---|---|\n| `listRevenue` | list price — `revenue + discounts` |\n| `discount` | what the store gave up |\n| `incentive` | balance the program paid (`null` without `withAttribution`) |\n| `netRevenue` | what came in — `revenue − incentive` (`null` without `withAttribution`) |\n| `averageTicket` | **ASP**, the average price actually charged |\n| `listAverageTicket` | **OSP**, the average list price, before discount |\n\n⚠️ **`revenue` is already net of the commercial discount** — an item's `price`\nis the unit price after discount. So list price is `revenue` **plus**\n`discounts`, not minus. Subtracting the discount from `revenue` counts it\ntwice, and it is the most common way to get this number wrong.\n\n⚠️ Do **not** confuse `mix` with `attribution.revenueGross` / `revenueNet`:\nthose are scoped to the attributed orders only, while `mix` is the whole\nbusiness.\n\n⚠️ `listRevenue` and `listAverageTicket` are only as good as `total_discounts`.\nWhere the integration does not send \"list price minus sale price\" the number\ndoes not hold — `ordersDiscountOverRevenue`, in the same total, counts the\norders whose discount is bigger than the sale itself.\n\nEvery total and row also carries the headline counts: **`orders`**, **`revenue`**,\n**`averageTicket`**, and **`customersIdentified`** — the number of **unique\nbuyers** (distinct customers, `COUNT(DISTINCT client)`): how many different\npeople bought — plus **`ordersIdentified`** / **`ordersAnonymous`** (orders with\nvs. without an identified customer). So \"sales by day with average ticket and\nunique buyers\" is a single call: this report with `groupBy=day` (add\n`membership=member` for members only). `customersIdentified` counts identified\nbuyers only — an anonymous order has no customer to count.\n\nPass **`compareWith`** to get a period-over-period comparison: the response\nadds a `comparison` block with the baseline period's total and the `delta`\n(absolute and percent) on orders, revenue and average ticket — so you can\nanswer \"sold X, +12% vs last month\".\n\nPass **`withAttribution`** for revenue **attributed to campaigns** — the total\nvalue of the **sales where a campaign's cashback / balance was redeemed** or\nwhose message drove the purchase, and the same broken down **per campaign**\n(`topCampaigns=N`), so you can answer \"how much did campaign X's cashback\ngenerate\" and the **ticket per campaign**. This is influenced revenue, not\nincremental. The block also splits **attributed** sales (balance redeemed),\n**influenced** ones (only got the message and bought) and the **impacted**\ntotal (the sum) in `split`. Within the attributed sales, `split` also separates\n**cashback** (redeemed, no push) from **push** (redeemed *and* a push\nnotification — push wins the tie), so you can read the push-assisted revenue\napart from organic cashback; `cashback + push = attributed`. The split is in\n`byDay` and in the `byStore`/`byInterface` breakdowns too (cashback vs push by\nchannel and month).\n\nValues are in **cents**. The day is cut from `order_date` (the business date)\nconverted to the organization timezone, so a sale rings up on the day it\nhappened, not the day it synced. `updatedThrough` is the newest `createAt`\nthat entered the calculation — because orders arrive after the sale,\n\"yesterday\" is a moving number; use it to decide whether to refetch.\n\nSupersedes `financeSumary`, which summed cancellations, dropped the last day\nof the period and grouped in UTC."
                            },
                            "status": "OK",
                            "code": 200,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": "{\n  \"meta\": {\n    \"unit\": \"cents\",\n    \"timezone\": \"America/Sao_Paulo\",\n    \"groupBy\": [\"month\"],\n    \"filters\": { \"store\": null, \"status\": \"all except canceled (default)\" }\n  },\n  \"rows\": [\n    { \"month\": \"2026-08\", \"orders\": 22431, \"revenue\": 4936614695,\n      \"discounts\": 261093017, \"averageTicket\": 220080, \"customersIdentified\": 13445,\n      \"ordersIdentified\": 22283, \"ordersAnonymous\": 148 }\n  ],\n  \"total\": {\n    \"orders\": 22431, \"revenue\": 4936614695, \"discounts\": 261093017, \"averageTicket\": 220080,\n    \"customersIdentified\": 13445, \"ordersIdentified\": 22283, \"ordersAnonymous\": 148\n  },\n  \"byStatus\": [\n    { \"status\": \"completed\", \"orders\": 22431, \"revenue\": 4936614695 },\n    { \"status\": \"canceled\",  \"orders\": 448,   \"revenue\": 113308848 }\n  ],\n  \"updatedThrough\": \"2026-09-02 18:05:03\",\n  \"comparison\": {\n    \"period\": { \"start\": \"2026-07-01\", \"end\": \"2026-07-31\", \"label\": \"previous\" },\n    \"total\": {\n      \"orders\": 23633, \"revenue\": 4585023678, \"averageTicket\": 194009,\n      \"customersIdentified\": 14139, \"ordersIdentified\": 23490, \"ordersAnonymous\": 143\n    },\n    \"delta\": {\n      \"orders\":        { \"abs\": -1202,      \"pct\": -0.0509 },\n      \"revenue\":       { \"abs\": 351591017,  \"pct\": 0.0767 },\n      \"averageTicket\": { \"abs\": 26071,      \"pct\": 0.1344 }\n    }\n  }\n}"
                        },
                        {
                            "name": "Invalid `groupBy`, `status`, `compareWith`, or `dateStart` after `dateEnd`.",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "x-guper-authorization",
                                        "value": "{{x-guper-authorization}}",
                                        "type": "text",
                                        "description": "User token issued by Guper."
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{Content-Type}}",
                                        "type": "text",
                                        "description": "Always `application/json` for endpoints that accept a JSON body."
                                    }
                                ],
                                "url": {
                                    "raw": "https://{{organization}}.myguper.com/api/order/report/sales/{{dateStart}}/{{dateEnd}}",
                                    "protocol": "https",
                                    "host": [
                                        "{{organization}}",
                                        "myguper",
                                        "com"
                                    ],
                                    "path": [
                                        "api",
                                        "order",
                                        "report",
                                        "sales",
                                        "{{dateStart}}",
                                        "{{dateEnd}}"
                                    ]
                                },
                                "description": "Aggregated sales/revenue for a period, broken down by day, month, store or\nintegration channel (`interface`) — the answer to \"how much did I sell\nyesterday\", \"revenue by store this month\", \"sales per channel\", \"average\nticket per period\". Returns totals plus a per-status breakdown; each row/total\ncarries `revenue` and `discounts`. Filter to a cohort with `client`.\n\n**Revenue is net of cancellations by default** (canceled orders are excluded\nfrom the total). The `byStatus` block always reports every status, including\ncanceled, so what was left out stays auditable.\n\nEvery total carries **`mix`**, the revenue broken down from list price to what\nactually came in — the answer to \"what is my net revenue\", \"how much did I\ngive away in discount\", \"what did the loyalty program cost me\":\n\n| field | meaning |\n|---|---|\n| `listRevenue` | list price — `revenue + discounts` |\n| `discount` | what the store gave up |\n| `incentive` | balance the program paid (`null` without `withAttribution`) |\n| `netRevenue` | what came in — `revenue − incentive` (`null` without `withAttribution`) |\n| `averageTicket` | **ASP**, the average price actually charged |\n| `listAverageTicket` | **OSP**, the average list price, before discount |\n\n⚠️ **`revenue` is already net of the commercial discount** — an item's `price`\nis the unit price after discount. So list price is `revenue` **plus**\n`discounts`, not minus. Subtracting the discount from `revenue` counts it\ntwice, and it is the most common way to get this number wrong.\n\n⚠️ Do **not** confuse `mix` with `attribution.revenueGross` / `revenueNet`:\nthose are scoped to the attributed orders only, while `mix` is the whole\nbusiness.\n\n⚠️ `listRevenue` and `listAverageTicket` are only as good as `total_discounts`.\nWhere the integration does not send \"list price minus sale price\" the number\ndoes not hold — `ordersDiscountOverRevenue`, in the same total, counts the\norders whose discount is bigger than the sale itself.\n\nEvery total and row also carries the headline counts: **`orders`**, **`revenue`**,\n**`averageTicket`**, and **`customersIdentified`** — the number of **unique\nbuyers** (distinct customers, `COUNT(DISTINCT client)`): how many different\npeople bought — plus **`ordersIdentified`** / **`ordersAnonymous`** (orders with\nvs. without an identified customer). So \"sales by day with average ticket and\nunique buyers\" is a single call: this report with `groupBy=day` (add\n`membership=member` for members only). `customersIdentified` counts identified\nbuyers only — an anonymous order has no customer to count.\n\nPass **`compareWith`** to get a period-over-period comparison: the response\nadds a `comparison` block with the baseline period's total and the `delta`\n(absolute and percent) on orders, revenue and average ticket — so you can\nanswer \"sold X, +12% vs last month\".\n\nPass **`withAttribution`** for revenue **attributed to campaigns** — the total\nvalue of the **sales where a campaign's cashback / balance was redeemed** or\nwhose message drove the purchase, and the same broken down **per campaign**\n(`topCampaigns=N`), so you can answer \"how much did campaign X's cashback\ngenerate\" and the **ticket per campaign**. This is influenced revenue, not\nincremental. The block also splits **attributed** sales (balance redeemed),\n**influenced** ones (only got the message and bought) and the **impacted**\ntotal (the sum) in `split`. Within the attributed sales, `split` also separates\n**cashback** (redeemed, no push) from **push** (redeemed *and* a push\nnotification — push wins the tie), so you can read the push-assisted revenue\napart from organic cashback; `cashback + push = attributed`. The split is in\n`byDay` and in the `byStore`/`byInterface` breakdowns too (cashback vs push by\nchannel and month).\n\nValues are in **cents**. The day is cut from `order_date` (the business date)\nconverted to the organization timezone, so a sale rings up on the day it\nhappened, not the day it synced. `updatedThrough` is the newest `createAt`\nthat entered the calculation — because orders arrive after the sale,\n\"yesterday\" is a moving number; use it to decide whether to refetch.\n\nSupersedes `financeSumary`, which summed cancellations, dropped the last day\nof the period and grouped in UTC."
                            },
                            "status": "Bad Request",
                            "code": 400,
                            "_postman_previewlanguage": "json",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "body": ""
                        }
                    ]
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "scheme",
            "value": "https",
            "type": "string"
        },
        {
            "key": "organization",
            "value": "acme",
            "type": "string"
        },
        {
            "key": "TID",
            "value": "tx_demo_a1b2c3d4",
            "type": "string"
        },
        {
            "key": "confirmToken",
            "value": "54eb6281f4e3e13671a5e4c95609f4a69247a5f38d01bef99768399bb6645c49",
            "type": "string"
        },
        {
            "key": "hash",
            "value": "h_demo_abc123def456",
            "type": "string"
        },
        {
            "key": "id",
            "value": "42",
            "type": "string"
        },
        {
            "key": "personId",
            "value": "1234",
            "type": "string"
        },
        {
            "key": "couponCode",
            "value": "DEMO20",
            "type": "string"
        },
        {
            "key": "transactionId",
            "value": "tx_demo_a1b2c3d4",
            "type": "string"
        },
        {
            "key": "dateStart",
            "value": "2024-04-01",
            "type": "string"
        },
        {
            "key": "dateEnd",
            "value": "2024-04-30",
            "type": "string"
        },
        {
            "key": "x-guper-authorization",
            "value": "48c70a3d6bc1d15104abfaee80c6010f348713f5315bfd12028c2455667685a2",
            "type": "string"
        },
        {
            "key": "Content-Type",
            "value": "application/json",
            "type": "string"
        },
        {
            "key": "User-Agent",
            "value": "guper-docs/2.x",
            "type": "string"
        },
        {
            "key": "environment",
            "value": "",
            "type": "string"
        }
    ]
}