API Integration

Shipping insurance as code. Insure parcels, file claims and reconcile payments with simple REST calls.

  • Two REST APIs at api.u-pic.com
  • Serverless API to insure your own shipments
  • Booking API to offer coverage to your sellers
  • Test client and Postman collections to build against
Read the docs
POST /manifests
{
  "success": true,
  "message": "Successfully created manifest",
  "manifest_id": "1000042",
  "tracking_number": "9400111899223456789001",
  "declared_value": "150.00",
  "calculated_dvu": 2,
  "calculated_cost": "1.30"
}

Choose your API

Both APIs use the same API key and authentication (the Booking API also needs Booking access switched on for your key), and both cover the full life of a shipment from coverage to a paid claim. Which one you use depends on whose shipments you are insuring.

Serverless API

For shippers, stores and warehouses insuring their own shipments: file a manifest for each insured parcel, and if something goes wrong, file a claim against its tracking number.

Base URL https://api.u-pic.com | 13 endpoints | JSON over HTTPS

How it works

  1. 1 Authenticate Exchange your API key for a bearer token.
  2. 2 Client Carriers Look up the carriers you can use now.
  3. 3 File Manifest Insure a parcel by tracking number.
  4. 4 File Claim Open a claim against an insured parcel.
  5. 5 Attach Upload supporting documents.

Booking API

For marketplaces, shipping platforms and fulfillment providers that sell coverage to their own sellers: register each seller, quote and book coverage per order, handle claims, and reconcile payments and invoices.

Base URL https://api.u-pic.com | 21 endpoints | JSON over HTTPS

How it works

  1. 1 Authenticate Exchange your API key for a bearer token.
  2. 2 Create seller Register a seller once, then reuse their id.
  3. 3 Quote Price an order. U-PIC returns the premium.
  4. 4 Book Turn the quote into insured parcels.
  5. 5 Claim Open a claim and attach documents.
  6. 6 Reconcile Settlements and invoice lines for your books.

Authentication

  • Every endpoint except /health and /auth needs Authorization: Bearer <token>. Requests with a JSON body also need Content-Type: application/json.
  • Your key carries permissions, returned by /auth and checked on each request: manifests for filing and querying manifests, claims for every claims endpoint, and delete_manifests for removing a manifest. A permission you do not hold returns 403 insufficient_permissions.
  • The claim attachments endpoint uses multipart/form-data. Let your HTTP client set it with its own boundary.

Endpoint reference

Select an endpoint for its fields, an example request and response, and what to watch for.

You'll need an API key to make these calls. Request a test key and we'll set you up with a test client.

Getting started

GET /health Health Check

Confirms the API is reachable. Useful before debugging an authentication problem.

Auth: None

cURL
curl "https://api.u-pic.com/health"
Example response
{ "status": "ok", "service": "serverless-api", "version": "1.0.0" }
POST /auth Authenticate

Exchange your API key for a bearer token.

Auth: None

FieldTypeNotes
api_keystringRequired. The API key U-PIC issued you.
Example request
{ "api_key": "<your-api-key>" }
cURL
curl -X POST "https://api.u-pic.com/auth" \
  -H "Content-Type: application/json" \
  -d '{ "api_key": "<your-api-key>" }'
Example response
{
  "token": "<token>",
  "client_id": 1001,
  "permissions": { "manifests": 1, "claims": 1, "delete_manifests": 0 },
  "issued_at": "2026-08-06T17:04:11+00:00"
}
  • Tokens do not expire. Authenticate once, store the token securely and reuse it. Calling /auth again issues a new token and invalidates the previous one, so a job still holding the old token starts receiving 401 invalid_token.
  • A wrong or switched off key returns 401 invalid_api_key. An account that is no longer active returns 403 account_not_active. A body that is not valid JSON returns 400 invalid_json, and one without api_key returns 400 api_key_required.

Reference data

GET /countries Countries

The countries U-PIC recognizes. Every country field in this API takes the numeric country_id from this list.

Auth: Bearer

cURL
curl "https://api.u-pic.com/countries" \
  -H "Authorization: Bearer <your-token>"
Example response
[
  { "country_id": "40",  "iso_3166": "CA", "short_name": "Canada",        "long_name": "Canada" },
  { "country_id": "236", "iso_3166": "US", "short_name": "United States", "long_name": "United States of America" }
]
  • Send country_id, not an ISO code. 236 is the United States and 40 is Canada.
GET /client/carriers Client Carriers

The carriers you can use now, with the rate and limits on each. A manifest is accepted only with a carrier from this list.

Auth: Bearer

cURL
curl "https://api.u-pic.com/client/carriers" \
  -H "Authorization: Bearer <your-token>"
Example response
[
  {
    "client_carrier_id": "10001",
    "carrier_id": "42",
    "description": "UPS",
    "international": "0",
    "cost_per_dvu": "0.650",
    "parcel_deductible": "0.00",
    "parcel_limit": "5000.00",
    "active": "1",
    "started": "2026-01-05 00:00:00"
  }
]
  • Send client_carrier_id as the carrier_id when filing a manifest, not carrier_id. It identifies your arrangement with that carrier: its rate, deductible and parcel limit. The wrong one returns 400 WRONG_CARRIER.

Manifests

POST /manifests File Manifest

Insures one parcel. One manifest per tracking number.

Auth: Bearer + manifests

FieldTypeNotes
carrier_idintegerRequired. A client_carrier_id from Client Carriers.
declared_valuenumberRequired. The value to insure.
trackingstringRequired. The parcel's tracking number.
shippeddateRequired. Ship date, YYYY-MM-DD preferred.
shipperstringRequired.
consigneestringRequired.
invoicestringOptional. Your reference for the shipment.
accountstringOptional. Stored as an external reference.
Example request
{
  "carrier_id": 10001,
  "declared_value": 150.00,
  "tracking": "9400111899223456789001",
  "shipped": "2026-07-24",
  "shipper": "123 Company Warehouse",
  "consignee": "Jane Doe",
  "invoice": "ORD-122222"
}
cURL
curl -X POST "https://api.u-pic.com/manifests" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "carrier_id": 10001,
  "declared_value": 150.00,
  "tracking": "9400111899223456789001",
  "shipped": "2026-07-24",
  "shipper": "123 Company Warehouse",
  "consignee": "Jane Doe",
  "invoice": "ORD-122222"
}'
Example response
{
  "success": true,
  "message": "Successfully created manifest",
  "manifest_id": "1000042",
  "tracking_number": "9400111899223456789001",
  "declared_value": "150.00",
  "calculated_dvu": 2,
  "calculated_cost": "1.30"
}
  • How the premium is calculated: the carrier's deductible is subtracted from declared_value, the rest is capped at the carrier's parcel limit and divided into declared value units of $100, rounded up. You are charged that many units at your cost_per_dvu.
  • A declared value that does not exceed the deductible returns 400 BELOW_DEDUCTIBLE and creates nothing.
  • Re-filing the same tracking number returns 400 DUPLICATE_ENTRY instead of a second manifest, so a retried request is safe.
GET /manifests?tracking={tracking} Query Manifests

Looks up manifests you have filed, by tracking number.

Auth: Bearer + manifests

Example request
GET /manifests?tracking=9400111899223456789001
cURL
curl "https://api.u-pic.com/manifests?tracking=9400111899223456789001" \
  -H "Authorization: Bearer <your-token>"
Example response
[
  {
    "manifest_id": "1000042",
    "shipped": "2026-07-24",
    "declared_value": "150.00",
    "invoice": "ORD-122222",
    "shipper": "123 Company Warehouse",
    "consignee": "Jane Doe",
    "carrier_id": "42"
  }
]
  • carrier_id here is the carrier's own id, not the client_carrier_id you sent when filing.
  • Nothing found returns 404 no_manifests_found rather than an empty list. Leaving out tracking returns 400 tracking_required.
DELETE /manifests?tracking={tracking} Delete Manifest

Removes a manifest you filed, so the parcel is no longer insured or billed. Use it when an order is cancelled before it ships.

Auth: Bearer + delete_manifests

Example request
DELETE /manifests?tracking=9400111899223456789001
cURL
curl -X DELETE "https://api.u-pic.com/manifests?tracking=9400111899223456789001" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "success": true,
  "message": "Successfully deleted manifest",
  "manifest_id": "1000042",
  "tracking_number": "9400111899223456789001"
}
  • A parcel with a claim against it cannot be deleted. The request returns 400 NO_MANIFEST, the same code as a tracking number that was never filed, so check for a claim before assuming the manifest is missing.

Claims

POST /claims File Claim

Opens a claim against a parcel you manifested. The claim section describes the loss and the claimant section describes who is owed.

Auth: Bearer + claims

