Skip to main content
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
receipts
Create new Receipts
curl --request POST \
  --url https://api.dintero.com/v1/accounts/{aid}/receipts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "store": {
      "id": "sc029",
      "name": "SC Oslo",
      "business_name": "SC Oslo AS",
      "chain": "SuperChain",
      "email": "contact@superchain.com",
      "gln": "5790001398644",
      "organization_number": "123456789MVA",
      "phone_number": "+4738260107",
      "mcc": "5814",
      "bax": "102603",
      "terminal_id": "T0292",
      "payout_destination_id": "seller-1"
    },
    "receipt_id": "714118",
    "purchase_at": "2023-11-07T05:31:56Z",
    "discounts": [
      {
        "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"
        },
        "campaign_id": "<string>",
        "active": true,
        "private": false,
        "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_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"
          }
        ],
        "refs": [
          {
            "id": "e3da6be5-d8e0-466c-af66-b7f69472ebb5",
            "stamp": 123,
            "amount": 10000,
            "bonus": 9050,
            "statistics": {
              "amount": 15050,
              "bonus": 11050,
              "debit_balance": 12350,
              "stamp": 11,
              "usage": 2
            },
            "items": [
              {
                "line_id": 1,
                "amount": 3000
              },
              {
                "line_id": 5,
                "amount": 7000
              }
            ],
            "usage": 1
          }
        ]
      }
    ],
    "items": [
      {
        "id": "175938",
        "groups": [
          {
            "id": "B234",
            "name": "Stol"
          },
          {
            "id": "B1",
            "name": "Møbel"
          }
        ],
        "quantity": 2,
        "unit": "stk",
        "description": "Stablestol for utendørsbruk",
        "description_alias": "Stablestol",
        "net_amount": 27840,
        "net_amount_dwh": "27840.10",
        "gross_amount": 39800,
        "gross_amount_dwh": "34800.12",
        "unit_gross_price": 10900,
        "tax_percent": 25,
        "line_id": 1,
        "barcode": "3123212343212",
        "cost_price": 2033,
        "voided": false,
        "scale_item": false,
        "eligible_for_discount": true,
        "included_in_total_discount": true,
        "price_has_been_keyedIn": false,
        "discount_has_been_keyedIn": false,
        "is_return_item": false,
        "is_linked_item": false,
        "is_virtual_product": false,
        "is_changed": true,
        "salesperson_id": "000111",
        "salesperson_name": "Jesper",
        "serial_id": "32424234231312312",
        "comment": "Kan være hva som helst",
        "infocode_lines": [
          {
            "line_id": 1,
            "amount": 123,
            "amount_dwh": "1.14",
            "infocode_id": "<string>",
            "sub_infocode_id": "<string>",
            "information": "<string>",
            "input_type": 123,
            "withdrawal_from_stock": false
          }
        ],
        "tax_lines": [
          {
            "amount": 5584,
            "amount_dwh": "5584.0440",
            "exempt": false,
            "included_in_price": true,
            "percentage": 25,
            "tax_basis": 27920,
            "tax_basis_dwh": "27920.22",
            "tax_code": "3",
            "tax_group": "Vmva-høy"
          }
        ],
        "dimension": {
          "color": "<string>",
          "size": "<string>",
          "style": "<string>",
          "config": "<string>",
          "variant": "<string>"
        },
        "discount_lines": [
          {
            "amount": 4400,
            "percentage": 44,
            "discount_type": "customer",
            "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
            "description": "<string>",
            "line_id": 1
          }
        ],
        "bonus_lines": [
          {
            "bonus": 3130,
            "percentage": 10,
            "discount_type": "customer",
            "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
            "description": "<string>",
            "line_id": 1
          }
        ],
        "extra_info": [
          {
            "key": "<string>",
            "value": "<string>",
            "value_type": "string"
          }
        ]
      }
    ],
    "delivery": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "customer@example.com",
      "phone_number": "+4799999999"
    },
    "customer_id": "C13db4f63",
    "customer": {
      "gender": "male",
      "first_name": "John",
      "last_name": "Doe",
      "email": "customer@example.com",
      "metadata": {
        "dob_year": 1985
      },
      "phone_number": "+4799999999",
      "addresses": [
        {
          "address_line": "Sommerkroveien 34",
          "postal_place": "Oslo",
          "country": "NO",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "type": "<string>",
          "custom_type": "<string>"
        }
      ],
      "pays_tax": false,
      "date_of_birth": "1990-09-20",
      "favorite_store": "<string>",
      "marketing_consent": {
        "sms": {
          "consent": true
        },
        "email": {
          "consent": true
        }
      },
      "status": "<string>",
      "term": {
        "id": "<string>"
      },
      "type": "customer",
      "token": {
        "token_id": "983558fe-05bd-495f-92b5-9075d085db32",
        "value": "5345346544ffea22",
        "type": "VIPPS"
      }
    },
    "gross_amount": 59800,
    "gross_amount_dwh": "59800.01",
    "net_amount": 47840,
    "net_amount_dwh": "47840.01",
    "round_off_to_coin": 100,
    "currency": "NOK",
    "order_number": "order12345",
    "transaction_date": "2023-11-07T05:31:56Z",
    "amount_due": 2050,
    "amount_due_dwh": "2050.10",
    "no_of_items": 4,
    "is_changed": true,
    "transaction_id": "SC999-9991-1828",
    "total_discount": 0,
    "total_manual_discount_amount": 0,
    "total_manual_percentage_discount": 0,
    "operator_id": "000210",
    "operator_name": "Ole Anders",
    "salesperson_id": "000111",
    "salesperson_name": "Jesper",
    "entry_status": "None",
    "comment": "Kunden ønsker mer for info",
    "tax_lines": [
      {
        "amount": 5584,
        "amount_dwh": "5584.0440",
        "exempt": false,
        "included_in_price": true,
        "percentage": 25,
        "tax_basis": 27920,
        "tax_basis_dwh": "27920.22",
        "tax_code": "3",
        "tax_group": "Vmva-høy"
      }
    ],
    "payments": [
      {
        "line_id": 1,
        "amount": 123,
        "type_id": "<string>",
        "token_id": "983558fe-05bd-495f-92b5-9075d085db32",
        "token_type": "VIPPS",
        "description": "<string>",
        "voided": true,
        "card_info": {
          "balance_amount": 123,
          "card_amount": 123,
          "issuer_id": 123,
          "issuer_name": "Barcley",
          "session_id": "022",
          "terminal_id": "71015233",
          "card_number": "************00198-1",
          "card_type": "VISA",
          "receipt": "BAX: 111010-71015233\\n\\r\\11/11/2015 14:41\\n\\r\\345849\\n\\r\\ VISA CLASSIC\\n\\r\\************5671\\n\\r\\AID:A0000000031010\\n\\r\\ REF:011 006687000000\\n\\r\\RESP:00 GODKJENT\\n\\r\\RETUR AV VARER\\n\\r \\NOK=           50.00\\n\\r\\SIGNATUR................\\n\\r \\KORTHOLDERS KOPI\n"
        },
        "reference_id": "B00668107235",
        "infocode_lines": [
          {
            "line_id": 1,
            "amount": 123,
            "amount_dwh": "1.14",
            "infocode_id": "<string>",
            "sub_infocode_id": "<string>",
            "information": "<string>",
            "input_type": 123,
            "withdrawal_from_stock": false
          }
        ]
      }
    ],
    "infocode_items": [
      {
        "line_id": 1,
        "amount": 123,
        "amount_dwh": "1.14",
        "infocode_id": "<string>",
        "sub_infocode_id": "<string>",
        "information": "<string>",
        "input_type": 123,
        "withdrawal_from_stock": false
      }
    ],
    "receipt_text": "<string>",
    "discount_code": [
      "<string>"
    ],
    "extra_info": [
      {
        "key": "<string>",
        "value": "<string>",
        "value_type": "string"
      }
    ]
  }
]
'
{
  "receipts": [
    {
      "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"
    }
  ],
  "duplicates": 123
}

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

