Saltar al contenido
PromocionesDescuentos

Obtener un descuento

Devuelve el descuento con su tipo, importe, reglas, vigencia y límites de uso.

Parámetros de ruta

discountId*string

Parámetros de cabecera

x-Store-Id?string

Tienda sobre la que actúa la solicitud. No hace falta cuando el token ya está vinculado a una tienda.

Authorization*string

Token bearer OAuth 2.0.

Cuerpo de la respuesta

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.ecomiq.pe/api/v1/discounts/7204558912004329313" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>"
{  "id": "7204558912004329139",  "storeId": "7204558912004327977",  "sellerId": "7204558912004323447",  "name": "Bienvenida 10 %",  "description": "Polo de algodón pima para uso diario.",  "status": "draft",  "type": "percentage",  "target": "order",  "amount": 178,  "allocation": "once",  "maxQuantity": 2,  "applyAfterTaxes": false,  "isAutomatic": false,  "validFrom": "2026-09-28T15:30:00Z",  "validTo": "2026-09-28T15:30:00Z",  "usageLimit": 1,  "usageCount": 24,  "customerUsageLimit": 1,  "combineWithOtherDiscounts": false,  "rules": [    {      "field": "cartSubtotal",      "operator": "eq",      "decimalValues": [        1      ],      "integerValues": [        1      ],      "resourceIds": [        "7204558912004324902"      ],      "codes": [        "BIENVENIDA10"      ]    }  ],  "codes": [    {      "id": "7204558912004329139",      "code": "BIENVENIDA10",      "usageLimit": 1,      "usageCount": 24,      "createdOn": "2026-09-28T15:30:00Z",      "updatedOn": "2026-09-28T15:30:00Z"    }  ],  "createdOn": "2026-09-28T15:30:00Z",  "updatedOn": "2026-09-28T15:30:00Z"}