Asigna un regalo o cupon al cliente

Scope requerido: promociones:write

Escritura: header Idempotency-Key obligatorio.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Asigna un regalo o cupon al cliente

Scope requeridopromociones:write
MétodoPOST /ext/v3/clientes/{uid}/regalos
Idempotenciaheader Idempotency-Key obligatorio

Path

ParámetroTipoRequeridoDescripción
uidstringsíUID del cliente (user_fireb_uid)

Body

ParámetroTipoRequeridoDescripción
regaloIdintegersíId del regalo o promocion (mp_regalos.regalo_id)
enviarPushbooleannoNotificar por push al asignar Default false.
origenstringnoOrigen que queda en el historial Default "api_v3".

Ejemplo

curl -X POST 'https://api3.clau.io/ext/v3/clientes/uid-7/regalos' \
  -H 'apikey: ck_1_...' \
  -H 'Idempotency-Key: 6f1e2d3c-0001' \
  -H 'Content-Type: application/json' \
  -d '{"regaloId":45}'

Respuesta 200

{
  "codigoRespuesta": 0,
  "msj": "Exito",
  "data": "…",
  "meta": {
    "requestId": "5f1c…",
    "appId": 1,
    "scope": "promociones:write"
  }
}

Errores: 401 key inválida (9501), 403 sin scope (9503, meta.requiredScope), 400 parámetros (details), 409 idempotencia, 422 regla de negocio (meta.legacy), 429 límite de tasa. Agregue ?help=true para la ayuda en texto plano.

Path Params
string
required
length ≤ 128

UID del cliente (user_fireb_uid)

Query Params
boolean

Con true devuelve la ayuda del endpoint en texto plano.

Body Params
integer
required
≥ 1

Id del regalo o promocion (mp_regalos.regalo_id)

boolean
Defaults to false

Notificar por push al asignar

string
length ≤ 60
Defaults to api_v3

Origen que queda en el historial

Headers
string
required
length between 8 and 128

Identificador unico de la operacion (8 a 128 caracteres, p. ej. un UUID). Repetir con el mismo cuerpo devuelve la respuesta original; con otro cuerpo responde 409.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json