# Fetch an accounting invoice PDF

Fetches the linked invoice PDF from the connected accounting platform and attaches it to the Resolve invoice.

The invoice must already be linked to a record on the connected accounting platform. Once attached, the PDF is served with the invoice like any other invoice attachment.

Endpoint: PUT /external-syncs/invoices/{merchant_invoice_id}/pdf
Version: V5
Security: bearerAuth, basicAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `merchant_invoice_id` (string, required)
    ID of the invoice to fetch the accounting platform PDF for.

## Response 200:

  - `200` (unknown)
    The request was accepted.

## Response 200 fields (application/json):

  - `success` (boolean, required)
    Always `true` when the request was accepted.
    Enum: true

## Response 400:

  - `400` (unknown)
    The request cannot be completed.

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (string)
    A short string identifying the error, when available.
    Example: INVALID_PARAM

  - `error.message` (string, required)
    A short string describing error details.
    Example: Unsupported accounting platform: xero

  - `error.type` (string)
    A short string describing error type, when available.
    Example: invalid_request_error

## Response 401:

  - `401` (unknown)
    Unauthorized error

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 403:

  - `403` (unknown)
    The access key lacks the permission required for this request.

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.code` (string)
    A short string identifying the error, when available.
    Example: INVALID_PARAM

  - `error.message` (string, required)
    A short string describing error details.
    Example: Unsupported accounting platform: xero

  - `error.type` (string)
    A short string describing error type, when available.
    Example: invalid_request_error

## Response 404:

  - `404` (unknown)
    The invoice does not exist for the authenticated merchant.

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.code` (string)
    A short string identifying the error, when available.
    Example: INVALID_PARAM

  - `error.message` (string, required)
    A short string describing error details.
    Example: Unsupported accounting platform: xero

  - `error.type` (string)
    A short string describing error type, when available.
    Example: invalid_request_error

## Response 200 examples:

  - `Request accepted` (unknown)

## Response 400 examples:

  - `Unsupported accounting platform` (unknown)

  - `No accounting platform connected` (unknown)

## Response 403 examples:

  - `Missing permission` (unknown)

## Response 404 examples:

  - `Invoice not found` (unknown)

