cURL
curl --request POST \
--url https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems \
--header 'Content-Type: application/json' \
--header 'X-ACCOUNT-KEY: <x-account-key>' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100
}
'import requests
url = "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems"
payload = {
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100
}
headers = {
"X-API-KEY": "<x-api-key>",
"X-ACCOUNT-KEY": "<x-account-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<x-api-key>',
'X-ACCOUNT-KEY': '<x-account-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: '6733a433-9662-4a40-8e36-e38ebda94fe1',
description: 'SEOUL Guest Chair, red',
dimensions: [
{
id: 'c1d2e3f4-5678-9abc-def0-1234567890ab',
categoryName: 'CostCenter',
name: 'C1'
}
],
discountItemAmount: 10,
discountItemPercentage: 10,
grossAmount: 109,
itemsAmount: 100,
itemId: '9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b',
name: 'RED CHAIR',
quantity: 1,
taxCode: '03',
taxRatePercentage: 19,
unitAmount: 100
})
};
fetch('https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '6733a433-9662-4a40-8e36-e38ebda94fe1',
'description' => 'SEOUL Guest Chair, red',
'dimensions' => [
[
'id' => 'c1d2e3f4-5678-9abc-def0-1234567890ab',
'categoryName' => 'CostCenter',
'name' => 'C1'
]
],
'discountItemAmount' => 10,
'discountItemPercentage' => 10,
'grossAmount' => 109,
'itemsAmount' => 100,
'itemId' => '9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b',
'name' => 'RED CHAIR',
'quantity' => 1,
'taxCode' => '03',
'taxRatePercentage' => 19,
'unitAmount' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-ACCOUNT-KEY: <x-account-key>",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems"
payload := strings.NewReader("{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("X-ACCOUNT-KEY", "<x-account-key>")
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.maesn.dev/accounting/invoices/{invoiceId}/lineItems")
.header("X-API-KEY", "<x-api-key>")
.header("X-ACCOUNT-KEY", "<x-account-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["X-ACCOUNT-KEY"] = '<x-account-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"warnings": [
"Field not used by target system"
],
"pagination": {
"total": 125,
"perPage": 50,
"currentPage": 1,
"totalPages": 3
}
},
"data": {
"lineItemId": "987a2b3c-4d5e-6f7g-8h9i-0j1k2l3m4n5o",
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"createdDate": "2021-01-01T00:00:00Z",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100,
"updatedDate": "2021-01-01T00:00:00Z"
}
}Invoice Lines
Create invoice line
POST
/
accounting
/
invoices
/
{invoiceId}
/
lineItems
cURL
curl --request POST \
--url https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems \
--header 'Content-Type: application/json' \
--header 'X-ACCOUNT-KEY: <x-account-key>' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100
}
'import requests
url = "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems"
payload = {
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100
}
headers = {
"X-API-KEY": "<x-api-key>",
"X-ACCOUNT-KEY": "<x-account-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<x-api-key>',
'X-ACCOUNT-KEY': '<x-account-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: '6733a433-9662-4a40-8e36-e38ebda94fe1',
description: 'SEOUL Guest Chair, red',
dimensions: [
{
id: 'c1d2e3f4-5678-9abc-def0-1234567890ab',
categoryName: 'CostCenter',
name: 'C1'
}
],
discountItemAmount: 10,
discountItemPercentage: 10,
grossAmount: 109,
itemsAmount: 100,
itemId: '9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b',
name: 'RED CHAIR',
quantity: 1,
taxCode: '03',
taxRatePercentage: 19,
unitAmount: 100
})
};
fetch('https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '6733a433-9662-4a40-8e36-e38ebda94fe1',
'description' => 'SEOUL Guest Chair, red',
'dimensions' => [
[
'id' => 'c1d2e3f4-5678-9abc-def0-1234567890ab',
'categoryName' => 'CostCenter',
'name' => 'C1'
]
],
'discountItemAmount' => 10,
'discountItemPercentage' => 10,
'grossAmount' => 109,
'itemsAmount' => 100,
'itemId' => '9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b',
'name' => 'RED CHAIR',
'quantity' => 1,
'taxCode' => '03',
'taxRatePercentage' => 19,
'unitAmount' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-ACCOUNT-KEY: <x-account-key>",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems"
payload := strings.NewReader("{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("X-ACCOUNT-KEY", "<x-account-key>")
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.maesn.dev/accounting/invoices/{invoiceId}/lineItems")
.header("X-API-KEY", "<x-api-key>")
.header("X-ACCOUNT-KEY", "<x-account-key>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maesn.dev/accounting/invoices/{invoiceId}/lineItems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["X-ACCOUNT-KEY"] = '<x-account-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"6733a433-9662-4a40-8e36-e38ebda94fe1\",\n \"description\": \"SEOUL Guest Chair, red\",\n \"dimensions\": [\n {\n \"id\": \"c1d2e3f4-5678-9abc-def0-1234567890ab\",\n \"categoryName\": \"CostCenter\",\n \"name\": \"C1\"\n }\n ],\n \"discountItemAmount\": 10,\n \"discountItemPercentage\": 10,\n \"grossAmount\": 109,\n \"itemsAmount\": 100,\n \"itemId\": \"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b\",\n \"name\": \"RED CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"03\",\n \"taxRatePercentage\": 19,\n \"unitAmount\": 100\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"warnings": [
"Field not used by target system"
],
"pagination": {
"total": 125,
"perPage": 50,
"currentPage": 1,
"totalPages": 3
}
},
"data": {
"lineItemId": "987a2b3c-4d5e-6f7g-8h9i-0j1k2l3m4n5o",
"accountId": "6733a433-9662-4a40-8e36-e38ebda94fe1",
"createdDate": "2021-01-01T00:00:00Z",
"description": "SEOUL Guest Chair, red",
"dimensions": [
{
"id": "c1d2e3f4-5678-9abc-def0-1234567890ab",
"categoryName": "CostCenter",
"name": "C1"
}
],
"discountItemAmount": 10,
"discountItemPercentage": 10,
"grossAmount": 109,
"itemsAmount": 100,
"itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
"name": "RED CHAIR",
"quantity": 1,
"taxCode": "03",
"taxRatePercentage": 19,
"unitAmount": 100,
"updatedDate": "2021-01-01T00:00:00Z"
}
}Field support per integration

Business Central
Business Central
If you’re not using the Interactive Authentication Flow, make sure the query parameters
environmentName and companyId are correctly populated.
You can obtain these values by using the GET Environments and GET Companies endpoints available under the Authentication section.string
number
number
number
number
string
number
Note that quantity can be a decimal numeral.
string
number
number
Path Parameters
Body
application/json
Example:
"6733a433-9662-4a40-8e36-e38ebda94fe1"
Example:
"SEOUL Guest Chair, red"
Show child attributes
Show child attributes
Example:
10
Example:
10
Example:
109
Example:
100
Example:
"9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b"
Example:
"RED CHAIR"
Example:
1
Example:
"03"
Example:
19
Example:
100
Last modified on July 9, 2026
Was this page helpful?
⌘I