Saltar al contenido principal
PATCH
/
promotions
/
{promotionId}
Actualizar
curl --request PATCH \
  --url https://sandbox.api.riqra.com/promotions/{promotionId} \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "usageLimit": 2,
  "startDate": "2023-11-07T05:31:56Z",
  "expirationDate": "2023-11-07T05:31:56Z",
  "rules": [
    {
      "type": "<string>",
      "configuration": {
        "value": 1
      }
    }
  ],
  "actions": [
    {
      "type": "product-discount",
      "configuraion": {
        "property": "<string>",
        "values": [
          "<string>"
        ],
        "type": "percent",
        "amount": 123,
        "applyRepetitions": true,
        "each": 123
      }
    }
  ]
}
'
{
  "errors": [
    {
      "message": "<string>",
      "code": 123
    }
  ]
}

Authorizations

api-key
string
header
required

Todas las llamadas al API tienen que contener este header junto a la clave para poder autenticar y autorizar al cliente.

Path Parameters

promotionId
number
required

Body

application/json
name
string

Nombre de la promoción que se mostrará en el checkout.

Maximum string length: 60
usageLimit
integer

Máximo número de veces que se puede utilizar/canjear una promoción.

Rango requerido: x >= 1
startDate
string<date-time>
expirationDate
string<date-time>
rules
PromotionRuleRequestCreate · object[]
Minimum array length: 1
actions
PromotionActionRequestCreate · object[]
Minimum array length: 1

Response

No Content