Code Samples
Copy
curl --request POST \
--url 'https://supership.is/api/v1/shipments' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
}'
const response = await fetch('https://supership.is/api/v1/shipments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
})
});
const data = await response.json();
console.log(data);
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
payload = {
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
}
response = requests.post("https://supership.is/api/v1/shipments", headers=headers, json=payload)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://supership.is/api/v1/shipments',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_TOKEN',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => '{
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
}',
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://supership.is/api/v1/shipments");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
request.Content = new StringContent(@"{
""orderId"": ""string"",
""name"": ""string"",
""email"": ""user@example.com"",
""phone"": ""string"",
""ssn"": ""string"",
""address1"": ""string"",
""address2"": ""string"",
""zipcode"": ""string"",
""ageRestriction"": 1,
""ssnExactMatch"": ""string"",
""authRequired"": true,
""city"": ""string"",
""country"": ""string"",
""note"": ""string"",
""meta"": [
{
""key"": ""Paid"",
""value"": ""true""
}
]
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://supership.is/api/v1/shipments"))
.header("Authorization", "Bearer YOUR_TOKEN")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
}
"""))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response
Copy
{
"id": "123e4567-e89b-12d3-a456-426614174000"
}
{
"error": {
"code": "string",
"message": "string"
}
}
{
"error": {
"code": "string",
"message": "string"
}
}
Creates a new shipment with recipient details, delivery requirements, and metadata. Supports age verification and authentication requirements.
Header Parameters
| Nafn | Type | Required | Description |
|---|---|---|---|
X-Team-ID | string (uuid) | Required | Team identifier for tracking and authorization |
Request Body
Content type: application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Required | Unique identifier in the client system |
name | string | Optional | Full name of the recipient |
email | string (email) | Optional | Contact email for delivery updates |
phone | string | Optional | Phone number without country code |
ssn | string | Optional | Social security number for identity verification |
address1 | string | Optional | Primary delivery address |
address2 | string | Optional | Additional address details (apartment, suite, etc) |
zipcode | string | Optional | Postal code |
ageRestriction | integer | Optional | Minimum age required for delivery |
ssnExactMatch | string | Optional | Exact SSN match requirement for restricted deliveries |
authRequired | boolean | Optional | Whether recipient authentication is required |
city | string | Optional | |
country | string | Optional | Two-letter ISO country code |
note | string | Optional | Delivery instructions |
meta | array of object | Optional | Additional metadata key-value pairs |
Example request
Copy
{
"orderId": "string",
"name": "string",
"email": "user@example.com",
"phone": "string",
"ssn": "string",
"address1": "string",
"address2": "string",
"zipcode": "string",
"ageRestriction": 1,
"ssnExactMatch": "string",
"authRequired": true,
"city": "string",
"country": "string",
"note": "string",
"meta": [
{
"key": "Paid",
"value": "true"
}
]
}
Responses
201 — Shipment created successfully
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Optional | Unique identifier for tracking the shipment |
Example 201 response
Copy
{
"id": "123e4567-e89b-12d3-a456-426614174000"
}
400 — Bad Request
| Field | Type | Required | Description |
|---|---|---|---|
error | object | Optional | |
error.code | string | Optional | |
error.message | string | Optional |
Example 400 response
Copy
{
"error": {
"code": "string",
"message": "string"
}
}
401 — Unauthorized
403 — Forbidden
500 — Internal Server Error
| Field | Type | Required | Description |
|---|---|---|---|
error | object | Optional | |
error.code | string | Optional | |
error.message | string | Optional |
Example 500 response
Copy
{
"error": {
"code": "string",
"message": "string"
}
}