cURL
curl --request POST \
--url https://api.maesn.dev/accounting/offers \
--header 'Content-Type: application/json' \
--data '
{
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"currency": "EUR",
"lineItems": [
{
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "PIECE"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19
}
'import requests
url = "https://api.maesn.dev/accounting/offers"
payload = {
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"currency": "EUR",
"lineItems": [
{
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "PIECE"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
addresses: [
{
addressLine1: 'Main street 45',
addressLine2: '2nd floor',
city: 'Berlin',
countryCode: 'DE',
postalCode: '10243',
type: 'BILLING'
}
],
contactId: 'eaa28f49-6028-4b6e-bb12-d8f6278073fc',
currency: 'EUR',
lineItems: [
{
accountCode: '8400',
accountId: 'a23cc-334rn-finsd-438m',
description: 'SYDNEY Schreibtischstuhl, grün',
itemId: 'f9f6653e-5be6-ee11-a201-6045bde98d28',
name: 'GREEN CHAIR',
quantity: 1,
taxCode: 'CODE.19',
taxRatePercentage: '19',
taxType: 'type-19',
type: 'ITEM',
totalDiscountAmount: 10,
totalDiscountPercentage: 10,
totalGrossAmount: 109,
totalNetAmount: 100,
totalTaxAmount: 19,
unitAmount: 100,
unitDiscountAmount: 10,
unitDiscountPercentage: 10,
unitName: 'PIECE'
}
],
name: 'Trey Research',
offerDate: '2021-01-01T00:00:00Z',
offerNumber: '1001',
reference: 'RCXF197253F',
status: 'DRAFT',
taxText: 'Tax 19 percent',
totalDiscountAmount: 10,
totalDiscountPercentage: 10,
totalGrossAmount: 109,
totalNetAmount: 100,
totalTaxAmount: 19
})
};
fetch('https://api.maesn.dev/accounting/offers', 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/offers",
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([
'addresses' => [
[
'addressLine1' => 'Main street 45',
'addressLine2' => '2nd floor',
'city' => 'Berlin',
'countryCode' => 'DE',
'postalCode' => '10243',
'type' => 'BILLING'
]
],
'contactId' => 'eaa28f49-6028-4b6e-bb12-d8f6278073fc',
'currency' => 'EUR',
'lineItems' => [
[
'accountCode' => '8400',
'accountId' => 'a23cc-334rn-finsd-438m',
'description' => 'SYDNEY Schreibtischstuhl, grün',
'itemId' => 'f9f6653e-5be6-ee11-a201-6045bde98d28',
'name' => 'GREEN CHAIR',
'quantity' => 1,
'taxCode' => 'CODE.19',
'taxRatePercentage' => '19',
'taxType' => 'type-19',
'type' => 'ITEM',
'totalDiscountAmount' => 10,
'totalDiscountPercentage' => 10,
'totalGrossAmount' => 109,
'totalNetAmount' => 100,
'totalTaxAmount' => 19,
'unitAmount' => 100,
'unitDiscountAmount' => 10,
'unitDiscountPercentage' => 10,
'unitName' => 'PIECE'
]
],
'name' => 'Trey Research',
'offerDate' => '2021-01-01T00:00:00Z',
'offerNumber' => '1001',
'reference' => 'RCXF197253F',
'status' => 'DRAFT',
'taxText' => 'Tax 19 percent',
'totalDiscountAmount' => 10,
'totalDiscountPercentage' => 10,
'totalGrossAmount' => 109,
'totalNetAmount' => 100,
'totalTaxAmount' => 19
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/offers"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\n}")
req, _ := http.NewRequest("POST", url, payload)
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/offers")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maesn.dev/accounting/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\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": {
"id": "9dea18d2-748e-4bda-9f4c-02b08a9622cd",
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"createdDate": "2021-01-01T00:00:00Z",
"currency": "EUR",
"lineItems": [
{
"id": "c1f85763-5be6-ee11-a201-6045bde98d28",
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"createdDate": "2021-01-01T00:00:00Z",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "STÜCK",
"updatedDate": "2021-01-01T00:00:00Z"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"updatedDate": "2021-01-01T00:00:00Z"
}
}Offers
Create offer
POST
/
accounting
/
offers
cURL
curl --request POST \
--url https://api.maesn.dev/accounting/offers \
--header 'Content-Type: application/json' \
--data '
{
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"currency": "EUR",
"lineItems": [
{
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "PIECE"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19
}
'import requests
url = "https://api.maesn.dev/accounting/offers"
payload = {
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"currency": "EUR",
"lineItems": [
{
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "PIECE"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
addresses: [
{
addressLine1: 'Main street 45',
addressLine2: '2nd floor',
city: 'Berlin',
countryCode: 'DE',
postalCode: '10243',
type: 'BILLING'
}
],
contactId: 'eaa28f49-6028-4b6e-bb12-d8f6278073fc',
currency: 'EUR',
lineItems: [
{
accountCode: '8400',
accountId: 'a23cc-334rn-finsd-438m',
description: 'SYDNEY Schreibtischstuhl, grün',
itemId: 'f9f6653e-5be6-ee11-a201-6045bde98d28',
name: 'GREEN CHAIR',
quantity: 1,
taxCode: 'CODE.19',
taxRatePercentage: '19',
taxType: 'type-19',
type: 'ITEM',
totalDiscountAmount: 10,
totalDiscountPercentage: 10,
totalGrossAmount: 109,
totalNetAmount: 100,
totalTaxAmount: 19,
unitAmount: 100,
unitDiscountAmount: 10,
unitDiscountPercentage: 10,
unitName: 'PIECE'
}
],
name: 'Trey Research',
offerDate: '2021-01-01T00:00:00Z',
offerNumber: '1001',
reference: 'RCXF197253F',
status: 'DRAFT',
taxText: 'Tax 19 percent',
totalDiscountAmount: 10,
totalDiscountPercentage: 10,
totalGrossAmount: 109,
totalNetAmount: 100,
totalTaxAmount: 19
})
};
fetch('https://api.maesn.dev/accounting/offers', 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/offers",
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([
'addresses' => [
[
'addressLine1' => 'Main street 45',
'addressLine2' => '2nd floor',
'city' => 'Berlin',
'countryCode' => 'DE',
'postalCode' => '10243',
'type' => 'BILLING'
]
],
'contactId' => 'eaa28f49-6028-4b6e-bb12-d8f6278073fc',
'currency' => 'EUR',
'lineItems' => [
[
'accountCode' => '8400',
'accountId' => 'a23cc-334rn-finsd-438m',
'description' => 'SYDNEY Schreibtischstuhl, grün',
'itemId' => 'f9f6653e-5be6-ee11-a201-6045bde98d28',
'name' => 'GREEN CHAIR',
'quantity' => 1,
'taxCode' => 'CODE.19',
'taxRatePercentage' => '19',
'taxType' => 'type-19',
'type' => 'ITEM',
'totalDiscountAmount' => 10,
'totalDiscountPercentage' => 10,
'totalGrossAmount' => 109,
'totalNetAmount' => 100,
'totalTaxAmount' => 19,
'unitAmount' => 100,
'unitDiscountAmount' => 10,
'unitDiscountPercentage' => 10,
'unitName' => 'PIECE'
]
],
'name' => 'Trey Research',
'offerDate' => '2021-01-01T00:00:00Z',
'offerNumber' => '1001',
'reference' => 'RCXF197253F',
'status' => 'DRAFT',
'taxText' => 'Tax 19 percent',
'totalDiscountAmount' => 10,
'totalDiscountPercentage' => 10,
'totalGrossAmount' => 109,
'totalNetAmount' => 100,
'totalTaxAmount' => 19
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/offers"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\n}")
req, _ := http.NewRequest("POST", url, payload)
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/offers")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maesn.dev/accounting/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"addressLine1\": \"Main street 45\",\n \"addressLine2\": \"2nd floor\",\n \"city\": \"Berlin\",\n \"countryCode\": \"DE\",\n \"postalCode\": \"10243\",\n \"type\": \"BILLING\"\n }\n ],\n \"contactId\": \"eaa28f49-6028-4b6e-bb12-d8f6278073fc\",\n \"currency\": \"EUR\",\n \"lineItems\": [\n {\n \"accountCode\": \"8400\",\n \"accountId\": \"a23cc-334rn-finsd-438m\",\n \"description\": \"SYDNEY Schreibtischstuhl, grün\",\n \"itemId\": \"f9f6653e-5be6-ee11-a201-6045bde98d28\",\n \"name\": \"GREEN CHAIR\",\n \"quantity\": 1,\n \"taxCode\": \"CODE.19\",\n \"taxRatePercentage\": \"19\",\n \"taxType\": \"type-19\",\n \"type\": \"ITEM\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19,\n \"unitAmount\": 100,\n \"unitDiscountAmount\": 10,\n \"unitDiscountPercentage\": 10,\n \"unitName\": \"PIECE\"\n }\n ],\n \"name\": \"Trey Research\",\n \"offerDate\": \"2021-01-01T00:00:00Z\",\n \"offerNumber\": \"1001\",\n \"reference\": \"RCXF197253F\",\n \"status\": \"DRAFT\",\n \"taxText\": \"Tax 19 percent\",\n \"totalDiscountAmount\": 10,\n \"totalDiscountPercentage\": 10,\n \"totalGrossAmount\": 109,\n \"totalNetAmount\": 100,\n \"totalTaxAmount\": 19\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": {
"id": "9dea18d2-748e-4bda-9f4c-02b08a9622cd",
"addresses": [
{
"addressLine1": "Main street 45",
"addressLine2": "2nd floor",
"city": "Berlin",
"countryCode": "DE",
"postalCode": "10243",
"type": "BILLING"
}
],
"contactId": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"createdDate": "2021-01-01T00:00:00Z",
"currency": "EUR",
"lineItems": [
{
"id": "c1f85763-5be6-ee11-a201-6045bde98d28",
"accountCode": "8400",
"accountId": "a23cc-334rn-finsd-438m",
"createdDate": "2021-01-01T00:00:00Z",
"description": "SYDNEY Schreibtischstuhl, grün",
"itemId": "f9f6653e-5be6-ee11-a201-6045bde98d28",
"name": "GREEN CHAIR",
"quantity": 1,
"taxCode": "CODE.19",
"taxRatePercentage": "19",
"taxType": "type-19",
"type": "ITEM",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"unitAmount": 100,
"unitDiscountAmount": 10,
"unitDiscountPercentage": 10,
"unitName": "STÜCK",
"updatedDate": "2021-01-01T00:00:00Z"
}
],
"name": "Trey Research",
"offerDate": "2021-01-01T00:00:00Z",
"offerNumber": "1001",
"reference": "RCXF197253F",
"status": "DRAFT",
"taxText": "Tax 19 percent",
"totalDiscountAmount": 10,
"totalDiscountPercentage": 10,
"totalGrossAmount": 109,
"totalNetAmount": 100,
"totalTaxAmount": 19,
"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.Address[]
Show properties
Show properties
string
string
string
string
enum
Available options (ISO 3166-1 alpha-2):
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZWenum
Available options:
SELLING, DELIVERY,string
required
enum
Available options (3-letter ISO 4217):
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GQE, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZM, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SYP, SZL, THB, TJS, TMT, TND, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEB, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMK, ZWRLineItem[]
string
ISO-8601 date format, e.g., 2024-01-01T00:00:00Z

Lexware Office
Lexware Office
As a minimum a valid
contactId OR a name and countryCode must be provided. We recommend to always provide a valid address in addition in the latter caseThe offer is always created as a draft in Lexware Office. A
status provided in the request is ignored.The response only contains
id, createdDate and updatedDate. Use the GET Offer endpoint with the returned id to retrieve the full offer.Address[]
Show properties
Show properties
string
string
enum
The
countryCode field supports ISO 3166-1 alpha-2 (2-letter codes).
For details visit the Standardized Data section.Note that this field is required if no contactId is provided.string
Only one address is supported. Further entries in
addresses are ignored.string
enum
required
The
currency field supports ISO 4217 (3-letter codes).
For details visit the Standardized Data section.Note that Lexware Office only accepts EUR.string
required
For date format details visit the
Standardized Data section.LineItem[]
required
Show properties
Show properties
string
string
Note that this field is required if
type is SERVICE or RESOURCE.string
required
number
Required for all types except
COMMENT.number
Required for all types except
COMMENT.number
Discount in percent for the line item.
number
Total amount of the line item.
enum
required
Available options:
SERVICE, RESOURCE, COMMENT, ACCOUNT, ITEM, VALUE, FIXED_ASSET, CHARGEnumber
Net amount per unit. If
taxText is gross, the value is interpreted as the gross amount per unit.Required for all types except COMMENT.string
Required for all types except
COMMENT.string
string
required
For date format details visit the
Standardized Data section.enum
required
Available options:
net, gross, vatfree, intraCommunitySupply, constructionService13b, externalService13b, thirdPartyCountryService, thirdPartyCountryDeliverynumber
number
number
Body
application/json
Show child attributes
Show child attributes
Example:
"eaa28f49-6028-4b6e-bb12-d8f6278073fc"
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GQE, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZM, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SYP, SZL, THB, TJS, TMT, TND, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEB, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMK, ZWR Example:
"EUR"
Show child attributes
Show child attributes
Example:
"Trey Research"
Example:
"2021-01-01T00:00:00Z"
Example:
"1001"
Example:
"RCXF197253F"
Available options:
DRAFT, SENT, ACCEPTED, VOIDED, DECLINED, EXPIRED Example:
"DRAFT"
Example:
"Tax 19 percent"
Total discount applied, in the document currency.
Example:
10
Total discount applied, as a percentage.
Example:
10
Gross total — the net amount plus tax (the total payable, including VAT).
Example:
109
Net total — the sum of all line amounts before tax (excluding VAT).
Example:
100
Tax (VAT) total — the difference between the gross and net totals.
Example:
19
Last modified on September 4, 2026
Was this page helpful?