Upload Invoice
curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/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
}
]
}
]
}
]
},
"document": "<string>"
}
'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice"
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
}
]
}
]
}
]
},
"document": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "multipart/x-www-form-urlencoded"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'multipart/x-www-form-urlencoded'
},
body: JSON.stringify({
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
}
]
}
]
}
]
},
document: '<string>'
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice', 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",
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([
'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
]
]
]
]
]
]
],
'document' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/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"
payload := strings.NewReader("{\n \"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 },\n \"document\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "multipart/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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/x-www-form-urlencoded")
.body("{\n \"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 },\n \"document\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice")
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"] = 'multipart/x-www-form-urlencoded'
request.body = "{\n \"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 },\n \"document\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Order
Upload Invoice
Upload an invoice document for an order.
POST
/
v1
/
channel
/
order
/
invoice
Upload Invoice
curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/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
}
]
}
]
}
]
},
"document": "<string>"
}
'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice"
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
}
]
}
]
}
]
},
"document": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "multipart/x-www-form-urlencoded"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'multipart/x-www-form-urlencoded'
},
body: JSON.stringify({
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
}
]
}
]
}
]
},
document: '<string>'
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice', 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",
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([
'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
]
]
]
]
]
]
],
'document' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/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"
payload := strings.NewReader("{\n \"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 },\n \"document\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "multipart/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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "multipart/x-www-form-urlencoded")
.body("{\n \"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 },\n \"document\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/order/invoice")
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"] = 'multipart/x-www-form-urlencoded'
request.body = "{\n \"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 },\n \"document\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Authorizations
Bearer JWT issued to a seller after they sign up for a JTL-Scx subscription via the JTL
Customer Center. Usage format: Bearer <JWT>.
Body
multipart/x-www-form-urlencoded
Invoice metadata together with the binary PDF document for a marketplace order.
Response
Invoice received
Was this page helpful?
⌘I