FieldTypeNotes
claim.trackingstringRequired. Must already be on one of your manifests.
claim.ship_datedateRequired. YYYY-MM-DD preferred.
claim.carrierintegerNot needed. The claim uses the carrier on the parcel manifest, so a parcel shipped while a carrier was active can be claimed after that carrier ends. Ignored if sent, unless the manifest has no carrier on file; then it must be a client_carrier_id from Client Carriers (403 WRONG_CARRIER otherwise). If the manifest has no carrier and none is sent, the claim is refused with 400 MISSING_FIELD.
claim.typeintegerRequired. 1 = Loss, 2 = Damage.
claim.damage_descriptionstringRequired when type is 2.
claim.item_descriptionstringRequired. What was in the parcel.
claim.invoice_valuenumberRequired.
claim.declared_valuenumberRequired.
claim.amount_recoverednumberOptional, defaults to 0. Any amount already recovered.
claim.amount_paid_by_carriernumberOptional, defaults to 0. Any amount the carrier already paid.
claim.payeeintegerRequired. Who is to be paid. U-PIC gives you the value for your account.
claim.shipperstringRequired.
claim.shipper_referencestringOptional. Your own reference for the claim.
claim.repairablebooleanOptional. Whether a damaged item can be repaired.
claim.consignee_namestringRequired.
claim.consignee_emailstringRequired.
claim.consignee_zipstringRequired.
claim.consignee_countryintegerRequired. A country_id from Countries.
claimant.contactstringRequired.
claimant.companystringOptional.
claimant.emailstringOptional. Where claim updates are sent.
claimant.phonestringOptional. Digits only are kept.
claimant.addressstringRequired.
claimant.address_2stringOptional.
claimant.citystringOptional.
claimant.countryintegerRequired. A country_id from Countries.
claimant.statestringRequired with zip when country is 236 (US) or 40 (Canada).
claimant.zipstringRequired with state when country is 236 or 40.
Example request
{
  "claim": {
    "tracking": "9400111899223456789001",
    "ship_date": "2026-07-24",
    "type": 1,
    "item_description": "Leather handbag",
    "invoice_value": 150.00,
    "declared_value": 150.00,
    "payee": "<value for your account>",
    "shipper": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "consignee_email": "jane@example.com",
    "consignee_zip": "91000",
    "consignee_country": 236
  },
  "claimant": {
    "contact": "Ops Team",
    "address": "123 Wood Ave",
    "country": 236,
    "state": "CA",
    "zip": "91000"
  }
}
cURL
curl -X POST "https://api.u-pic.com/claims" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "claim": {
    "tracking": "9400111899223456789001",
    "ship_date": "2026-07-24",
    "type": 1,
    "item_description": "Leather handbag",
    "invoice_value": 150.00,
    "declared_value": 150.00,
    "payee": "<value for your account>",
    "shipper": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "consignee_email": "jane@example.com",
    "consignee_zip": "91000",
    "consignee_country": 236
  },
  "claimant": {
    "contact": "Ops Team",
    "address": "123 Wood Ave",
    "country": 236,
    "state": "CA",
    "zip": "91000"
  }
}'
Example response
{
  "success": true,
  "message": "Successfully filed claim",
  "claim_id": "500123",
  "tracking_number": "9400111899223456789001",
  "claim_amount": 150.0,
  "claim_type": "Loss",
  "file_date": "2026-08-02 10:14:00"
}
  • A new claim returns 201. claim_amount is declared_value minus amount_recovered minus amount_paid_by_carrier.
  • A tracking number you never manifested returns 404 INVALID_TRACKING. File the manifest first.
  • If a claim already exists for that tracking number and ship date, the response is 200 with "duplicate": true and the existing claim_id, so a retry never creates a second claim.
  • Claims filed before your account is active are saved as test claims and are not processed.
GET /claims?tracking={tracking} Find Claim by Tracking Number

Resolves a tracking number to the claim filed against it.

Auth: Bearer + claims

Example request
GET /claims?tracking=9400111899223456789001
cURL
curl "https://api.u-pic.com/claims?tracking=9400111899223456789001" \
  -H "Authorization: Bearer <your-token>"
Example response
{ "claim_id": "500123" }
  • No claim returns 404 no_claim_found.
GET /claims/{claim_id} Get Claim Details

Status, amounts, claimant and shipment detail for one claim.

Auth: Bearer + claims

Example request
GET /claims/500123
cURL
curl "https://api.u-pic.com/claims/500123" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "status": {
    "claim_id": 500123,
    "claim_status_id": 8,
    "claim_status": "Paid",
    "claim_amount": 150.0,
    "claim_amount_paid": 150.0,
    "paid_date": { "formatted": "2026-08-20", "unix": 1787184000 },
    "resolution_date": { "formatted": "2026-08-18", "unix": 1787011200 },
    "claim_check_number": "10442"
  },
  "claimant": {
    "contact": "Ops Team", "company": "123 Company", "email": "ops@123co.com",
    "phone": "5555550100", "address": "123 Wood Ave", "address_2": "",
    "city": "Simi Valley", "state": "California", "country": "United States", "zip": "91000"
  },
  "claim": {
    "claim_type_id": 1,
    "claim_type": "Loss",
    "file_date": { "formatted": "2026-08-02 10:14:00", "unix": 1785665640 }
  },
  "shipment": {
    "ship_date": { "formatted": "2026-07-24", "unix": 1784851200 },
    "carrier": "UPS",
    "tracking": "9400111899223456789001",
    "consignee_name": "Jane Doe",
    "shipper": "123 Company Warehouse",
    "invoice_value": 150.0,
    "declared_value": 150.0
  }
}
  • The example shows only some of the fields.
POST /claims/{claim_id}/affidavits Send Affidavit Request

Emails the consignee a link to a short signed statement confirming what happened to the package.

Auth: Bearer + claims

FieldTypeNotes
emailstringRequired. Where to send the request.
Example request
{ "email": "jane@example.com" }
cURL
curl -X POST "https://api.u-pic.com/claims/500123/affidavits" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{ "email": "jane@example.com" }'
Example response
{
  "affidavit_request_id": "663541",
  "claim_id": "500123",
  "email": "jane@example.com",
  "sent_at": "2026-08-03T10:30:00",
  "expires_at": "2026-09-02T10:30:00",
  "affidavit_url": "https://u-pic.com/affidavit/<token>",
  "upload_url": "https://u-pic.com/upload/<token>",
  "status": "queued"
}
  • A new request returns 201. The same email again within 3 days returns 400 TOO_SOON; a different email is allowed. If the latest request was already signed, this returns 400 ALREADY_FILLED. Neither needs retrying.
GET /claims/{claim_id}/affidavits List Affidavit Requests

The affidavit requests sent for a claim, and whether each has been signed.

Auth: Bearer + claims

Example request
GET /claims/500123/affidavits
cURL
curl "https://api.u-pic.com/claims/500123/affidavits" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "claim_id": "500123",
  "affidavits": [
    { "affidavit_request_id": "663541", "sent_to": "jane@example.com",
      "sent_at": "2026-08-03T10:30:00", "completed_at": "2026-08-04T08:05:00",
      "status": "completed" }
  ],
  "total": 1
}
  • A claim not on your account returns 404 claim_not_found.
POST /claims/{claim_id}/attachments Upload Claim Attachments

Uploads supporting documents such as invoices, photos and carrier correspondence.

Auth: Bearer + claims

FieldTypeNotes
filemultipart fileOne or more files under the form-data key file. Up to 10 per request, 25 MB each. PDF or images: JPEG, PNG, GIF, BMP, TIFF, WebP, HEIC, SVG, Photoshop and a few older graphics formats.
Example request
POST /claims/500123/attachments
Content-Type: multipart/form-data; boundary=<set by your client>

file=@invoice.pdf
file=@photo.jpg
cURL
curl -X POST "https://api.u-pic.com/claims/500123/attachments" \
  -H "Authorization: Bearer <your-token>" \
  -F "file=@invoice.pdf" \
  -F "file=@photo.jpg"
Example response
{
  "success": true,
  "claim_id": "500123",
  "uploaded_count": 2,
  "files": [
    { "attachment_id": 88121, "original_filename": "invoice.pdf", "size_bytes": 184220 },
    { "attachment_id": 88122, "original_filename": "photo.jpg", "size_bytes": 902114 }
  ]
}
  • Do not set the Content-Type header yourself. Forcing application/json on this request is the most common cause of upload failures.
  • If any file is too large or not an allowed type, the whole request is refused and nothing is saved.

Resources

Code samples

Authenticate, then insure a parcel, in the language you already use.

<?php
$base = "https://api.u-pic.com";

function upic($method, $url, $body = null, $token = null) {
    $ch = curl_init($url);
    $headers = ["Content-Type: application/json"];
    if ($token) $headers[] = "Authorization: Bearer " . $token;
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST  => $method,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER     => $headers,
        CURLOPT_POSTFIELDS     => $body ? json_encode($body) : null,
    ]);
    $result = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $result;
}

