API Quick Start
This quickstart guide intends to walk you through the common scenario to help you know how to use the email parse API.
1. What is AfterShip Parser API?
The AfterShip Parser API can detect the emails you want to extract with user authorization, and extract order & tracking information from the email content to form structured model data.
By obtaining this data, you can combine it with the Tracking API to provide consumers with an innovative logistics tracking experience and gain unique customer insights.
2. API Endpoint
https://api.aftership.com/admin/2022-01All endpoints are only accessible via HTTPS.
3. Common scenarios
Scenario 1. Extract order & tracking information from an email
Use POST API https://api.aftership.com/admin/2022-01/email-parses-v2
curl --location --request POST 'https://api.aftership.com/admin/2022-01/email-parses-v2' \ --header 'as-api-key: your API key' \ --header 'Content-Type: application/json' \ --data-raw '{"from": "[email protected]","subject": "Your order xxxxxxxx","body":{"html":"<html><head><title>Order Confirmed</title></head><body><div>Your Order number xxxxxx is confirmed. We will send you another email when your order shipped.</div></body></html>", "text":"Your Order number xxxxxx is confirmed. We will send you another email when your order shipped.", "attachments": [{"filename": "xxx.pdf","content_type":"application/pdf","data": "base64"}]},"headers":[{"name":"From","value":"[email protected]"},{"name":"Subject","value":"Your order xxxxxxxxxx"}]'