Skip to content
Tier 2 Schema

Parse Amazon Order Emails

Turn Amazon order confirmations and shipping alerts into typed JSON — order ID, line items, totals, delivery estimate, and seller, ready for your database.

Amazon sends order confirmation and shipment notification emails for every purchase, but the data is buried in dense HTML across multiple email variants. MailFrame pulls the order ID, every line item, the estimated delivery date, and the seller into a consistent typed JSON object you can act on immediately.

It works on “Order Confirmation”, “Your order has shipped”, and “Delivered” notification emails from Amazon.com and international Amazon storefronts.

Fields MailFrame extracts

FieldTypeExampleNotes
order_idstring113-1234567-1234567Amazon order ID in NNN-NNNNNNN-NNNNNNN format
itemsarraysee outputEach item: title, quantity, price_cents
order_total_centsinteger3498Grand total charged in minor units
currencystringusdISO 4217, lower-cased
ship_to_namestringMorgan ChenRecipient name on the shipping address
estimated_deliverystring2026-05-24Estimated or confirmed delivery date, ISO 8601
order_datestring2026-05-21Date the order was placed, ISO 8601
sellerstringAmazon.comFulfilled by Amazon or third-party seller name

Sample input

A typical Amazon order confirmation email looks like this:

From: auto-confirm@amazon.com
Subject: Your Amazon.com order of "USB-C Charging Cable..." has shipped!
Date: Thu, 21 May 2026 09:14:00 -0800
To: morgan@example.com

Hello Morgan,

Your package is on its way!

Order #113-1234567-1234567
Placed: May 21, 2026
Estimated delivery: Sunday, May 24, 2026

Items shipped:
  Anker USB-C Charging Cable 6ft (2-Pack)    Qty: 1    $12.99
  Screen Cleaning Kit                         Qty: 2    $10.99 each

Order total: $34.98
Sold by: Amazon.com

Track your package: https://www.amazon.com/progress-tracker/...

Structured JSON output

{
  "order_id": "113-1234567-1234567",
  "items": [
    { "title": "Anker USB-C Charging Cable 6ft (2-Pack)", "quantity": 1, "price_cents": 1299 },
    { "title": "Screen Cleaning Kit", "quantity": 2, "price_cents": 1099 }
  ],
  "order_total_cents": 3498,
  "currency": "usd",
  "ship_to_name": "Morgan Chen",
  "estimated_delivery": "2026-05-24",
  "order_date": "2026-05-21",
  "seller": "Amazon.com"
}

JSON Schema definition

Every field is validated against the schema before delivery. You can copy this as a starting point and tighten it for your own use case:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "amazon_order",
  "type": "object",
  "required": ["order_id", "items", "order_total_cents", "currency", "order_date"],
  "properties": {
    "order_id": { "type": "string", "pattern": "^[0-9]{3}-[0-9]{7}-[0-9]{7}$" },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["title", "quantity", "price_cents"],
        "properties": {
          "title": { "type": "string" },
          "quantity": { "type": "integer", "minimum": 1 },
          "price_cents": { "type": "integer", "minimum": 0 }
        }
      }
    },
    "order_total_cents": { "type": "integer", "minimum": 0 },
    "currency": { "type": "string", "minLength": 3, "maxLength": 3 },
    "ship_to_name": { "type": "string" },
    "estimated_delivery": { "type": "string", "format": "date" },
    "order_date": { "type": "string", "format": "date" },
    "seller": { "type": "string" }
  }
}

Parse via the API

POST the raw email (MIME or plain text) to /v1/parse with the schema you want to extract against:

The example below sends this page’s Sample input as raw_mime.

curl https://api.mailframe.ai/v1/parse \
  -H "Authorization: Bearer $MAILFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "schema_id": "amazon_order",
    "raw_mime": "From: auto-confirm@amazon.com\r\nTo: morgan@example.com\r\nSubject: Your Amazon.com order of \"USB-C Charging Cable...\" has shipped!\r\n\r\nHello Morgan,"
  }'

Prefer a hands-off setup? Inbox forwarding — sending your Amazon confirmation emails to a unique inbox address MailFrame assigns you — is on the roadmap. Until it ships, POST the raw email to /v1/parse as shown above.

Signed webhook delivery (roadmap)

Signed webhook delivery — where MailFrame would POST the extraction result to your endpoint — is on the roadmap, not yet available. As planned, each delivery would carry an HMAC-SHA256 signature in the MailFrame-Signature header for verification, with retries on failure also planned. The envelope below is an illustrative sketch of the planned format and may change; the confidence block reflects per-field confidence scoring, which is also on the roadmap and not yet available:

{
  "event": "parse.completed",
  "parse_id": "parse_a1b4f2",
  "schema": "amazon_order",
  "data": {
    "order_id": "113-1234567-1234567",
    "items": [
      { "title": "Anker USB-C Charging Cable 6ft (2-Pack)", "quantity": 1, "price_cents": 1299 },
      { "title": "Screen Cleaning Kit", "quantity": 2, "price_cents": 1099 }
    ],
    "order_total_cents": 3498,
    "currency": "usd",
    "ship_to_name": "Morgan Chen",
    "estimated_delivery": "2026-05-24",
    "order_date": "2026-05-21",
    "seller": "Amazon.com"
  },
  "confidence": { "order_id": 0.99, "order_total_cents": 0.98, "items": 0.94 },
  "received_at": "2026-05-21T17:14:12Z"
}

For synchronous delivery, use POST /v1/parse as shown above — the response returns typed JSON for every successful extraction.

Other schemas

Ship this schema in production

Define your fields once, then POST raw email to /v1/parse. MailFrame returns typed JSON in the same HTTP response. (Signed webhook delivery and inbox forwarding are on the roadmap, not yet available.)

Request early access