Sylius/tests/Api/Responses/admin/promotion/get_promotions_response.json
2024-09-24 12:10:54 +02:00

119 lines
4 KiB
JSON

{
"@context": "\/api\/v2\/contexts\/Promotion",
"@id": "\/api\/v2\/admin\/promotions",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "\/api\/v2\/admin\/promotions\/dollar_off",
"@type": "Promotion",
"id": "@integer@",
"code": "dollar_off",
"name": "1 dollar off each item",
"description": "Get 1 dollar off every item",
"channels": [
"\/api\/v2\/admin\/channels\/WEB",
"\/api\/v2\/admin\/channels\/MOBILE"
],
"priority": 2,
"exclusive": false,
"appliesToDiscounted": true,
"usageLimit": null,
"used": 0,
"couponBased": true,
"startsAt": null,
"endsAt": null,
"coupons": [
"\/api\/v2\/admin\/promotions\/dollar_off\/coupons\/XYZ1",
"\/api\/v2\/admin\/promotions\/dollar_off\/coupons\/XYZ2"
],
"rules": [],
"actions": [
{
"@id": "\/api\/v2\/admin\/promotions\/dollar_off\/actions\/@integer@",
"@type": "PromotionAction",
"id": "@integer@",
"type": "unit_fixed_discount",
"configuration": {
"WEB": {
"amount": 100
}
}
}
],
"archivedAt": null,
"createdAt": "@date@",
"updatedAt": "@date@",
"translations": {
"en_US": {
"@id": "\/api\/v2\/admin\/promotions\/dollar_off\/translations\/en_US",
"@type": "PromotionTranslation",
"label": "1$ off every item!"
}
}
},
{
"@id": "\/api\/v2\/admin\/promotions\/50_off",
"@type": "Promotion",
"id": "@integer@",
"code": "50_off",
"name": "50% Off on your first order",
"description": "Get 50% off of your first purchase",
"channels": [
"\/api\/v2\/admin\/channels\/MOBILE"
],
"priority": 1,
"exclusive": true,
"appliesToDiscounted": false,
"usageLimit": 1,
"used": 0,
"couponBased": false,
"startsAt": null,
"endsAt": null,
"coupons": [],
"rules": [],
"actions": [],
"archivedAt": null,
"createdAt": "@date@",
"updatedAt": "@date@",
"translations": {
"en_US": {
"@id": "\/api\/v2\/admin\/promotions\/50_off\/translations\/en_US",
"@type": "PromotionTranslation",
"label": "-50% on first order!"
}
}
}
],
"hydra:totalItems": 2,
"hydra:search": {
"@type": "hydra:IriTemplate",
"hydra:template": "\/api\/v2\/admin\/promotions{?coupons.code,coupons.code[],order[priority],exists[archivedAt]}",
"hydra:variableRepresentation": "BasicRepresentation",
"hydra:mapping": [
{
"@type": "IriTemplateMapping",
"variable": "coupons.code",
"property": "coupons.code",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "coupons.code[]",
"property": "coupons.code",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "order[priority]",
"property": "priority",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "exists[archivedAt]",
"property": "archivedAt",
"required": false
}
]
}
}