Download Due-Date Calendar Event
GET/api/purchase-invoices/:purchaseInvoice/calendar.ics
Download a single-event iCalendar (.ics) file for the invoice's payment due date, suitable for importing into Outlook, Apple Calendar, or any calendar app.
Authentication: Requires Bearer token.
The response is a text/calendar file download (not JSON) containing one all-day VEVENT on the due date with a stable UID, so re-importing an updated file replaces the earlier event. The event carries popup reminders 7 days and 1 day before the deadline.
Returns 422 when the invoice has no payment due date.
Request
Responses
- 401
- 403
- 404
- 422
- 429
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.