{"openapi":"3.1.0","info":{"title":"lastscanned","version":"1.0.0","description":"Normalized package tracking API across 70 carriers (ups, usps, dhl, fedex, amazon, ontrac, uniuni, gofo, veho, speedee, cdl, bettertrucks, axlehire, cirro, yanwen, 4px, cainiao, yunexpress, speedx, intelcom, canadapost, purolator, tforce, glsus, osm, pitneybowes, cne, sunyou, ubi, sendle, asendia, japanpost, singpost, koreapost, nzpost, dpduk, apc, landmark, canpar, loomis, glscanada, nationex, bpost, postnord, austrianpost, polishpost, gls, inpost, packeta, hermesde, ydh, equick, topyou, laposte, postnl, correos, posteitaliane, cjlogistics, yamato, delhivery, bluedart, evri, anpost, swisspost, brt, aramexau, couriersplease, teamglobalexpress, ninjavan, flashexpress) with automatic carrier detection from the tracking number format.","contact":{"name":"lastscanned","email":"support@lastscanned.com","url":"https://lastscanned.com"},"x-guidance":"Use GET /v1/track/{number} to track a single package, or GET /v1/track?numbers=num1,num2 to track up to 100 packages in one batch (at most 35 per carrier). Carrier auto-detection is built in: omit the optional ?carrier= parameter unless a tracking number format is shared across carriers or you want to force a specific carrier code from GET /v1/carriers. Payment via MPP (WWW-Authenticate: Payment on HTTP 402): pay $0.02 per tracking number in USDC on Tempo (tempo/charge), or $0.50 by card via Stripe Shared Payment Token (stripe/charge) for a pack of 25 tracking numbers. When a payment buys more tracking numbers than the current request uses (such as a 25-number card pack), the response returns a credit key (lsk_pack_...) in the x-lastscanned-key header and credits.key JSON field. Reuse that key on subsequent requests via Authorization: Bearer lsk_pack_... or x-api-key: lsk_pack_... until credits.remaining reaches 0. Only answered lookups (HTTP 200 or 404 not_found from the carrier) spend credits; transient carrier errors automatically refund the credit."},"servers":[{"url":"https://api.lastscanned.com"}],"x-service-info":{"categories":["shipping","logistics"],"docs":{"homepage":"https://lastscanned.com","apiReference":"https://docs.lastscanned.com","llms":"https://docs.lastscanned.com/llms.txt"}},"paths":{"/v1/track/{number}":{"get":{"operationId":"trackPackage","summary":"Track one package","description":"Returns normalized tracking status, delivery estimate, destination, and scan history for one tracking number.","parameters":[{"name":"number","in":"path","required":true,"description":"Tracking number to look up (case-insensitive).","schema":{"type":"string","minLength":1,"examples":["9400111899223847162534","1Z999AA10123456784"]}},{"name":"carrier","in":"query","required":false,"description":"Optional carrier code override when a tracking number format is shared by multiple carriers. Omit to auto-detect from the tracking number.","schema":{"type":"string","enum":["ups","usps","dhl","fedex","amazon","ontrac","uniuni","gofo","veho","speedee","cdl","bettertrucks","axlehire","cirro","yanwen","4px","cainiao","yunexpress","speedx","intelcom","canadapost","purolator","tforce","glsus","osm","pitneybowes","cne","sunyou","ubi","sendle","asendia","japanpost","singpost","koreapost","nzpost","dpduk","apc","landmark","canpar","loomis","glscanada","nationex","bpost","postnord","austrianpost","polishpost","gls","inpost","packeta","hermesde","ydh","equick","topyou","laposte","postnl","correos","posteitaliane","cjlogistics","yamato","delhivery","bluedart","evri","anpost","swisspost","brt","aramexau","couriersplease","teamglobalexpress","ninjavan","flashexpress"]}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"USD"}},{"mpp":{"method":"stripe","intent":"charge","currency":"USD"}}],"offers":[{"method":"tempo","intent":"charge","currency":"usd","amount":"20000","description":"2 cents per tracking number in stablecoins"},{"method":"stripe","intent":"charge","currency":"usd","amount":"50","description":"$0.50 by card for 25 tracking numbers"}]},"responses":{"200":{"description":"Normalized tracking result.","content":{"application/json":{"schema":{"type":"object","required":["carrier","trackingNumber","status","statusDescription","service","deliveredAt","signedBy","destination","events"],"properties":{"carrier":{"type":"string","enum":["ups","usps","dhl","fedex","amazon","ontrac","uniuni","gofo","veho","speedee","cdl","bettertrucks","axlehire","cirro","yanwen","4px","cainiao","yunexpress","speedx","intelcom","canadapost","purolator","tforce","glsus","osm","pitneybowes","cne","sunyou","ubi","sendle","asendia","japanpost","singpost","koreapost","nzpost","dpduk","apc","landmark","canpar","loomis","glscanada","nationex","bpost","postnord","austrianpost","polishpost","gls","inpost","packeta","hermesde","ydh","equick","topyou","laposte","postnl","correos","posteitaliane","cjlogistics","yamato","delhivery","bluedart","evri","anpost","swisspost","brt","aramexau","couriersplease","teamglobalexpress","ninjavan","flashexpress"]},"trackingNumber":{"type":"string"},"status":{"type":"string","enum":["label_created","in_transit","out_for_delivery","delivered","exception","returned","unknown"]},"statusDescription":{"type":"string"},"service":{"type":["string","null"]},"deliveredAt":{"type":["string","null"]},"deliveredAtLocal":{"type":["string","null"]},"signedBy":{"type":["string","null"]},"destination":{"type":["object","null"],"properties":{"city":{"type":["string","null"]},"state":{"type":["string","null"]},"country":{"type":["string","null"]}}},"estimatedDelivery":{"type":["string","null"]},"estimatedDeliveryAt":{"type":["string","null"]},"message":{"type":["string","null"],"description":"Latest carrier status note or cross-border handoff tracking information."},"events":{"type":"array","description":"Chronological scan history, newest first.","items":{"type":"object","required":["timestamp","localTime","status","description","location","code"],"properties":{"timestamp":{"type":["string","null"],"description":"UTC timestamp in ISO 8601 format with Z, or null when the carrier gives no time/zone."},"localTime":{"type":["string","null"],"description":"Local timestamp as printed by the carrier (ISO 8601 without timezone)."},"status":{"type":"string","enum":["label_created","in_transit","out_for_delivery","delivered","exception","returned","unknown"]},"description":{"type":"string"},"location":{"type":["string","null"]},"code":{"type":["string","null"],"description":"Carrier-native event code when provided."}}}},"credits":{"type":"object","required":["key","remaining","note"],"properties":{"key":{"type":"string","description":"Credit key (lsk_pack_...) to send via Authorization: Bearer or x-api-key on subsequent requests."},"remaining":{"type":"integer","description":"Remaining prepaid tracking number lookups on this credit key."},"note":{"type":"string"}}}}}}}},"402":{"description":"Payment required (WWW-Authenticate: Payment challenge header included).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"404":{"description":"Carrier has no record of this tracking number.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/v1/track":{"get":{"operationId":"trackPackages","summary":"Track up to 100 packages in one batch","description":"Tracks 1-100 comma-separated tracking numbers in one call (up to 35 per carrier).","parameters":[{"name":"numbers","in":"query","required":true,"description":"Comma-separated tracking numbers (1-100 numbers, at most 35 per carrier).","schema":{"type":"string","minLength":1,"examples":["9400111899223847162534,1Z999AA10123456784"]}},{"name":"carrier","in":"query","required":false,"description":"Optional carrier code override when a tracking number format is shared by multiple carriers. Omit to auto-detect from the tracking number.","schema":{"type":"string","enum":["ups","usps","dhl","fedex","amazon","ontrac","uniuni","gofo","veho","speedee","cdl","bettertrucks","axlehire","cirro","yanwen","4px","cainiao","yunexpress","speedx","intelcom","canadapost","purolator","tforce","glsus","osm","pitneybowes","cne","sunyou","ubi","sendle","asendia","japanpost","singpost","koreapost","nzpost","dpduk","apc","landmark","canpar","loomis","glscanada","nationex","bpost","postnord","austrianpost","polishpost","gls","inpost","packeta","hermesde","ydh","equick","topyou","laposte","postnl","correos","posteitaliane","cjlogistics","yamato","delhivery","bluedart","evri","anpost","swisspost","brt","aramexau","couriersplease","teamglobalexpress","ninjavan","flashexpress"]}}],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.02","max":"2.00"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"USD"}},{"mpp":{"method":"stripe","intent":"charge","currency":"USD"}}],"offers":[{"method":"tempo","intent":"charge","currency":"usd","amount":"20000","description":"2 cents per tracking number in stablecoins"},{"method":"stripe","intent":"charge","currency":"usd","amount":"50","description":"$0.50 by card for 25 tracking numbers"}]},"responses":{"200":{"description":"Batch tracking results.","content":{"application/json":{"schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","required":["trackingNumber"],"properties":{"trackingNumber":{"type":"string"},"result":{"type":"object","required":["carrier","trackingNumber","status","statusDescription","service","deliveredAt","signedBy","destination","events"],"properties":{"carrier":{"type":"string","enum":["ups","usps","dhl","fedex","amazon","ontrac","uniuni","gofo","veho","speedee","cdl","bettertrucks","axlehire","cirro","yanwen","4px","cainiao","yunexpress","speedx","intelcom","canadapost","purolator","tforce","glsus","osm","pitneybowes","cne","sunyou","ubi","sendle","asendia","japanpost","singpost","koreapost","nzpost","dpduk","apc","landmark","canpar","loomis","glscanada","nationex","bpost","postnord","austrianpost","polishpost","gls","inpost","packeta","hermesde","ydh","equick","topyou","laposte","postnl","correos","posteitaliane","cjlogistics","yamato","delhivery","bluedart","evri","anpost","swisspost","brt","aramexau","couriersplease","teamglobalexpress","ninjavan","flashexpress"]},"trackingNumber":{"type":"string"},"status":{"type":"string","enum":["label_created","in_transit","out_for_delivery","delivered","exception","returned","unknown"]},"statusDescription":{"type":"string"},"service":{"type":["string","null"]},"deliveredAt":{"type":["string","null"]},"deliveredAtLocal":{"type":["string","null"]},"signedBy":{"type":["string","null"]},"destination":{"type":["object","null"],"properties":{"city":{"type":["string","null"]},"state":{"type":["string","null"]},"country":{"type":["string","null"]}}},"estimatedDelivery":{"type":["string","null"]},"estimatedDeliveryAt":{"type":["string","null"]},"message":{"type":["string","null"],"description":"Latest carrier status note or cross-border handoff tracking information."},"events":{"type":"array","description":"Chronological scan history, newest first.","items":{"type":"object","required":["timestamp","localTime","status","description","location","code"],"properties":{"timestamp":{"type":["string","null"],"description":"UTC timestamp in ISO 8601 format with Z, or null when the carrier gives no time/zone."},"localTime":{"type":["string","null"],"description":"Local timestamp as printed by the carrier (ISO 8601 without timezone)."},"status":{"type":"string","enum":["label_created","in_transit","out_for_delivery","delivered","exception","returned","unknown"]},"description":{"type":"string"},"location":{"type":["string","null"]},"code":{"type":["string","null"],"description":"Carrier-native event code when provided."}}}},"credits":{"type":"object","required":["key","remaining","note"],"properties":{"key":{"type":"string","description":"Credit key (lsk_pack_...) to send via Authorization: Bearer or x-api-key on subsequent requests."},"remaining":{"type":"integer","description":"Remaining prepaid tracking number lookups on this credit key."},"note":{"type":"string"}}}}},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}},"credits":{"type":"object","required":["key","remaining","note"],"properties":{"key":{"type":"string","description":"Credit key (lsk_pack_...) to send via Authorization: Bearer or x-api-key on subsequent requests."},"remaining":{"type":"integer","description":"Remaining prepaid tracking number lookups on this credit key."},"note":{"type":"string"}}}}}}}},"402":{"description":"Payment required (WWW-Authenticate: Payment challenge header included).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/v1/carriers":{"get":{"operationId":"listCarriers","summary":"List supported carrier codes","description":"Returns all supported carrier identifiers accepted by the optional ?carrier= query parameter. Free endpoint (no API key or payment required).","security":[],"responses":{"200":{"description":"Supported carrier codes.","content":{"application/json":{"schema":{"type":"object","required":["carriers"],"properties":{"carriers":{"type":"array","items":{"type":"string","enum":["ups","usps","dhl","fedex","amazon","ontrac","uniuni","gofo","veho","speedee","cdl","bettertrucks","axlehire","cirro","yanwen","4px","cainiao","yunexpress","speedx","intelcom","canadapost","purolator","tforce","glsus","osm","pitneybowes","cne","sunyou","ubi","sendle","asendia","japanpost","singpost","koreapost","nzpost","dpduk","apc","landmark","canpar","loomis","glscanada","nationex","bpost","postnord","austrianpost","polishpost","gls","inpost","packeta","hermesde","ydh","equick","topyou","laposte","postnl","correos","posteitaliane","cjlogistics","yamato","delhivery","bluedart","evri","anpost","swisspost","brt","aramexau","couriersplease","teamglobalexpress","ninjavan","flashexpress"]}}}}}}}}}}}}