Every declaration in the GlobalLine dashboard is also a REST resource. File from your ERP, TMS, or checkout. JSON in, JSON out. Bearer auth. No SOAP, no SDR onboarding, no licence file.
Generate a key in Settings → API & Webhooks. Send it as a Bearer token. Keys are hashed at rest and revocable instantly.
curl https://api.globalline.app/api/public/v1/declarations \ -H "Authorization: Bearer gl_live_•••••••••••"
/api/public/v1/declarations?limit=50&status=queuedList declarations for the authenticated org. Filter by status (queued, approved, route1, cleared, rejected).
{
"data": [
{
"id": "f0e3…",
"status": "approved",
"mrn": "25GB01ZA001234",
"hs_code": "8471.30",
"origin_country": "CN",
"declared_value": 12450.00,
"duty_amount": 248.99,
"vat_amount": 2540.00,
"confidence": 0.97,
"ai_handled": true,
"created_at": "2026-05-08T10:12:33Z"
}
],
"total": 412,
"limit": 50
}/api/public/v1/declarationsCreate a new declaration draft. Returns 201 with the new id; the agent picks it up and routes it through your autonomy gates.
{
"supplier": "Acme Trading GmbH",
"hs_code": "8471.30",
"origin_country": "DE",
"declared_value": 12450.00,
"incoterm": "DAP"
}{
"id": "9c2f…",
"status": "queued",
"hs_code": "8471.30",
"declared_value": 12450.00,
"duty_amount": 0,
"vat_amount": 0,
"created_at": "2026-05-08T10:14:01Z"
}/api/public/v1/declarations/{id}Fetch a single declaration by id, including the full agent draft JSON.
{ "id": "9c2f…", "status": "approved", "draft_json": { … }, … }All errors return JSON: { "error": { "code": "…", "message": "…" } }
401 missing_bearer / invalid_key / revoked — auth problem400 invalid_body — request failed schema validation404 not_found — resource not in your org500 query_failed / insert_failed — server-side; we get paged