Query Parameters

token_expire_days
integer

Generate tokens for the receipts created, the token can be used to retrieve the receipt from:

Following values will be added to extra_info when receipt is created with this query parameter:

  • dintero.receipt.token.value: JWT token that can be used to retrieve the receipt.
  • dintero.receipt.token.expires_at: The date-time when the token expires.
  • dintero.receipt.token.url: URL to retrieve the receipt using the token.
Required range: x >= 1

Body

application/json

receipt

store
object
required
receipt_id
string
required
Minimum string length: 1
Example:

"714118"

purchase_at
string<date-time>
required

The date and time for the receipt purchase

discounts
object[]

List all discounts referenced in discount_lines

items
object[]
delivery
object

Details for the delivery

customer_id
string

The customer id identifying the customer. (must not have trailing or leading spaces)

Maximum string length: 255
Example:

"C13db4f63"

customer
object

The customer, owner of the receipt

gross_amount
integer

Monetary amount in smallest unit for the currency before discounts

Example:

59800

gross_amount_dwh
string

Monetary amount in smallest unit for the currency before discounts with decimal

Example:

"59800.01"

net_amount
integer

Monetary amount in smallest unit for the currency after discounts

Example:

47840

net_amount_dwh
string

Monetary value in smallest unit for the currency after discounts with decimal

Example:

"47840.01"

round_off_to_coin
integer
Example:

100

currency
string

The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217

Example:

"NOK"

order_number
string
Example:

"order12345"

transaction_date
string<date-time>
amount_due
integer

How much more need to be paid before the transaction is completed. Monetary amount in smallest unit for the currency

Example:

2050

amount_due_dwh
string

Monetary value with decimal

Example:

"2050.10"

no_of_items
number

How many items did the customer buy

Example:

4

is_changed
boolean

Discount applied to gross amount

transaction_id
string
Example:

"SC999-9991-1828"

total_discount
integer
Example:

0

total_manual_discount_amount
integer

Monetary amount in smallest unit for the currency

Example:

0

total_manual_percentage_discount
integer
Example:

0

operator_id
string

POS user

Example:

"000210"

operator_name
string

Name of the POS user

Example:

"Ole Anders"

salesperson_id
string

ID of the POS user

Example:

"000111"

salesperson_name
string
Example:

"Jesper"

entry_status
enum<string>

Status for the transaction

Available options:
None,
Voided,
Posted,
Concluded,
Cancelled,
OnHold,
Training,
Reprinted
comment
string
Example:

"Kunden ønsker mer for info"

tax_lines
object[]

Breakdown of the tax to different tax groups

payments
object[]
infocode_items
object[]
receipt_text
string
discount_code
string[]
extra_info
object[]

Response

Receipt created

receipts
object[]
duplicates
integer