Shipping insurance as code. Insure parcels, file claims and reconcile payments with simple REST calls.
{
"success": true,
"message": "Successfully created manifest",
"manifest_id": "1000042",
"tracking_number": "9400111899223456789001",
"declared_value": "150.00",
"calculated_dvu": 2,
"calculated_cost": "1.30"
}
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.
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.
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.
/health and /auth needs Authorization: Bearer <token>. Requests with a JSON body also need Content-Type: application/json./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.multipart/form-data. Let your HTTP client set it with its own boundary.Select an endpoint for its fields, an example request and response, and what to watch for.
Confirms the API is reachable. Useful before debugging an authentication problem.
Auth: None
curl "https://api.u-pic.com/health"
{ "status": "ok", "service": "serverless-api", "version": "1.0.0" }Exchange your API key for a bearer token.
Auth: None
| Field | Type | Notes |
|---|---|---|
api_key | string | Required. The API key U-PIC issued you. |
{ "api_key": "<your-api-key>" }curl -X POST "https://api.u-pic.com/auth" \
-H "Content-Type: application/json" \
-d '{ "api_key": "<your-api-key>" }'
{
"token": "<token>",
"client_id": 1001,
"permissions": { "manifests": 1, "claims": 1, "delete_manifests": 0 },
"issued_at": "2026-08-06T17:04:11+00:00"
}/auth again issues a new token and invalidates the previous one, so a job still holding the old token starts receiving 401 invalid_token.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.The countries U-PIC recognizes. Every country field in this API takes the numeric country_id from this list.
Auth: Bearer
curl "https://api.u-pic.com/countries" \
-H "Authorization: Bearer <your-token>"
[
{ "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" }
]country_id, not an ISO code. 236 is the United States and 40 is Canada.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 "https://api.u-pic.com/client/carriers" \
-H "Authorization: Bearer <your-token>"
[
{
"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"
}
]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.Insures one parcel. One manifest per tracking number.
Auth: Bearer + manifests
| Field | Type | Notes |
|---|---|---|
carrier_id | integer | Required. A client_carrier_id from Client Carriers. |
declared_value | number | Required. The value to insure. |
tracking | string | Required. The parcel's tracking number. |
shipped | date | Required. Ship date, YYYY-MM-DD preferred. |
shipper | string | Required. |
consignee | string | Required. |
invoice | string | Optional. Your reference for the shipment. |
account | string | Optional. Stored as an external reference. |
{
"carrier_id": 10001,
"declared_value": 150.00,
"tracking": "9400111899223456789001",
"shipped": "2026-07-24",
"shipper": "123 Company Warehouse",
"consignee": "Jane Doe",
"invoice": "ORD-122222"
}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"
}'
{
"success": true,
"message": "Successfully created manifest",
"manifest_id": "1000042",
"tracking_number": "9400111899223456789001",
"declared_value": "150.00",
"calculated_dvu": 2,
"calculated_cost": "1.30"
}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.400 BELOW_DEDUCTIBLE and creates nothing.400 DUPLICATE_ENTRY instead of a second manifest, so a retried request is safe.Looks up manifests you have filed, by tracking number.
Auth: Bearer + manifests
GET /manifests?tracking=9400111899223456789001curl "https://api.u-pic.com/manifests?tracking=9400111899223456789001" \
-H "Authorization: Bearer <your-token>"
[
{
"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.404 no_manifests_found rather than an empty list. Leaving out tracking returns 400 tracking_required.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
DELETE /manifests?tracking=9400111899223456789001curl -X DELETE "https://api.u-pic.com/manifests?tracking=9400111899223456789001" \
-H "Authorization: Bearer <your-token>"
{
"success": true,
"message": "Successfully deleted manifest",
"manifest_id": "1000042",
"tracking_number": "9400111899223456789001"
}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.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
| Field | Type | Notes |
|---|---|---|
claim.tracking | string | Required. Must already be on one of your manifests. |
claim.ship_date | date | Required. YYYY-MM-DD preferred. |
claim.carrier | integer | Not 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.type | integer | Required. 1 = Loss, 2 = Damage. |
claim.damage_description | string | Required when type is 2. |
claim.item_description | string | Required. What was in the parcel. |
claim.invoice_value | number | Required. |
claim.declared_value | number | Required. |
claim.amount_recovered | number | Optional, defaults to 0. Any amount already recovered. |
claim.amount_paid_by_carrier | number | Optional, defaults to 0. Any amount the carrier already paid. |
claim.payee | integer | Required. Who is to be paid. U-PIC gives you the value for your account. |
claim.shipper | string | Required. |
claim.shipper_reference | string | Optional. Your own reference for the claim. |
claim.repairable | boolean | Optional. Whether a damaged item can be repaired. |
claim.consignee_name | string | Required. |
claim.consignee_email | string | Required. |
claim.consignee_zip | string | Required. |
claim.consignee_country | integer | Required. A country_id from Countries. |
claimant.contact | string | Required. |
claimant.company | string | Optional. |
claimant.email | string | Optional. Where claim updates are sent. |
claimant.phone | string | Optional. Digits only are kept. |
claimant.address | string | Required. |
claimant.address_2 | string | Optional. |
claimant.city | string | Optional. |
claimant.country | integer | Required. A country_id from Countries. |
claimant.state | string | Required with zip when country is 236 (US) or 40 (Canada). |
claimant.zip | string | Required with state when country is 236 or 40. |
{
"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 -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"
}
}'
{
"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"
}201. claim_amount is declared_value minus amount_recovered minus amount_paid_by_carrier.404 INVALID_TRACKING. File the manifest first.200 with "duplicate": true and the existing claim_id, so a retry never creates a second claim.Resolves a tracking number to the claim filed against it.
Auth: Bearer + claims
GET /claims?tracking=9400111899223456789001curl "https://api.u-pic.com/claims?tracking=9400111899223456789001" \
-H "Authorization: Bearer <your-token>"
{ "claim_id": "500123" }404 no_claim_found.Status, amounts, claimant and shipment detail for one claim.
Auth: Bearer + claims
GET /claims/500123curl "https://api.u-pic.com/claims/500123" \
-H "Authorization: Bearer <your-token>"
{
"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
}
}Emails the consignee a link to a short signed statement confirming what happened to the package.
Auth: Bearer + claims
| Field | Type | Notes |
|---|---|---|
email | string | Required. Where to send the request. |
{ "email": "jane@example.com" }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" }'
{
"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"
}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.The affidavit requests sent for a claim, and whether each has been signed.
Auth: Bearer + claims
GET /claims/500123/affidavitscurl "https://api.u-pic.com/claims/500123/affidavits" \
-H "Authorization: Bearer <your-token>"
{
"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
}404 claim_not_found.Uploads supporting documents such as invoices, photos and carrier correspondence.
Auth: Bearer + claims
| Field | Type | Notes |
|---|---|---|
file | multipart file | One 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. |
POST /claims/500123/attachments
Content-Type: multipart/form-data; boundary=<set by your client>
file=@invoice.pdf
file=@photo.jpgcurl -X POST "https://api.u-pic.com/claims/500123/attachments" \
-H "Authorization: Bearer <your-token>" \
-F "file=@invoice.pdf" \
-F "file=@photo.jpg"
{
"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 }
]
}application/json on this request is the most common cause of upload failures.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());Pick a call and press Send to see what comes back. These are example responses; nothing leaves your browser.
{
"carrier_id": 10001,
"declared_value": 150.00,
"tracking": "9400111899223456789001",
"shipped": "2026-07-24",
"shipper": "123 Company Warehouse",
"consignee": "Jane Doe",
"invoice": "ORD-122222"
}
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" }
GET /manifests?tracking=9400111899223456789001
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" } ]
DELETE /manifests?tracking=9400111899223456789001
Press "Send Request" to see the response{ "success": true, "message": "Successfully deleted manifest", "manifest_id": "1000042", "tracking_number": "9400111899223456789001" }
{
"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"
}
}
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" }
GET /claims/500123
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 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.
| Code | Meaning |
|---|---|
400 INVALID_JSON | The request body was not valid JSON. |
400 MISSING_FIELD | A required field was absent. The message names it. |
400 UNKNOWN_CARRIER | carrier_id is missing or not an integer. |
400 WRONG_CARRIER | File Manifest: carrier_id is not on your Client Carriers list. Check Client Carriers. |
400 BELOW_DEDUCTIBLE | The declared value does not exceed the carrier's deductible, so there is nothing to insure. |
400 DUPLICATE_ENTRY | That tracking number is already manifested. |
400 DECLARED_VALUE | declared_value is missing or not a number. |
400 MISSING_TRACKING | tracking is required on File Manifest, and as the query string on Delete Manifest. |
400 MISSING_PACKAGE_DATE | shipped is required. |
400 MISSING_SHIPPER | shipper is required. |
400 MISSING_CONSIGNEE | consignee is required. |
400 BAD_SHIP_DATE | The ship date format was not recognized. Use YYYY-MM-DD. |
400 NO_MANIFEST | Nothing was deleted: no manifest carries that tracking number, or one does and a claim has been filed against it. |
400 INVALID_CLAIM_TYPE | claim.type must be 1 (Loss) or 2 (Damage). |
400 MISSING_DAMAGE_DESCRIPTION | Damage claims require damage_description. |
400 MISSING_STATE_ZIP | A US or Canada claimant needs both state and zip. |
400 NO_SHIP_DATE | The manifest for this tracking number has no ship date, which a claim requires. |
400 MISSING_EMAIL | An affidavit request carried no email. |
400 INVALID_EMAIL | The affidavit email was not a usable address. |
400 TOO_SOON | An affidavit request went to the same email less than 3 days ago. A different email is allowed. |
400 ALREADY_FILLED | The latest affidavit request for this claim was already signed. |
400 tracking_required | Query Manifests and Find Claim by Tracking Number need tracking in the query string. |
400 invalid_json / api_key_required | Authenticate: the body was not valid JSON, or had no api_key. |
400 NO_FILE | The attachments request carried no file. Send at least one under the form-data key file. |
400 TOO_MANY_FILES | More than 10 files in one request. Split them across requests. |
400 FILE_TOO_LARGE | A file exceeded 25 MB. Nothing in the request was saved. |
400 REJECTED_TYPE | A file was not a PDF or an allowed image type. Nothing in the request was saved. |
401 token_required / invalid_token | The bearer token is missing or invalid. |
401 invalid_api_key | Authenticate: the key is wrong or has been switched off. |
403 insufficient_permissions | Your key lacks the permission that endpoint needs. |
403 account_not_active | Authenticate: your account is no longer active. Contact U-PIC. |
403 account_cancelled | File Manifest: a cancelled account can no longer insure new shipments. |
403 SHIPPED_AFTER_CANCELLATION | File Claim: the shipment shipped after your account was cancelled, so it was not covered. |
403 PAST_FILING_WINDOW | File Claim: the account is cancelled and the shipment is past its filing window. |
403 WRONG_CARRIER | File 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_CLAIM | Upload Claim Attachments: that claim belongs to another account. Other claim endpoints return 404 for another account's claim. |
404 INVALID_TRACKING | No manifest for that tracking number on your account. File the manifest first. |
404 INVALID_COUNTRY | A country field held an unknown id. Send the numeric country_id from Countries, not an ISO code. |
404 INVALID_STATE | claimant.state is not a recognized abbreviation for that country. |
404 NO_CLAIM | No claim with that id. |
404 no_manifests_found / no_claim_found | The lookup matched nothing. |
404 claim_not_found | List Affidavit Requests: no claim with that id on your account. |
500 SERVER_ERROR / internal_error | A server side failure. Safe to retry with backoff. |
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.
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.
/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./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.409, or 400 INVALID_QUOTE for a quote that was already booked. Each rejection hands back the identifier you need, so retries are safe.Select an endpoint for its fields, an example request and response, and what to watch for.
Confirms the API is reachable. Useful before debugging an authentication problem.
Auth: None
curl "https://api.u-pic.com/health"
{ "status": "ok", "service": "serverless-api", "version": "1.0.0" }https://api.u-pic.com/health), not under /partners/v1.Exchange your API key for a bearer token.
Auth: None
| Field | Type | Notes |
|---|---|---|
api_key | string | Required. The API key U-PIC issued you. |
{ "api_key": "<your-api-key>" }curl -X POST "https://api.u-pic.com/auth" \
-H "Content-Type: application/json" \
-d '{ "api_key": "<your-api-key>" }'
{
"token": "<token>",
"client_id": 1001,
"permissions": { "manifests": 0, "claims": 0, "delete_manifests": 1 },
"issued_at": "2026-08-06T17:04:11+00:00"
}/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).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.The carriers you can book with, for booking with an exact client_carrier_id instead of a carrier name.
Auth: Bearer
curl "https://api.u-pic.com/client/carriers" \
-H "Authorization: Bearer <your-token>"
[
{
"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"
}
]client_carrier_id (not carrier_id) on Book as order_metadata.client_carrier_id. Every carrier on this list can be booked now.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.cost_per_dvu does not apply. Shared with the Serverless API, so it sits at the root, not under /partners/v1.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
| Field | Type | Notes |
|---|---|---|
sub_client_identifier | string | Required. The id the seller is known by on your platform. Keep it stable: it groups the seller's bookings, claims and settlements. |
company_name | string | Optional. Max 255 characters. |
contact_name | string | Optional. Max 255 characters. |
email | string | Optional. Max 250 characters. |
phone | string | Optional. Max 100 characters. |
address_1, address_2, city | string | Optional. Max 255 characters each. |
state | string | Optional. 2 letter state or province code. Send country with it. |
country | string | Optional. ISO alpha-2, for example US. |
zip | string | Optional. Max 16 characters. |
{
"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 -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"
}'
{
"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"
}201. Sending an identifier that already exists returns 409 DUPLICATE_SUB_CLIENT and changes nothing. To correct a seller's details, use Update Seller.409 CLIENT_RATE_NOT_SET.payment_link to forward to the seller. Treat it as that seller's credential.Reads back one seller by the identifier you registered it with.
Auth: Bearer
GET /partners/v1/subclients/SELLER-4471curl "https://api.u-pic.com/partners/v1/subclients/SELLER-4471" \
-H "Authorization: Bearer <your-token>"
{
"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.404 SUB_CLIENT_NOT_FOUND.Lists your sellers by company name, 500 per page, with optional filters.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
search | string | Optional. Part of a company name. |
status | string | Optional. active, inactive or deactivated. |
payment_details_provided | string | Optional. true or false. |
page | integer | Optional, defaults to 1. |
GET /partners/v1/subclients?search=123%20Company&status=activecurl "https://api.u-pic.com/partners/v1/subclients?search=123%20Company&status=active" \
-H "Authorization: Bearer <your-token>"
{
"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
}
]
}has_more is true, send the same request with the next page.Corrects a seller's contact and address, or sets them active or inactive. Send only the fields you are changing.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
company_name, contact_name, email, phone | string | Optional. Same limits as Create Seller. |
address_1, address_2, city, state, zip, country | string | Optional. null or an empty string clears a field. |
status | string | Optional. active or inactive. An inactive seller cannot be quoted; existing bookings and claims are unaffected. |
{
"address_1": "200 Oak Ave",
"address_2": null,
"city": "Tampa",
"state": "FL",
"country": "US"
}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"
}'
// The updated seller, in the same shape as Look Up Seller.409 SUB_CLIENT_LOCKED. Status can still be changed.400 UNKNOWN_FIELD and nothing is saved.Prices an order at your account's rate and returns a quote_uuid. The premium is locked at quote time.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
sub_client_identifier | string | Required. The seller, as sent to Create Seller. |
total_insured_value | number | Required. The order value to insure. |
destination_country | string | Required. ISO alpha-2. |
external_order_ref | string | Optional here. Your order reference, if you know it at quote time. Book needs one from either call. |
perishable | boolean | Optional, defaults to false. Priced at a perishable rate only when your account has one set up. |
{
"sub_client_identifier": "SELLER-4471",
"total_insured_value": 150.00,
"destination_country": "US",
"perishable": false
}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
}'
{
"quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425",
"premium_amount": 1.30,
"currency": "USD",
"perishable": false,
"status": "PENDING"
}premium_amount is what will be billed. Use it rather than calculating the premium yourself.perishable: true does not add perishable coverage on its own; that needs an endorsement on your account.Turns a PENDING quote into insured parcels and returns a manifest_uuid. Store it as you would a policy number.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
quote_uuid | string | Required. A PENDING quote. |
order_metadata.shipper_name | string | Required. |
order_metadata.consignee_name | string | Required. |
order_metadata.ship_date | date | Required. YYYY-MM-DD, the date the parcel actually ships. |
order_metadata.carrier | string | Required unless you send client_carrier_id. The carrier name, for example UPS. |
order_metadata.client_carrier_id | integer | Optional. The exact carrier, a client_carrier_id from Client Carriers. Used instead of carrier when sent. |
order_metadata.external_order_ref | string | Required here or on the quote. Your reference for what the booking covers. |
order_metadata.consignee_address, consignee_email, destination_country, destination_postal | string | Optional. |
tracking_numbers | array | Required. One tracking number as a string, or one object per parcel with its own insured_value. |
{
"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 -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"]
}'
{
"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"
}[{ "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.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.201.409 MANIFEST_NOT_SYNCED) until U-PIC corrects it. Copy names from Client Carriers, or send client_carrier_id.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).Reads a booking back: whether it is active, what it cost and which parcels it covers.
Auth: Bearer
GET /partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65curl "https://api.u-pic.com/partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65" \
-H "Authorization: Bearer <your-token>"
{
"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 }
]
}status answers whether the booking succeeded. On a booking with several parcels, check each parcel's own status.manifest_uuid.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
| Field | Type | Notes |
|---|---|---|
to_tracking_number | string | Required. Must not already be booked on your account. |
from_tracking_number | string | Required when more than one active parcel remains on the booking. |
{
"from_tracking_number": "1Z999AA10123456784",
"to_tracking_number": "1Z999AA10123456799"
}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"
}'
// The booking, in the same shape as Booking Lookup, with the new number in place.200 and the booking.409 CLAIM_EXISTS.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
DELETE /partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65?tracking_number=1Z999AA10123456784curl -X DELETE "https://api.u-pic.com/partners/v1/bookings/d7bed04b-93d6-4251-a127-0fa9364faf65?tracking_number=1Z999AA10123456784" \
-H "Authorization: Bearer <your-token>"
{
"manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
"status": "CANCELLED",
"cancelled_tracking_numbers": ["1Z999AA10123456784"],
"already_cancelled": false
}cancelled_tracking_numbers and already_cancelled. The example shows only those and the status.200 with already_cancelled true, so a retry is safe.409 PARTIAL_CANCEL_NOT_SUPPORTED. Remove the whole booking instead.409 CLAIM_EXISTS.Opens a claim against a booked parcel and returns a claim_id.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
identifier.type | string | Required. tracking_number or manifest_uuid. Use tracking_number on bookings with several parcels. |
identifier.value | string | Required. |
claim_details.type | string | Required. loss, damage or shortage. |
claim_details.description | string | Required. What happened. |
claim_details.amount | number | Optional. The amount claimed. |
{
"identifier": { "type": "tracking_number", "value": "1Z999AA10123456784" },
"claim_details": {
"type": "loss",
"description": "Customer reported package not delivered.",
"amount": 150.00
}
}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
}
}'
{
"claim_id": "9001",
"status": "PENDING_REVIEW",
"manifest_uuid": "d7bed04b-93d6-4251-a127-0fa9364faf65",
"created_at": "2026-08-02T10:14:00+00:00"
}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.TEST, and are not processed.Uploads supporting files to a claim as multipart/form-data.
Auth: Bearer
| Field | Type | Notes |
|---|---|---|
file | multipart file | One 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). |
POST /partners/v1/claim/9001/attachments
Content-Type: multipart/form-data; boundary=<set by your client>
file=@invoice.pdfcurl -X POST "https://api.u-pic.com/partners/v1/claim/9001/attachments" \
-H "Authorization: Bearer <your-token>" \
-F "file=@invoice.pdf"
{
"success": true,
"claim_id": "9001",
"uploaded_count": 1,
"files": [
{ "attachment_id": 88121, "original_filename": "invoice.pdf", "size_bytes": 184220 }
]
}Where a claim stands and whether it has been paid.
Auth: Bearer
GET /partners/v1/claim/9001curl "https://api.u-pic.com/partners/v1/claim/9001" \
-H "Authorization: Bearer <your-token>"
{
"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
}
}404 CLAIM_NOT_FOUND.The claims filed on a parcel, or on every parcel in a booking. Send exactly one of tracking_number or manifest_uuid.
Auth: Bearer
GET /partners/v1/claim?tracking_number=1Z999AA10123456784curl "https://api.u-pic.com/partners/v1/claim?tracking_number=1Z999AA10123456784" \
-H "Authorization: Bearer <your-token>"
{
"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" }
}
]
}200 with "count": 0. A manifest_uuid not on your account returns 404 BOOKING_NOT_FOUND.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
| Field | Type | Notes |
|---|---|---|
email | string | Required. The buyer's email address. |
{ "email": "buyer@example.com" }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" }'
{
"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"
}201. A signed claim returns 400 ALREADY_FILLED. The same email again within 3 days returns 400 TOO_SOON. A different email is allowed.The affidavit requests sent for a claim, and whether each has been signed.
Auth: Bearer
GET /partners/v1/claim/9001/affidavitscurl "https://api.u-pic.com/partners/v1/claim/9001/affidavits" \
-H "Authorization: Bearer <your-token>"
{
"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.The claims U-PIC paid in a date range (by pay date), for reconciling payments. Optional sub_client_identifier and page.
Auth: Bearer
GET /partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31curl "https://api.u-pic.com/partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31" \
-H "Authorization: Bearer <your-token>"
{
"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"
}
]
}has_more is true, send the same request with the next page.One invoice's lines, one row per parcel. Optional sub_client_identifier and page.
Auth: Bearer
GET /partners/v1/bookings?invoice_id=109703curl "https://api.u-pic.com/partners/v1/bookings?invoice_id=109703" \
-H "Authorization: Bearer <your-token>"
{
"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"
}
]
}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
GET /partners/v1/bookings?date_from=2026-07-01&date_to=2026-07-31curl "https://api.u-pic.com/partners/v1/bookings?date_from=2026-07-01&date_to=2026-07-31" \
-H "Authorization: Bearer <your-token>"
{
"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"
}
]
}has_more is true, send the same request with the next page.400 CONFLICTING_FILTERS.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());Pick a call and press Send to see what comes back. These are example responses; nothing leaves your browser.
{
"sub_client_identifier": "SELLER-4471",
"total_insured_value": 150.00,
"destination_country": "US",
"perishable": false
}
Press "Send Request" to see the response{ "quote_uuid": "d849b87f-02de-4fb9-b3ab-e14989906425", "premium_amount": 1.30, "currency": "USD", "perishable": false, "status": "PENDING" }
{
"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"]
}
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" }
{
"identifier": { "type": "tracking_number", "value": "1Z999AA10123456784" },
"claim_details": {
"type": "loss",
"description": "Customer reported package not delivered.",
"amount": 150.00
}
}
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" }
GET /partners/v1/claim/9001
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 } }
GET /partners/v1/settlements?date_from=2026-08-01&date_to=2026-08-31
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 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.
| Code | Meaning |
|---|---|
400 INVALID_JSON | The request body was not valid JSON. |
400 MISSING_FIELD | A required field was absent. The message names it. |
400 INVALID_VALUE | A 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_COUNTRY | Unknown country code. Use ISO alpha-2. |
400 INVALID_STATE | Not a state or province of that country. |
400 INVALID_FIELD | A seller field was too long or not a string, or (on Update Seller) an invalid email. The message names it. |
400 INVALID_SUB_CLIENT | That sub_client_identifier is not registered on your account. Create the seller first. |
400 SUB_CLIENT_INACTIVE | Quote was sent for an inactive or deactivated seller. |
400 NO_ACTIVE_RATE | The seller has no active rate. Contact techsupport@u-pic.com. |
400 NO_FIELDS | Update Seller was sent with an empty body. |
400 UNKNOWN_FIELD | Update Seller included a field that cannot be changed. Nothing was saved. |
400 INVALID_STATUS | Status must be active or inactive (or deactivated, as a lookup filter). |
400 INVALID_FILTER | payment_details_provided must be true or false. |
400 INVALID_QUOTE | The quote is unknown, belongs to another account, or was already booked. When already booked, the response carries its manifest_uuid. |
400 MISSING_ORDER_REF | No external_order_ref on the quote or the booking. |
400 MISSING_TRACKING | No tracking number, or an empty one in a parcel object. |
400 MULTIPLE_TRACKING_NOT_SUPPORTED | Two or more tracking numbers sent as plain strings. Use one object per parcel with insured_value. |
400 MISSING_INSURED_VALUE | A parcel object had no insured_value. |
400 INSURED_VALUE_MISMATCH | Parcel insured_value amounts do not add up to the quote's total_insured_value. |
400 INVALID_TRACKING_FORMAT | Plain strings and parcel objects mixed in one array. |
400 DUPLICATE_TRACKING | The same tracking number appears twice in one request. |
400 BAD_SHIP_DATE | ship_date was not a recognized date. Use YYYY-MM-DD. |
400 BAD_CARRIER | carrier was a number or a numeric string. Send the carrier name, for example "UPS", or the id as client_carrier_id. |
400 WRONG_CARRIER | client_carrier_id is not on your Client Carriers list. Check Client Carriers. |
400 CARRIER_PERISHABLE_MISMATCH | The 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_IDENTIFIER | Create 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_IDENTIFIER | A claim used manifest_uuid on a booking with several parcels. Use tracking_number. |
400 MISSING_DESCRIPTION | claim_details.description is required. |
400 INVALID_MANIFEST_STATUS | The booking cannot be claimed against, for example because it was cancelled. |
400 NO_SHIP_DATE | The booked parcel has no ship date, which a claim requires. |
400 MISSING_CLAIM_ID | The attachments URL did not contain a claim id. |
400 NO_FILE | No file was sent. Use the form-data key file. |
400 TOO_MANY_FILES | More than 10 files in one request. |
400 FILE_TOO_LARGE | A file exceeded 25 MB. Nothing in the request was saved. |
400 REJECTED_TYPE | A file type is not allowed. |
400 MISSING_IDENTIFIER | Find 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_EMAIL | The affidavit request email is missing or not an email address. |
400 ALREADY_FILLED | The buyer already signed an affidavit for this claim. |
400 TOO_SOON | An affidavit request went to the same email less than 3 days ago. |
400 AMBIGUOUS_PARCEL | A tracking number change on a booking with several parcels needs from_tracking_number. |
400 TRACKING_NOT_ON_BOOKING | That 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_RANGE | Settlements needs date_from and date_to; the Reconciliation Report needs them or invoice_id. |
400 BAD_DATE / INVALID_DATE_RANGE | A report date was not YYYY-MM-DD, or date_to is before date_from. |
400 RANGE_TOO_LARGE | The report range exceeds 366 days. |
400 INVALID_PAGE | Pages start at 1. |
400 CONFLICTING_FILTERS | The Reconciliation Report was sent invoice_id and a date range together. |
400 invalid_json / api_key_required | Authenticate: the body was not valid JSON, or had no api_key. |
401 token_required | No bearer token was sent. |
401 invalid_token | Client Carriers: the token is invalid or has been replaced. |
401 invalid_api_key | Authenticate: the key is wrong or has been switched off. |
403 insufficient_permissions | Any /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_PERMISSIONS | Remove Insurance needs the delete_manifests permission. |
403 account_not_active | Authenticate: your account is no longer active. Contact U-PIC. |
403 ACCOUNT_CANCELLED | A cancelled account cannot create sellers, quote or book. |
403 SHIPPED_AFTER_CANCELLATION | Create Claim: the parcel shipped after the account was cancelled. |
403 PAST_FILING_WINDOW | Create Claim: the account is cancelled and the parcel is past its filing window. |
403 WRONG_MANIFEST | The booking named by the claim belongs to another account. |
404 SUB_CLIENT_NOT_FOUND | No seller with that identifier on your account. |
404 BOOKING_NOT_FOUND | No booking on your account has that manifest_uuid. |
404 CLAIM_NOT_FOUND | No claim with that id on your account. |
404 INVOICE_NOT_FOUND | No invoice with that invoice_id on your account. |
409 DUPLICATE_SUB_CLIENT | That seller is already registered. Nothing changed. |
409 CLIENT_RATE_NOT_SET | Your account has no rate set up. Contact techsupport@u-pic.com. |
409 SUB_CLIENT_LOCKED | The seller gave U-PIC their payment details, so contact and address are locked. Status can still change. |
409 SUB_CLIENT_DEACTIVATED | U-PIC deactivated this seller, so it cannot be changed through the API. |
409 DUPLICATE_TRACKING | That 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_CLAIM | A claim already exists for this parcel. |
409 CLAIM_EXISTS | A claim is filed on that parcel, so its tracking number and coverage cannot change. |
409 BOOKING_NOT_ACTIVE | The booking is cancelled or closed. |
409 PARTIAL_CANCEL_NOT_SUPPORTED | Remove Insurance: an older booking billed as one record cannot have a single parcel removed. Remove the whole booking. |
409 MANIFEST_NOT_SYNCED | 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. |
500 SERVER_ERROR | A server side failure. Safe to retry with backoff. |
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.
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.
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.
Get API credentials and start building. Our team can have you up and running in days, not weeks.