// 1. Authenticate once and keep the token
$token = upic("POST", "$base/auth", ["api_key" => getenv("UPIC_API_KEY")])["token"];

// 2. Insure a parcel
$manifest = upic("POST", "$base/manifests", [
    "carrier_id"     => 10001,   // client_carrier_id from GET /client/carriers
    "declared_value" => 150.00,
    "tracking"       => "9400111899223456789001",
    "shipped"        => "2026-07-24",
    "shipper"        => "123 Company Warehouse",
    "consignee"      => "Jane Doe",
    "invoice"        => "ORD-122222",
], $token);
import os
import requests

BASE = "https://api.u-pic.com"

# 1. Authenticate once and keep the token
auth = requests.post(f"{BASE}/auth", json={"api_key": os.environ["UPIC_API_KEY"]})
token = auth.json()["token"]
headers = {"Authorization": f"Bearer {token}"}

# 2. Insure a parcel
manifest = requests.post(f"{BASE}/manifests", headers=headers, json={
    "carrier_id": 10001,  # client_carrier_id from GET /client/carriers
    "declared_value": 150.00,
    "tracking": "9400111899223456789001",
    "shipped": "2026-07-24",
    "shipper": "123 Company Warehouse",
    "consignee": "Jane Doe",
    "invoice": "ORD-122222",
})
print(manifest.status_code, manifest.json())
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;

var http = new HttpClient { BaseAddress = new Uri("https://api.u-pic.com") };

// 1. Authenticate once and keep the token
var auth = await http.PostAsJsonAsync("/auth",
    new { api_key = Environment.GetEnvironmentVariable("UPIC_API_KEY") });
var token = (await auth.Content.ReadFromJsonAsync<JsonElement>())
    .GetProperty("token").GetString();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

// 2. Insure a parcel
var manifest = await http.PostAsJsonAsync("/manifests", new {
    carrier_id = 10001,   // client_carrier_id from GET /client/carriers
    declared_value = 150.00,
    tracking = "9400111899223456789001",
    shipped = "2026-07-24",
    shipper = "123 Company Warehouse",
    consignee = "Jane Doe",
    invoice = "ORD-122222"
});
Console.WriteLine(await manifest.Content.ReadAsStringAsync());

Try the flow

Pick a call and press Send to see what comes back. These are example responses; nothing leaves your browser.

REQUEST
POST /manifests
{
  "carrier_id": 10001,
  "declared_value": 150.00,
  "tracking": "9400111899223456789001",
  "shipped": "2026-07-24",
  "shipper": "123 Company Warehouse",
  "consignee": "Jane Doe",
  "invoice": "ORD-122222"
}
RESPONSE
Press "Send Request" to see the response{
  "success": true,
  "message": "Successfully created manifest",
  "manifest_id": "1000042",
  "tracking_number": "9400111899223456789001",
  "declared_value": "150.00",
  "calculated_dvu": 2,
  "calculated_cost": "1.30"
}
REQUEST
GET /manifests?tracking={tracking}
GET /manifests?tracking=9400111899223456789001
RESPONSE
Press "Send Request" to see the response[
  {
    "manifest_id": "1000042",
    "shipped": "2026-07-24",
    "declared_value": "150.00",
    "invoice": "ORD-122222",
    "shipper": "123 Company Warehouse",
    "consignee": "Jane Doe",
    "carrier_id": "42"
  }
]
REQUEST
DELETE /manifests?tracking={tracking}
DELETE /manifests?tracking=9400111899223456789001
RESPONSE
Press "Send Request" to see the response{
  "success": true,
  "message": "Successfully deleted manifest",
  "manifest_id": "1000042",
  "tracking_number": "9400111899223456789001"
}
REQUEST
POST /claims
{
  "claim": {
    "tracking": "9400111899223456789001",
    "ship_date": "2026-07-24",
    "type": 1,
    "item_description": "Leather handbag",
    "invoice_value": 150.00,
    "declared_value": 150.00,
    "payee": "<value for your account>",
    "shipper": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "consignee_email": "jane@example.com",
    "consignee_zip": "91000",
    "consignee_country": 236
  },
  "claimant": {
    "contact": "Ops Team",
    "address": "123 Wood Ave",
    "country": 236,
    "state": "CA",
    "zip": "91000"
  }
}
RESPONSE
Press "Send Request" to see the response{
  "success": true,
  "message": "Successfully filed claim",
  "claim_id": "500123",
  "tracking_number": "9400111899223456789001",
  "claim_amount": 150.0,
  "claim_type": "Loss",
  "file_date": "2026-08-02 10:14:00"
}
REQUEST
GET /claims/{claim_id}
GET /claims/500123
RESPONSE
Press "Send Request" to see the response{
  "status": {
    "claim_id": 500123,
    "claim_status_id": 8,
    "claim_status": "Paid",
    "claim_amount": 150.0,
    "claim_amount_paid": 150.0,
    "paid_date": { "formatted": "2026-08-20", "unix": 1787184000 },
    "resolution_date": { "formatted": "2026-08-18", "unix": 1787011200 },
    "claim_check_number": "10442"
  },
  "claimant": {
    "contact": "Ops Team", "company": "123 Company", "email": "ops@123co.com",
    "phone": "5555550100", "address": "123 Wood Ave", "address_2": "",
    "city": "Simi Valley", "state": "California", "country": "United States", "zip": "91000"
  },
  "claim": {
    "claim_type_id": 1,
    "claim_type": "Loss",
    "file_date": { "formatted": "2026-08-02 10:14:00", "unix": 1785665640 }
  },
  "shipment": {
    "ship_date": { "formatted": "2026-07-24", "unix": 1784851200 },
    "carrier": "UPS",
    "tracking": "9400111899223456789001",
    "consignee_name": "Jane Doe",
    "shipper": "123 Company Warehouse",
    "invoice_value": 150.0,
    "declared_value": 150.0
  }
}

Errors

Errors come back as JSON with a code and a readable message. Most look like {"errcode": "WRONG_CARRIER", "error": "..."}; authentication and lookup errors use {"error": "invalid_token", "message": "..."} instead, so check both keys. Treat any non-2xx status as a failure. Retry network and 5xx errors with backoff; a 4xx will fail the same way again unless its row below says otherwise. Never log your API key or token.

All 43 error codes
CodeMeaning
400 INVALID_JSONThe request body was not valid JSON.
400 MISSING_FIELDA required field was absent. The message names it.
400 UNKNOWN_CARRIERcarrier_id is missing or not an integer.
400 WRONG_CARRIERFile Manifest: carrier_id is not on your Client Carriers list. Check Client Carriers.
400 BELOW_DEDUCTIBLEThe declared value does not exceed the carrier's deductible, so there is nothing to insure.
400 DUPLICATE_ENTRYThat tracking number is already manifested.
400 DECLARED_VALUEdeclared_value is missing or not a number.
400 MISSING_TRACKINGtracking is required on File Manifest, and as the query string on Delete Manifest.
400 MISSING_PACKAGE_DATEshipped is required.
400 MISSING_SHIPPERshipper is required.
400 MISSING_CONSIGNEEconsignee is required.
400 BAD_SHIP_DATEThe ship date format was not recognized. Use YYYY-MM-DD.
400 NO_MANIFESTNothing was deleted: no manifest carries that tracking number, or one does and a claim has been filed against it.
400 INVALID_CLAIM_TYPEclaim.type must be 1 (Loss) or 2 (Damage).
400 MISSING_DAMAGE_DESCRIPTIONDamage claims require damage_description.
400 MISSING_STATE_ZIPA US or Canada claimant needs both state and zip.
400 NO_SHIP_DATEThe manifest for this tracking number has no ship date, which a claim requires.
400 MISSING_EMAILAn affidavit request carried no email.
400 INVALID_EMAILThe affidavit email was not a usable address.
400 TOO_SOONAn affidavit request went to the same email less than 3 days ago. A different email is allowed.
400 ALREADY_FILLEDThe latest affidavit request for this claim was already signed.
400 tracking_requiredQuery Manifests and Find Claim by Tracking Number need tracking in the query string.
400 invalid_json / api_key_requiredAuthenticate: the body was not valid JSON, or had no api_key.
400 NO_FILEThe attachments request carried no file. Send at least one under the form-data key file.
400 TOO_MANY_FILESMore than 10 files in one request. Split them across requests.
400 FILE_TOO_LARGEA file exceeded 25 MB. Nothing in the request was saved.
400 REJECTED_TYPEA file was not a PDF or an allowed image type. Nothing in the request was saved.
401 token_required / invalid_tokenThe bearer token is missing or invalid.
401 invalid_api_keyAuthenticate: the key is wrong or has been switched off.
403 insufficient_permissionsYour key lacks the permission that endpoint needs.
403 account_not_activeAuthenticate: your account is no longer active. Contact U-PIC.
403 account_cancelledFile Manifest: a cancelled account can no longer insure new shipments.
403 SHIPPED_AFTER_CANCELLATIONFile Claim: the shipment shipped after your account was cancelled, so it was not covered.
403 PAST_FILING_WINDOWFile Claim: the account is cancelled and the shipment is past its filing window.
403 WRONG_CARRIERFile Claim: the parcel's manifest has no carrier on file, and the claim.carrier you sent is not on your Client Carriers list.
403 WRONG_CLAIMUpload Claim Attachments: that claim belongs to another account. Other claim endpoints return 404 for another account's claim.
404 INVALID_TRACKINGNo manifest for that tracking number on your account. File the manifest first.
404 INVALID_COUNTRYA country field held an unknown id. Send the numeric country_id from Countries, not an ISO code.
404 INVALID_STATEclaimant.state is not a recognized abbreviation for that country.
404 NO_CLAIMNo claim with that id.
404 no_manifests_found / no_claim_foundThe lookup matched nothing.
404 claim_not_foundList Affidavit Requests: no claim with that id on your account.
500 SERVER_ERROR / internal_errorA server side failure. Safe to retry with backoff.

