Licenses
A License is a single carrier account. Every license-scoped endpoint in this API acts under one license, selected with the license_key query parameter — and that value is a license's key, which you look up here.
Sensitive data
Each license's settings block is exposed in full, including the raw provider settings JSON, which contains carrier credentials (username / password / token / api_key / api_secret / client_code / printer_api_key / …). Treat this response as secret. The license's own key is included so you can use it as license_key.
GET /licenses
List every carrier account (License) owned by the authenticating customer, ordered by id. Auth: client credentials. License: n/a — this endpoint returns all of the customer's licenses and does not require license_key.
Parameters
None.
Example request
curl --location 'https://app.shipos.co.il/api/v2/licenses' \
--header 'X-Client-Id: {client_id}' \
--header 'X-Client-Secret: {client_secret}' \
--header 'Accept: application/json'// Node.js 18+ / browsers — no dependencies
const response = await fetch('https://app.shipos.co.il/api/v2/licenses', {
headers: {
'X-Client-Id': process.env.SHIPOS_CLIENT_ID,
'X-Client-Secret': process.env.SHIPOS_CLIENT_SECRET,
Accept: 'application/json',
},
})
if (!response.ok) {
const { error } = await response.json()
throw new Error(`${error.code}: ${error.message}`)
}
const { data: licenses } = await response.json()
for (const license of licenses) {
console.log(license.key, '→', license.company.carrier.name)
}<?php
// composer require guzzlehttp/guzzle
$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.shipos.co.il/api/v2/',
'headers' => [
'X-Client-Id' => getenv('SHIPOS_CLIENT_ID'),
'X-Client-Secret' => getenv('SHIPOS_CLIENT_SECRET'),
'Accept' => 'application/json',
],
]);
$licenses = json_decode(
$client->get('licenses')->getBody()->getContents(),
true,
)['data'];
foreach ($licenses as $license) {
echo $license['key'], ' → ', $license['company']['carrier']['name'], PHP_EOL;
}<?php
use Illuminate\Support\Facades\Http;
$licenses = Http::withHeaders([
'X-Client-Id' => config('services.shipos.client_id'),
'X-Client-Secret' => config('services.shipos.client_secret'),
])
->acceptJson()
->get('https://app.shipos.co.il/api/v2/licenses')
->throw()
->json('data');
foreach ($licenses as $license) {
logger()->info($license['key'].' → '.$license['company']['carrier']['name']);
}# pip install httpx
import os
import httpx
response = httpx.get(
"https://app.shipos.co.il/api/v2/licenses",
headers={
"X-Client-Id": os.environ["SHIPOS_CLIENT_ID"],
"X-Client-Secret": os.environ["SHIPOS_CLIENT_SECRET"],
"Accept": "application/json",
},
)
response.raise_for_status()
licenses = response.json()["data"]
for lic in licenses:
print(lic["key"], "→", lic["company"]["carrier"]["name"])package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
type licensesResponse struct {
Data []struct {
Key string `json:"key"`
Company struct {
Carrier struct {
Name string `json:"name"`
} `json:"carrier"`
} `json:"company"`
} `json:"data"`
}
func main() {
req, _ := http.NewRequest("GET",
"https://app.shipos.co.il/api/v2/licenses", nil)
req.Header.Set("X-Client-Id", os.Getenv("SHIPOS_CLIENT_ID"))
req.Header.Set("X-Client-Secret", os.Getenv("SHIPOS_CLIENT_SECRET"))
req.Header.Set("Accept", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var payload licensesResponse
if err := json.NewDecoder(res.Body).Decode(&payload); err != nil {
panic(err)
}
for _, license := range payload.Data {
fmt.Println(license.Key, "→", license.Company.Carrier.Name)
}
}// Java 17+ — java.net.http, no dependencies (parse with Jackson/Gson)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ShipOsLicenses {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.shipos.co.il/api/v2/licenses"))
.header("X-Client-Id", System.getenv("SHIPOS_CLIENT_ID"))
.header("X-Client-Secret", System.getenv("SHIPOS_CLIENT_SECRET"))
.header("Accept", "application/json")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new RuntimeException("ShipOS error: " + response.body());
}
System.out.println(response.body()); // {"data":[...]} — contains credentials
}
}// .NET 8+ — System.Net.Http.Json
using System.Net.Http.Json;
using System.Text.Json;
using var http = new HttpClient
{
BaseAddress = new Uri("https://app.shipos.co.il/api/v2/"),
};
http.DefaultRequestHeaders.Add("X-Client-Id",
Environment.GetEnvironmentVariable("SHIPOS_CLIENT_ID"));
http.DefaultRequestHeaders.Add("X-Client-Secret",
Environment.GetEnvironmentVariable("SHIPOS_CLIENT_SECRET"));
var payload = await http.GetFromJsonAsync<JsonDocument>("licenses")
?? throw new InvalidOperationException("Empty response");
foreach (var license in payload.RootElement.GetProperty("data").EnumerateArray())
{
var carrier = license.GetProperty("company").GetProperty("carrier");
Console.WriteLine($"{license.GetProperty("key").GetString()} → " +
$"{carrier.GetProperty("name").GetString()}");
}require "net/http"
require "json"
uri = URI("https://app.shipos.co.il/api/v2/licenses")
request = Net::HTTP::Get.new(uri)
request["X-Client-Id"] = ENV.fetch("SHIPOS_CLIENT_ID")
request["X-Client-Secret"] = ENV.fetch("SHIPOS_CLIENT_SECRET")
request["Accept"] = "application/json"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
raise "ShipOS error: #{response.body}" unless response.is_a?(Net::HTTPSuccess)
JSON.parse(response.body).fetch("data").each do |license|
puts "#{license["key"]} → #{license.dig("company", "carrier", "name")}"
end// [dependencies]
// reqwest = { version = "0.12", features = ["json"] }
// tokio = { version = "1", features = ["full"] }
// serde_json = "1"
use serde_json::Value;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let payload: Value = reqwest::Client::new()
.get("https://app.shipos.co.il/api/v2/licenses")
.header("X-Client-Id", std::env::var("SHIPOS_CLIENT_ID")?)
.header("X-Client-Secret", std::env::var("SHIPOS_CLIENT_SECRET")?)
.header("Accept", "application/json")
.send()
.await?
.error_for_status()?
.json()
.await?;
if let Some(licenses) = payload["data"].as_array() {
for license in licenses {
println!(
"{} → {}",
license["key"], license["company"]["carrier"]["name"]
);
}
}
Ok(())
}Response 200
Each item embeds its company (with a nested carrier) and its settings (one row per provider).
{
"data": [
{
"id": 812,
"key": "a1b2c3d4e5f6",
"name": "HFD main account",
"company": {
"id": 3391,
"name": "Baldar Logistics Ltd",
"carrier": {
"id": 4,
"name": "HFD"
}
},
"commitment_day": 3,
"multiple_shipment": true,
"is_active": true,
"is_expired": false,
"expires_at": "2027-01-31T00:00:00.000000Z",
"settings": [
{
"id": 2201,
"provider_id": 4,
"settings": {
"username": "shipos",
"token": "eyJhbGciOi...",
"client_code": "14641"
},
"collect_street": "Herzl",
"collect_street_number": "10",
"collect_city": "Tel Aviv",
"collect_company": "Baldar Logistics Ltd",
"print_products": true,
"print_variations": false,
"print_customer_detail_sku_and_quantity_bold_in_label": false,
"print_products_on_label_notes": false,
"print_products_on_a4_label_notes": false,
"print_products_name": true,
"print_products_sku": false,
"print_virtual_product_on_note": false,
"enable_cod": true,
"label_method": "pdf",
"label_type": "a4",
"separate_street_and_number": true,
"get_street_number_with_suffix": false,
"display_shipping_line_number": false,
"order_prefix": "SO-",
"send_note_on_order": false,
"created_at": "2026-01-31T00:00:00.000000Z",
"updated_at": "2026-07-01T10:22:14.000000Z"
}
]
}
]
}License fields
| Field | Type | Description |
|---|---|---|
id | integer | Internal license id. |
key | string | The license credential. This is the value to pass as license_key on license-scoped endpoints. |
name | string | null | Human-facing license name. |
company | object | The courier company this license belongs to (see below). |
commitment_day | integer | null | Carrier commitment day setting. |
multiple_shipment | boolean | Whether the license permits multiple shipments per order. |
is_active | boolean | Whether the license is active. |
is_expired | boolean | Whether the license has expired. |
expires_at | string | null | ISO 8601 expiry timestamp. |
settings | array | Per-provider settings rows (see below). |
company
| Field | Type | Description |
|---|---|---|
id | integer | Company id. |
name | string | Company name. |
carrier | object | The carrier (provider) { id, name }. Present when the provider relation is loaded (it is, on this endpoint). |
carrier
| Field | Type | Description |
|---|---|---|
id | integer | Carrier (provider) id. |
name | string | Carrier name (e.g. HFD, Cargo, Zigzag). |
settings[]
Full license_settings row for the provider. The nested settings JSON is shaved of empty values — keys whose value is null, empty string, or empty array (recursively) are dropped; booleans are always kept (both true and false are meaningful), as are 0 and other real scalars.
| Field | Type | Description |
|---|---|---|
id | integer | Settings row id. |
provider_id | integer | Provider (carrier) id these settings apply to. |
settings | object | Raw provider settings JSON, empty values shaved. Contains carrier credentials. |
collect_street | string | null | Pickup (collect) address — street. |
collect_street_number | string | null | Pickup address — street number. |
collect_city | string | null | Pickup address — city. |
collect_company | string | null | Pickup address — company. |
print_products | bool | null | Label print option. |
print_variations | bool | null | Label print option. |
print_customer_detail_sku_and_quantity_bold_in_label | bool | null | Label print option. |
print_products_on_label_notes | bool | null | Label print option. |
print_products_on_a4_label_notes | bool | null | Label print option. |
print_products_name | bool | null | Label print option. |
print_products_sku | bool | null | Label print option. |
print_virtual_product_on_note | bool | null | Label print option. |
enable_cod | bool | null | Whether cash-on-delivery is enabled. |
label_method | string | null | Label generation method. |
label_type | string | null | Label format/type. |
separate_street_and_number | bool | null | Address handling option. |
get_street_number_with_suffix | bool | null | Address handling option. |
display_shipping_line_number | bool | null | Label display option. |
order_prefix | string | null | Order number prefix. |
send_note_on_order | bool | null | Whether to send a note on the order. |
created_at | string | ISO 8601 timestamp. |
updated_at | string | ISO 8601 timestamp. |
Errors
| Status | code | When |
|---|---|---|
| 401 | unauthenticated | Missing or invalid client credentials. |