Session Token
curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/auth \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data refreshToken=SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQimport requests
url = "https://scx-sbx.api.jtl-software.com/v1/auth"
payload = { "refreshToken": "SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ" }
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({refreshToken: 'SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ'})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/auth', 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/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ",
CURLOPT_HTTPHEADER => [
"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/auth"
payload := strings.NewReader("refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ")
req, _ := http.NewRequest("POST", url, payload)
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/auth")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ"
response = http.request(request)
puts response.read_body{
"scope": "SELLER",
"authToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ.uWKi0yGrf35hapLiNAb1QHpQ5dLJ7hyUg8_R6GU6RzU",
"tokenExpireAt": "2036-04-01T12:00:00+00:00",
"expiresIn": 360
}{
"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": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Authentication
Session Token
Create Session Token
POST
/
v1
/
auth
Session Token
curl --request POST \
--url https://scx-sbx.api.jtl-software.com/v1/auth \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data refreshToken=SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQimport requests
url = "https://scx-sbx.api.jtl-software.com/v1/auth"
payload = { "refreshToken": "SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ" }
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({refreshToken: 'SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ'})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/auth', 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/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ",
CURLOPT_HTTPHEADER => [
"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/auth"
payload := strings.NewReader("refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ")
req, _ := http.NewRequest("POST", url, payload)
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/auth")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "refreshToken=SELLER%3A0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ"
response = http.request(request)
puts response.read_body{
"scope": "SELLER",
"authToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ.uWKi0yGrf35hapLiNAb1QHpQ5dLJ7hyUg8_R6GU6RzU",
"tokenExpireAt": "2036-04-01T12:00:00+00:00",
"expiresIn": 360
}{
"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": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Body
application/x-www-form-urlencoded
Refresh token used to obtain a new short-lived session (access) token.
Example:
"SELLER:0eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ"
Response
Create new Auth Token
Issued session credentials returned by the auth endpoint. Contains the bearer token, its scope (seller, channel, or admin), and absolute/relative expiry timestamps.
Available options:
SELLER, CHAN, ADM Example:
"SELLER"
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SWQiOiIxNDU3IiwiaWF0IjoxNTE2MjM5MDIyfQ.uWKi0yGrf35hapLiNAb1QHpQ5dLJ7hyUg8_R6GU6RzU"
Example:
"2036-04-01T12:00:00+00:00"
Example:
360
Was this page helpful?
⌘I