Deel: Create Vendor Bill
Deel treasury.createVendorBill: arguments, response, policy and SDK examples.
← Treasury operations · Get started
Operation deel.treasury_createvendorbill_v2026_01_01
Provider route: POST /accounts-payable/vendor-bills. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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["treasury"]["createVendorBill"]>[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.treasury.createVendorBill(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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.treasury.create_vendor_bill(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Optional | |
body.data | Model | Required within parent | Expand Create Vendor Bill — request body — body data |
Referenced models: Create Vendor Bill — request body — body data
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create Vendor Bill — 201 response body |
Referenced models: Create Vendor Bill — 201 response body
Schemas
Section titled “Schemas”Create Vendor Bill — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | number | Required within parent | Total amount including VAT Format: double |
currency | string | Required within parent | ISO 4217 currency code Maximum length: 3 Minimum length: 3 Pattern: ^[A-Z]{3}$ |
date | string | Required within parent | Invoice/bill date Format: date |
description | string | Required within parent | General description of the vendor bill Minimum length: 1 |
due_date | string | Required within parent | Due date for payment Format: date |
external_id | string | Required within parent | External system identifier (e.g., Brightflag ID) Minimum length: 1 |
line_items | array | Required within parent | Line items for the vendor bill |
line_items[] | Model | Each item | Expand Create Vendor Bill — request body — body data line items item |
reference | string | Required within parent | Vendor bill reference Maximum length: 100 Minimum length: 1 |
subsidiary_id | string | Required within parent | Unique identifier for the Deel legal entity/subsidiary |
subtotal | number | Required within parent | Subtotal amount excluding VAT Format: double |
vendor_id | string | Required within parent | Unique identifier for the Vendor |
Referenced models: Create Vendor Bill — request body — body data line items item
Create Vendor Bill — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Create Vendor Bill — 201 response body — data |
Referenced models: Create Vendor Bill — 201 response body — data
Create Vendor Bill — request body — body data line items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | number | Required within parent | Total amount for this line item Format: double |
department_id | string | Optional | Unique Identifier for the Financial department |
description | string | Required within parent | Description of the line item Minimum length: 1 |
expense_account_id | string | Optional | Unique Identifier for the Expense account |
quantity | number | Required within parent | Quantity of items Format: double |
unit_price | number | Required within parent | Price per unit Format: double |
vat_amount | number | Optional | VAT amount for this line item Format: double |
vat_code | string | Optional | VAT Code name |
vat_rate | number | Required within parent | VAT rate percentage Format: double Minimum: 0 |
Create Vendor Bill — 201 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | number | Alternative | Total amount including VAT Format: double |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created_at | string | Required within parent | Creation timestamp Format: date-time |
currency | string | Required within parent | ISO 4217 currency code |
date | string | Required within parent | Invoice/bill date Format: date |
description | string | Required within parent | General description of the vendor bill |
due_date | string | Required within parent | Due date for payment Format: date |
exchange_rate | JSON | Required within parent | |
exchange_rate (anyOf 1) | JSON | Alternative | |
exchange_rate (anyOf 1) (anyOf 1) | number | Alternative | Exchange rate to USD Format: double |
exchange_rate (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
exchange_rate (anyOf 2) | null | Alternative | Exchange rate to USD Format: double |
external_id | string | Required within parent | External system identifier (e.g., Brightflag ID) |
id | string | Required within parent | Unique identifier for the vendor in the treasury system Format: uuid |
is_active | boolean | Required within parent | Whether the vendor bill is active |
line_items | array | Required within parent | Line items for the vendor bill |
line_items[] | Model | Each item | Expand Create Vendor Bill — 201 response body — data line items item |
reference | string | Required within parent | Vendor bill reference |
subsidiary_id | string | Required within parent | Unique identifier for the Deel legal entity/subsidiary |
subtotal | JSON | Required within parent | |
subtotal (anyOf 1) | number | Alternative | Subtotal amount excluding VAT Format: double |
subtotal (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updated_at | string | Required within parent | Last update timestamp Format: date-time |
vendor_id | string | Required within parent | Vendor ID |
Referenced models: Create Vendor Bill — 201 response body — data line items item
Create Vendor Bill — 201 response body — data line items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | number | Alternative | Total amount for this line item Format: double |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created_at | string | Required within parent | Creation timestamp Format: date-time |
department_id | JSON | Optional | |
department_id (anyOf 1) | string | Alternative | Unique identifier for the Financial department |
department_id (anyOf 2) | null | Alternative | Unique identifier for the Financial department |
description | string | Required within parent | Description of the line item |
expense_account_id | JSON | Optional | |
expense_account_id (anyOf 1) | string | Alternative | Unique identifier for the expense account |
expense_account_id (anyOf 2) | null | Alternative | Unique identifier for the expense account |
id | string | Required within parent | Unique identifier of the line item Format: uuid |
quantity | JSON | Required within parent | |
quantity (anyOf 1) | number | Alternative | Quantity of items Format: double |
quantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
unit_price | JSON | Required within parent | |
unit_price (anyOf 1) | number | Alternative | Price per unit Format: double |
unit_price (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updated_at | string | Required within parent | Last update timestamp Format: date-time |
vat_amount | JSON | Required within parent | |
vat_amount (anyOf 1) | number | Alternative | VAT amount for this line item Format: double |
vat_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
vat_code | JSON | Optional | |
vat_code (anyOf 1) | string | Alternative | VAT code name |
vat_code (anyOf 2) | null | Alternative | VAT code name |
vat_rate | JSON | Required within parent | |
vat_rate (anyOf 1) | number | Alternative | VAT rate percentage Format: double |
vat_rate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
vendor_bill_id | string | Required within parent | Reference to parent vendor bill Format: uuid |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.treasury_createvendorbill_v2026_01_01. Catalog operation: treasury_createvendorbill_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: ["treasury-vendorbill:write"]
Pinned headers: {"X-Version": "2026-01-01"}