Testing and Postman

Build against a test client

U-PIC sets you up with a test client and its own API key. You build against the same api.u-pic.com URL, then switch to your live key when you go to production. Claims filed by a test client are saved as test claims and never processed.

Postman logo
Serverless API Postman collection

All 13 requests, with example bodies. Set api_key to your test key and run them top to bottom; each request saves the ids the next one needs.

Download collection

Authentication

  • Every endpoint except /health and /auth needs Authorization: Bearer <token>. Booking access is switched on for your key by U-PIC when your account is set up. It is not one of the flags /auth returns. No token returns 401 token_required. A key without Booking access, or a token that is invalid or has been replaced, gets 403 insufficient_permissions with the message Partner API access required on every /partners/v1 call.
  • Booking endpoints live under /partners/v1. /health, /auth and /client/carriers are shared with the Serverless API and sit at the root, for example https://api.u-pic.com/auth.
  • Create Seller, Book and Create Claim reject duplicates rather than creating a second record: 409, or 400 INVALID_QUOTE for a quote that was already booked. Each rejection hands back the identifier you need, so retries are safe.

Endpoint reference

Select an endpoint for its fields, an example request and response, and what to watch for.

You'll need an API key to make these calls. Request a test key and we'll set you up with a test client.

Getting started

GET /health Health Check

Confirms the API is reachable. Useful before debugging an authentication problem.

Auth: None

cURL
curl "https://api.u-pic.com/health"
Example response
{ "status": "ok", "service": "serverless-api", "version": "1.0.0" }
  • Shared with the Serverless API, so it sits at the root (https://api.u-pic.com/health), not under /partners/v1.
POST /auth Authenticate

Exchange your API key for a bearer token.

Auth: None

FieldTypeNotes
api_keystringRequired. The API key U-PIC issued you.
Example request
{ "api_key": "<your-api-key>" }
cURL
curl -X POST "https://api.u-pic.com/auth" \
  -H "Content-Type: application/json" \
  -d '{ "api_key": "<your-api-key>" }'
Example response
{
  "token": "<token>",
  "client_id": 1001,
  "permissions": { "manifests": 0, "claims": 0, "delete_manifests": 1 },
  "issued_at": "2026-08-06T17:04:11+00:00"
}
  • Tokens do not expire. Authenticate once, store the token securely and reuse it. Calling /auth again issues a new token and invalidates the previous one, so a job still holding the old token starts receiving 403 insufficient_permissions on /partners/v1 calls (and 401 invalid_token on /client/carriers).
  • A wrong or switched off key returns 401 invalid_api_key. An account that is no longer active returns 403 account_not_active. A body that is not valid JSON returns 400 invalid_json, and one without api_key returns 400 api_key_required.

Reference data

GET /client/carriers Client Carriers

The carriers you can book with, for booking with an exact client_carrier_id instead of a carrier name.

Auth: Bearer

cURL
curl "https://api.u-pic.com/client/carriers" \
  -H "Authorization: Bearer <your-token>"
Example response
[
  {
    "client_carrier_id": "10001",
    "carrier_id": "42",
    "description": "UPS",
    "international": "0",
    "cost_per_dvu": "0.650",
    "parcel_deductible": "0.00",
    "parcel_limit": "5000.00",
    "active": "1",
    "started": "2026-01-05 00:00:00"
  }
]
  • Optional, between Quote and Book. To name the carrier exactly, send its client_carrier_id (not carrier_id) on Book as order_metadata.client_carrier_id. Every carrier on this list can be booked now.
  • Booking by name still works as before: order_metadata.carrier is matched against description (case and extra spaces are ignored, and a few known alternative names are accepted), so copy names from this list.
  • The premium is fixed by your quote, whichever carrier you book on; cost_per_dvu does not apply. Shared with the Serverless API, so it sits at the root, not under /partners/v1.

Sellers

POST /partners/v1/create Create Seller

Registers a seller (a sub-client) under your account. Create once, then send the same sub_client_identifier on every quote for that seller.

Auth: Bearer

FieldTypeNotes
sub_client_identifierstringRequired. The id the seller is known by on your platform. Keep it stable: it groups the seller's bookings, claims and settlements.
company_namestringOptional. Max 255 characters.
contact_namestringOptional. Max 255 characters.
emailstringOptional. Max 250 characters.
phonestringOptional. Max 100 characters.
address_1, address_2, citystringOptional. Max 255 characters each.
statestringOptional. 2 letter state or province code. Send country with it.
countrystringOptional. ISO alpha-2, for example US.
zipstringOptional. Max 16 characters.
Example request
{
  "sub_client_identifier": "SELLER-4471",
  "company_name": "123 Company",
  "contact_name": "Pat Lee",
  "email": "ops@123co.com",
  "phone": "555-555-0100",
  "address_1": "100 Main St",
  "city": "Orlando",
  "state": "FL",
  "zip": "32801",
  "country": "US"
}
cURL
curl -X POST "https://api.u-pic.com/partners/v1/create" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "sub_client_identifier": "SELLER-4471",
  "company_name": "123 Company",
  "contact_name": "Pat Lee",
  "email": "ops@123co.com",
  "phone": "555-555-0100",
  "address_1": "100 Main St",
  "city": "Orlando",
  "state": "FL",
  "zip": "32801",
  "country": "US"
}'
Example response
{
  "success": true,
  "message": "Sub-client created",
  "sub_client_id": 142185,
  "sub_client_identifier": "SELLER-4471",
  "country": "US",
  "rate_id": 3301,
  "rate_type": "PER_DVU",
  "rate_value": 0.65,
  "status": "active"
}
  • A new seller returns 201. Sending an identifier that already exists returns 409 DUPLICATE_SUB_CLIENT and changes nothing. To correct a seller's details, use Update Seller.
  • Sellers are priced at your account's rate. If your account has no rate set up yet, this returns 409 CLIENT_RATE_NOT_SET.
  • Where U-PIC collects payment details directly from your sellers, the response also carries a payment_link to forward to the seller. Treat it as that seller's credential.
GET /partners/v1/subclients/{sub_client_identifier} Look Up Seller

Reads back one seller by the identifier you registered it with.

Auth: Bearer

Example request
GET /partners/v1/subclients/SELLER-4471
cURL
curl "https://api.u-pic.com/partners/v1/subclients/SELLER-4471" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "sub_client_identifier": "SELLER-4471",
  "company_name": "123 Company",
  "contact_name": "Pat Lee",
  "email": "ops@123co.com",
  "phone": "555-555-0100",
  "address": {
    "address_1": "100 Main St", "address_2": "Suite 4",
    "city": "Orlando", "state": "FL", "zip": "32801", "country": "US"
  },
  "status": "active",
  "created_on": "2026-11-12T23:27:50",
  "payment_details_provided": true,
  "payment_method": "check"
}
  • status is active, inactive or deactivated. payment_method is check or ach once the seller has given U-PIC their details. The details themselves are never returned.
  • An identifier not on your account returns 404 SUB_CLIENT_NOT_FOUND.
GET /partners/v1/subclients List Sellers

Lists your sellers by company name, 500 per page, with optional filters.

Auth: Bearer

