Skip to content

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

bash
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'
js
// 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
<?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
<?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']);
}
python
# 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"])
go
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
// 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
    }
}
csharp
// .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()}");
}
ruby
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
rust
// [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).

json
{
  "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

FieldTypeDescription
idintegerInternal license id.
keystringThe license credential. This is the value to pass as license_key on license-scoped endpoints.
namestring | nullHuman-facing license name.
companyobjectThe courier company this license belongs to (see below).
commitment_dayinteger | nullCarrier commitment day setting.
multiple_shipmentbooleanWhether the license permits multiple shipments per order.
is_activebooleanWhether the license is active.
is_expiredbooleanWhether the license has expired.
expires_atstring | nullISO 8601 expiry timestamp.
settingsarrayPer-provider settings rows (see below).

company

FieldTypeDescription
idintegerCompany id.
namestringCompany name.
carrierobjectThe carrier (provider) { id, name }. Present when the provider relation is loaded (it is, on this endpoint).

carrier

FieldTypeDescription
idintegerCarrier (provider) id.
namestringCarrier 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.

FieldTypeDescription
idintegerSettings row id.
provider_idintegerProvider (carrier) id these settings apply to.
settingsobjectRaw provider settings JSON, empty values shaved. Contains carrier credentials.
collect_streetstring | nullPickup (collect) address — street.
collect_street_numberstring | nullPickup address — street number.
collect_citystring | nullPickup address — city.
collect_companystring | nullPickup address — company.
print_productsbool | nullLabel print option.
print_variationsbool | nullLabel print option.
print_customer_detail_sku_and_quantity_bold_in_labelbool | nullLabel print option.
print_products_on_label_notesbool | nullLabel print option.
print_products_on_a4_label_notesbool | nullLabel print option.
print_products_namebool | nullLabel print option.
print_products_skubool | nullLabel print option.
print_virtual_product_on_notebool | nullLabel print option.
enable_codbool | nullWhether cash-on-delivery is enabled.
label_methodstring | nullLabel generation method.
label_typestring | nullLabel format/type.
separate_street_and_numberbool | nullAddress handling option.
get_street_number_with_suffixbool | nullAddress handling option.
display_shipping_line_numberbool | nullLabel display option.
order_prefixstring | nullOrder number prefix.
send_note_on_orderbool | nullWhether to send a note on the order.
created_atstringISO 8601 timestamp.
updated_atstringISO 8601 timestamp.

Errors

StatuscodeWhen
401unauthenticatedMissing or invalid client credentials.