younifyd
Menu

Retrieve Invoice As Pdf

Retrieve invoice as PDF

POST/invoices/{invoice-id}/pdf

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the Retrieve Invoice As Pdf action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{retrieveInvoiceAsPdf.response.data}}.

Request

Path parameters

invoice-idstringrequired

Headers

chargebee-request-origin-devicestring

The device from which the customer has made the request

chargebee-request-origin-userstring (email)

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-user-encodedstring (email)

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-request-origin-ipstring

The IP address of the customer where the request originated

chargebee-event-actionsstring

skip all actions to be done on the events

One ofall-disabled

chargebee-event-emailstring

skip only emails

One ofall-disabled

chargebee-event-webhookstring

skip only webhooks

One ofall-disabled

chargebee-business-entity-idstring

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

Request body

Enter the body as JSON in the step's Body field.

disposition_typestring

Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser

One ofattachmentinlineDefault "attachment"

json
{
  "disposition_type": null
}

Response

Returns 200 with an object. Read it in later steps with {{retrieveInvoiceAsPdf.response.data.<field>}}.

downloadobject

<div class="api-description"><p class="mb-2">Requesting to download a file through this API will return the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">download_url</code> attribute as the response. This attribute will contain a URL that will allow the requested content to be downloaded.</p></div>

download_urlstringrequired

The URL at which the file is available for download.

valid_tillinteger (unix-time)required

<p class="mb-2">The time until which the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">download_url</code> is valid.</p>

mime_typestring

The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.

json
{
  "download": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.

Retrieve Invoice As Pdf — Chargebee — Documentation