Webhook Document Model v1

Definition of the Webhook payload used for Document events.

Document Model v1

{
    id: "yyxxgqjabpe2k88x_dc",
    created: "2023-02-15T17:43:11.000Z",
    type: "invoice",
    subject: "Your Invoice",
    number: "12345ABCDE",
    date: "2023-02-15T17:43:11.000Z",
    due_date: "2023-02-15T17:43:11.000Z",
    delivery_date: "2023-02-15T17:43:11.000Z",
    purchase_order_number: "",
    payment_terms: "30 Days",
    payment_reference: "",
    currency_code: "USD",
    currency_exchange_rate: 1,
    summary: {
        goods_amount: 1.00,
        taxable_amount: 1.00,
        tax_rate: 20,
        tax_amount: 2.00,
        total_amount: 12.00,
        due_amount: 12.00
    },
    lines: [
        {
            "name": "Storage Credits",
            "amount": 779.59,
            "quantity": 1,
            "unit_price": 649.66
        }
    ],
    from: {
        email: "fred@asterix.to.co",
        contact_name: "Fred Flint",
        website_url: "",
        phone: "",
        vat_registration_number: "",
        iban: "",
        address: {
            text: "320 Firecrest Court Centre Park, Warrington, WA1 1RG, GB",
            country_code: "GB",
            state_code: ""
        },
        org: {

Org Model

        }
    },
    ship_from: {
        contact_name: "Fred Flint",
        address: {
            text: "320 Firecrest Court Centre Park, Warrington, WA1 1RG, GB"
        },
        org: {

Org Model

        }
    },
    to: {
        email: "jane@jupiter.to.co",
        contact_name: "Jane Jupiter",
        vat_registration_number: "DE123456789",
        address: {
            text: "1023 Jupiter Way, San Diego, CA 12345, US",
            country_code: "US",
            state_code: "CA"
        },
        org: {

Org Model

        }
    },
    remit_to: {
        contact_name: "Fred Flint",
        address: {
            text: "320 Firecrest Court Centre Park, Warrington, WA1 1RG, GB"
        },
        org: {

Org Model

        }
    },
    attachments: [
        {
            "url": "https://doc-archive.to.co/yyyy.zzzz.to.co/email/y2njscr77cjnyskx/attachments/invoice.pdf",
            "content_type": "application/pdf"
        }
    ]
}