Skip to content

Deel: Get invoice by id

Deel accounting.getInvoiceById: arguments, response, policy and SDK examples.

← Accounting operations · Get started

Operation deel.accounting_getinvoicebyid_v2026_01_01

Provider route: GET /invoices/{invoice_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["accounting"]["getInvoiceById"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.accounting.getInvoiceById(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_deel import DeelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.accounting.get_invoice_by_id(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.invoice_idstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get invoice by id — 200 response body

Referenced models: Get invoice by id — 200 response body

1 more schema is linked from the tables above, on the schema pages.

Get invoice by id — 200 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataModelOptionalExpand Get invoice by id — 200 response body — data
The invoice resource returned

Referenced models: Get invoice by id — 200 response body — data

Get invoice by id — 200 response body — data
FieldTypePresenceDescription and constraints
$objectRootThe invoice resource returned
contract_idJSONOptional
contract_id (anyOf 1)stringAlternativeUnique identifier of the related contract. For invoices linked directly to a contract this is that contract; for invoices covering service reports it is the contract of the linked service report with the lowest id (for invoices spanning several contracts only that one is returned). Null when the invoice has no related contract (e.g. organization-level fee invoices).
contract_id (anyOf 2)nullAlternativeUnique identifier of the related contract. For invoices linked directly to a contract this is that contract; for invoices covering service reports it is the contract of the linked service report with the lowest id (for invoices spanning several contracts only that one is returned). Null when the invoice has no related contract (e.g. organization-level fee invoices).
created_atstringOptionalTimestamp of when the invoice was created in the system
Format: date-time
currencystringOptionalCurrency code for the invoice total
due_datestringOptionalThe due date for the invoice payment
Format: date-time
idstringOptionalUnique identifier for the invoice
issued_atstringOptionalDate and time when the invoice was issued
Format: date-time
labelstringOptionalHuman-readable label or reference number for the invoice
line_itemsarrayOptionalThe individual line items associated with the invoice
line_items[]ModelEach itemExpand Get invoice by id — 200 response body — data line items item
paid_atstringOptionalDate and time when the invoice was paid
Format: date-time
recipient_legal_entity_idstringOptionalUnique identifier for the recipient legal entity
Format: uuid
statusstringOptionalCurrent payment status of the invoice.
Known values: open, pending, skipped, preprocessing, processing, credited, processed, paid, failed, cancelled, refunded, unpayable, awaiting_payment
totalstringOptionalTotal amount of the invoice
worker_idstringOptionalUnique identifier for the worker profile
Format: uuid

Referenced models: Get invoice by id — 200 response body — data line items item

Get invoice by id — 200 response body — data line items item
FieldTypePresenceDescription and constraints
$objectRoot
adjustment_idJSONOptional
adjustment_id (anyOf 1)stringAlternativeFor line items sourced from an EOR adjustment payout, the id of the originating adjustment — matches the id returned by the Retrieve adjustments API (GET /contracts/{contract_id}/adjustments). Null for non-adjustment line items (e.g. fees, deposits). Global Payroll adjustment correlation is not yet supported. Note: for legacy (pre-migration) EOR adjustments the Retrieve adjustments API may return a legacy id instead; those historical line items may not correlate.
adjustment_id (anyOf 2)nullAlternativeFor line items sourced from an EOR adjustment payout, the id of the originating adjustment — matches the id returned by the Retrieve adjustments API (GET /contracts/{contract_id}/adjustments). Null for non-adjustment line items (e.g. fees, deposits). Global Payroll adjustment correlation is not yet supported. Note: for legacy (pre-migration) EOR adjustments the Retrieve adjustments API may return a legacy id instead; those historical line items may not correlate.
descriptionstringOptionalMain description of the line item
fx_ratestringOptionalExchange rate used for this line item
idstringOptionalUnique identifier for the line item
price_per_unitJSONOptional
price_per_unit (anyOf 1)numberAlternativePrice charged per unit
Format: double
price_per_unit (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
pricing_fx_ratestringOptionalExchange rate used for pricing calculations on this line item
quantityJSONOptional
quantity (anyOf 1)integerAlternativeQuantity of units billed in this line item
quantity (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
sub_descriptionstringOptionalOptional additional description or detail
tax_ratestringOptionalTax rate applied to this line item
tax_typeJSONOptional
tax_type (anyOf 1)stringAlternativeType of tax applied (if any); can be null
tax_type (anyOf 2)nullAlternativeType of tax applied (if any); can be null
totalstringOptionalTotal amount for this line item
typeModelOptionalExpand Get invoice by id — 200 response body — data line items item type
The type of this line item

Referenced models: Get invoice by id — 200 response body — data line items item type

SDK function policy ID: deel.accounting_getinvoicebyid_v2026_01_01. Catalog operation: accounting_getinvoicebyid_v2026_01_01. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["accounting:read"]

Pinned headers: {"X-Version": "2026-01-01"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.