Skip to main content
DELETE
https://api.dintero.com/v1
/
accounts
/
{aid}
/
discounts
/
rules
/
{did}
Delete discount
curl --request DELETE \
  --url https://api.dintero.com/v1/accounts/{aid}/discounts/rules/{did} \
  --header 'Authorization: Bearer <token>'
{
  "requirement": {
    "purchase_from": "2023-11-07T05:31:56Z",
    "purchase_to": "2023-11-07T05:31:56Z",
    "customer": {
      "addresses": [
        {
          "country": [
            "NO"
          ],
          "postal_code": [
            "0349"
          ],
          "postal_place": [
            "Oslo"
          ],
          "custom_type": [
            "offsite"
          ],
          "type": [
            "custom"
          ]
        }
      ],
      "company": {
        "bussiness_name": [
          "TKP tech AS"
        ],
        "department": [
          "production",
          "research"
        ],
        "industry": [
          "J62.0.1",
          "J62.0.2"
        ],
        "number_of_employees": [
          "20"
        ],
        "organization_number": [
          "123456789MVA"
        ],
        "website": [
          "https://dintero.com"
        ]
      },
      "date_of_birth": [
        "1990-09-20",
        "1990-05-10"
      ],
      "enrolled_by": {
        "type": [
          "url"
        ],
        "value": [
          "https://mypage.example.dintero.com"
        ]
      },
      "favorite_store": [
        "sc029"
      ],
      "first_name": [
        "John"
      ],
      "gender": [
        "male"
      ],
      "last_name": [
        "Doe"
      ],
      "marketing_consent": {
        "email": {
          "consent": [
            "true"
          ]
        },
        "sms": {
          "consent": [
            "true"
          ]
        }
      },
      "status": [
        "vip"
      ],
      "term": {
        "id": [
          "<string>"
        ]
      },
      "type": [
        "<string>"
      ],
      "attributes": {}
    },
    "item": {
      "quantity": 0,
      "mixes": [
        {
          "quantity": 1,
          "reward_eligible": true,
          "items": [
            {
              "id": "b714118"
            },
            {
              "group_id": "g4"
            }
          ]
        }
      ],
      "items": [
        {
          "id": "b714118",
          "group_id": "B1"
        }
      ]
    },
    "store_ids": [
      "sc029"
    ],
    "gross_amount": 0,
    "net_amount": 0,
    "currencies": [
      {
        "anything-but": [
          "NOK"
        ]
      }
    ],
    "stamp": 5,
    "discount_code": "TACO",
    "store": {
      "id": [
        "sc029"
      ],
      "name": [
        "SC Oslo"
      ],
      "business_name": [
        "SC Oslo AS"
      ],
      "address": {
        "country": [
          "NO"
        ],
        "postal_code": [
          "0349"
        ],
        "postal_place": [
          "Oslo"
        ]
      },
      "chain": [
        "SuperChain"
      ],
      "email": [
        "contact@superchain.com"
      ],
      "gln": [
        "5790001398644"
      ],
      "organization_number": [
        "123456789MVA"
      ],
      "phone_number": [
        "+4738260107"
      ],
      "mcc": [
        5814
      ],
      "mcc_ranges": [
        {
          "start": 5814,
          "end": 5815
        }
      ],
      "bax": [
        "102603"
      ],
      "terminal_id": [
        "T0292"
      ]
    }
  },
  "reward": {
    "type": "discount_amount",
    "value": 10000,
    "values": [
      {
        "items": [
          {
            "id": "b714118",
            "group_id": "B1"
          }
        ],
        "value": 123
      }
    ],
    "base": "gross",
    "effect": "discount"
  },
  "statistics": {
    "stamp": 123,
    "used": 28,
    "usage": 28,
    "amount": 280000,
    "debit_balance": 12350
  },
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  "updated_at": "2023-11-07T05:31:56Z",
  "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  "deleted_at": "2023-11-07T05:31:56Z",
  "campaign_id": "<string>",
  "active": true,
  "private": false,
  "updated_by": "3d1e4824-5474-48e7-a369-4f603fa4c5b8",
  "type": "item",
  "name": "Spar 100,-",
  "receipt_text": "Mai Salg",
  "visible_from": "2023-11-07T05:31:56Z",
  "description": "Gjør et Stablestol kupp!",
  "limitation": {
    "dynamic_purchase_to_days": 2,
    "discount_activation": [
      {
        "type": "deactivate_if_discount_active",
        "value": "<string>"
      }
    ],
    "discount_hours": {
      "hours": [
        {
          "day": "mon",
          "start": "10:00",
          "end": "20:00"
        }
      ],
      "timezone": "Europe/Oslo"
    },
    "discount_reward_usage": 1,
    "discount_combination": -1,
    "discount_eligible": "item_eligible_for_discount",
    "discount_repeat_usage": -1,
    "stamp_expire_days": 100,
    "blacklist": [
      {
        "id": "b714118",
        "group_id": "B1"
      }
    ]
  },
  "metadata": {
    "campaign_id": "V101",
    "is_featured": true,
    "dintero:private_text:kind": "Gold"
  },
  "links": [
    {
      "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"
    }
  ]
}

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.

Authorizations

Authorization
string
header
required

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).

Path Parameters

aid
string<^[PT]{1}\d{8}$>
required

An id that uniquely identifies the account.

Required string length: 9
did
string<uuid>
required

An UUID that uniquely identifies the discount

Response

Discount deleted

requirement
object
required

Discount base requirement

reward
object
required
statistics
object
id
string<uuid>
read-only

An UUID that uniquely identifies the resource

created_at
string<date-time>
read-only

The date-time when the resource was created

created_by
string
read-only

The ID of the user/client created the resource

Example:

"1c92f7e1-2897-4d46-bdcc-c127a914fb4e"

updated_at
string<date-time>
read-only

The date-time when the resource was last updated

deleted_by
string
read-only

The ID of the user/client created the resource

Example:

"1c92f7e1-2897-4d46-bdcc-c127a914fb4e"

deleted_at
string<date-time>
read-only
campaign_id
string

The campaign the rule belongs to

active
boolean
default:true

the discount is active and can be available for purchase (if given to any or all customers)

private
boolean
default:false

the discount will be excluded from public discount collection (GET /discounts/public/rules).

updated_by
string
read-only

The ID of the user/client that last updated the resource

Example:

"3d1e4824-5474-48e7-a369-4f603fa4c5b8"

type
enum<string>
read-only

The discount base type * receipt discount is given on receipt * item discount is given to items

Available options:
item,
receipt
name
string
Example:

"Spar 100,-"

receipt_text
string

Text that should be used when displaying the discount, e.g. on receipt

Example:

"Mai Salg"

visible_from
string<date-time>

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

description
string
Example:

"Gjør et Stablestol kupp!"

limitation
object
metadata
object

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

Example:
{
"campaign_id": "V101",
"is_featured": true,
"dintero:private_text:kind": "Gold"
}

Links to resources related to the discount

Example:
[
{
"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"
}
]