Create a new discount for an account.
A new discount will be unavailable for purchases until the discount is given to one or more customer.
Discount can be given to a customer by either adding a automation to the discount that will grant the discount to the customer from events received or by adding customers to the discount.
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.
9Discount to create
Discount base requirement
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).
"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"
}
]Discount created
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"
}
]