Parse orders and tracking detail from an email.
AfterShip Parser only returns parsing results that meet the conditions of the minimum valid parsing results during parsing. See Minimum Valid Parsing Result.
The size of the Request Body must be at most 27MB.
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.Show all...
Email header name.
Email header value.
At least one out of HTML or text is required. HTML is recommended for a much better result.
The HTML content of an email.
The text content of an email.
Labels generated by email service providers such as Gmail
ISO 3166 Alpha-3 code of the country or region. See ISO 3166 Country codes.
OK
Meta data object.
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.
The order object contains at least 1 order number (order.number) or 1 tracking information (order.trackings.tracking_number). See Minimum Valid Parsing Result.
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.
Bad Request
Meta data object.
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.
Unauthorized
Meta data object.
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.
Forbidden
Meta data object.
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.
Unprocessable Entity
Meta data object.
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.
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.
Too Many Requests
Meta data object.
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.
Internal Server Error
Meta data object.
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.
{
"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": "[email protected]"
},
{
"name": "Subject",
"value": "Your order xxxxxxxx"
}
]
}{ "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": "[email protected]", "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 } }