Sign in

List

GET https://{organization}.myguper.com/api/loyalty/rule

Returns the paginated list of loyalty rules.

Try-it values populated from environment ACME (Demo)


Authentication

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.

Headers

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.

Query parameters

Name Type Description
q[column][operator] string Filter using the `q[column][operator]=value` grammar. See [List query parameters](/docs/{lang}/guides/list-query-parameters) for the full operator table.
o[column] string Sort by column. Direction: `ASC`, `DESC`, `1` or `0`.
e integer Items per page. Max `1000`. `0` for unlimited.
default: 20
p integer Page number (≥ 1).
default: 1

Responses

{
    "list": [
        {
            "id": 1,
            "name": "Compra de valor",
            "class": "Rule",
            "method": "value",
            "priority": 100
        },
        {
            "id": 2,
            "name": "Produto da categoria",
            "class": "Rule",
            "method": "categoryItems",
            "priority": 0
        },
        {
            "id": 3,
            "name": "Quantidade",
            "class": "Rule",
            "method": "quantityItems",
            "priority": 100
        },
        {
            "id": 4,
            "name": "Produto da marca",
            "class": "Rule",
            "method": "brandProduct",
            "priority": 0
        }
    ],
    "total": 4,
    "pagination": {
        "entries": 20,
        "totalPages": 1,
        "currentPage": 1,
        "isInitial": true,
        "isEnd": true,
        "totalPrevPages": 0,
        "totalNextPages": 0
    }
}

Related

Copied to clipboard