FieldTypeNotes
searchstringOptional. Part of a company name.
statusstringOptional. active, inactive or deactivated.
payment_details_providedstringOptional. true or false.
pageintegerOptional, defaults to 1.
Example request
GET /partners/v1/subclients?search=123%20Company&status=active
cURL
curl "https://api.u-pic.com/partners/v1/subclients?search=123%20Company&status=active" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "page": 1,
  "page_size": 500,
  "total_count": 1,
  "total_pages": 1,
  "has_more": false,
  "subclients": [
    {
      "sub_client_identifier": "SELLER-4471",
      "company_name": "123 Company",
      "status": "active",
      "payment_details_provided": true
    }
  ]
}
  • Each seller has the same fields as Look Up Seller. The example shows only a few.
  • While has_more is true, send the same request with the next page.
PATCH /partners/v1/subclients/{sub_client_identifier} Update Seller

Corrects a seller's contact and address, or sets them active or inactive. Send only the fields you are changing.

Auth: Bearer

FieldTypeNotes
company_name, contact_name, email, phonestringOptional. Same limits as Create Seller.
address_1, address_2, city, state, zip, countrystringOptional. null or an empty string clears a field.
statusstringOptional. active or inactive. An inactive seller cannot be quoted; existing bookings and claims are unaffected.
Example request
{
  "address_1": "200 Oak Ave",
  "address_2": null,
  "city": "Tampa",
  "state": "FL",
  "country": "US"
}
cURL
curl -X PATCH "https://api.u-pic.com/partners/v1/subclients/SELLER-4471" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "address_1": "200 Oak Ave",
  "address_2": null,
  "city": "Tampa",
  "state": "FL",
  "country": "US"
}'
Example response
// The updated seller, in the same shape as Look Up Seller.
  • Once a seller has given U-PIC their own payment details, their contact and address are locked and this returns 409 SUB_CLIENT_LOCKED. Status can still be changed.
  • The identifier and the rate cannot be changed. Any other field returns 400 UNKNOWN_FIELD and nothing is saved.

Coverage

POST /partners/v1/quote Quote

Prices an order at your account's rate and returns a quote_uuid. The premium is locked at quote time.

Auth: Bearer

FieldTypeNotes
sub_client_identifierstringRequired. The seller, as sent to Create Seller.
total_insured_valuenumberRequired. The order value to insure.
destination_countrystringRequired. ISO alpha-2.
external_order_refstringOptional here. Your order reference, if you know it at quote time. Book needs one from either call.
perishablebooleanOptional, defaults to false. Priced at a perishable rate only when your account has one set up.
Example request
{
  "sub_client_identifier": "SELLER-4471",
  "total_insured_value": 150.00,
  "destination_country": "US",
  "perishable": false
}
cURL
curl -X POST "https://api.u-pic.com/partners/v1/quote" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "sub_client_identifier": "SELLER-4471",
  "total_insured_value": 150.00,
  "destination_country": "US",
  "perishable": false
}'
Example response
{
  "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
  "premium_amount": 1.30,
  "currency": "USD",
  "perishable": false,
  "status": "PENDING"
}
  • The returned premium_amount is what will be billed. Use it rather than calculating the premium yourself.
  • Sending perishable: true does not add perishable coverage on its own; that needs an endorsement on your account.
POST /partners/v1/book Book

Turns a PENDING quote into insured parcels and returns a manifest_uuid. Store it as you would a policy number.

Auth: Bearer

FieldTypeNotes
quote_uuidstringRequired. A PENDING quote.
order_metadata.shipper_namestringRequired.
order_metadata.consignee_namestringRequired.
order_metadata.ship_datedateRequired. YYYY-MM-DD, the date the parcel actually ships.
order_metadata.carrierstringRequired unless you send client_carrier_id. The carrier name, for example UPS.
order_metadata.client_carrier_idintegerOptional. The exact carrier, a client_carrier_id from Client Carriers. Used instead of carrier when sent.
order_metadata.external_order_refstringRequired here or on the quote. Your reference for what the booking covers.
order_metadata.consignee_address, consignee_email, destination_country, destination_postalstringOptional.
tracking_numbersarrayRequired. One tracking number as a string, or one object per parcel with its own insured_value.
Example request
{
  "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
  "order_metadata": {
    "shipper_name": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "ship_date": "2026-07-24",
    "carrier": "UPS",
    "destination_country": "US",
    "destination_postal": "93063",
    "external_order_ref": "ORD-122222"
  },
  "tracking_numbers": ["1Z999AA10123456784"]
}
cURL
curl -X POST "https://api.u-pic.com/partners/v1/book" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
  "order_metadata": {
    "shipper_name": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "ship_date": "2026-07-24",
    "carrier": "UPS",
    "destination_country": "US",
    "destination_postal": "93063",
    "external_order_ref": "ORD-122222"
  },
  "tracking_numbers": ["1Z999AA10123456784"]
}'
Example response
{
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "status": "ACTIVE",
  "premium_amount": 1.30,
  "tracking_count": 1,
  "created_at": "2026-07-24T16:02:11+00:00"
}
  • Several parcels: send [{ "tracking_number": "...", "insured_value": 100.00 }, ...]. The values must add up exactly to the quote's total_insured_value. Each parcel becomes its own insured shipment with its own claim.
  • A quote can be booked once. Re-sending it returns 400 INVALID_QUOTE with the manifest_uuid it produced. A fresh quote for a tracking number that is already insured returns 409 DUPLICATE_TRACKING with existing_manifest_uuid. Either way nothing is booked twice.
  • A new booking returns 201.
  • A carrier name that does not match exactly one of your carriers is still insured, but the booking is held and cannot be claimed against (409 MANIFEST_NOT_SYNCED) until U-PIC corrects it. Copy names from Client Carriers, or send client_carrier_id.
  • Or name the carrier exactly with client_carrier_id: it is used as is, and carrier can be left out. It must be one on the Client Carriers list (400 WRONG_CARRIER) and suit the quote: a perishable carrier on a perishable quote and a standard one on a standard quote, whenever your account has that kind (400 CARRIER_PERISHABLE_MISMATCH).
GET /partners/v1/bookings/{manifest_uuid} Booking Lookup

Reads a booking back: whether it is active, what it cost and which parcels it covers.

Auth: Bearer

Example request
GET /partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65
cURL
curl "https://api.u-pic.com/partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "status": "ACTIVE",
  "premium_amount": 1.30,
  "total_insured_value": 150.00,
  "ship_date": "2026-07-24",
  "carrier": "UPS",
  "external_order_ref": "ORD-122222",
  "sub_client_identifier": "SELLER-4471",
  "booked_at": "2026-07-24T16:02:11",
  "tracking_count": 1,
  "active_tracking_count": 1,
  "tracking_numbers": [
    { "tracking_number": "1Z999AA10123456784", "insured_value": 150.00,
      "is_primary": true, "status": "ACTIVE", "cancelled_on": null }
  ]
}
  • The example shows only some of the fields.
  • status answers whether the booking succeeded. On a booking with several parcels, check each parcel's own status.
  • There is no lookup by tracking number. A booking is the policy and may cover several parcels, so keep the manifest_uuid.
PATCH /partners/v1/bookings/{manifest_uuid} Change a Tracking Number

Moves a parcel's coverage to a new tracking number, for when a label is voided and reprinted. Premium, coverage and billing period stay the same.

Auth: Bearer

FieldTypeNotes
to_tracking_numberstringRequired. Must not already be booked on your account.
from_tracking_numberstringRequired when more than one active parcel remains on the booking.
Example request
{
  "from_tracking_number": "1Z999AA10123456784",
  "to_tracking_number": "1Z999AA10123456799"
}
cURL
curl -X PATCH "https://api.u-pic.com/partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "from_tracking_number": "1Z999AA10123456784",
  "to_tracking_number": "1Z999AA10123456799"
}'
Example response
// The booking, in the same shape as Booking Lookup, with the new number in place.
  • Safe to retry: re-sending a change that already went through returns 200 and the booking.
  • Not possible once a claim is filed on that parcel: 409 CLAIM_EXISTS.
DELETE /partners/v1/bookings/{manifest_uuid} Remove Insurance

Removes coverage from a whole booking, or from one parcel with ?tracking_number=, when an order is cancelled and will not ship.

Auth: Bearer + delete_manifests

Example request
DELETE /partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65?tracking_number=1Z999AA10123456784
cURL
curl -X DELETE "https://api.u-pic.com/partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65?tracking_number=1Z999AA10123456784" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "status": "CANCELLED",
  "cancelled_tracking_numbers": ["1Z999AA10123456784"],
  "already_cancelled": false
}
  • The response is the whole booking, exactly as Booking Lookup returns it, plus cancelled_tracking_numbers and already_cancelled. The example shows only those and the status.
  • The parcel stops being insured and billed, and its tracking number can be booked again. A parcel already invoiced stays on that invoice and is not credited. The booking stays ACTIVE until its last parcel is removed.
  • Removing a parcel that was already removed returns 200 with already_cancelled true, so a retry is safe.
  • An older booking billed as one record cannot have a single parcel removed: 409 PARTIAL_CANCEL_NOT_SUPPORTED. Remove the whole booking instead.
  • If only the label changed, use Change a Tracking Number instead: it keeps the original premium and billing period.
  • Not possible once a claim is filed on that parcel: 409 CLAIM_EXISTS.

