AfterShip Email Parses API
The Email Parses API from AfterShip — 2 operation(s) for email parses.
The Email Parses API from AfterShip — 2 operation(s) for email parses.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/aftership-email-parses-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Overview Email Parses API
version: '1.0'
contact:
name: AfterShip Support
url: https://www.aftership.com/contact-us
email: support@aftership.com
termsOfService: https://www.aftership.com/legal/terms-of-service
description: '> OAS Schema can be downloaded [here](https://stoplight.io/api/v1/projects/automizely/docs-api-aftership-com-parser/nodes/reference/api.v1.json?branch=master&deref=optimizedBundle)'
summary: API Overview
servers:
- url: https://api.aftership.com/admin/2022-01
description: API Endpoint
security:
- as-api-key: []
tags:
- name: Email Parses
paths:
/email-parses-v2:
parameters: []
post:
summary: Parse an email V2
operationId: email-parses-v2
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
x-examples:
example-1:
meta:
code: 20000
type: OK
message: The request was successfully processed by Automizely.
data:
orders: []
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- confidence_score
properties:
orders:
type: array
items:
$ref: '#/components/schemas/Order.v2'
confidence_score:
type: number
x-stoplight:
id: 1k4rjrvotfgsu
example: 0.92
minimum: 0
maximum: 1
format: float
description: The confidence score represents the probability that AfterShip Parser thinks the email contains order information. The higher the value, the more likely message includes order information.
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 200
type: OK
message: The request was successfully processed by Automizely.
data:
orders:
- number: '23234324'
url: https://www.amazon.com/gp/css/2323432.html
placed_at:
date: '2012-12-12'
time: '13:06:22'
utc_offset: 8
timezone_identifier: Asia/Shanghai
status: open
store:
name: example store
url: https://www.example-store.com
logo_url: https://example-store.com/logo.png
email: contact@example-store.com
phone:
calling_code: '1'
phone_number: '3105550199'
slug: example-store
items:
- external_product_id: '3123213'
title: T-shirt
url: http://example.com/t-shirt.html
image_url: http://example.com/images/t-shirt.png
quantity: 2
unit_price:
amount: '10.00'
currency: USD
raw_symbol: $
compare_unit_price:
amount: '20.00'
currency: USD
raw_symbol: $
total_price:
amount: '20.00'
currency: USD
raw_symbol: $
compare_total_price:
amount: '40.00'
currency: USD
raw_symbol: $
variant_description: 'size: XL - color: red'
status: null
shipping_address:
raw_location: Los Angeles, CA, USA
phone:
calling_code: '1'
phone_number: '3105550199'
postal_code: '90003'
city: Los Angeles
state:
name: California
code: US-CA
country_region:
name: United States
code: USA
shipping_method:
name: Standard - free
billing_address:
raw_location: Los Angeles, CA, USA
phone:
calling_code: '1'
phone_number: '3105550199'
postal_code: '90003'
city: Los Angeles
state:
name: California
code: US-CA
country_region:
name: United States
code: USA
total:
amount: '19.00'
currency: USD
raw_symbol: $
subtotal:
amount: '20.00'
currency: USD
raw_symbol: $
shipping_total:
amount: '4.00'
currency: USD
raw_symbol: $
tax_total:
amount: '1.00'
currency: USD
raw_symbol: $
discount_total:
amount: '-5.00'
currency: USD
raw_symbol: $
other_prices:
- title: Reward Coupon
price:
amount: '-1.00'
currency: USD
raw_symbol: $
trackings:
- status: Delivered
substatus: Delivered_001
tracking_number: '234234'
slug: ups
additional_fields:
postal_code: xxxxxx
ship_date: null
state: null
origin_country: null
destination_country: null
items:
- external_product_id: '3123213'
title: T-shirt
url: http://example.com/t-shirt.html
image_url: http://example.com/images/t-shirt.png
quantity: 2
unit_price:
amount: '10.00'
currency: USD
raw_symbol: $
compare_unit_price:
amount: '20.00'
currency: USD
raw_symbol: $
total_price:
amount: '20.00'
currency: USD
raw_symbol: $
compare_total_price:
amount: '40.00'
currency: USD
raw_symbol: $
variant_description: 'size: XL - color: red'
status: null
tracking_url: http://example.com
shipping_provider: Third Party
estimated_delivery_datetime:
min:
date: '2012-12-12'
time: 00:00:00
utc_offset: 8
timezone_identifier: Asia/Shanghai
max:
date: '2012-12-13'
time: 00:00:00
utc_offset: 8
timezone_identifier: Asia/Shanghai
raw_delivery_text: tomorrow
pickup:
location:
raw_address: Amazon Locker - 123 Example Street, London, United Kingdom
raw_opening_hours: 'Monday - Saturday: 08:00 AM - 10:00 PM Sunday: 09:00 AM - 08:00 PM'
opening_hours:
sunday:
- open: true
from: 09:00
to: '20:00'
monday:
- open: true
from: 08:00
to: '22:00'
tuesday:
- open: true
from: 08:00
to: '22:00'
wednesday:
- open: true
from: 08:00
to: '22:00'
thursday:
- open: true
from: 08:00
to: '22:00'
friday:
- open: true
from: 08:00
to: '22:00'
saturday:
- open: true
from: 08:00
to: '22:00'
instructions: You must bring your ID that matches the name on the parcel.
code: '31232'
barcode:
image_url: http://example.com/images/barcode.png
pickup_action_url: https://www.example.com/pickup/start?order=12345
available_datetime:
start: null
end:
date: '2012-12-12'
time: null
utc_offset: null
timezone_identifier: null
raw: PICK UP UNTIL Wednesday, Dec 12
requires_shipping: true
confidence_score: 0.96
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
examples:
example-1:
value:
meta:
code: 400
message: The request body JSON payload is invalid
type: BadRequest
data: {}
'401':
description: Unauthorized
headers: {}
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
meta:
code: 401
message: 'The API key is invalid. '
type: Unauthorized
data: {}
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 401
message: Invalid API key.
type: Unauthorized
data: {}
'403':
description: Forbidden
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
meta:
code: 401
message: The API key is invalid.
type: Unauthorized
data: {}
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 403
message: Access forbidden.
type: Forbidden
data: {}
'422':
description: Unprocessable Entity
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
properties:
confidence_score:
type: number
x-stoplight:
id: 8mhsqdjm1jz9h
minimum: 0
maximum: 1
format: float
example: 0.96
description: The confidence score represents the probability that AfterShip Parser thinks the email contains order information. The higher the value, the more likely message includes order information.
required:
- meta
- data
examples:
'422: Request parameter is invalid.':
value:
meta:
code: 422
message: Invalid request parameters.
type: UnprocessableEntity
errors: []
data: {}
'20001: No available order data after detection.':
value:
meta:
code: 20001
message: Unable to parse the order information from the email content.
type: UnprocessableEntity
data:
confidence_score: 0.02
'429':
description: Too Many Requests
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
examples:
example-1:
value:
meta:
code: 429
message: Rate limit exceeded. The default API call limit is 10 requests per second.
type: TooManyRequests
data: {}
'500':
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
examples:
example-1:
value:
meta:
code: 500
message: Something's wrong on Automizely's end.
type: InternalError
data: {}
description: Internal Server Error
requestBody:
content:
application/json:
schema:
type: object
x-examples:
example-1:
subject: 'Order #32324 confirmed'
from: hello@example.com
labels:
- UNREAD
- IMPORTANT
- CATEGORY_UPDATES
- INBOX
content:
html: <html></html>
text: Thank you for your purchase! ---------------------------- Hi xxx, we're getting your order ready to be shipped.
additionalProperties: false
required:
- headers
- body
properties:
headers:
x-stoplight:
id: sr9qhpqishbdy
type: array
maxItems: 100
description: 'Email headers in the raw email data. It is **recommended** to pass all headers for improving the parsing process, especially `Subject` , `From` , `Date` , `Message-ID`, `References`, and `Delivered-To`.
It is possible to optionally hash the email address of `Delivered-To` before requesting and then pass it to our system as the value of `X-AS-Hashed-Delivered-To` to prevent passing the user''s email address to our system.
`Delivered-To` is required by default, but in some special cases, you can contact the support for help.
If the `Delivered-To` header does not exist, it can be replaced with `To` and `X-AS-Hashed-To`, but priority should still be given to `Delivered-To`.'
items:
$ref: '#/components/schemas/Email_header.v1'
x-stoplight:
id: ye2154vzyci7n
body:
type: object
x-stoplight:
id: 4z3o4sgtalfb5
description: At least one out of HTML or text is required. HTML is recommended for a much better result.
required:
- html
- text
properties:
html:
type: string
x-stoplight:
id: baq03b1g8rp07
description: The HTML content of an email.
minLength: 1
text:
type: string
x-stoplight:
id: vve5j8xz6975r
description: The text content of an email.
minLength: 1
attachments:
x-stoplight:
id: oe97eq0h4ldxp
type:
- array
- 'null'
description: 'Attachments of an email.
The total size of all attachments combined must not exceed `26MB`.'
maxItems: 30
items:
$ref: '#/components/schemas/Attachment.v1'
x-stoplight:
id: jqxxfufazshzz
labels:
type: array
description: Labels generated by email service providers such as Gmail
maxItems: 50
items:
type: string
maxLength: 64
country_region:
type: string
x-stoplight:
id: kgjxnd4ssdryh
description: ISO 3166 Alpha-3 code of the country or region. See [ISO 3166 Country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
examples:
'email sample - order confirmed ':
value:
labels:
- UNREAD
- IMPORTANT
- CATEGORY_UPDATES
- INBOX
body:
html: <!DOCTYPE html><html lang="en"><head><title>Thank you for your purchase! </title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width"/></head><body>...</body></html>
text: Thank you for your purchase! ---------------------------- Hi Tom, we've received your order!
attachments:
- filename: xxx.pdf
content_type: application/pdf
data: base64
headers:
- name: Reference
value: <CAasdfzM=ATfHsacasdfDO6o-xTOwnbasdfqwerqweradsVyasdfxzfQ@mail.gmail.com>
- name: From
value: xxxxx-xxxxx-xxxx@yyy.zzzzz
- name: Subject
value: Your order xxxxxxxx
application/xml:
schema:
type: object
properties: {}
description: ''
description: "Parse orders and tracking detail from an email.\n\nAfterShip Parser only returns parsing results that meet the conditions of the minimum valid parsing results during parsing. See [Minimum Valid Parsing Result](../docs/other/minimum_valid_parsing_result.md).\n \n \nThe size of the Request Body must be at most `27MB`."
parameters: []
tags:
- Email Parses
/email-parses:
parameters: []
post:
summary: Parse an email
operationId: email-parses
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
x-examples:
example-1:
meta:
code: 20000
type: OK
message: The request was successfully processed by Automizely.
data:
orders: []
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- confidence_score
properties:
orders:
type: array
items:
$ref: '#/components/schemas/Order.v1'
confidence_score:
type: number
x-stoplight:
id: qxno1p1uq7hwi
minimum: 0
maximum: 1
format: float
example: 0.96
description: The confidence score represents the probability that AfterShip Parser thinks the email contains order information. The higher the value, the more likely message includes order information.
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 200
type: OK
message: The request was successfully processed by Automizely.
data:
orders:
- order_number: '23234324'
order_url: https://www.amazon.com/gp/css/2323432.html
placed_at:
date: '2012-12-12'
time: '13:06:22'
utc_offset: 8
timezone_identifier: Asia/Shanghai
order_status: open
store:
name: example store
url: https://www.example-store.com
logo_url: https://example-store.com/logo.png
email: contact@example-store.com
phone:
country_region_code: '1'
number: '3105550199'
items:
- external_product_id: '3123213'
product_title: T-shirt
url: http://example.com/t-shirt.html
image_url: http://example.com/images/t-shirt.png
quantity: 2
unit_price:
amount: '10.00'
currency: USD
symbol: $
compare_unit_price:
amount: '20.00'
currency: USD
symbol: $
total_price:
amount: '20.00'
currency: USD
symbol: $
compare_total_price:
amount: '40.00'
currency: USD
symbol: $
variant_description: 'size: XL - color: red'
status: null
shipping_address:
raw_location: Los Angeles, CA, USA
phone:
country_region_code: '1'
number: '3105550199'
shipping_method:
name: Standard - free
billing_address:
raw_location: Los Angeles, CA, USA
phone:
country_region_code: '1'
number: '3105550199'
order_total:
amount: '19.00'
currency: USD
symbol: $
subtotal:
amount: '20.00'
currency: USD
symbol: $
shipping_total:
amount: '4.00'
currency: USD
symbol: $
tax_total:
amount: '1.00'
currency: USD
symbol: $
discount_total:
amount: '-5.00'
currency: USD
symbol: $
other_prices:
- title: Reward Coupon
price:
amount: '-1.00'
currency: USD
symbol: $
trackings:
- status: Delivered
tracking_number: '234234'
slug: ups
additional_fields:
postal_code: xxxxxx
items:
- external_product_id: '3123213'
product_title: T-shirt
url: http://example.com/t-shirt.html
image_url: http://example.com/images/t-shirt.png
quantity: 2
unit_price:
amount: '10.00'
currency: USD
symbol: $
compare_unit_price:
amount: '20.00'
currency: USD
symbol: $
total_price:
amount: '20.00'
currency: USD
symbol: $
compare_total_price:
amount: '40.00'
currency: USD
symbol: $
variant_description: 'size: XL - color: red'
status: null
estimated_delivery_date:
estimated_delivery_date_min: '2021-12-11'
estimated_delivery_date_max: '2021-12-12'
confidence_score: 0.96
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
examples:
example-1:
value:
meta:
code: 400
message: The request body JSON payload is invalid
type: BadRequest
data: {}
'401':
description: Unauthorized
headers: {}
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
meta:
code: 401
message: 'The API key is invalid. '
type: Unauthorized
data: {}
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 401
message: Invalid API key.
type: Unauthorized
data: {}
'403':
description: Forbidden
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
meta:
code: 401
message: The API key is invalid.
type: Unauthorized
data: {}
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
required:
- meta
- data
examples:
example-1:
value:
meta:
code: 403
message: Access forbidden.
type: Forbidden
data: {}
'422':
description: Unprocessable Entity
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta.v1'
data:
type: object
properties:
confidence_score:
type: number
x-stoplight:
id: txzkfks03zwg2
minimum: 0
maximum: 1
example: 0.96
format: float
description: The confidence score represents the probability that AfterShip Parser thinks the email contains order information. The higher the value, the more likely message includes order information.
required:
- meta
- data
examples:
'422: Request parameter is invalid.':
value:
meta:
code: 422
message: Invalid request parameters.
# --- truncated at 32 KB (128 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aftership/refs/heads/main/openapi/aftership-email-parses-api-openapi.yml