GuidesAPI ReferenceChangelog
Guides

Accounting API

Learn how to use the accounting API to keep track of your payments to Deel

The Accounting API helps with your bookkeeping by providing endpoints for retrieving invoice and payment data. Specifically, the endpoints allow to:

Retrieve invoices

Invoices are organized into two categories: Deel fees and worker salaries. There's a separate endpoint for each invoices:

Retrieve worker salary invoices

You can use the Retrieve invoices endpoint to retrieve the invoices that are related to the salaries of your workforce.

To retrieve the worker salary invoices, make a GET request to the endpoint.

curl --request GET \
curl --request GET \
     --url 'https://api.letsdeel.com/rest/v2/invoices?issued_from_date=2024-11-09&issued_to_date=2024-11-14&entities=company&limit=10&offset=0' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'

In the query:

NameRequiredTypeFormatDescriptionExample
issued_from_datefalsestring-The start of the date range that you can filter invoices by2024-11-09
issued_to_datefalsestring-The end of the date range that you can filter invoices by2024-11-14
entitiesfalsestringenumFilter invoices by legal entity type. The entity type can be either company or individual. More information at List of legal entitiescompany
limitfalsenumber-Number of results to be returned in the response100
offsetfalsenumber-The number of results that the respone starts from. All results before this number are skipped.10

A successful response (200) returns the list of invoices available in your organization and matching any filters applied. For example:gi

{
  "data": [
    {
      "id": "rhCTiRd9Mad41RwjsFWw-",
      "status": "paid",
      "currency": "GBP",
      "created_at": "2022-05-24T09:38:46.235Z",
      "total": "1000",
      "label": "INV-2023-4",
      "paid_at": "2022-05-24T09:38:46.235Z",
      "vat_total": "210",
      "vat_percentage": "21",
      "is_overdue": true,
      "issued_at": "2022-05-24T09:38:46.235Z",
      "vat_id": "string",
      "due_date": "2022-05-24T09:38:46.235Z",
      "contract_id": "string"
    }
  ],
  "page": {
    "total_rows": 0,
    "items_per_page": 0,
    "offset": 0
  }
}

Where:

NameRequiredTypeFormatDescriptionExample
idtruestringUUIDThe ID of the invoice.rhCTiRd9Mad41RwjsFWw-
statustruestringenumThe status of the invoice.paid
currencytruestringenumThe currency of the invoice.GBP
created_attruestringdate-timeDate on which the invoice is created2022-05-24T09:38:46.235Z
totaltruenumber-The total amount of the invoice.1000
labeltruestring-The label of the invoice.INV-2023-4
paid_attruestringdate-timeDate on which the invoice is paid2022-05-24T09:38:46.235Z
vat_totaltruenumber-The total VAT amount of the invoice.210
vat_percentagetruenumber-The VAT percentage of the invoice.21
is_overduetrueboolean-Defines if the invoice is overdue or not.true
issued_attruestringdate-timeDate on which the invoice is issued2022-05-24T09:38:46.235Z
vat_idtruestring-The VAT ID of the invoice.string
due_datetruestringdate-timeDate on which the invoice is due2022-05-24T09:38:46.235Z
contract_idtruestring-Unique identifier of the contract that invoices were submitted forstring
pagetrueobject-An object containing pagination information. Use it to navigate through sets of results-

Retrieve Deel fees invoices

Deel fees are invoiced separately from your worker's salaries. You can use the Retrieve Deel invoices endpoint to retrieve the invoices that are related to Deel fees.

To retrieve the Deel fees invoices, make a GET request to the endpoint.

curl --request GET \
     --url 'https://api.letsdeel.com/rest/v2/invoices/deel?limit=10&offset=0&contract_id=54d268g' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'

In the query:

NameRequiredTypeFormatDescriptionExample
limitfalsenumber-Number of results to be returned in the response100
offsetfalsenumber-The number of results that the respone starts from. All results before this number are skipped.10
contract_idtruestring-Unique identifier of the contract that fee invoices were generated for. You can obtain it from the List of contracts endpoint.d3g0d3g

