Entrar

Reward: Buscar

POST https://{organization}.myguper.com/api/loyalty/reward/search

Calcula o reward (cashback / promotion / points) que um pedido receberia — mesmo engine de Acúmulo por pedido mas exposto como endpoint avulso de busca. Retorna um hash/confirmToken que pode ser usado depois em redeem/settle.

Try-it values populated from environment ACME (Demo)


Autenticação

Token

Send your user token in the x-guper-authorization header. Endpoints that support a Public mode (e.g. acúmulo and resgate previews) accept the same request without the header — Private mode adds customer data and a confirmation token to the response.

Cabeçalhos

Name Type Description
x-guper-authorization * string User token issued by Guper. Omit only on endpoints that explicitly support a Public mode.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Corpo da requisição

Content-Type: application/json

{
    "interface": "generic",
    "storeId": "1",
    "client": {                                                 // optional
        "id": 47,                                               // optional
        "refId": "3143c4fb",                                    // optional
        "name": "Trifólio Girassol",                            // optional
        "countryCallingCode": 55,                               // optional
        "cellphone": "19954264546",                             // optional
        "email": "trifolio@girassol.com",                       // optional
        "document": "<document>"                                // optional
    },
    "items": [
        {
            "id": "1",
            "name": "Smartphone Guper MK1",
            "quantity": 1,
            "price": 96390,                                     // cents
            "listPrice": 100000,                                // optional, cents
            "categoryId": "<categoryId>",                       // optional
            "brandId": "<brandId>",                             // optional
            "tax": 0                                            // optional, cents
        }
    ],
    "total_order": 97390,                                       // optional, cents
    "total_item": 96390,                                        // optional, cents
    "total_shipping": 2000,                                     // optional, cents
    "total_discounts": 1000                                     // optional, cents
}

Respostas

Relacionados

Copied to clipboard