Create Return
curl --request POST \
--url https://api.jtl-cloud.com/erp/v1/returns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"CompanyId": 123,
"SalesOrderId": 123,
"WarehouseId": 123,
"Items": [
{
"Quantity": 1073741823.5000005,
"ReturnReasonId": 123,
"ReturnReasonComment": "<string>",
"Credit": true,
"SalesOrderLineItemId": 123,
"DeliveryNoteLineItemId": 123
}
],
"ReturnDate": "2023-11-07T05:31:56Z",
"ExternalNumber": "<string>",
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"Packages": [
{
"TrackingID": "<string>",
"ShippingMethodId": 123,
"ShippingMethodCustom": "<string>"
}
],
"TransmitToSalesChannel": true
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/returns"
payload = {
"CompanyId": 123,
"SalesOrderId": 123,
"WarehouseId": 123,
"Items": [
{
"Quantity": 1073741823.5000005,
"ReturnReasonId": 123,
"ReturnReasonComment": "<string>",
"Credit": True,
"SalesOrderLineItemId": 123,
"DeliveryNoteLineItemId": 123
}
],
"ReturnDate": "2023-11-07T05:31:56Z",
"ExternalNumber": "<string>",
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"Packages": [
{
"TrackingID": "<string>",
"ShippingMethodId": 123,
"ShippingMethodCustom": "<string>"
}
],
"TransmitToSalesChannel": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
CompanyId: 123,
SalesOrderId: 123,
WarehouseId: 123,
Items: [
{
Quantity: 1073741823.5000005,
ReturnReasonId: 123,
ReturnReasonComment: '<string>',
Credit: true,
SalesOrderLineItemId: 123,
DeliveryNoteLineItemId: 123
}
],
ReturnDate: '2023-11-07T05:31:56Z',
ExternalNumber: '<string>',
ExternalComment: '<string>',
InternalComment: '<string>',
Contact: '<string>',
Packages: [
{
TrackingID: '<string>',
ShippingMethodId: 123,
ShippingMethodCustom: '<string>'
}
],
TransmitToSalesChannel: true
})
};
fetch('https://api.jtl-cloud.com/erp/v1/returns', 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.jtl-cloud.com/erp/v1/returns",
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([
'CompanyId' => 123,
'SalesOrderId' => 123,
'WarehouseId' => 123,
'Items' => [
[
'Quantity' => 1073741823.5000005,
'ReturnReasonId' => 123,
'ReturnReasonComment' => '<string>',
'Credit' => true,
'SalesOrderLineItemId' => 123,
'DeliveryNoteLineItemId' => 123
]
],
'ReturnDate' => '2023-11-07T05:31:56Z',
'ExternalNumber' => '<string>',
'ExternalComment' => '<string>',
'InternalComment' => '<string>',
'Contact' => '<string>',
'Packages' => [
[
'TrackingID' => '<string>',
'ShippingMethodId' => 123,
'ShippingMethodCustom' => '<string>'
]
],
'TransmitToSalesChannel' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.jtl-cloud.com/erp/v1/returns"
payload := strings.NewReader("{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jtl-cloud.com/erp/v1/returns")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}"
response = http.request(request)
puts response.read_body{
"Id": 123,
"Number": "<string>",
"ReturnDate": "2023-11-07T05:31:56Z",
"CustomerId": 123,
"ExternalNumber": "<string>",
"Origin": 0,
"CompanyId": 123,
"SalesOrderId": 123,
"StateId": 123,
"WarehouseId": 123,
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"TransmitToSalesChannel": true
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Return
Create Return
deprecated
Create a new return with associated items and packages.
POST
/
v1
/
returns
Create Return
curl --request POST \
--url https://api.jtl-cloud.com/erp/v1/returns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"CompanyId": 123,
"SalesOrderId": 123,
"WarehouseId": 123,
"Items": [
{
"Quantity": 1073741823.5000005,
"ReturnReasonId": 123,
"ReturnReasonComment": "<string>",
"Credit": true,
"SalesOrderLineItemId": 123,
"DeliveryNoteLineItemId": 123
}
],
"ReturnDate": "2023-11-07T05:31:56Z",
"ExternalNumber": "<string>",
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"Packages": [
{
"TrackingID": "<string>",
"ShippingMethodId": 123,
"ShippingMethodCustom": "<string>"
}
],
"TransmitToSalesChannel": true
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/returns"
payload = {
"CompanyId": 123,
"SalesOrderId": 123,
"WarehouseId": 123,
"Items": [
{
"Quantity": 1073741823.5000005,
"ReturnReasonId": 123,
"ReturnReasonComment": "<string>",
"Credit": True,
"SalesOrderLineItemId": 123,
"DeliveryNoteLineItemId": 123
}
],
"ReturnDate": "2023-11-07T05:31:56Z",
"ExternalNumber": "<string>",
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"Packages": [
{
"TrackingID": "<string>",
"ShippingMethodId": 123,
"ShippingMethodCustom": "<string>"
}
],
"TransmitToSalesChannel": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
CompanyId: 123,
SalesOrderId: 123,
WarehouseId: 123,
Items: [
{
Quantity: 1073741823.5000005,
ReturnReasonId: 123,
ReturnReasonComment: '<string>',
Credit: true,
SalesOrderLineItemId: 123,
DeliveryNoteLineItemId: 123
}
],
ReturnDate: '2023-11-07T05:31:56Z',
ExternalNumber: '<string>',
ExternalComment: '<string>',
InternalComment: '<string>',
Contact: '<string>',
Packages: [
{
TrackingID: '<string>',
ShippingMethodId: 123,
ShippingMethodCustom: '<string>'
}
],
TransmitToSalesChannel: true
})
};
fetch('https://api.jtl-cloud.com/erp/v1/returns', 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.jtl-cloud.com/erp/v1/returns",
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([
'CompanyId' => 123,
'SalesOrderId' => 123,
'WarehouseId' => 123,
'Items' => [
[
'Quantity' => 1073741823.5000005,
'ReturnReasonId' => 123,
'ReturnReasonComment' => '<string>',
'Credit' => true,
'SalesOrderLineItemId' => 123,
'DeliveryNoteLineItemId' => 123
]
],
'ReturnDate' => '2023-11-07T05:31:56Z',
'ExternalNumber' => '<string>',
'ExternalComment' => '<string>',
'InternalComment' => '<string>',
'Contact' => '<string>',
'Packages' => [
[
'TrackingID' => '<string>',
'ShippingMethodId' => 123,
'ShippingMethodCustom' => '<string>'
]
],
'TransmitToSalesChannel' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.jtl-cloud.com/erp/v1/returns"
payload := strings.NewReader("{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.jtl-cloud.com/erp/v1/returns")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CompanyId\": 123,\n \"SalesOrderId\": 123,\n \"WarehouseId\": 123,\n \"Items\": [\n {\n \"Quantity\": 1073741823.5000005,\n \"ReturnReasonId\": 123,\n \"ReturnReasonComment\": \"<string>\",\n \"Credit\": true,\n \"SalesOrderLineItemId\": 123,\n \"DeliveryNoteLineItemId\": 123\n }\n ],\n \"ReturnDate\": \"2023-11-07T05:31:56Z\",\n \"ExternalNumber\": \"<string>\",\n \"ExternalComment\": \"<string>\",\n \"InternalComment\": \"<string>\",\n \"Contact\": \"<string>\",\n \"Packages\": [\n {\n \"TrackingID\": \"<string>\",\n \"ShippingMethodId\": 123,\n \"ShippingMethodCustom\": \"<string>\"\n }\n ],\n \"TransmitToSalesChannel\": true\n}"
response = http.request(request)
puts response.read_body{
"Id": 123,
"Number": "<string>",
"ReturnDate": "2023-11-07T05:31:56Z",
"CustomerId": 123,
"ExternalNumber": "<string>",
"Origin": 0,
"CompanyId": 123,
"SalesOrderId": 123,
"StateId": 123,
"WarehouseId": 123,
"ExternalComment": "<string>",
"InternalComment": "<string>",
"Contact": "<string>",
"TransmitToSalesChannel": true
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Authorizations
oauth2-authorization-codeoauth2-client-credentials
Headers
Body
application/json
The details of the return to create.
Model Class: CreateReturn
Response
The created return.
Model Class: Return
Was this page helpful?