A successful response (200) returns the list of invoices for Deel fees that match the filters. For example:

{
  "data": [
    {
      "id": "rhCTiRd9Mad41RwjsFWw-",
      "label": "INV-2023-4",
      "status": "paid",
      "currency": "GBP",
      "total": "1000",
      "created_at": "2024-05-24T09:38:46.235Z"
    }
  ],
  "page": {
    "total_rows": 0,
    "items_per_page": 0,
    "offset": 0
  }
}

Where:

NameRequiredTypeFormatDescriptionExample
idtruestringUUIDThe unique ID of the invoicerhCTiRd9Mad41RwjsFWw-
labeltruestring-The label of the invoiceINV-2023-4
statustruestringenumThe status of the invoicepaid
currencytruestring-The currency code of the invoiceGBP
totaltruenumber-The total amount of the invoice1000
created_attruestringdate-timeDate on which the invoice is created2022-05-24T09:38:46.235Z
pagetrueobject-An object containing pagination information. Use it to navigate through sets of results.-

Download invoice PDF

For each invoice, you can also download the invoices as a PDF files. Both the worker salary invoices and Deel fee invoices are available.

To download an invoice, make a GET request to the Download invoice PDF endpoint.

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/invoices/{id}/download \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'

In the path:

NameRequiredTypeFormatDescriptionExample
idtruestringUUIDThe unique ID of the invoice. You can retrieve itd3m0d3m0d3m0d3m0d3m0d

A successful response (200) returns the link to download the PDF file. For example:

{
  "data": {
    "url": "https://url.com/invoices/12345.pdf"
  }
}

Retrieve payment receipts

For each payment made to Deel for the issued invoices, you can also retrieve the receipts.

To retrieve the receipts, make a GET request to the Retrieve payment reciepts endpoint.

curl --request GET \
     --url 'https://api.letsdeel.com/rest/v2/payments?date_from=2024-10-11&date_to=2024-10-19&currencies=EUR&entities=individual' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'

In the query, you can specify the following parameters to filter the results:

NameRequiredTypeFormatDescriptionExample
date_fromtruestringdateThe start date of the payment receipts. The format is YYYY-MM-DD.2024-10-11
date_totruestringdateThe end date of the payment receipts. The format is YYYY-MM-DD.2024-10-19
currenciestruestring-The currency codes of the payment receipts. You can retrieve the available currencies from Currency list.EUR
entitiestruestring-The entities of the payment receiptsindividual

A successful response (200) returns the list of payment receipts that match the filters. For example:

{
  "data": {
    "rows": [
      {
        "id": 12345,
        "payment_method": {
          "type": "stripe_bacs_debit"
        },
        "status": "paid",
        "payment_currency": "GBP",
        "label": "string",
        "paid_at": "2022-05-24T09:38:46.235Z",
        "created_at": "2022-05-24T09:38:46.235Z",
        "total": "1000.00",
        "workers": [
          {
            "id": 123456,
            "name": "Jane Doe",
            "picUrl": "string",
            "contract_id": "string"
          }
        ]
      }
    ],
    "total": 1
  }
}

Where:

NameRequiredTypeFormatDescriptionExample
idtruenumber-The ID of the payment receipt. You can use this ID to retrieve the payment breakdown.12345
payment_methodtrueobject-The payment method of the payment receipt-
payment_method.typetruestringenumThe type of the payment methodstripe_bacs_debit
statustruestringenumThe status of the payment receiptpaid
payment_currencytruestringenumThe currency code of the payment receipt. You can retrieve the available currencies from Currency list.GBP
labeltruestring-The label of the payment receiptstring
paid_attruestringdate-timeDate on which the payment receipt is paid2022-05-24T09:38:46.235Z
created_attruestringdate-timeDate on which the payment receipt is created2022-05-24T09:38:46.235Z
totaltruenumber-The total amount of the payment receipt1000.00
workerstruearray-Contains objects that represent the workers that the payment receipt is related to-
workers.[].idtruenumber-The ID of the worker123456
workers.[].nametruestring-The name of the workerJane Doe
workers.[].picUrltruestring-The URL of the worker's profile picturestring
workers.[].contract_idtruestring-The contract ID of the workerstring

