Contractors
Invoices

Preview a Contractor Invoice

Changed on

Returns a base64-encoded PDF preview of a contractor invoice built from the given parameters.

The document is a draft and is not persisted.

Authentication

This endpoint accepts any one of the following token types:

  • Company-scoped access token (OAuth2AuthorizationCode) — obtained through the Authorization Code flow or the Refresh Token flow. See Authentication for partners.
  • Customer API token (CustomerAPIToken) — generated by the customer on their Integration Settings page. See Authorization for customers.

Scopes

CategoryRead only ScopeWrite only Scope (read access implicit)
Manage invoices (invoices)View invoices (invoices:read)Manage invoices (invoices:write)
post/v1/employments/{employment_id}/contractor-invoices/preview

Request

  • Base URL: https://gateway.remote.com
  • URL: https://gateway.remote.com/v1/employments/{employment_id}/contractor-invoices/preview
  • Auth: HTTP bearer and OAuth 2 (authorization code, authorization URL /auth/oauth2/authorize, token URL /auth/oauth2/token, scopes: https://gateway.remote.com/company.manage, invoices:read, invoices:write, invoices, all:write, all:read)

Path parameters

employment_idstring uuid required

A unique identifier in UUID v4 format.

Example:663e0b79-c893-45ff-a1b2-f6dcabc098b5

Employment identifier

Request body

currencystring nullable required

Currency code of the SWIFT fee. Only present when processing_fee is set.

notestring nullable

Custom defined note.

numberstring nullable

Invoice identifier.

start_datestring date required

UTC date in ISO 8601 format

Example request

{
  "currency": "USD",
  "items": [
    {
      "amount": 5000,
      "description": "Description"
    }
  ],
  "note": "Contractor invoice note",
  "number": "Num321",
  "start_date": "2021-07-01"
}

Response

Success

Example response

{
  "data": {
    "contractor_invoice_preview": {
      "content": "data:application/pdf;base64,iVBORw0KGgoAAAANSUhEUgAAAJUAAACVCAYAAABRorhPAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWF...",
      "name": "contractor-invoice.pdf"
    }
  }
}

Changes