curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'invoice={
"type": "INVOICE",
"sellerId": "4711",
"orderId": "43523-43432-43532",
"invoiceNumber": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"taxCalculationDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"billingAddress": {
"lastName": "Nym",
"street": "Leyboldstrasse",
"city": "Hürth",
"country": "DE",
"firstName": "Arno",
"companyName": "<string>",
"houseNumber": "14a",
"addition": "1. UG",
"postcode": "50354",
"phone": "+49 0221 123456",
"state": "NRW"
},
"originalInvoiceNumber": "<string>",
"transactionDetails": "<string>",
"shipmentDate": "2023-11-07T05:31:56Z",
"exportOutsideEu": true,
"sellerVatNumber": "<string>",
"buyerVatNumber": "<string>",
"orderList": [
{
"orderId": "43523-43432-43532",
"purchasedAt": "2023-11-07T05:31:56Z",
"transactionItemList": [
{
"orderItemId": "<string>",
"totalGrossPriceWithDiscounts": 1,
"totalNetPriceWithDiscounts": 1,
"totalVatAmountWithDiscounts": 1,
"vatRate": 1,
"sku": "<string>",
"title": "<string>",
"quantity": 1,
"discounts": [
{
"totalGrossPrice": 0,
"totalNetPrice": 0,
"totalVatAmount": 0,
"name": "10% Winter Sale",
"discountId": "D1265327",
"vatRate": 0
}
]
}
]
}
]
}'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data"
payload = { "invoice": "{
\"type\": \"INVOICE\",
\"sellerId\": \"4711\",
\"orderId\": \"43523-43432-43532\",
\"invoiceNumber\": \"<string>\",
\"transactionDate\": \"2023-11-07T05:31:56Z\",
\"taxCalculationDate\": \"2023-11-07T05:31:56Z\",
\"currency\": \"<string>\",
\"billingAddress\": {
\"lastName\": \"Nym\",
\"street\": \"Leyboldstrasse\",
\"city\": \"Hürth\",
\"country\": \"DE\",
\"firstName\": \"Arno\",
\"companyName\": \"<string>\",
\"houseNumber\": \"14a\",
\"addition\": \"1. UG\",
\"postcode\": \"50354\",
\"phone\": \"+49 0221 123456\",
\"state\": \"NRW\"
},
\"originalInvoiceNumber\": \"<string>\",
\"transactionDetails\": \"<string>\",
\"shipmentDate\": \"2023-11-07T05:31:56Z\",
\"exportOutsideEu\": true,
\"sellerVatNumber\": \"<string>\",
\"buyerVatNumber\": \"<string>\",
\"orderList\": [
{
\"orderId\": \"43523-43432-43532\",
\"purchasedAt\": \"2023-11-07T05:31:56Z\",
\"transactionItemList\": [
{
\"orderItemId\": \"<string>\",
\"totalGrossPriceWithDiscounts\": 1,
\"totalNetPriceWithDiscounts\": 1,
\"totalVatAmountWithDiscounts\": 1,
\"vatRate\": 1,
\"sku\": \"<string>\",
\"title\": \"<string>\",
\"quantity\": 1,
\"discounts\": [
{
\"totalGrossPrice\": 0,
\"totalNetPrice\": 0,
\"totalVatAmount\": 0,
\"name\": \"10% Winter Sale\",
\"discountId\": \"D1265327\",
\"vatRate\": 0
}
]
}
]
}
]
}" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
invoice: '{\n "type": "INVOICE",\n "sellerId": "4711",\n "orderId": "43523-43432-43532",\n "invoiceNumber": "<string>",\n "transactionDate": "2023-11-07T05:31:56Z",\n "taxCalculationDate": "2023-11-07T05:31:56Z",\n "currency": "<string>",\n "billingAddress": {\n "lastName": "Nym",\n "street": "Leyboldstrasse",\n "city": "Hürth",\n "country": "DE",\n "firstName": "Arno",\n "companyName": "<string>",\n "houseNumber": "14a",\n "addition": "1. UG",\n "postcode": "50354",\n "phone": "+49 0221 123456",\n "state": "NRW"\n },\n "originalInvoiceNumber": "<string>",\n "transactionDetails": "<string>",\n "shipmentDate": "2023-11-07T05:31:56Z",\n "exportOutsideEu": true,\n "sellerVatNumber": "<string>",\n "buyerVatNumber": "<string>",\n "orderList": [\n {\n "orderId": "43523-43432-43532",\n "purchasedAt": "2023-11-07T05:31:56Z",\n "transactionItemList": [\n {\n "orderItemId": "<string>",\n "totalGrossPriceWithDiscounts": 1,\n "totalNetPriceWithDiscounts": 1,\n "totalVatAmountWithDiscounts": 1,\n "vatRate": 1,\n "sku": "<string>",\n "title": "<string>",\n "quantity": 1,\n "discounts": [\n {\n "totalGrossPrice": 0,\n "totalNetPrice": 0,\n "totalVatAmount": 0,\n "name": "10% Winter Sale",\n "discountId": "D1265327",\n "vatRate": 0\n }\n ]\n }\n ]\n }\n ]\n}'
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data', 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://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data"
payload := strings.NewReader("invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "VAL100",
"message": "Required field sellerId not found",
"severity": "error",
"hint": "Check the field `sellerId` — it must be a non-empty string."
}
]
}{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Upload Invoice Data
Submit the structured invoice data for an order without an invoice document. The payload is the same
as for POST /v1/channel/order/invoice, only the document part is missing completely.
This is only accepted when invoiceDataTransfer is from-channel for that order, either set as an order
override or, if the order does not say anything about it, by the channel default. Otherwise the request is
rejected with 400 and error code CHN706.
The Seller receives these invoice data as a regular Channel:Order.Invoice Event, but without a document
reference. Such a submission does not claim the invoice number, the Seller can still upload the actual
document for the same order and the same invoice number using POST /v1/seller/order/invoice.
Submitting the same invoice number twice for the same Seller is rejected with 400 and error code CHN704,
so a retry after a timeout does not produce a second Channel:Order.Invoice Event.
An originalInvoiceNumber must refer to an invoice number already submitted for that Seller, either with
a document or as invoice data. An unknown reference is rejected with 400 and error code CHN705.
curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'invoice={
"type": "INVOICE",
"sellerId": "4711",
"orderId": "43523-43432-43532",
"invoiceNumber": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"taxCalculationDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"billingAddress": {
"lastName": "Nym",
"street": "Leyboldstrasse",
"city": "Hürth",
"country": "DE",
"firstName": "Arno",
"companyName": "<string>",
"houseNumber": "14a",
"addition": "1. UG",
"postcode": "50354",
"phone": "+49 0221 123456",
"state": "NRW"
},
"originalInvoiceNumber": "<string>",
"transactionDetails": "<string>",
"shipmentDate": "2023-11-07T05:31:56Z",
"exportOutsideEu": true,
"sellerVatNumber": "<string>",
"buyerVatNumber": "<string>",
"orderList": [
{
"orderId": "43523-43432-43532",
"purchasedAt": "2023-11-07T05:31:56Z",
"transactionItemList": [
{
"orderItemId": "<string>",
"totalGrossPriceWithDiscounts": 1,
"totalNetPriceWithDiscounts": 1,
"totalVatAmountWithDiscounts": 1,
"vatRate": 1,
"sku": "<string>",
"title": "<string>",
"quantity": 1,
"discounts": [
{
"totalGrossPrice": 0,
"totalNetPrice": 0,
"totalVatAmount": 0,
"name": "10% Winter Sale",
"discountId": "D1265327",
"vatRate": 0
}
]
}
]
}
]
}'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data"
payload = { "invoice": "{
\"type\": \"INVOICE\",
\"sellerId\": \"4711\",
\"orderId\": \"43523-43432-43532\",
\"invoiceNumber\": \"<string>\",
\"transactionDate\": \"2023-11-07T05:31:56Z\",
\"taxCalculationDate\": \"2023-11-07T05:31:56Z\",
\"currency\": \"<string>\",
\"billingAddress\": {
\"lastName\": \"Nym\",
\"street\": \"Leyboldstrasse\",
\"city\": \"Hürth\",
\"country\": \"DE\",
\"firstName\": \"Arno\",
\"companyName\": \"<string>\",
\"houseNumber\": \"14a\",
\"addition\": \"1. UG\",
\"postcode\": \"50354\",
\"phone\": \"+49 0221 123456\",
\"state\": \"NRW\"
},
\"originalInvoiceNumber\": \"<string>\",
\"transactionDetails\": \"<string>\",
\"shipmentDate\": \"2023-11-07T05:31:56Z\",
\"exportOutsideEu\": true,
\"sellerVatNumber\": \"<string>\",
\"buyerVatNumber\": \"<string>\",
\"orderList\": [
{
\"orderId\": \"43523-43432-43532\",
\"purchasedAt\": \"2023-11-07T05:31:56Z\",
\"transactionItemList\": [
{
\"orderItemId\": \"<string>\",
\"totalGrossPriceWithDiscounts\": 1,
\"totalNetPriceWithDiscounts\": 1,
\"totalVatAmountWithDiscounts\": 1,
\"vatRate\": 1,
\"sku\": \"<string>\",
\"title\": \"<string>\",
\"quantity\": 1,
\"discounts\": [
{
\"totalGrossPrice\": 0,
\"totalNetPrice\": 0,
\"totalVatAmount\": 0,
\"name\": \"10% Winter Sale\",
\"discountId\": \"D1265327\",
\"vatRate\": 0
}
]
}
]
}
]
}" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
invoice: '{\n "type": "INVOICE",\n "sellerId": "4711",\n "orderId": "43523-43432-43532",\n "invoiceNumber": "<string>",\n "transactionDate": "2023-11-07T05:31:56Z",\n "taxCalculationDate": "2023-11-07T05:31:56Z",\n "currency": "<string>",\n "billingAddress": {\n "lastName": "Nym",\n "street": "Leyboldstrasse",\n "city": "Hürth",\n "country": "DE",\n "firstName": "Arno",\n "companyName": "<string>",\n "houseNumber": "14a",\n "addition": "1. UG",\n "postcode": "50354",\n "phone": "+49 0221 123456",\n "state": "NRW"\n },\n "originalInvoiceNumber": "<string>",\n "transactionDetails": "<string>",\n "shipmentDate": "2023-11-07T05:31:56Z",\n "exportOutsideEu": true,\n "sellerVatNumber": "<string>",\n "buyerVatNumber": "<string>",\n "orderList": [\n {\n "orderId": "43523-43432-43532",\n "purchasedAt": "2023-11-07T05:31:56Z",\n "transactionItemList": [\n {\n "orderItemId": "<string>",\n "totalGrossPriceWithDiscounts": 1,\n "totalNetPriceWithDiscounts": 1,\n "totalVatAmountWithDiscounts": 1,\n "vatRate": 1,\n "sku": "<string>",\n "title": "<string>",\n "quantity": 1,\n "discounts": [\n {\n "totalGrossPrice": 0,\n "totalNetPrice": 0,\n "totalVatAmount": 0,\n "name": "10% Winter Sale",\n "discountId": "D1265327",\n "vatRate": 0\n }\n ]\n }\n ]\n }\n ]\n}'
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data', 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://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data"
payload := strings.NewReader("invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "invoice=%7B%0A%20%20%22type%22%3A%20%22INVOICE%22%2C%0A%20%20%22sellerId%22%3A%20%224711%22%2C%0A%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%22invoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22taxCalculationDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22currency%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22billingAddress%22%3A%20%7B%0A%20%20%20%20%22lastName%22%3A%20%22Nym%22%2C%0A%20%20%20%20%22street%22%3A%20%22Leyboldstrasse%22%2C%0A%20%20%20%20%22city%22%3A%20%22H%C3%BCrth%22%2C%0A%20%20%20%20%22country%22%3A%20%22DE%22%2C%0A%20%20%20%20%22firstName%22%3A%20%22Arno%22%2C%0A%20%20%20%20%22companyName%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%22houseNumber%22%3A%20%2214a%22%2C%0A%20%20%20%20%22addition%22%3A%20%221.%20UG%22%2C%0A%20%20%20%20%22postcode%22%3A%20%2250354%22%2C%0A%20%20%20%20%22phone%22%3A%20%22%2B49%200221%20123456%22%2C%0A%20%20%20%20%22state%22%3A%20%22NRW%22%0A%20%20%7D%2C%0A%20%20%22originalInvoiceNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22transactionDetails%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22shipmentDate%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%22exportOutsideEu%22%3A%20true%2C%0A%20%20%22sellerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22buyerVatNumber%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%22orderList%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22orderId%22%3A%20%2243523-43432-43532%22%2C%0A%20%20%20%20%20%20%22purchasedAt%22%3A%20%222023-11-07T05%3A31%3A56Z%22%2C%0A%20%20%20%20%20%20%22transactionItemList%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22orderItemId%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalGrossPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalNetPriceWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22totalVatAmountWithDiscounts%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22sku%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22%3Cstring%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22quantity%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20%22discounts%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalGrossPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalNetPrice%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22totalVatAmount%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%2210%25%20Winter%20Sale%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22discountId%22%3A%20%22D1265327%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22vatRate%22%3A%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "VAL100",
"message": "Required field sellerId not found",
"severity": "error",
"hint": "Check the field `sellerId` — it must be a non-empty string."
}
]
}{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Authorizations
As a Channel Integrator you will receive a API Refresh Token. With such a Refresh Token you need to request an Access Token with a limited Lifetime (see POST /v1/auth). This Access Token must be provided as a Bearer Token in the Authorization Header with every request.
Body
Invoice metadata for a marketplace order without any invoice document.
Payload carrying only the invoice metadata, without an invoice document. Used by
POST /v1/channel/order/invoice-data.
Show child attributes
Show child attributes
Response
Invoice data received
Was this page helpful?