aid_discounts_available_for_receipt_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt \
--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",
"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>"
}
]
}
]
}
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt"
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",
"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>"
}
]
}
]
}
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',
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>'}]
}
]
})
};
fetch('https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt', 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}/discounts/available_for_receipt"
payload := strings.NewReader("{\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 \"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}")
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}/discounts/available_for_receipt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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 \"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}")
.asString();{
"store": {
"id": "sc029",
"name": "SC Oslo",
"business_name": "SC Oslo AS",
"address": {
"address_line": "Sommerkroveien 34",
"postal_place": "Oslo",
"country": "NO",
"address_line_2": "PB 123",
"postal_code": "0349"
},
"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",
"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",
"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": [
{
"items": [
{
"id": "b714118"
},
{
"group_id": "g4"
}
],
"quantity": 1,
"reward_eligible": true
}
],
"items": [
{
"id": "b714118",
"group_id": "B1"
}
]
},
"store_ids": [
"sc029"
],
"gross_amount": 0,
"net_amount": 0,
"currencies": [
{
"anything-but": [
"NOK"
]
}
],
"stamp": 5,
"discount_code": "TACO",
"store": {
"id": [
"sc029"
],
"name": [
"SC Oslo"
],
"business_name": [
"SC Oslo AS"
],
"address": {
"country": [
"NO"
],
"postal_code": [
"0349"
],
"postal_place": [
"Oslo"
]
},
"chain": [
"SuperChain"
],
"email": [
"contact@superchain.com"
],
"gln": [
"5790001398644"
],
"organization_number": [
"123456789MVA"
],
"phone_number": [
"+4738260107"
],
"mcc": [
5814
],
"mcc_ranges": [
{
"start": 5814,
"end": 5815
}
],
"bax": [
"102603"
],
"terminal_id": [
"T0292"
]
}
},
"reward": {
"type": "discount_amount",
"value": 10000,
"values": [
{
"items": [
{
"id": "b714118",
"group_id": "B1"
}
],
"value": 123
}
],
"base": "gross",
"effect": "discount"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_at": "2023-11-07T05:31:56Z",
"campaign_id": "<string>",
"active": true,
"private": false,
"updated_by": "3d1e4824-5474-48e7-a369-4f603fa4c5b8",
"type": "item",
"name": "Spar 100,-",
"receipt_text": "Mai Salg",
"visible_from": "2023-11-07T05:31:56Z",
"description": "Gjør et Stablestol kupp!",
"limitation": {
"dynamic_purchase_to_days": 2,
"discount_activation": [
{
"type": "deactivate_if_discount_active",
"value": "<string>"
}
],
"discount_hours": {
"hours": [
{
"day": "mon",
"start": "10:00",
"end": "20:00"
}
],
"timezone": "Europe/Oslo"
},
"discount_reward_usage": 1,
"discount_combination": -1,
"discount_eligible": "item_eligible_for_discount",
"discount_repeat_usage": -1,
"stamp_expire_days": 100,
"blacklist": [
{
"id": "b714118",
"group_id": "B1"
}
]
},
"metadata": {
"campaign_id": "V101",
"is_featured": true,
"dintero:private_text:kind": "Gold"
},
"links": [
{
"href": "https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png",
"rel": "thumbnail_discount_image"
},
{
"href": "https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png",
"rel": "medium_discount_image"
},
{
"href": "https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer",
"rel": "webshoop"
},
{
"href": "https://example.dintero.com/newsletter/2018.pdf",
"rel": "newletter",
"type": "application/pdf"
}
],
"refs": [
{
"id": "e3da6be5-d8e0-466c-af66-b7f69472ebb5",
"stamp": 123,
"amount": 10000,
"bonus": 9050,
"statistics": {
"amount": 15050,
"bonus": 11050,
"debit_balance": 12350,
"stamp": 11,
"usage": 2
},
"items": [
{
"line_id": 1,
"amount": 3000
},
{
"line_id": 5,
"amount": 7000
}
],
"usage": 1
}
]
}
],
"items": [
{
"id": "175938",
"groups": [
{
"id": "B234",
"name": "Stol"
},
{
"id": "B1",
"name": "Møbel"
}
],
"quantity": 2,
"unit": "stk",
"description": "Stablestol for utendørsbruk",
"description_alias": "Stablestol",
"net_amount": 27840,
"net_amount_dwh": "27840.10",
"gross_amount": 39800,
"gross_amount_dwh": "34800.12",
"unit_gross_price": 10900,
"tax_percent": 25,
"line_id": 1,
"barcode": "3123212343212",
"cost_price": 2033,
"voided": false,
"scale_item": false,
"eligible_for_discount": true,
"included_in_total_discount": true,
"price_has_been_keyedIn": false,
"discount_has_been_keyedIn": false,
"is_return_item": false,
"is_linked_item": false,
"is_virtual_product": false,
"is_changed": true,
"salesperson_id": "000111",
"salesperson_name": "Jesper",
"serial_id": "32424234231312312",
"comment": "Kan være hva som helst",
"infocode_lines": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
],
"tax_lines": [
{
"amount": 5584,
"amount_dwh": "5584.0440",
"exempt": false,
"included_in_price": true,
"percentage": 25,
"tax_basis": 27920,
"tax_basis_dwh": "27920.22",
"tax_code": "3",
"tax_group": "Vmva-høy"
}
],
"dimension": {
"color": "<string>",
"size": "<string>",
"style": "<string>",
"config": "<string>",
"variant": "<string>"
},
"discount_lines": [
{
"amount": 4400,
"percentage": 44,
"discount_type": "customer",
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_type": "customer",
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<string>",
"value_type": "string"
}
]
}
],
"delivery": {
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"address": {
"address_line": "Sommerkroveien 34",
"postal_place": "Oslo",
"country": "NO",
"address_line_2": "PB 123",
"postal_code": "0349"
}
},
"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",
"enrolled_by": {
"value": "https://facebook.com",
"type": "url"
},
"favorite_store": "<string>",
"company": {
"bussiness_name": "TKP tech AS",
"organization_number": "123456789MVA",
"department": "sales department",
"industry": "computer industry",
"website": "<string>",
"number_of_employees": "<string>"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"status": "<string>",
"term": {
"id": "<string>"
},
"type": "customer",
"token": {
"token_id": "983558fe-05bd-495f-92b5-9075d085db32",
"value": "5345346544ffea22",
"type": "VIPPS"
}
},
"gross_amount": 59800,
"gross_amount_dwh": "59800.01",
"net_amount": 47840,
"net_amount_dwh": "47840.01",
"round_off_to_coin": 100,
"currency": "NOK",
"order_number": "order12345",
"transaction_date": "2023-11-07T05:31:56Z",
"amount_due": 2050,
"amount_due_dwh": "2050.10",
"no_of_items": 4,
"is_changed": true,
"transaction_id": "SC999-9991-1828",
"total_discount": 0,
"total_manual_discount_amount": 0,
"total_manual_percentage_discount": 0,
"operator_id": "000210",
"operator_name": "Ole Anders",
"salesperson_id": "000111",
"salesperson_name": "Jesper",
"entry_status": "None",
"comment": "Kunden ønsker mer for info",
"tax_lines": [
{
"amount": 5584,
"amount_dwh": "5584.0440",
"exempt": false,
"included_in_price": true,
"percentage": 25,
"tax_basis": 27920,
"tax_basis_dwh": "27920.22",
"tax_code": "3",
"tax_group": "Vmva-høy"
}
],
"payments": [
{
"line_id": 1,
"amount": 123,
"type_id": "<string>",
"token_id": "983558fe-05bd-495f-92b5-9075d085db32",
"token_type": "VIPPS",
"description": "<string>",
"voided": true,
"card_info": {
"balance_amount": 123,
"card_amount": 123,
"issuer_id": 123,
"issuer_name": "Barcley",
"session_id": "022",
"terminal_id": "71015233",
"card_number": "************00198-1",
"card_type": "VISA",
"receipt": "BAX: 111010-71015233\\n\\r\\11/11/2015 14:41\\n\\r\\345849\\n\\r\\ VISA CLASSIC\\n\\r\\************5671\\n\\r\\AID:A0000000031010\\n\\r\\ REF:011 006687000000\\n\\r\\RESP:00 GODKJENT\\n\\r\\RETUR AV VARER\\n\\r \\NOK= 50.00\\n\\r\\SIGNATUR................\\n\\r \\KORTHOLDERS KOPI\n"
},
"reference_id": "B00668107235",
"infocode_lines": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
]
}
],
"infocode_items": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
],
"receipt_text": "<string>",
"discount_code": [
"<string>"
],
"extra_info": [
{
"key": "<string>",
"value": "<string>",
"value_type": "string"
}
]
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}use discounts
Post receipt for discount
Find discounts available for the receipt
Active discounts
customer_idwill be used to find active discounts for the purchase.customer.tokenwill be used to resolvecustomer_idif nocustomer_idis provided.- No discounts will be given if the token does not resolve to any customer_id.
- A receipt with no
customer_idand nocustomer.tokenwill only be applicable for active discounts given to/(see)
Requirement of the receipt
- all items must have
eligible_for_discountset to enable for discount - all items must have a positive
gross_amountto qualify for discount - a
netbase discount reward requires the receipt to include existing discounts as discount_lines (on item) in order to calculate net
A receipt that qualified for discount will have the is_change
property set to true. Any items that has received a discount will be
flagged by is_change and have one or more new entries to its
discount_lines.
The receipt discounts list will be populated with all discounts the
receipt is qualified to receive
scopes:
- admin:discounts
- write:discounts
- write:discounts:/available_for_receipt
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
discounts
/
available_for_receipt
aid_discounts_available_for_receipt_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt \
--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",
"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>"
}
]
}
]
}
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt"
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",
"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>"
}
]
}
]
}
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',
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>'}]
}
]
})
};
fetch('https://api.dintero.com/v1/accounts/{aid}/discounts/available_for_receipt', 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}/discounts/available_for_receipt"
payload := strings.NewReader("{\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 \"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}")
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}/discounts/available_for_receipt")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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 \"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}")
.asString();{
"store": {
"id": "sc029",
"name": "SC Oslo",
"business_name": "SC Oslo AS",
"address": {
"address_line": "Sommerkroveien 34",
"postal_place": "Oslo",
"country": "NO",
"address_line_2": "PB 123",
"postal_code": "0349"
},
"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",
"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",
"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": [
{
"items": [
{
"id": "b714118"
},
{
"group_id": "g4"
}
],
"quantity": 1,
"reward_eligible": true
}
],
"items": [
{
"id": "b714118",
"group_id": "B1"
}
]
},
"store_ids": [
"sc029"
],
"gross_amount": 0,
"net_amount": 0,
"currencies": [
{
"anything-but": [
"NOK"
]
}
],
"stamp": 5,
"discount_code": "TACO",
"store": {
"id": [
"sc029"
],
"name": [
"SC Oslo"
],
"business_name": [
"SC Oslo AS"
],
"address": {
"country": [
"NO"
],
"postal_code": [
"0349"
],
"postal_place": [
"Oslo"
]
},
"chain": [
"SuperChain"
],
"email": [
"contact@superchain.com"
],
"gln": [
"5790001398644"
],
"organization_number": [
"123456789MVA"
],
"phone_number": [
"+4738260107"
],
"mcc": [
5814
],
"mcc_ranges": [
{
"start": 5814,
"end": 5815
}
],
"bax": [
"102603"
],
"terminal_id": [
"T0292"
]
}
},
"reward": {
"type": "discount_amount",
"value": 10000,
"values": [
{
"items": [
{
"id": "b714118",
"group_id": "B1"
}
],
"value": 123
}
],
"base": "gross",
"effect": "discount"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_at": "2023-11-07T05:31:56Z",
"campaign_id": "<string>",
"active": true,
"private": false,
"updated_by": "3d1e4824-5474-48e7-a369-4f603fa4c5b8",
"type": "item",
"name": "Spar 100,-",
"receipt_text": "Mai Salg",
"visible_from": "2023-11-07T05:31:56Z",
"description": "Gjør et Stablestol kupp!",
"limitation": {
"dynamic_purchase_to_days": 2,
"discount_activation": [
{
"type": "deactivate_if_discount_active",
"value": "<string>"
}
],
"discount_hours": {
"hours": [
{
"day": "mon",
"start": "10:00",
"end": "20:00"
}
],
"timezone": "Europe/Oslo"
},
"discount_reward_usage": 1,
"discount_combination": -1,
"discount_eligible": "item_eligible_for_discount",
"discount_repeat_usage": -1,
"stamp_expire_days": 100,
"blacklist": [
{
"id": "b714118",
"group_id": "B1"
}
]
},
"metadata": {
"campaign_id": "V101",
"is_featured": true,
"dintero:private_text:kind": "Gold"
},
"links": [
{
"href": "https://example.dintero.com/c/photos/2018/6_20_thumbnail_discount_image.png",
"rel": "thumbnail_discount_image"
},
{
"href": "https://example.dintero.com/c/photos/2018/6_20_medium_discount_image.png",
"rel": "medium_discount_image"
},
{
"href": "https://example.dintero.com/shop?utm_source=dintero&utm_medium=email&utm_campaign=spring-summer",
"rel": "webshoop"
},
{
"href": "https://example.dintero.com/newsletter/2018.pdf",
"rel": "newletter",
"type": "application/pdf"
}
],
"refs": [
{
"id": "e3da6be5-d8e0-466c-af66-b7f69472ebb5",
"stamp": 123,
"amount": 10000,
"bonus": 9050,
"statistics": {
"amount": 15050,
"bonus": 11050,
"debit_balance": 12350,
"stamp": 11,
"usage": 2
},
"items": [
{
"line_id": 1,
"amount": 3000
},
{
"line_id": 5,
"amount": 7000
}
],
"usage": 1
}
]
}
],
"items": [
{
"id": "175938",
"groups": [
{
"id": "B234",
"name": "Stol"
},
{
"id": "B1",
"name": "Møbel"
}
],
"quantity": 2,
"unit": "stk",
"description": "Stablestol for utendørsbruk",
"description_alias": "Stablestol",
"net_amount": 27840,
"net_amount_dwh": "27840.10",
"gross_amount": 39800,
"gross_amount_dwh": "34800.12",
"unit_gross_price": 10900,
"tax_percent": 25,
"line_id": 1,
"barcode": "3123212343212",
"cost_price": 2033,
"voided": false,
"scale_item": false,
"eligible_for_discount": true,
"included_in_total_discount": true,
"price_has_been_keyedIn": false,
"discount_has_been_keyedIn": false,
"is_return_item": false,
"is_linked_item": false,
"is_virtual_product": false,
"is_changed": true,
"salesperson_id": "000111",
"salesperson_name": "Jesper",
"serial_id": "32424234231312312",
"comment": "Kan være hva som helst",
"infocode_lines": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
],
"tax_lines": [
{
"amount": 5584,
"amount_dwh": "5584.0440",
"exempt": false,
"included_in_price": true,
"percentage": 25,
"tax_basis": 27920,
"tax_basis_dwh": "27920.22",
"tax_code": "3",
"tax_group": "Vmva-høy"
}
],
"dimension": {
"color": "<string>",
"size": "<string>",
"style": "<string>",
"config": "<string>",
"variant": "<string>"
},
"discount_lines": [
{
"amount": 4400,
"percentage": 44,
"discount_type": "customer",
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"bonus_lines": [
{
"bonus": 3130,
"percentage": 10,
"discount_type": "customer",
"discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
"description": "<string>",
"line_id": 1
}
],
"extra_info": [
{
"key": "<string>",
"value": "<string>",
"value_type": "string"
}
]
}
],
"delivery": {
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"address": {
"address_line": "Sommerkroveien 34",
"postal_place": "Oslo",
"country": "NO",
"address_line_2": "PB 123",
"postal_code": "0349"
}
},
"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",
"enrolled_by": {
"value": "https://facebook.com",
"type": "url"
},
"favorite_store": "<string>",
"company": {
"bussiness_name": "TKP tech AS",
"organization_number": "123456789MVA",
"department": "sales department",
"industry": "computer industry",
"website": "<string>",
"number_of_employees": "<string>"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"status": "<string>",
"term": {
"id": "<string>"
},
"type": "customer",
"token": {
"token_id": "983558fe-05bd-495f-92b5-9075d085db32",
"value": "5345346544ffea22",
"type": "VIPPS"
}
},
"gross_amount": 59800,
"gross_amount_dwh": "59800.01",
"net_amount": 47840,
"net_amount_dwh": "47840.01",
"round_off_to_coin": 100,
"currency": "NOK",
"order_number": "order12345",
"transaction_date": "2023-11-07T05:31:56Z",
"amount_due": 2050,
"amount_due_dwh": "2050.10",
"no_of_items": 4,
"is_changed": true,
"transaction_id": "SC999-9991-1828",
"total_discount": 0,
"total_manual_discount_amount": 0,
"total_manual_percentage_discount": 0,
"operator_id": "000210",
"operator_name": "Ole Anders",
"salesperson_id": "000111",
"salesperson_name": "Jesper",
"entry_status": "None",
"comment": "Kunden ønsker mer for info",
"tax_lines": [
{
"amount": 5584,
"amount_dwh": "5584.0440",
"exempt": false,
"included_in_price": true,
"percentage": 25,
"tax_basis": 27920,
"tax_basis_dwh": "27920.22",
"tax_code": "3",
"tax_group": "Vmva-høy"
}
],
"payments": [
{
"line_id": 1,
"amount": 123,
"type_id": "<string>",
"token_id": "983558fe-05bd-495f-92b5-9075d085db32",
"token_type": "VIPPS",
"description": "<string>",
"voided": true,
"card_info": {
"balance_amount": 123,
"card_amount": 123,
"issuer_id": 123,
"issuer_name": "Barcley",
"session_id": "022",
"terminal_id": "71015233",
"card_number": "************00198-1",
"card_type": "VISA",
"receipt": "BAX: 111010-71015233\\n\\r\\11/11/2015 14:41\\n\\r\\345849\\n\\r\\ VISA CLASSIC\\n\\r\\************5671\\n\\r\\AID:A0000000031010\\n\\r\\ REF:011 006687000000\\n\\r\\RESP:00 GODKJENT\\n\\r\\RETUR AV VARER\\n\\r \\NOK= 50.00\\n\\r\\SIGNATUR................\\n\\r \\KORTHOLDERS KOPI\n"
},
"reference_id": "B00668107235",
"infocode_lines": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
]
}
],
"infocode_items": [
{
"line_id": 1,
"amount": 123,
"amount_dwh": "1.14",
"infocode_id": "<string>",
"sub_infocode_id": "<string>",
"information": "<string>",
"input_type": 123,
"withdrawal_from_stock": false
}
],
"receipt_text": "<string>",
"discount_code": [
"<string>"
],
"extra_info": [
{
"key": "<string>",
"value": "<string>",
"value_type": "string"
}
]
}{
"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
Body
application/json
receipt
Response
Receipt with discount