Saltar al contenido
Guías
PromocionesDescuentos
promotion:read

Obtener un descuento

GET/v1/discounts/{discountId}

Obtener un descuento. Una solicitud exitosa devuelve HTTP 200 con el cuerpo de respuesta documentado.

Autorización

bearerAuth
AutorizaciónBearer <token>

Token de acceso OAuth 2.0 emitido por Ecomiq Auth.

Ubicación: header

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://example.com/v1/discounts/7204558912004325301" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>"
{  "id": "7204558912004325301",  "storeId": "7204558912004325301",  "sellerId": "7204558912004325301",  "name": "Example resource",  "description": "Example description.",  "status": "draft",  "type": "percentage",  "target": "order",  "amount": 1,  "allocation": "once",  "maxQuantity": 1,  "applyAfterTaxes": false,  "isAutomatic": false,  "validFrom": "2026-08-01T15:30:00Z",  "validTo": "2026-08-01T15:30:00Z",  "usageLimit": 1,  "usageCount": 1,  "customerUsageLimit": 1,  "combineWithOtherDiscounts": false,  "rules": [    {      "field": "cartSubtotal",      "operator": "eq",      "decimalValues": [        1      ],      "integerValues": [        1      ],      "resourceIds": [        "example"      ]    }  ],  "codes": [    {      "id": "7204558912004325301",      "code": "example_code",      "usageLimit": 1,      "usageCount": 1,      "assignedCustomers": [        {          "customerId": "7204558912004325301",          "email": "andrea@example.com",          "firstName": "Andrea",          "lastName": "Ramos"        }      ],      "createdOn": "2026-08-01T15:30:00Z",      "updatedOn": "2026-08-01T15:30:00Z"    }  ],  "createdOn": "2026-08-01T15:30:00Z",  "updatedOn": "2026-08-01T15:30:00Z"}