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.
Email Subject.
Email From.
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
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 information (order.order_number + order.store) or 1 tracking information (order.trackings.n.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.
{
"from": "[email protected]",
"subject": "Your order xxxxxxxx",
"labels": [
"UNREAD",
"IMPORTANT",
"CATEGORY_UPDATES",
"INBOX"
],
"content": {
"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!"
}
}{ "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": "[email protected]", "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 } }