Update discount details.
Caution: Update of non-meta properties, properties that changes requirement or limitation can create conflict with the usage history of the discount.
Example is to change requirement.item.items, such change would mean that purchases before the change would not be correcly rewarded given the new version of the discount.
We recomment to limit the update of a discount to meta only properties if the discount has previously been used in a purchase.
Update on requirement purchase_to is only supported when
the new value that is after current value.
Update of requirement purchase_from and reward is not supported.
Update discount.active to toggle if an discount is active
and available for purchase.
Update discount.private to toggle if an discount is included
in public discount collection if given to all customers
scopes:
Documentation Index
Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication (token authentication) should be used for accessing the API.
Use Get Token to get an access token for client credentials. Pass the token in the request header:
Authorization: Bearer {access_token}where the access_token is JSON Web Tokens (JWT).
An id that uniquely identifies the account.
9An UUID that uniquely identifies the discount
Discount properties to update
The campaign the rule belongs to, use null to remove
the rule from the campaign.
the discount is active and can be available for purchase
the discount is private and will not be included in public discount collection
false
Links to resources related to the discount
[
{
"href": "https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png",
"rel": "thumbnail_discount_image"
},
{
"href": "https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png",
"rel": "medium_discount_image"
},
{
"href": "https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer",
"rel": "webshoop"
},
{
"href": "https://example.dintero.com/newsletter/2018.pdf",
"rel": "newletter",
"type": "application/pdf"
}
]Discount base requirement
"Gjør et Stablestol kupp!"
Additional metadata about the discount
{
"campaign_id": "V101",
"is_featured": true
}"Spar 100,-"
Text that should be used when displaying the discount, e.g. on receipt
"Mai Salg"
Discount Updated
Discount base requirement
An UUID that uniquely identifies the resource
The date-time when the resource was created
The ID of the user/client created the resource
"1c92f7e1-2897-4d46-bdcc-c127a914fb4e"
The date-time when the resource was last updated
The ID of the user/client created the resource
"1c92f7e1-2897-4d46-bdcc-c127a914fb4e"
The campaign the rule belongs to
the discount is active and can be available for purchase (if given to any or all customers)
the discount will be excluded from public discount collection (GET /discounts/public/rules).
The ID of the user/client that last updated the resource
"3d1e4824-5474-48e7-a369-4f603fa4c5b8"
The discount base type * receipt discount is given on receipt * item discount is given to items
item, receipt "Spar 100,-"
Text that should be used when displaying the discount, e.g. on receipt
"Mai Salg"
Make the discount visible to the customer from given date. Default behavior is to only return discount to the customer where the current time is between purchase_from and purchase_to
"Gjør et Stablestol kupp!"
Additional metadata about the discount
Metadata prefixed with dintero:exclude:public: will
be excluded when listing the rules from the public endpoint
and included in all other endpoints that returns discount rules
{
"campaign_id": "V101",
"is_featured": true,
"dintero:private_text:kind": "Gold"
}Links to resources related to the discount
[
{
"href": "https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png",
"rel": "thumbnail_discount_image"
},
{
"href": "https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png",
"rel": "medium_discount_image"
},
{
"href": "https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer",
"rel": "webshoop"
},
{
"href": "https://example.dintero.com/newsletter/2018.pdf",
"rel": "newletter",
"type": "application/pdf"
}
]