Entrar

Atualizar campanha

PUT https://{organization}.myguper.com/api/loyalty/campaign

Atualiza uma campanha existente. Apenas id é estritamente obrigatório — qualquer outro campo aceito por Criar campanha pode ser enviado aqui e é mesclado parcialmente ao registro (apenas as chaves enviadas são atualizadas).

Quando o trigger da campanha é audience-list, o registro CampaignAudience correspondente é re-sincronizado: alternar isActive move o status entre running e standby.

Para campanhas member-event, o campo eventType define qual evento de ciclo de vida dispara a campanha (membership_joined ou tier_achieved). Para filtrar por um nível de tier específico em tier_achieved, anexe uma campaign_rule com code 17 (veja Campaign rules).

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

{
    "id": 1,
    "name": "My Campaign",                                      // optional
    "displayName": "<displayName>",                             // optional
    "isActive": false,                                          // optional
    "isDraft": false,                                           // optional
    "aliquot": 0,                                               // optional
    "aliquotType": 0,                                           // optional
    "dateRangeStart": "<dateRangeStart>",                       // optional
    "dateRangeEnd": "<dateRangeEnd>",                           // optional
    "initAt": "<initAt>",                                       // optional
    "finishAt": "<finishAt>"                                    // optional
}

Respostas

Copied to clipboard