Entrar

Actualizar campaña

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

Actualiza una campaña existente. Solo id es estrictamente obligatorio — cualquier otro campo aceptado por Crear campaña puede enviarse aquí y se fusiona parcialmente al registro (solo se actualizan las claves enviadas).

Cuando el trigger de la campaña es audience-list, el registro CampaignAudience correspondiente se re-sincroniza: alternar isActive cambia su estado entre running y standby.

Para campañas member-event, el campo eventType define qué evento del ciclo de vida dispara la campaña (membership_joined o tier_achieved). Para filtrar por un nivel de tier específico en tier_achieved, adjunta una campaign_rule con code 17 (consulta Campaign rules).

Try-it values populated from environment ACME (Demo)


Autenticación

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.

Encabezados

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.

Cuerpo de la petición

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
}

Respuestas

Copied to clipboard