Retrieve a payment breakdown

You can retrieve the breakdown of the payments made to Deel by using the payment ID that is returned in the payment receipt. Breakdowns include all the details of a payment and are available for both Deel fee and worker salary invoices. Breakdowns include individual invoices and Deel fee as line items.

To retrieve the breakdown, make a GET request to the Retrieve a payment breakdowns endpoint.

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/payments/{payment_id}/breakdown \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}'

In the path:

NameRequiredTypeFormatDescriptionExample
payment_idtruenumber-The ID of the payment receipt. You can retrieve it from the Retrieve payment reciepts endpoint.d3m0d3m0d3m0d3m0d3m0

A successful response (200) returns the breakdown of the payment. An empty parameter means that the parameter is either not provided or not applicable.

📘

1 breakdown item = 1 object

Each breakdown item is an object in the data array.

For example:

{
  "data": [
    {
      "date": "2022-10-01T00:59:28.482Z",
      "general_ledger_account": "",
      "team": "Deel Inc.",
      "contractor_unique_identifier": "12345",
      "contractor_employee_name": "Jane Doe",
      "contractor_email": "[email protected]",
      "invoice_number": "5069872",
      "currency": "USD",
      "payment_currency": "USD",
      "receipt_number": "5551621",
      "work": "0.00",
      "bonus": "0.00",
      "expenses": "0.00",
      "commissions": "0.00",
      "deductions": "0.00",
      "overtime": "0.00",
      "pro_rata": "0.00",
      "others": "0.00",
      "processing_fee": "0.00",
      "adjustment": "0.00",
      "total": "1000.00",
      "total_payment_currency": "1000.00",
      "payment_date": "2022-11-01T17:20:32.837Z",
      "frequency": "",
      "contract_country": "US",
      "contract_start_date": "2020-03-31T10:58:49.780Z",
      "approvers": "string",
      "approve_date": "string"
    }
  ]
}

Where:

NameRequiredTypeFormatDescriptionExample
datetruestringdate-timeDate on which the item is paid2022-05-24T09:38:46.235Z
general_ledger_accounttruestring-Returns the name of the general ledger account if the payment is linked to one-
teamtruestring-The team of the itemDeel Inc.
contractor_unique_identifiertruestring-The unique identifier of the worker12345
contractor_employee_nametruestring-The name of the contractorMichael Scott
contractor_emailtruestring-The email of the contractor[email protected]
invoice_numbertruestring-The invoice number of the item5069872
currencytruestringenumThe currency code of the itemUSD
payment_currencytruestringenumThe currency code of the itemUSD
receipt_numbertruestring-The receipt number of the item5551621
worktruenumber-The amount of the base work for the item0.00
bonustruenumber-The amount of the bonus for the item0.00
expensestruenumber-The amount of the expenses for the item0.00
commissionstruenumber-The commissions amount of the item0.00
deductionstruenumber-The deductions amount of the item0.00
overtimetruenumber-The overtime amount of the item0.00
pro_ratatruenumber-The pro rata amount of the item0.00
otherstruenumber-The others amount of the item0.00
processing_feetruenumber-The processing fee amount of the item0.00
adjustmenttruenumber-The adjustment amount of the item0.00
totaltruenumber-The total amount of the item1000.00
total_payment_currencytruenumber-The total amount of the item in the payment currency1000.00
payment_datetruestringdate-timeDate on which the item is paid2022-11-01T17:20:32.837Z
frequencytruestring-The frequency of the item-
contract_countrytruestring-The country of the contractorUS
contract_start_datetruestringdate-timeThe start date of the contract2020-03-31T10:58:49.780Z
approverstruestring-The approvers of the itemstring
approve_datetruestringdate-timeDate on which the item is approvedstring