API Quick Start

AfterShip Protection helps eCommerce businesses to insure their package against losses and damages.

You can create policies with the Protection API to help your users insure their packages with an insurance fee and claim the insurance amount during losses and damages.

This quickstart guide intends to walk you through 3 common scenarios to let you know how to use the Protection API to seamlessly manage the policies and claims.


Protection is a shipping insurance for consumers and merchants. As a merchant, you can obtain coverage for your logistics services to reduce the loss of goods due to your logistics, and you can sell this service to your consumers to provide them with additional protection.

You can create and query policies, make claims and check the progress of claims through the APIs.

preparing...

All endpoints are only accessible via HTTPS.


Protection Creation Flow
Protection Creation Flow

Create Policy Docs

preparing...

While creating a policy, we need:

The original address of the package, such as storehouse or dropshipping address, is required to help the insurer track the logistics of the package.

The destination address of the package (customer’s address) is required to help the insurer track the logistics of the package.

Product Information of the package, including sku, quantity, name and price is required to display it on the Protection Admin Portal.

Protection Insured fee or the ‘“Premium” for the package, which is used to verify the price calculated on the developer’s side.

Create Claim Docs

preparing...

For creating a claim, the policy needs to be active. You can update the claim in the processing flow, but you can't create a new claim against this policy.

For processing a claim request, we need:

The commodity in the package for verifying the claim request.

The claim type you want to apply for, such as:

  • Stolen
  • Damaged
  • LostInTransit

The loss date will always be the date of application.

Query Policy Docs

preparing...

When you need to check the policy status, you can query the policy entity with the policyId.

The response for the policy entity will look like this:

preparing...

Query Policy Docs

preparing...

When you need to check the claim status, you can query the claim entity with the ClaimId.

The response for the claim entity will look like this:

preparing...