Claims

POST /partners/v1/claim Create Claim

Opens a claim against a booked parcel and returns a claim_id.

Auth: Bearer

FieldTypeNotes
identifier.typestringRequired. tracking_number or manifest_uuid. Use tracking_number on bookings with several parcels.
identifier.valuestringRequired.
claim_details.typestringRequired. loss, damage or shortage.
claim_details.descriptionstringRequired. What happened.
claim_details.amountnumberOptional. The amount claimed.
Example request
{
  "identifier": { "type": "tracking_number", "value": "1Z999AA10123456784" },
  "claim_details": {
    "type": "loss",
    "description": "Customer reported package not delivered.",
    "amount": 150.00
  }
}
cURL
curl -X POST "https://api.u-pic.com/partners/v1/claim" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "identifier": { "type": "tracking_number", "value": "1Z999AA10123456784" },
  "claim_details": {
    "type": "loss",
    "description": "Customer reported package not delivered.",
    "amount": 150.00
  }
}'
Example response
{
  "claim_id": "9001",
  "status": "PENDING_REVIEW",
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "created_at": "2026-08-02T10:14:00+00:00"
}
  • A new claim returns 201. One claim per parcel. A second returns 409 DUPLICATE_CLAIM.
  • 409 MANIFEST_NOT_SYNCED means the booking could not be recorded for claims, most often because its carrier name did not match one of your carriers. Retry once after a short wait, and if it persists contact techsupport@u-pic.com.
  • Claims filed before your account is active are saved as test claims, come back with status TEST, and are not processed.
POST /partners/v1/claim/{claim_id}/attachments Upload Claim Attachments

Uploads supporting files to a claim as multipart/form-data.

Auth: Bearer

FieldTypeNotes
filemultipart fileOne or more files under the form-data key file. Up to 10 per request, 25 MB each. PDF or images (JPEG, PNG, GIF, BMP, TIFF, WebP, HEIC, SVG, ICO).
Example request
POST /partners/v1/claim/9001/attachments
Content-Type: multipart/form-data; boundary=<set by your client>

file=@invoice.pdf
cURL
curl -X POST "https://api.u-pic.com/partners/v1/claim/9001/attachments" \
  -H "Authorization: Bearer <your-token>" \
  -F "file=@invoice.pdf"
Example response
{
  "success": true,
  "claim_id": "9001",
  "uploaded_count": 1,
  "files": [
    { "attachment_id": 88121, "original_filename": "invoice.pdf", "size_bytes": 184220 }
  ]
}
GET /partners/v1/claim/{claim_id} Claim Status

Where a claim stands and whether it has been paid.

Auth: Bearer

Example request
GET /partners/v1/claim/9001
cURL
curl "https://api.u-pic.com/partners/v1/claim/9001" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "status": {
    "claim_id": 9001,
    "claim_status_id": 8,
    "claim_status": "Paid",
    "claim_amount": 150.00,
    "claim_amount_paid": 150.00,
    "paid_date": { "formatted": "2026-08-15", "unix": 1786752000 },
    "resolution_date": { "formatted": "2026-08-12", "unix": 1786492800 },
    "claim_check_number": "10442"
  },
  "claimant": { "contact": "Jane Roe", "company": "123 Company", "city": "Simi Valley", "state": "California" },
  "claim": { "claim_type_id": 1, "claim_type": "Loss" },
  "shipment": {
    "carrier": "UPS",
    "tracking": "1Z999AA10123456784",
    "reference": "d7bed04b-93d6-4251-a127-0fa9364faf65",
    "declared_value": 150.00
  }
}
  • Covers every claim on your account, including claims U-PIC entered for you. A claim id not on your account returns 404 CLAIM_NOT_FOUND.
GET /partners/v1/claim?tracking_number={tracking} Find Claims by Parcel or Booking

The claims filed on a parcel, or on every parcel in a booking. Send exactly one of tracking_number or manifest_uuid.

Auth: Bearer

Example request
GET /partners/v1/claim?tracking_number=1Z999AA10123456784
cURL
curl "https://api.u-pic.com/partners/v1/claim?tracking_number=1Z999AA10123456784" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "tracking_number": "1Z999AA10123456784",
  "count": 1,
  "claims": [
    {
      "status": { "claim_id": 9001, "claim_status": "Paid", "claim_amount_paid": 150.00 },
      "claim": { "claim_type_id": 1, "claim_type": "Loss" },
      "shipment": { "carrier": "UPS", "tracking": "1Z999AA10123456784" }
    }
  ]
}
  • Each claim has the same shape as Claim Status. The example shows only a few fields.
  • No claims is not an error: it returns 200 with "count": 0. A manifest_uuid not on your account returns 404 BOOKING_NOT_FOUND.
POST /partners/v1/claim/{claim_id}/affidavits Send Affidavit Request

Emails the buyer a link to a short signed statement about what happened to the package. The email names the seller's store so the buyer recognizes it.

Auth: Bearer

FieldTypeNotes
emailstringRequired. The buyer's email address.
Example request
{ "email": "buyer@example.com" }
cURL
curl -X POST "https://api.u-pic.com/partners/v1/claim/9001/affidavits" \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{ "email": "buyer@example.com" }'
Example response
{
  "affidavit_request_id": "663541",
  "claim_id": "9001",
  "email": "buyer@example.com",
  "sent_at": "2026-11-11T10:30:00",
  "expires_at": "2026-12-11T10:30:00",
  "affidavit_url": "https://u-pic.com/affidavit/<token>",
  "upload_url": "https://u-pic.com/upload/<token>",
  "status": "queued"
}
  • A new request returns 201. A signed claim returns 400 ALREADY_FILLED. The same email again within 3 days returns 400 TOO_SOON. A different email is allowed.
GET /partners/v1/claim/{claim_id}/affidavits List Affidavit Requests

The affidavit requests sent for a claim, and whether each has been signed.

Auth: Bearer

Example request
GET /partners/v1/claim/9001/affidavits
cURL
curl "https://api.u-pic.com/partners/v1/claim/9001/affidavits" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "claim_id": "9001",
  "affidavits": [
    { "affidavit_request_id": "663541", "sent_to": "buyer@example.com",
      "sent_at": "2026-11-11T10:30:00", "completed_at": "2026-11-12T08:05:00",
      "status": "completed" }
  ],
  "total": 1
}
  • status is pending until the buyer signs, then completed. Newest request first.

Reporting

GET /partners/v1/settlements?date_from={date}&date_to={date} Settlements

The claims U-PIC paid in a date range (by pay date), for reconciling payments. Optional sub_client_identifier and page.

Auth: Bearer

Example request
GET /partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31
cURL
curl "https://api.u-pic.com/partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "date_from": "2026-08-01",
  "date_to": "2026-08-31",
  "count": 1,
  "total_count": 1,
  "total_paid_amount": 150.00,
  "page": 1,
  "page_size": 5000,
  "total_pages": 1,
  "has_more": false,
  "settlements": [
    {
      "claim_id": "9001",
      "pay_date": "2026-08-15",
      "paid_amount": 150.00,
      "claim_type": "loss",
      "tracking_number": "1Z999AA10123456784",
      "sub_client_identifier": "SELLER-4471",
      "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
      "external_order_ref": "ORD-122222",
      "carrier": "UPS"
    }
  ]
}
  • Maximum range 366 days. Up to 5,000 rows per page; while has_more is true, send the same request with the next page.
  • Only claims that are actually paid appear. A claim under review or approved but unpaid does not.
GET /partners/v1/bookings?invoice_id={invoice_id} Reconciliation Report

One invoice's lines, one row per parcel. Optional sub_client_identifier and page.

Auth: Bearer

Example request
GET /partners/v1/bookings?invoice_id=109703
cURL
curl "https://api.u-pic.com/partners/v1/bookings?invoice_id=109703" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "invoice_id": "109703",
  "invoice_period": "2026-07-01",
  "date_from": null,
  "date_to": null,
  "sub_client_identifier": null,
  "count": 1,
  "total_count": 1,
  "page": 1,
  "page_size": 5000,
  "total_pages": 1,
  "has_more": false,
  "rows": [
    {
      "type": "CHARGE",
      "invoice_id": "109703",
      "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
      "tracking_number": "1Z999AA10123456784",
      "ship_date": "2026-07-24",
      "declared_value": 150.00,
      "premium_charged": 1.30,
      "carrier": "UPS",
      "external_order_ref": "ORD-122222",
      "sub_client_identifier": "SELLER-4471",
      "status": "ACTIVE"
    }
  ]
}
  • Send invoice_id or a date range, not both.
  • A parcel cancelled after its invoice was issued stays on that invoice with status CANCELLED.
