Invoicing

sponsorships.invoice.preview

Preview a sponsorship invoice from its package and optional existing invoice template, using the existing customer's legal/billing identity and project. Choose currency, price, service dates, terms and explicit tax treatment; unknown tax remains unconfirmed, country alone never selects tax. Preview does not create, issue or send an invoice.

GETPOST/api/v1/accounting/sponsorships.invoice.preview

Permissions

accounting:read

Who can call it

admin, finance

Retries

Safe to retry: it only reads, with expectedRevision

MCP

accounting_sponsorships_invoice_preview

Fields

  • idstring (ID)Required

    The record's ID.

  • expectedRevisionintegerRequired

    The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.

    0 to 9007199254740991

  • additionalInvoiceReasonstring or null

    Default null

  • issueDatestring or null

    The date the document was issued, as YYYY-MM-DD.

  • dueDatestring or null

    The date payment is due, as YYYY-MM-DD.

  • taxTreatmentenumRequired
    unknownhstgstgst_qstzero_ratedexemptnonecustom
  • taxRateCodestring or null
  • taxReasonstring

    at most 2000 characters · Default ""

  • termsobject

    No other fields

  • priceMinorstring

    An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50.

    Matches ^(?:0|[1-9]\d{0,18})$

  • currencystring

    Three-letter currency code, such as CAD or USD.

Example

curl -G https://app.getoatmilk.com/api/v1/accounting/sponsorships.invoice.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'id=9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d' \
  --data-urlencode 'expectedRevision=3' \
  --data-urlencode 'taxTreatment=unknown'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

GET/api/v1/accounting/sponsorships.invoice.preview
curl -G https://app.getoatmilk.com/api/v1/accounting/sponsorships.invoice.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'id=9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d' \
  --data-urlencode 'expectedRevision=3' \
  --data-urlencode 'taxTreatment=unknown'

More in Invoicing.