Webhooks
Get a watch
GET
header
AuthorizationBearer <token>Authorization: Bearer lsk_live_…
id*stringThe watch with its last result or error.
application/json- response
id?stringtrackingNumber?stringcarrier?string|nullstatus?|nullactive?booleanmetadata?|nullcreatedAt?stringcheckedAt?string|nullnextCheckAt?string|nullendedAt?string|nullendReason?|Value in
"delivered""returned""not_found""expired""deleted"nullresult?|nullerror?|nullcurl -X GET 'https://api.lastscanned.com/v1/watches/string'Example Response
{ "id": "string", "trackingNumber": "string", "carrier": "string", "status": "label_created", "active": true, "metadata": {}, "createdAt": "string", "checkedAt": "string", "nextCheckAt": "string", "endedAt": "string", "endReason": "delivered", "result": { "carrier": "ups", "trackingNumber": "string", "status": "label_created", "statusDescription": "string", "service": "string", "deliveredAt": "string", "deliveredAtLocal": "string", "signedBy": "string", "destination": { "city": "string", "state": "string", "country": "string" }, "estimatedDelivery": "string", "estimatedDeliveryAt": "string", "message": "string", "events": [ { "timestamp": "string", "localTime": "string", "status": "label_created", "description": "string", "location": "string", "code": "string" } ] }, "error": { "code": "bad_request", "message": "string" }}Watch numbers POST
Looks the numbers up now and returns each watch with its current `result`, then re-checks them on a schedule and POSTs to the account's webhook whenever the status, newest event or estimate changes. A new watch counts as a tracked number; re-checks are free. A number already being watched keeps its watch (200 instead of 201).
Stop watching DELETE
Next Page