GET /partners/v1/bookings?date_from={date}&date_to={date} Reconciliation by Date Range

The same invoice lines as the Reconciliation Report, across every invoice, for parcels booked (or credits for parcels cancelled) in a date range. Optional sub_client_identifier and page.

Auth: Bearer

Example request
GET /partners/v1/bookings?date_from=2026-07-01&date_to=2026-07-31
cURL
curl "https://api.u-pic.com/partners/v1/bookings?date_from=2026-07-01&date_to=2026-07-31" \
  -H "Authorization: Bearer <your-token>"
Example response
{
  "invoice_id": null,
  "invoice_period": null,
  "date_from": "2026-07-01",
  "date_to": "2026-07-31",
  "sub_client_identifier": null,
  "count": 1,
  "total_count": 1,
  "page": 1,
  "page_size": 5000,
  "total_pages": 1,
  "has_more": false,
  "rows": [
    {
      "type": "CHARGE",
      "invoice_id": "109703",
      "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
      "tracking_number": "1Z999AA10123456784",
      "ship_date": "2026-07-24",
      "declared_value": 150.00,
      "premium_charged": 1.30,
      "carrier": "UPS",
      "external_order_ref": "ORD-122222",
      "sub_client_identifier": "SELLER-4471",
      "status": "ACTIVE"
    }
  ]
}
  • Maximum range 366 days. Up to 5,000 rows per page; while has_more is true, send the same request with the next page.
  • Only invoiced lines appear: a charge by the date the parcel was booked, a credit by the date it was cancelled. A period that has not been invoiced yet returns no rows.
  • Sending invoice_id with a date range returns 400 CONFLICTING_FILTERS.

Resources

Code samples

Authenticate, quote, then book, in the language you already use.

<?php
$base = "https://api.u-pic.com";

function upic($method, $url, $body = null, $token = null) {
    $ch = curl_init($url);
    $headers = ["Content-Type: application/json"];
    if ($token) $headers[] = "Authorization: Bearer " . $token;
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST  => $method,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER     => $headers,
        CURLOPT_POSTFIELDS     => $body ? json_encode($body) : null,
    ]);
    $result = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $result;
}

// 1. Authenticate once and keep the token
$token = upic("POST", "$base/auth", ["api_key" => getenv("UPIC_API_KEY")])["token"];

// 2. Quote the order (the seller was registered once with /partners/v1/create)
$quote = upic("POST", "$base/partners/v1/quote", [
    "sub_client_identifier" => "SELLER-4471",
    "total_insured_value"   => 150.00,
    "destination_country"   => "US",
], $token);

// 3. Book it, and store manifest_uuid with the order
$booking = upic("POST", "$base/partners/v1/book", [
    "quote_uuid" => $quote["quote_uuid"],
    "order_metadata" => [
        "shipper_name"       => "123 Company Warehouse",
        "consignee_name"     => "Jane Doe",
        "ship_date"          => date("Y-m-d"),
        "carrier"            => "UPS",
        "external_order_ref" => "ORD-122222",
    ],
    "tracking_numbers" => ["1Z999AA10123456784"],
], $token);
import os
from datetime import date
import requests

BASE = "https://api.u-pic.com"

# 1. Authenticate once and keep the token
auth = requests.post(f"{BASE}/auth", json={"api_key": os.environ["UPIC_API_KEY"]})
headers = {"Authorization": f"Bearer {auth.json()['token']}"}

# 2. Quote the order (the seller was registered once with /partners/v1/create)
quote = requests.post(f"{BASE}/partners/v1/quote", headers=headers, json={
    "sub_client_identifier": "SELLER-4471",
    "total_insured_value": 150.00,
    "destination_country": "US",
}).json()

# 3. Book it, and store manifest_uuid with the order
booking = requests.post(f"{BASE}/partners/v1/book", headers=headers, json={
    "quote_uuid": quote["quote_uuid"],
    "order_metadata": {
        "shipper_name": "123 Company Warehouse",
        "consignee_name": "Jane Doe",
        "ship_date": date.today().isoformat(),
        "carrier": "UPS",
        "external_order_ref": "ORD-122222",
    },
    "tracking_numbers": ["1Z999AA10123456784"],
}).json()
print(booking["manifest_uuid"], booking["premium_amount"])
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;

var http = new HttpClient { BaseAddress = new Uri("https://api.u-pic.com") };

// 1. Authenticate once and keep the token
var auth = await http.PostAsJsonAsync("/auth",
    new { api_key = Environment.GetEnvironmentVariable("UPIC_API_KEY") });
var token = (await auth.Content.ReadFromJsonAsync<JsonElement>())
    .GetProperty("token").GetString();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

// 2. Quote the order (the seller was registered once with /partners/v1/create)
var quote = await (await http.PostAsJsonAsync("/partners/v1/quote", new {
    sub_client_identifier = "SELLER-4471",
    total_insured_value = 150.00,
    destination_country = "US"
})).Content.ReadFromJsonAsync<JsonElement>();

// 3. Book it, and store manifest_uuid with the order
var booking = await http.PostAsJsonAsync("/partners/v1/book", new {
    quote_uuid = quote.GetProperty("quote_uuid").GetString(),
    order_metadata = new {
        shipper_name = "123 Company Warehouse",
        consignee_name = "Jane Doe",
        ship_date = DateTime.Today.ToString("yyyy-MM-dd"),
        carrier = "UPS",
        external_order_ref = "ORD-122222"
    },
    tracking_numbers = new[] { "1Z999AA10123456784" }
});
Console.WriteLine(await booking.Content.ReadAsStringAsync());

Try the flow

Pick a call and press Send to see what comes back. These are example responses; nothing leaves your browser.

REQUEST
POST /partners/v1/quote
{
  "sub_client_identifier": "SELLER-4471",
  "total_insured_value": 150.00,
  "destination_country": "US",
  "perishable": false
}
RESPONSE
Press "Send Request" to see the response{
  "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
  "premium_amount": 1.30,
  "currency": "USD",
  "perishable": false,
  "status": "PENDING"
}
REQUEST
POST /partners/v1/book
{
  "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
  "order_metadata": {
    "shipper_name": "123 Company Warehouse",
    "consignee_name": "Jane Doe",
    "ship_date": "2026-07-24",
    "carrier": "UPS",
    "destination_country": "US",
    "destination_postal": "93063",
    "external_order_ref": "ORD-122222"
  },
  "tracking_numbers": ["1Z999AA10123456784"]
}
RESPONSE
Press "Send Request" to see the response{
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "status": "ACTIVE",
  "premium_amount": 1.30,
  "tracking_count": 1,
  "created_at": "2026-07-24T16:02:11+00:00"
}
REQUEST
POST /partners/v1/claim
{
  "identifier": { "type": "tracking_number", "value": "1Z999AA10123456784" },
  "claim_details": {
    "type": "loss",
    "description": "Customer reported package not delivered.",
    "amount": 150.00
  }
}
RESPONSE
Press "Send Request" to see the response{
  "claim_id": "9001",
  "status": "PENDING_REVIEW",
  "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
  "created_at": "2026-08-02T10:14:00+00:00"
}
REQUEST
GET /partners/v1/claim/{claim_id}
GET /partners/v1/claim/9001
RESPONSE
Press "Send Request" to see the response{
  "status": {
    "claim_id": 9001,
    "claim_status_id": 8,
    "claim_status": "Paid",
    "claim_amount": 150.00,
    "claim_amount_paid": 150.00,
    "paid_date": { "formatted": "2026-08-15", "unix": 1786752000 },
    "resolution_date": { "formatted": "2026-08-12", "unix": 1786492800 },
    "claim_check_number": "10442"
  },
  "claimant": { "contact": "Jane Roe", "company": "123 Company", "city": "Simi Valley", "state": "California" },
  "claim": { "claim_type_id": 1, "claim_type": "Loss" },
  "shipment": {
    "carrier": "UPS",
    "tracking": "1Z999AA10123456784",
    "reference": "d7bed04b-93d6-4251-a127-0fa9364faf65",
    "declared_value": 150.00
  }
}
REQUEST
GET /partners/v1/settlements?date_from={date}&date_to={date}
GET /partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31
RESPONSE
Press "Send Request" to see the response{
  "date_from": "2026-08-01",
  "date_to": "2026-08-31",
  "count": 1,
  "total_count": 1,
  "total_paid_amount": 150.00,
  "page": 1,
  "page_size": 5000,
  "total_pages": 1,
  "has_more": false,
  "settlements": [
    {
      "claim_id": "9001",
      "pay_date": "2026-08-15",
      "paid_amount": 150.00,
      "claim_type": "loss",
      "tracking_number": "1Z999AA10123456784",
      "sub_client_identifier": "SELLER-4471",
      "manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
      "external_order_ref": "ORD-122222",
      "carrier": "UPS"
    }
  ]
}

