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": {
"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_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<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>"
},
"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",
"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>"
}
]
}
]
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/receipts"
payload = [
{
"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": {
"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_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<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>" },
"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",
"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
"
},
"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>"
}
]
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
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: {
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_id: '766da0ef-9283-42bd-b012-0582344ec53c',
description: '<string>',
line_id: 1
}
],
bonus_lines: [
{
bonus: 3130,
percentage: 10,
discount_id: '766da0ef-9283-42bd-b012-0582344ec53c',
description: '<string>',
line_id: 1
}
],
extra_info: [{key: '<string>', value: '<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>'},
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',
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>'}]
}
])
};
fetch('https://api.dintero.com/v1/accounts/{aid}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/receipts"
payload := strings.NewReader("[\n {\n \"store\": {\n \"id\": \"sc029\",\n \"name\": \"SC Oslo\",\n \"business_name\": \"SC Oslo AS\",\n \"chain\": \"SuperChain\",\n \"email\": \"contact@superchain.com\",\n \"gln\": \"5790001398644\",\n \"organization_number\": \"123456789MVA\",\n \"phone_number\": \"+4738260107\",\n \"mcc\": \"5814\",\n \"bax\": \"102603\",\n \"terminal_id\": \"T0292\",\n \"payout_destination_id\": \"seller-1\"\n },\n \"receipt_id\": \"714118\",\n \"purchase_at\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"requirement\": {\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"customer\": {\n \"addresses\": [\n {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ],\n \"custom_type\": [\n \"offsite\"\n ],\n \"type\": [\n \"custom\"\n ]\n }\n ],\n \"company\": {\n \"bussiness_name\": [\n \"TKP tech AS\"\n ],\n \"department\": [\n \"production\",\n \"research\"\n ],\n \"industry\": [\n \"J62.0.1\",\n \"J62.0.2\"\n ],\n \"number_of_employees\": [\n \"20\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"website\": [\n \"https://dintero.com\"\n ]\n },\n \"date_of_birth\": [\n \"1990-09-20\",\n \"1990-05-10\"\n ],\n \"enrolled_by\": {\n \"type\": [\n \"url\"\n ],\n \"value\": [\n \"https://mypage.example.dintero.com\"\n ]\n },\n \"favorite_store\": [\n \"sc029\"\n ],\n \"first_name\": [\n \"John\"\n ],\n \"gender\": [\n \"male\"\n ],\n \"last_name\": [\n \"Doe\"\n ],\n \"marketing_consent\": {\n \"email\": {\n \"consent\": [\n \"true\"\n ]\n },\n \"sms\": {\n \"consent\": [\n \"true\"\n ]\n }\n },\n \"status\": [\n \"vip\"\n ],\n \"term\": {\n \"id\": [\n \"<string>\"\n ]\n },\n \"type\": [\n \"<string>\"\n ],\n \"attributes\": {}\n },\n \"item\": {\n \"quantity\": 0,\n \"mixes\": [\n {\n \"quantity\": 1,\n \"reward_eligible\": true,\n \"items\": [\n {\n \"id\": \"b714118\"\n },\n {\n \"group_id\": \"g4\"\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"store_ids\": [\n \"sc029\"\n ],\n \"gross_amount\": 0,\n \"net_amount\": 0,\n \"currencies\": [\n {\n \"anything-but\": [\n \"NOK\"\n ]\n }\n ],\n \"stamp\": 5,\n \"discount_code\": \"TACO\",\n \"store\": {\n \"id\": [\n \"sc029\"\n ],\n \"name\": [\n \"SC Oslo\"\n ],\n \"business_name\": [\n \"SC Oslo AS\"\n ],\n \"address\": {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ]\n },\n \"chain\": [\n \"SuperChain\"\n ],\n \"email\": [\n \"contact@superchain.com\"\n ],\n \"gln\": [\n \"5790001398644\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"phone_number\": [\n \"+4738260107\"\n ],\n \"mcc\": [\n 5814\n ],\n \"mcc_ranges\": [\n {\n \"start\": 5814,\n \"end\": 5815\n }\n ],\n \"bax\": [\n \"102603\"\n ],\n \"terminal_id\": [\n \"T0292\"\n ]\n }\n },\n \"reward\": {\n \"value\": 10000,\n \"values\": [\n {\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ],\n \"value\": 123\n }\n ],\n \"base\": \"gross\",\n \"effect\": \"discount\"\n },\n \"campaign_id\": \"<string>\",\n \"active\": true,\n \"private\": false,\n \"name\": \"Spar 100,-\",\n \"receipt_text\": \"Mai Salg\",\n \"visible_from\": \"2023-11-07T05:31:56Z\",\n \"description\": \"Gjør et Stablestol kupp!\",\n \"limitation\": {\n \"dynamic_purchase_to_days\": 2,\n \"discount_activation\": [\n {\n \"type\": \"deactivate_if_discount_active\",\n \"value\": \"<string>\"\n }\n ],\n \"discount_reward_usage\": 1,\n \"discount_combination\": -1,\n \"discount_eligible\": \"item_eligible_for_discount\",\n \"discount_repeat_usage\": -1,\n \"stamp_expire_days\": 100,\n \"blacklist\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"metadata\": {\n \"campaign_id\": \"V101\",\n \"is_featured\": true,\n \"dintero:private_text:kind\": \"Gold\"\n },\n \"links\": [\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png\",\n \"rel\": \"thumbnail_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png\",\n \"rel\": \"medium_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer\",\n \"rel\": \"webshoop\"\n },\n {\n \"href\": \"https://example.dintero.com/newsletter/2018.pdf\",\n \"rel\": \"newletter\",\n \"type\": \"application/pdf\"\n }\n ],\n \"refs\": [\n {\n \"id\": \"e3da6be5-d8e0-466c-af66-b7f69472ebb5\",\n \"stamp\": 123,\n \"amount\": 10000,\n \"bonus\": 9050,\n \"statistics\": {\n \"amount\": 15050,\n \"bonus\": 11050,\n \"debit_balance\": 12350,\n \"stamp\": 11,\n \"usage\": 2\n },\n \"items\": [\n {\n \"line_id\": 1,\n \"amount\": 3000\n },\n {\n \"line_id\": 5,\n \"amount\": 7000\n }\n ],\n \"usage\": 1\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"175938\",\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"quantity\": 2,\n \"unit\": \"stk\",\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Stablestol\",\n \"net_amount\": 27840,\n \"net_amount_dwh\": \"27840.10\",\n \"gross_amount\": 39800,\n \"gross_amount_dwh\": \"34800.12\",\n \"unit_gross_price\": 10900,\n \"tax_percent\": 25,\n \"line_id\": 1,\n \"barcode\": \"3123212343212\",\n \"cost_price\": 2033,\n \"voided\": false,\n \"scale_item\": false,\n \"eligible_for_discount\": true,\n \"included_in_total_discount\": true,\n \"price_has_been_keyedIn\": false,\n \"discount_has_been_keyedIn\": false,\n \"is_return_item\": false,\n \"is_linked_item\": false,\n \"is_virtual_product\": false,\n \"is_changed\": true,\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"serial_id\": \"32424234231312312\",\n \"comment\": \"Kan være hva som helst\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 4400,\n \"percentage\": 44,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"bonus_lines\": [\n {\n \"bonus\": 3130,\n \"percentage\": 10,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"delivery\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"phone_number\": \"+4799999999\"\n },\n \"customer_id\": \"C13db4f63\",\n \"customer\": {\n \"gender\": \"male\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n },\n \"token\": {\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"value\": \"5345346544ffea22\",\n \"type\": \"VIPPS\"\n }\n },\n \"gross_amount\": 59800,\n \"gross_amount_dwh\": \"59800.01\",\n \"net_amount\": 47840,\n \"net_amount_dwh\": \"47840.01\",\n \"round_off_to_coin\": 100,\n \"currency\": \"NOK\",\n \"order_number\": \"order12345\",\n \"transaction_date\": \"2023-11-07T05:31:56Z\",\n \"amount_due\": 2050,\n \"amount_due_dwh\": \"2050.10\",\n \"no_of_items\": 4,\n \"is_changed\": true,\n \"transaction_id\": \"SC999-9991-1828\",\n \"total_discount\": 0,\n \"total_manual_discount_amount\": 0,\n \"total_manual_percentage_discount\": 0,\n \"operator_id\": \"000210\",\n \"operator_name\": \"Ole Anders\",\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"comment\": \"Kunden ønsker mer for info\",\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"payments\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"type_id\": \"<string>\",\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"token_type\": \"VIPPS\",\n \"description\": \"<string>\",\n \"voided\": true,\n \"card_info\": {\n \"balance_amount\": 123,\n \"card_amount\": 123,\n \"issuer_id\": 123,\n \"issuer_name\": \"Barcley\",\n \"session_id\": \"022\",\n \"terminal_id\": \"71015233\",\n \"card_number\": \"************00198-1\",\n \"card_type\": \"VISA\",\n \"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\"\n },\n \"reference_id\": \"B00668107235\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ]\n }\n ],\n \"infocode_items\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"receipt_text\": \"<string>\",\n \"discount_code\": [\n \"<string>\"\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/receipts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"store\": {\n \"id\": \"sc029\",\n \"name\": \"SC Oslo\",\n \"business_name\": \"SC Oslo AS\",\n \"chain\": \"SuperChain\",\n \"email\": \"contact@superchain.com\",\n \"gln\": \"5790001398644\",\n \"organization_number\": \"123456789MVA\",\n \"phone_number\": \"+4738260107\",\n \"mcc\": \"5814\",\n \"bax\": \"102603\",\n \"terminal_id\": \"T0292\",\n \"payout_destination_id\": \"seller-1\"\n },\n \"receipt_id\": \"714118\",\n \"purchase_at\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"requirement\": {\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"customer\": {\n \"addresses\": [\n {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ],\n \"custom_type\": [\n \"offsite\"\n ],\n \"type\": [\n \"custom\"\n ]\n }\n ],\n \"company\": {\n \"bussiness_name\": [\n \"TKP tech AS\"\n ],\n \"department\": [\n \"production\",\n \"research\"\n ],\n \"industry\": [\n \"J62.0.1\",\n \"J62.0.2\"\n ],\n \"number_of_employees\": [\n \"20\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"website\": [\n \"https://dintero.com\"\n ]\n },\n \"date_of_birth\": [\n \"1990-09-20\",\n \"1990-05-10\"\n ],\n \"enrolled_by\": {\n \"type\": [\n \"url\"\n ],\n \"value\": [\n \"https://mypage.example.dintero.com\"\n ]\n },\n \"favorite_store\": [\n \"sc029\"\n ],\n \"first_name\": [\n \"John\"\n ],\n \"gender\": [\n \"male\"\n ],\n \"last_name\": [\n \"Doe\"\n ],\n \"marketing_consent\": {\n \"email\": {\n \"consent\": [\n \"true\"\n ]\n },\n \"sms\": {\n \"consent\": [\n \"true\"\n ]\n }\n },\n \"status\": [\n \"vip\"\n ],\n \"term\": {\n \"id\": [\n \"<string>\"\n ]\n },\n \"type\": [\n \"<string>\"\n ],\n \"attributes\": {}\n },\n \"item\": {\n \"quantity\": 0,\n \"mixes\": [\n {\n \"quantity\": 1,\n \"reward_eligible\": true,\n \"items\": [\n {\n \"id\": \"b714118\"\n },\n {\n \"group_id\": \"g4\"\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"store_ids\": [\n \"sc029\"\n ],\n \"gross_amount\": 0,\n \"net_amount\": 0,\n \"currencies\": [\n {\n \"anything-but\": [\n \"NOK\"\n ]\n }\n ],\n \"stamp\": 5,\n \"discount_code\": \"TACO\",\n \"store\": {\n \"id\": [\n \"sc029\"\n ],\n \"name\": [\n \"SC Oslo\"\n ],\n \"business_name\": [\n \"SC Oslo AS\"\n ],\n \"address\": {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ]\n },\n \"chain\": [\n \"SuperChain\"\n ],\n \"email\": [\n \"contact@superchain.com\"\n ],\n \"gln\": [\n \"5790001398644\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"phone_number\": [\n \"+4738260107\"\n ],\n \"mcc\": [\n 5814\n ],\n \"mcc_ranges\": [\n {\n \"start\": 5814,\n \"end\": 5815\n }\n ],\n \"bax\": [\n \"102603\"\n ],\n \"terminal_id\": [\n \"T0292\"\n ]\n }\n },\n \"reward\": {\n \"value\": 10000,\n \"values\": [\n {\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ],\n \"value\": 123\n }\n ],\n \"base\": \"gross\",\n \"effect\": \"discount\"\n },\n \"campaign_id\": \"<string>\",\n \"active\": true,\n \"private\": false,\n \"name\": \"Spar 100,-\",\n \"receipt_text\": \"Mai Salg\",\n \"visible_from\": \"2023-11-07T05:31:56Z\",\n \"description\": \"Gjør et Stablestol kupp!\",\n \"limitation\": {\n \"dynamic_purchase_to_days\": 2,\n \"discount_activation\": [\n {\n \"type\": \"deactivate_if_discount_active\",\n \"value\": \"<string>\"\n }\n ],\n \"discount_reward_usage\": 1,\n \"discount_combination\": -1,\n \"discount_eligible\": \"item_eligible_for_discount\",\n \"discount_repeat_usage\": -1,\n \"stamp_expire_days\": 100,\n \"blacklist\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"metadata\": {\n \"campaign_id\": \"V101\",\n \"is_featured\": true,\n \"dintero:private_text:kind\": \"Gold\"\n },\n \"links\": [\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png\",\n \"rel\": \"thumbnail_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png\",\n \"rel\": \"medium_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer\",\n \"rel\": \"webshoop\"\n },\n {\n \"href\": \"https://example.dintero.com/newsletter/2018.pdf\",\n \"rel\": \"newletter\",\n \"type\": \"application/pdf\"\n }\n ],\n \"refs\": [\n {\n \"id\": \"e3da6be5-d8e0-466c-af66-b7f69472ebb5\",\n \"stamp\": 123,\n \"amount\": 10000,\n \"bonus\": 9050,\n \"statistics\": {\n \"amount\": 15050,\n \"bonus\": 11050,\n \"debit_balance\": 12350,\n \"stamp\": 11,\n \"usage\": 2\n },\n \"items\": [\n {\n \"line_id\": 1,\n \"amount\": 3000\n },\n {\n \"line_id\": 5,\n \"amount\": 7000\n }\n ],\n \"usage\": 1\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"175938\",\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"quantity\": 2,\n \"unit\": \"stk\",\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Stablestol\",\n \"net_amount\": 27840,\n \"net_amount_dwh\": \"27840.10\",\n \"gross_amount\": 39800,\n \"gross_amount_dwh\": \"34800.12\",\n \"unit_gross_price\": 10900,\n \"tax_percent\": 25,\n \"line_id\": 1,\n \"barcode\": \"3123212343212\",\n \"cost_price\": 2033,\n \"voided\": false,\n \"scale_item\": false,\n \"eligible_for_discount\": true,\n \"included_in_total_discount\": true,\n \"price_has_been_keyedIn\": false,\n \"discount_has_been_keyedIn\": false,\n \"is_return_item\": false,\n \"is_linked_item\": false,\n \"is_virtual_product\": false,\n \"is_changed\": true,\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"serial_id\": \"32424234231312312\",\n \"comment\": \"Kan være hva som helst\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 4400,\n \"percentage\": 44,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"bonus_lines\": [\n {\n \"bonus\": 3130,\n \"percentage\": 10,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"delivery\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"phone_number\": \"+4799999999\"\n },\n \"customer_id\": \"C13db4f63\",\n \"customer\": {\n \"gender\": \"male\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n },\n \"token\": {\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"value\": \"5345346544ffea22\",\n \"type\": \"VIPPS\"\n }\n },\n \"gross_amount\": 59800,\n \"gross_amount_dwh\": \"59800.01\",\n \"net_amount\": 47840,\n \"net_amount_dwh\": \"47840.01\",\n \"round_off_to_coin\": 100,\n \"currency\": \"NOK\",\n \"order_number\": \"order12345\",\n \"transaction_date\": \"2023-11-07T05:31:56Z\",\n \"amount_due\": 2050,\n \"amount_due_dwh\": \"2050.10\",\n \"no_of_items\": 4,\n \"is_changed\": true,\n \"transaction_id\": \"SC999-9991-1828\",\n \"total_discount\": 0,\n \"total_manual_discount_amount\": 0,\n \"total_manual_percentage_discount\": 0,\n \"operator_id\": \"000210\",\n \"operator_name\": \"Ole Anders\",\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"comment\": \"Kunden ønsker mer for info\",\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"payments\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"type_id\": \"<string>\",\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"token_type\": \"VIPPS\",\n \"description\": \"<string>\",\n \"voided\": true,\n \"card_info\": {\n \"balance_amount\": 123,\n \"card_amount\": 123,\n \"issuer_id\": 123,\n \"issuer_name\": \"Barcley\",\n \"session_id\": \"022\",\n \"terminal_id\": \"71015233\",\n \"card_number\": \"************00198-1\",\n \"card_type\": \"VISA\",\n \"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\"\n },\n \"reference_id\": \"B00668107235\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ]\n }\n ],\n \"infocode_items\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"receipt_text\": \"<string>\",\n \"discount_code\": [\n \"<string>\"\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n]")
.asString();{
"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
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}Create new Receipts
Post receipts
scopes:
- admin:receipts
- write: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": {
"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_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<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>"
},
"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",
"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>"
}
]
}
]
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/receipts"
payload = [
{
"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": {
"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_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<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>" },
"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",
"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
"
},
"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>"
}
]
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
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: {
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_id: '766da0ef-9283-42bd-b012-0582344ec53c',
description: '<string>',
line_id: 1
}
],
bonus_lines: [
{
bonus: 3130,
percentage: 10,
discount_id: '766da0ef-9283-42bd-b012-0582344ec53c',
description: '<string>',
line_id: 1
}
],
extra_info: [{key: '<string>', value: '<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>'},
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',
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>'}]
}
])
};
fetch('https://api.dintero.com/v1/accounts/{aid}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/receipts"
payload := strings.NewReader("[\n {\n \"store\": {\n \"id\": \"sc029\",\n \"name\": \"SC Oslo\",\n \"business_name\": \"SC Oslo AS\",\n \"chain\": \"SuperChain\",\n \"email\": \"contact@superchain.com\",\n \"gln\": \"5790001398644\",\n \"organization_number\": \"123456789MVA\",\n \"phone_number\": \"+4738260107\",\n \"mcc\": \"5814\",\n \"bax\": \"102603\",\n \"terminal_id\": \"T0292\",\n \"payout_destination_id\": \"seller-1\"\n },\n \"receipt_id\": \"714118\",\n \"purchase_at\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"requirement\": {\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"customer\": {\n \"addresses\": [\n {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ],\n \"custom_type\": [\n \"offsite\"\n ],\n \"type\": [\n \"custom\"\n ]\n }\n ],\n \"company\": {\n \"bussiness_name\": [\n \"TKP tech AS\"\n ],\n \"department\": [\n \"production\",\n \"research\"\n ],\n \"industry\": [\n \"J62.0.1\",\n \"J62.0.2\"\n ],\n \"number_of_employees\": [\n \"20\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"website\": [\n \"https://dintero.com\"\n ]\n },\n \"date_of_birth\": [\n \"1990-09-20\",\n \"1990-05-10\"\n ],\n \"enrolled_by\": {\n \"type\": [\n \"url\"\n ],\n \"value\": [\n \"https://mypage.example.dintero.com\"\n ]\n },\n \"favorite_store\": [\n \"sc029\"\n ],\n \"first_name\": [\n \"John\"\n ],\n \"gender\": [\n \"male\"\n ],\n \"last_name\": [\n \"Doe\"\n ],\n \"marketing_consent\": {\n \"email\": {\n \"consent\": [\n \"true\"\n ]\n },\n \"sms\": {\n \"consent\": [\n \"true\"\n ]\n }\n },\n \"status\": [\n \"vip\"\n ],\n \"term\": {\n \"id\": [\n \"<string>\"\n ]\n },\n \"type\": [\n \"<string>\"\n ],\n \"attributes\": {}\n },\n \"item\": {\n \"quantity\": 0,\n \"mixes\": [\n {\n \"quantity\": 1,\n \"reward_eligible\": true,\n \"items\": [\n {\n \"id\": \"b714118\"\n },\n {\n \"group_id\": \"g4\"\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"store_ids\": [\n \"sc029\"\n ],\n \"gross_amount\": 0,\n \"net_amount\": 0,\n \"currencies\": [\n {\n \"anything-but\": [\n \"NOK\"\n ]\n }\n ],\n \"stamp\": 5,\n \"discount_code\": \"TACO\",\n \"store\": {\n \"id\": [\n \"sc029\"\n ],\n \"name\": [\n \"SC Oslo\"\n ],\n \"business_name\": [\n \"SC Oslo AS\"\n ],\n \"address\": {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ]\n },\n \"chain\": [\n \"SuperChain\"\n ],\n \"email\": [\n \"contact@superchain.com\"\n ],\n \"gln\": [\n \"5790001398644\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"phone_number\": [\n \"+4738260107\"\n ],\n \"mcc\": [\n 5814\n ],\n \"mcc_ranges\": [\n {\n \"start\": 5814,\n \"end\": 5815\n }\n ],\n \"bax\": [\n \"102603\"\n ],\n \"terminal_id\": [\n \"T0292\"\n ]\n }\n },\n \"reward\": {\n \"value\": 10000,\n \"values\": [\n {\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ],\n \"value\": 123\n }\n ],\n \"base\": \"gross\",\n \"effect\": \"discount\"\n },\n \"campaign_id\": \"<string>\",\n \"active\": true,\n \"private\": false,\n \"name\": \"Spar 100,-\",\n \"receipt_text\": \"Mai Salg\",\n \"visible_from\": \"2023-11-07T05:31:56Z\",\n \"description\": \"Gjør et Stablestol kupp!\",\n \"limitation\": {\n \"dynamic_purchase_to_days\": 2,\n \"discount_activation\": [\n {\n \"type\": \"deactivate_if_discount_active\",\n \"value\": \"<string>\"\n }\n ],\n \"discount_reward_usage\": 1,\n \"discount_combination\": -1,\n \"discount_eligible\": \"item_eligible_for_discount\",\n \"discount_repeat_usage\": -1,\n \"stamp_expire_days\": 100,\n \"blacklist\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"metadata\": {\n \"campaign_id\": \"V101\",\n \"is_featured\": true,\n \"dintero:private_text:kind\": \"Gold\"\n },\n \"links\": [\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png\",\n \"rel\": \"thumbnail_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png\",\n \"rel\": \"medium_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer\",\n \"rel\": \"webshoop\"\n },\n {\n \"href\": \"https://example.dintero.com/newsletter/2018.pdf\",\n \"rel\": \"newletter\",\n \"type\": \"application/pdf\"\n }\n ],\n \"refs\": [\n {\n \"id\": \"e3da6be5-d8e0-466c-af66-b7f69472ebb5\",\n \"stamp\": 123,\n \"amount\": 10000,\n \"bonus\": 9050,\n \"statistics\": {\n \"amount\": 15050,\n \"bonus\": 11050,\n \"debit_balance\": 12350,\n \"stamp\": 11,\n \"usage\": 2\n },\n \"items\": [\n {\n \"line_id\": 1,\n \"amount\": 3000\n },\n {\n \"line_id\": 5,\n \"amount\": 7000\n }\n ],\n \"usage\": 1\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"175938\",\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"quantity\": 2,\n \"unit\": \"stk\",\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Stablestol\",\n \"net_amount\": 27840,\n \"net_amount_dwh\": \"27840.10\",\n \"gross_amount\": 39800,\n \"gross_amount_dwh\": \"34800.12\",\n \"unit_gross_price\": 10900,\n \"tax_percent\": 25,\n \"line_id\": 1,\n \"barcode\": \"3123212343212\",\n \"cost_price\": 2033,\n \"voided\": false,\n \"scale_item\": false,\n \"eligible_for_discount\": true,\n \"included_in_total_discount\": true,\n \"price_has_been_keyedIn\": false,\n \"discount_has_been_keyedIn\": false,\n \"is_return_item\": false,\n \"is_linked_item\": false,\n \"is_virtual_product\": false,\n \"is_changed\": true,\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"serial_id\": \"32424234231312312\",\n \"comment\": \"Kan være hva som helst\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 4400,\n \"percentage\": 44,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"bonus_lines\": [\n {\n \"bonus\": 3130,\n \"percentage\": 10,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"delivery\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"phone_number\": \"+4799999999\"\n },\n \"customer_id\": \"C13db4f63\",\n \"customer\": {\n \"gender\": \"male\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n },\n \"token\": {\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"value\": \"5345346544ffea22\",\n \"type\": \"VIPPS\"\n }\n },\n \"gross_amount\": 59800,\n \"gross_amount_dwh\": \"59800.01\",\n \"net_amount\": 47840,\n \"net_amount_dwh\": \"47840.01\",\n \"round_off_to_coin\": 100,\n \"currency\": \"NOK\",\n \"order_number\": \"order12345\",\n \"transaction_date\": \"2023-11-07T05:31:56Z\",\n \"amount_due\": 2050,\n \"amount_due_dwh\": \"2050.10\",\n \"no_of_items\": 4,\n \"is_changed\": true,\n \"transaction_id\": \"SC999-9991-1828\",\n \"total_discount\": 0,\n \"total_manual_discount_amount\": 0,\n \"total_manual_percentage_discount\": 0,\n \"operator_id\": \"000210\",\n \"operator_name\": \"Ole Anders\",\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"comment\": \"Kunden ønsker mer for info\",\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"payments\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"type_id\": \"<string>\",\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"token_type\": \"VIPPS\",\n \"description\": \"<string>\",\n \"voided\": true,\n \"card_info\": {\n \"balance_amount\": 123,\n \"card_amount\": 123,\n \"issuer_id\": 123,\n \"issuer_name\": \"Barcley\",\n \"session_id\": \"022\",\n \"terminal_id\": \"71015233\",\n \"card_number\": \"************00198-1\",\n \"card_type\": \"VISA\",\n \"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\"\n },\n \"reference_id\": \"B00668107235\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ]\n }\n ],\n \"infocode_items\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"receipt_text\": \"<string>\",\n \"discount_code\": [\n \"<string>\"\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/receipts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"store\": {\n \"id\": \"sc029\",\n \"name\": \"SC Oslo\",\n \"business_name\": \"SC Oslo AS\",\n \"chain\": \"SuperChain\",\n \"email\": \"contact@superchain.com\",\n \"gln\": \"5790001398644\",\n \"organization_number\": \"123456789MVA\",\n \"phone_number\": \"+4738260107\",\n \"mcc\": \"5814\",\n \"bax\": \"102603\",\n \"terminal_id\": \"T0292\",\n \"payout_destination_id\": \"seller-1\"\n },\n \"receipt_id\": \"714118\",\n \"purchase_at\": \"2023-11-07T05:31:56Z\",\n \"discounts\": [\n {\n \"requirement\": {\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"customer\": {\n \"addresses\": [\n {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ],\n \"custom_type\": [\n \"offsite\"\n ],\n \"type\": [\n \"custom\"\n ]\n }\n ],\n \"company\": {\n \"bussiness_name\": [\n \"TKP tech AS\"\n ],\n \"department\": [\n \"production\",\n \"research\"\n ],\n \"industry\": [\n \"J62.0.1\",\n \"J62.0.2\"\n ],\n \"number_of_employees\": [\n \"20\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"website\": [\n \"https://dintero.com\"\n ]\n },\n \"date_of_birth\": [\n \"1990-09-20\",\n \"1990-05-10\"\n ],\n \"enrolled_by\": {\n \"type\": [\n \"url\"\n ],\n \"value\": [\n \"https://mypage.example.dintero.com\"\n ]\n },\n \"favorite_store\": [\n \"sc029\"\n ],\n \"first_name\": [\n \"John\"\n ],\n \"gender\": [\n \"male\"\n ],\n \"last_name\": [\n \"Doe\"\n ],\n \"marketing_consent\": {\n \"email\": {\n \"consent\": [\n \"true\"\n ]\n },\n \"sms\": {\n \"consent\": [\n \"true\"\n ]\n }\n },\n \"status\": [\n \"vip\"\n ],\n \"term\": {\n \"id\": [\n \"<string>\"\n ]\n },\n \"type\": [\n \"<string>\"\n ],\n \"attributes\": {}\n },\n \"item\": {\n \"quantity\": 0,\n \"mixes\": [\n {\n \"quantity\": 1,\n \"reward_eligible\": true,\n \"items\": [\n {\n \"id\": \"b714118\"\n },\n {\n \"group_id\": \"g4\"\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"store_ids\": [\n \"sc029\"\n ],\n \"gross_amount\": 0,\n \"net_amount\": 0,\n \"currencies\": [\n {\n \"anything-but\": [\n \"NOK\"\n ]\n }\n ],\n \"stamp\": 5,\n \"discount_code\": \"TACO\",\n \"store\": {\n \"id\": [\n \"sc029\"\n ],\n \"name\": [\n \"SC Oslo\"\n ],\n \"business_name\": [\n \"SC Oslo AS\"\n ],\n \"address\": {\n \"country\": [\n \"NO\"\n ],\n \"postal_code\": [\n \"0349\"\n ],\n \"postal_place\": [\n \"Oslo\"\n ]\n },\n \"chain\": [\n \"SuperChain\"\n ],\n \"email\": [\n \"contact@superchain.com\"\n ],\n \"gln\": [\n \"5790001398644\"\n ],\n \"organization_number\": [\n \"123456789MVA\"\n ],\n \"phone_number\": [\n \"+4738260107\"\n ],\n \"mcc\": [\n 5814\n ],\n \"mcc_ranges\": [\n {\n \"start\": 5814,\n \"end\": 5815\n }\n ],\n \"bax\": [\n \"102603\"\n ],\n \"terminal_id\": [\n \"T0292\"\n ]\n }\n },\n \"reward\": {\n \"value\": 10000,\n \"values\": [\n {\n \"items\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ],\n \"value\": 123\n }\n ],\n \"base\": \"gross\",\n \"effect\": \"discount\"\n },\n \"campaign_id\": \"<string>\",\n \"active\": true,\n \"private\": false,\n \"name\": \"Spar 100,-\",\n \"receipt_text\": \"Mai Salg\",\n \"visible_from\": \"2023-11-07T05:31:56Z\",\n \"description\": \"Gjør et Stablestol kupp!\",\n \"limitation\": {\n \"dynamic_purchase_to_days\": 2,\n \"discount_activation\": [\n {\n \"type\": \"deactivate_if_discount_active\",\n \"value\": \"<string>\"\n }\n ],\n \"discount_reward_usage\": 1,\n \"discount_combination\": -1,\n \"discount_eligible\": \"item_eligible_for_discount\",\n \"discount_repeat_usage\": -1,\n \"stamp_expire_days\": 100,\n \"blacklist\": [\n {\n \"id\": \"b714118\",\n \"group_id\": \"B1\"\n }\n ]\n },\n \"metadata\": {\n \"campaign_id\": \"V101\",\n \"is_featured\": true,\n \"dintero:private_text:kind\": \"Gold\"\n },\n \"links\": [\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png\",\n \"rel\": \"thumbnail_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png\",\n \"rel\": \"medium_discount_image\"\n },\n {\n \"href\": \"https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer\",\n \"rel\": \"webshoop\"\n },\n {\n \"href\": \"https://example.dintero.com/newsletter/2018.pdf\",\n \"rel\": \"newletter\",\n \"type\": \"application/pdf\"\n }\n ],\n \"refs\": [\n {\n \"id\": \"e3da6be5-d8e0-466c-af66-b7f69472ebb5\",\n \"stamp\": 123,\n \"amount\": 10000,\n \"bonus\": 9050,\n \"statistics\": {\n \"amount\": 15050,\n \"bonus\": 11050,\n \"debit_balance\": 12350,\n \"stamp\": 11,\n \"usage\": 2\n },\n \"items\": [\n {\n \"line_id\": 1,\n \"amount\": 3000\n },\n {\n \"line_id\": 5,\n \"amount\": 7000\n }\n ],\n \"usage\": 1\n }\n ]\n }\n ],\n \"items\": [\n {\n \"id\": \"175938\",\n \"groups\": [\n {\n \"id\": \"B234\",\n \"name\": \"Stol\"\n },\n {\n \"id\": \"B1\",\n \"name\": \"Møbel\"\n }\n ],\n \"quantity\": 2,\n \"unit\": \"stk\",\n \"description\": \"Stablestol for utendørsbruk\",\n \"description_alias\": \"Stablestol\",\n \"net_amount\": 27840,\n \"net_amount_dwh\": \"27840.10\",\n \"gross_amount\": 39800,\n \"gross_amount_dwh\": \"34800.12\",\n \"unit_gross_price\": 10900,\n \"tax_percent\": 25,\n \"line_id\": 1,\n \"barcode\": \"3123212343212\",\n \"cost_price\": 2033,\n \"voided\": false,\n \"scale_item\": false,\n \"eligible_for_discount\": true,\n \"included_in_total_discount\": true,\n \"price_has_been_keyedIn\": false,\n \"discount_has_been_keyedIn\": false,\n \"is_return_item\": false,\n \"is_linked_item\": false,\n \"is_virtual_product\": false,\n \"is_changed\": true,\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"serial_id\": \"32424234231312312\",\n \"comment\": \"Kan være hva som helst\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"dimension\": {\n \"color\": \"<string>\",\n \"size\": \"<string>\",\n \"style\": \"<string>\",\n \"config\": \"<string>\",\n \"variant\": \"<string>\"\n },\n \"discount_lines\": [\n {\n \"amount\": 4400,\n \"percentage\": 44,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"bonus_lines\": [\n {\n \"bonus\": 3130,\n \"percentage\": 10,\n \"discount_id\": \"766da0ef-9283-42bd-b012-0582344ec53c\",\n \"description\": \"<string>\",\n \"line_id\": 1\n }\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"delivery\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"phone_number\": \"+4799999999\"\n },\n \"customer_id\": \"C13db4f63\",\n \"customer\": {\n \"gender\": \"male\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"customer@example.com\",\n \"metadata\": {\n \"dob_year\": 1985\n },\n \"phone_number\": \"+4799999999\",\n \"addresses\": [\n {\n \"address_line\": \"Sommerkroveien 34\",\n \"postal_place\": \"Oslo\",\n \"country\": \"NO\",\n \"address_line_2\": \"PB 123\",\n \"postal_code\": \"0349\",\n \"type\": \"<string>\",\n \"custom_type\": \"<string>\"\n }\n ],\n \"pays_tax\": false,\n \"date_of_birth\": \"1990-09-20\",\n \"favorite_store\": \"<string>\",\n \"marketing_consent\": {\n \"sms\": {\n \"consent\": true\n },\n \"email\": {\n \"consent\": true\n }\n },\n \"status\": \"<string>\",\n \"term\": {\n \"id\": \"<string>\"\n },\n \"token\": {\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"value\": \"5345346544ffea22\",\n \"type\": \"VIPPS\"\n }\n },\n \"gross_amount\": 59800,\n \"gross_amount_dwh\": \"59800.01\",\n \"net_amount\": 47840,\n \"net_amount_dwh\": \"47840.01\",\n \"round_off_to_coin\": 100,\n \"currency\": \"NOK\",\n \"order_number\": \"order12345\",\n \"transaction_date\": \"2023-11-07T05:31:56Z\",\n \"amount_due\": 2050,\n \"amount_due_dwh\": \"2050.10\",\n \"no_of_items\": 4,\n \"is_changed\": true,\n \"transaction_id\": \"SC999-9991-1828\",\n \"total_discount\": 0,\n \"total_manual_discount_amount\": 0,\n \"total_manual_percentage_discount\": 0,\n \"operator_id\": \"000210\",\n \"operator_name\": \"Ole Anders\",\n \"salesperson_id\": \"000111\",\n \"salesperson_name\": \"Jesper\",\n \"comment\": \"Kunden ønsker mer for info\",\n \"tax_lines\": [\n {\n \"amount\": 5584,\n \"amount_dwh\": \"5584.0440\",\n \"exempt\": false,\n \"included_in_price\": true,\n \"percentage\": 25,\n \"tax_basis\": 27920,\n \"tax_basis_dwh\": \"27920.22\",\n \"tax_code\": \"3\",\n \"tax_group\": \"Vmva-høy\"\n }\n ],\n \"payments\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"type_id\": \"<string>\",\n \"token_id\": \"983558fe-05bd-495f-92b5-9075d085db32\",\n \"token_type\": \"VIPPS\",\n \"description\": \"<string>\",\n \"voided\": true,\n \"card_info\": {\n \"balance_amount\": 123,\n \"card_amount\": 123,\n \"issuer_id\": 123,\n \"issuer_name\": \"Barcley\",\n \"session_id\": \"022\",\n \"terminal_id\": \"71015233\",\n \"card_number\": \"************00198-1\",\n \"card_type\": \"VISA\",\n \"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\"\n },\n \"reference_id\": \"B00668107235\",\n \"infocode_lines\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ]\n }\n ],\n \"infocode_items\": [\n {\n \"line_id\": 1,\n \"amount\": 123,\n \"amount_dwh\": \"1.14\",\n \"infocode_id\": \"<string>\",\n \"sub_infocode_id\": \"<string>\",\n \"information\": \"<string>\",\n \"input_type\": 123,\n \"withdrawal_from_stock\": false\n }\n ],\n \"receipt_text\": \"<string>\",\n \"discount_code\": [\n \"<string>\"\n ],\n \"extra_info\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n]")
.asString();{
"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
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}Authorizations
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
An id that uniquely identifies the account.
9Query Parameters
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.
x >= 1Body
receipt
Show child attributes
Show child attributes
1"714118"
The date and time for the receipt purchase
List all discounts referenced in discount_lines
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Details for the delivery
Show child attributes
Show child attributes
The customer id identifying the customer. (must not have trailing or leading spaces)
255"C13db4f63"
The customer, owner of the receipt
Show child attributes
Show child attributes
Monetary amount in smallest unit for the currency before discounts
59800
Monetary amount in smallest unit for the currency before discounts with decimal
"59800.01"
Monetary amount in smallest unit for the currency after discounts
47840
Monetary value in smallest unit for the currency after discounts with decimal
"47840.01"
100
The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
"NOK"
"order12345"
How much more need to be paid before the transaction is completed. Monetary amount in smallest unit for the currency
2050
Monetary value with decimal
"2050.10"
How many items did the customer buy
4
Discount applied to gross amount
"SC999-9991-1828"
0
Monetary amount in smallest unit for the currency
0
0
POS user
"000210"
Name of the POS user
"Ole Anders"
ID of the POS user
"000111"
"Jesper"
Status for the transaction
None, Voided, Posted, Concluded, Cancelled, OnHold, Training, Reprinted "Kunden ønsker mer for info"
Breakdown of the tax to different tax groups
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes