QUICKSTART
API Quick Start
Authentication
SignString
OAuth
Overview
Getting Started
Scope List
Versioning
Rate Limit
Body Envelope
Request Errors
Try API Endpoints
CHANGELOG
Changelog
Migration Guide
REFERENCE
API Overview
Trackings
Get trackings
get
Create a tracking
post
Get a tracking by ID
get
Update a tracking by ID
put
Delete a tracking by ID
delete
Retrack an expired tracking by ID
post
Mark tracking as completed by ID
post
Get a tracking (Legacy)
get
Update a tracking (Legacy)
put
Delete a tracking (Legacy)
delete
Retrack an expired tracking (Legacy)
post
Mark tracking as completed (Legacy)
post
Couriers
Get user activated couriers
get
Detect courier
post
Get all couriers
get
Last Checkpoints
Get last checkpoint by tracking ID
get
Get last checkpoint (Legacy)
get
Notifications
Get tracking notification by tracking ID
get
Add a notification by tracking ID
post
Remove a notification by tracking ID
post
Get tracking notification (Legacy)
get
Add a notification (Legacy)
post
Remove a notification (Legacy)
post
Estimated delivery date
Batch prediction for the Estimated Delivery Date
post
MODEL
Tracking
Courier
Checkpoint
Notification
ENUM
Additional Tracking Fields
Delivery Statuses
Delivery Sub-statuses
Slug Groups
Events
Confidence Codes
Webhook
Webhook Overview
Webhook Versioning
Webhook Specifications
Webhook Signature
Webhook OAuth 2.0
Webhook Outgoing IPs
Webhook Changelog
OTHERS
Supported Couriers
CSV Upload & CSV Auto-Fetch
Shipment CSV Export
Order CSV Export
SDK
Android SDK
iOS SDK
Java SDK
Node.js SDK
.NET SDK
Python SDK
Ruby Gem
PHP SDK
Golang SDK
Open Source
phone
email-verifier
Support
Contact Support

Overview

If you participate in the AfterShip Partner Program (for example, developing an app for AfterShip users or integrating AfterShip products into your platform for your users), you can apply for an OAuth API access for your apps.

This documentation describes how to submit your apps to the AfterShip App Store and integrate AfterShip product features into your apps.

OAuth flow
  1. The merchant requests to install the app
  2. The app redirects to AfterShip for the authentication
  3. AfterShip redirects to the OAuth grant screen and requests the merchant to authorize the required scopes
  4. The merchant authorizes the app by consenting to the requested scopes
  5. AfterShip receives an authorization grant and authenticates the app
  6. AfterShip redirects the user to the designated uri with code, state, and hmac parameters
  7. The app requests the access token from AfterShip with the given code
  8. AfterShip authenticates the app, validates the authorization grant, and issues an access token and a refresh token
  9. The app uses the access token to make requests to the AfterShip API
  10. The app can refresh the access token by the refresh token