Errors

Errors come back as JSON with a code and a readable message. Most look like {"errcode": "WRONG_CARRIER", "error": "..."}; authentication and lookup errors use {"error": "invalid_token", "message": "..."} instead, so check both keys. Treat any non-2xx status as a failure. Retry network and 5xx errors with backoff; a 4xx will fail the same way again unless its row below says otherwise. Never log your API key or token.

All 72 error codes
CodeMeaning
400 INVALID_JSONThe request body was not valid JSON.
400 MISSING_FIELDA required field was absent. The message names it.
400 INVALID_VALUEA field was present but not usable, such as a value that is not a positive number, or a client_carrier_id that is not a whole number.
400 INVALID_COUNTRYUnknown country code. Use ISO alpha-2.
400 INVALID_STATENot a state or province of that country.
400 INVALID_FIELDA seller field was too long or not a string, or (on Update Seller) an invalid email. The message names it.
400 INVALID_SUB_CLIENTThat sub_client_identifier is not registered on your account. Create the seller first.
400 SUB_CLIENT_INACTIVEQuote was sent for an inactive or deactivated seller.
400 NO_ACTIVE_RATEThe seller has no active rate. Contact techsupport@u-pic.com.
400 NO_FIELDSUpdate Seller was sent with an empty body.
400 UNKNOWN_FIELDUpdate Seller included a field that cannot be changed. Nothing was saved.
400 INVALID_STATUSStatus must be active or inactive (or deactivated, as a lookup filter).
400 INVALID_FILTERpayment_details_provided must be true or false.
400 INVALID_QUOTEThe quote is unknown, belongs to another account, or was already booked. When already booked, the response carries its manifest_uuid.
400 MISSING_ORDER_REFNo external_order_ref on the quote or the booking.
400 MISSING_TRACKINGNo tracking number, or an empty one in a parcel object.
400 MULTIPLE_TRACKING_NOT_SUPPORTEDTwo or more tracking numbers sent as plain strings. Use one object per parcel with insured_value.
400 MISSING_INSURED_VALUEA parcel object had no insured_value.
400 INSURED_VALUE_MISMATCHParcel insured_value amounts do not add up to the quote's total_insured_value.
400 INVALID_TRACKING_FORMATPlain strings and parcel objects mixed in one array.
400 DUPLICATE_TRACKINGThe same tracking number appears twice in one request.
400 BAD_SHIP_DATEship_date was not a recognized date. Use YYYY-MM-DD.
400 BAD_CARRIERcarrier was a number or a numeric string. Send the carrier name, for example "UPS", or the id as client_carrier_id.
400 WRONG_CARRIERclient_carrier_id is not on your Client Carriers list. Check Client Carriers.
400 CARRIER_PERISHABLE_MISMATCHThe carrier chosen by client_carrier_id does not suit the quote: a standard carrier on a perishable quote, or a perishable one on a standard quote. Only returned when your account has carriers of the kind the quote needs.
400 INVALID_IDENTIFIERCreate Claim: identifier.value did not match a booking or parcel on your account. An identifier.type other than manifest_uuid or tracking_number returns 400 INVALID_VALUE.
400 AMBIGUOUS_IDENTIFIERA claim used manifest_uuid on a booking with several parcels. Use tracking_number.
400 MISSING_DESCRIPTIONclaim_details.description is required.
400 INVALID_MANIFEST_STATUSThe booking cannot be claimed against, for example because it was cancelled.
400 NO_SHIP_DATEThe booked parcel has no ship date, which a claim requires.
400 MISSING_CLAIM_IDThe attachments URL did not contain a claim id.
400 NO_FILENo file was sent. Use the form-data key file.
400 TOO_MANY_FILESMore than 10 files in one request.
400 FILE_TOO_LARGEA file exceeded 25 MB. Nothing in the request was saved.
400 REJECTED_TYPEA file type is not allowed.
400 MISSING_IDENTIFIERFind Claims by Parcel or Booking needs exactly one of tracking_number or manifest_uuid. Change a Tracking Number and Remove Insurance return it when the URL has no manifest_uuid.
400 MISSING_EMAIL / INVALID_EMAILThe affidavit request email is missing or not an email address.
400 ALREADY_FILLEDThe buyer already signed an affidavit for this claim.
400 TOO_SOONAn affidavit request went to the same email less than 3 days ago.
400 AMBIGUOUS_PARCELA tracking number change on a booking with several parcels needs from_tracking_number.
400 TRACKING_NOT_ON_BOOKINGThat tracking number is not on the booking. On Change a Tracking Number it is also returned for a parcel already cancelled; Remove Insurance answers that case with 200 and already_cancelled true.
400 MISSING_DATE_RANGESettlements needs date_from and date_to; the Reconciliation Report needs them or invoice_id.
400 BAD_DATE / INVALID_DATE_RANGEA report date was not YYYY-MM-DD, or date_to is before date_from.
400 RANGE_TOO_LARGEThe report range exceeds 366 days.
400 INVALID_PAGEPages start at 1.
400 CONFLICTING_FILTERSThe Reconciliation Report was sent invoice_id and a date range together.
400 invalid_json / api_key_requiredAuthenticate: the body was not valid JSON, or had no api_key.
401 token_requiredNo bearer token was sent.
401 invalid_tokenClient Carriers: the token is invalid or has been replaced.
401 invalid_api_keyAuthenticate: the key is wrong or has been switched off.
403 insufficient_permissionsAny /partners/v1 call: the token is invalid or has been replaced, or your key does not have Booking access. The message reads Partner API access required.
403 INSUFFICIENT_PERMISSIONSRemove Insurance needs the delete_manifests permission.
403 account_not_activeAuthenticate: your account is no longer active. Contact U-PIC.
403 ACCOUNT_CANCELLEDA cancelled account cannot create sellers, quote or book.
403 SHIPPED_AFTER_CANCELLATIONCreate Claim: the parcel shipped after the account was cancelled.
403 PAST_FILING_WINDOWCreate Claim: the account is cancelled and the parcel is past its filing window.
403 WRONG_MANIFESTThe booking named by the claim belongs to another account.
404 SUB_CLIENT_NOT_FOUNDNo seller with that identifier on your account.
404 BOOKING_NOT_FOUNDNo booking on your account has that manifest_uuid.
404 CLAIM_NOT_FOUNDNo claim with that id on your account.
404 INVOICE_NOT_FOUNDNo invoice with that invoice_id on your account.
409 DUPLICATE_SUB_CLIENTThat seller is already registered. Nothing changed.
409 CLIENT_RATE_NOT_SETYour account has no rate set up. Contact techsupport@u-pic.com.
409 SUB_CLIENT_LOCKEDThe seller gave U-PIC their payment details, so contact and address are locked. Status can still change.
409 SUB_CLIENT_DEACTIVATEDU-PIC deactivated this seller, so it cannot be changed through the API.
409 DUPLICATE_TRACKINGThat tracking number is already insured. On Book the response carries existing_manifest_uuid: treat it as already booked. On Change a Tracking Number it lists the tracking_numbers already in use instead.
409 DUPLICATE_CLAIMA claim already exists for this parcel.
409 CLAIM_EXISTSA claim is filed on that parcel, so its tracking number and coverage cannot change.
409 BOOKING_NOT_ACTIVEThe booking is cancelled or closed.
409 PARTIAL_CANCEL_NOT_SUPPORTEDRemove Insurance: an older booking billed as one record cannot have a single parcel removed. Remove the whole booking.
409 MANIFEST_NOT_SYNCEDThe booking could not be recorded for claims, most often because its carrier name did not match one of your carriers. Retry once after a short wait, and if it persists contact techsupport@u-pic.com.
500 SERVER_ERRORA server side failure. Safe to retry with backoff.

Testing and Postman

Build against a test client

U-PIC sets you up with a test client and its own API key. You build against the same api.u-pic.com URL, then switch to your live key when you go to production. Claims filed by a test client are saved as test claims and never processed.

Postman logo
Booking API Postman collection

All 25 requests, with example bodies. Set api_key to your test key and run them top to bottom; each request saves the ids the next one needs.

Download collection

Integration Support

Our engineering team is available to support your integration from kickoff to production. Whether you need help with authentication, payload structure, or edge cases, we're here.

Ready to Integrate?

Get API credentials and start building. Our team can have you up and running in days, not weeks.

Image: A seller clicking an API integration overlay.

Integrate With U-PIC Shipping Insurance

Offer a shipping insurance solution native to your platform, for your customers
Complete this form and an agent will be in touch shortly
$