Update a coverage tracking info

post
/coverages/update-tracking

Update a coverage's tracking information by coverage ID or order source ID.

This API is used to update the tracking information. When the tracking information is provided, the coverage will be activated and you can make a claim via coverage.

id
string

coverage ID

source_id
string

order source ID

order
object
required
trackings
array[Tracking]
required

tracking information about package.

>= 1 items

OK

meta
Meta

Meta data object.

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required
Allowed values:
2000020100404004220050000
Default:
20000
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
Coverage
id
string
required

coverage id

>= 1 characters
source_id
string
required
policy_number
string
required

policy id from insurance supplier

>= 1 characters
Example:
412-231-231
status
string
required

policy status

>= 1 characters
Allowed values:
inactiveactivatedclaimedexpiredvoid
Example:
inactive
policy_detail_url
string
required

URL of the policy detail

>= 1 characters
premium
Amount
required
effective_time
string
required

Effective time of coverage, times in ISO8601 format.Show all...

>= 1 characters
Example:
2022-12-12T12:23:34.333Z
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
expiration_time
string
required

expiration time of coverage, render times in ISO8601 format e.g.: "2012-01-01T12:00:00Z"

>= 1 characters
Example:
2022-12-12T12:23:34.333Z
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
updated_at
string
required

Updated time in ISO8601 format.Show all...

>= 1 characters
Example:
2022-12-12T12:23:34.333Z
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
created_at
string
required

Created time in ISO8601 format.Show all...

>= 1 characters
Example:
2022-12-12T12:23:34.333Z
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
items
Order Item
required
shipping_address
Address
required
Example:
{"street_1":"1104, South University Avenue","street_2":"","postal_code":"53916","city":"Beaver Dam","state":{"name":"Wisconsin"},"country_region":{"code":"USA"},"phone":"+14155552671","email":"[email protected]","first_name":"Joe","last_name":"Smith"}
sender_address
Address
required
Example:
{"street_1":"1104, South University Avenue","street_2":"","postal_code":"53916","city":"Beaver Dam","state":{"name":"Wisconsin"},"country_region":{"code":"USA"},"phone":"+14155552671","email":"[email protected]","first_name":"Joe","last_name":"Smith"}
trackings
array[Tracking]

tracking information about package.

subtotal
Amount
required
shipping_total
Amount
premium_paid_by
string

Indicates who paid for the premium

Allowed values:
receiversender
Default:
receiver

Bad Request

meta
Meta

Meta data object.

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required
Allowed values:
2000020100404004220050000
Default:
20000
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Unauthorized

meta
Meta

Meta data object.

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required
Allowed values:
2000020100404004220050000
Default:
20000
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Unprocessable Entity (WebDAV)

meta
Meta

Meta data object.

Example:
{"code":20000,"type":"OK","message":"The request was successfully processed by AfterShip."}
code
number
required
Allowed values:
2000020100404004220050000
Default:
20000
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object
Auth
:
Parameters
:
:
Body
{ "order": { "trackings": [ { "slug": "string", "tracking_number": "string" } ], "ship_date": "2022-02-02" }, "additional_fields": "string" }
Response Example
{ "meta": { "code": 20000, "type": "OK", "message": "The request was successfully processed by AfterShip." }, "data": { "id": "string", "source_id": "string", "policy_number": "412-231-231", "status": "inactive", "policy_detail_url": "string", "premium": { "amount": "12.34", "currency": "USD" }, "effective_time": "2022-12-12T12:23:34.333Z", "expiration_time": "2022-12-12T12:23:34.333Z", "updated_at": "2022-12-12T12:23:34.333Z", "created_at": "2022-12-12T12:23:34.333Z", "items": { "source_id": "string", "title": "string", "quantity": 0, "unit_insured_amount": { "amount": "12.34", "currency": "USD" }, "sku": "string", "image_urls": [ "string" ] }, "shipping_address": { "street_1": "1104, South University Avenue", "street_2": "", "postal_code": "53916", "city": "Beaver Dam", "state": { "name": "Wisconsin" }, "country_region": { "code": "USA" }, "phone": "+14155552671", "email": "[email protected]", "first_name": "Joe", "last_name": "Smith" }, "sender_address": { "street_1": "1104, South University Avenue", "street_2": "", "postal_code": "53916", "city": "Beaver Dam", "state": { "name": "Wisconsin" }, "country_region": { "code": "USA" }, "phone": "+14155552671", "email": "[email protected]", "first_name": "Joe", "last_name": "Smith" }, "trackings": [ { "slug": "string", "tracking_number": "string", "ship_date": "2019-08-24" } ], "subtotal": { "amount": "12.34", "currency": "USD" }, "shipping_total": { "amount": "12.34", "currency": "USD" }, "premium_paid_by": "receiver" } }