Deel: Create an invoice adjustment
Deel invoiceAdjustments.createInvoiceAdjustment: arguments, response, policy and SDK examples.
← Invoice adjustments operations · Get started
Operation deel.invoiceadjustments_createinvoiceadjustment
Provider route: POST /invoice-adjustments. 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["invoiceAdjustments"]["createInvoiceAdjustment"]>[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.invoiceAdjustments.createInvoiceAdjustment(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.invoice_adjustments.create_invoice_adjustment(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.recurring | string | Optional | |
body | object | Optional | |
body.data | Model | Required within parent | Expand Create an invoice adjustment — request body — body data Payload attributes required to create one invoice adjustment with optional approval, preset, and grouping metadata. |
Referenced models: Create an invoice adjustment — 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 an invoice adjustment — 201 response body |
Referenced models: Create an invoice adjustment — 201 response body
Schemas
Section titled “Schemas”Create an invoice adjustment — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Payload attributes required to create one invoice adjustment with optional approval, preset, and grouping metadata. |
amount | number | Required within parent | Monetary amount to apply for this invoice adjustment, expressed in the contract currency as a positive number. Format: double Minimum: 0 |
contract_id | string | Required within parent | Unique Deel contract identifier (public id) that receives this invoice adjustment line item. |
date_submitted | string | Required within parent | Submission date in ISO-8601 short-date format (YYYY-MM-DD) used for filtering, reporting, and approvals. Format: date |
description | string | Required within parent | Detailed human-readable explanation that appears on invoices and audit records visible to both parties. Maximum length: 30000 |
group_key | string or null | Optional | When provided, invoice adjustments sharing the same group_key within the same payment cycle are merged into a single aggregated line item on the invoice. Requires is_auto_approved to be true. Maximum length: 300 |
hourly_report_preset_id | string or null | Optional | Identifier of an existing hourly report preset used to link standardized rate and scale metadata to this entry. Format: uuid |
is_auto_approved | boolean | Optional | When true, the created invoice adjustment skips manual approval and is approved immediately on creation. |
paymentCycleId | string or null | Optional | Public id (UUID) of the active payment cycle required when creating VAT-related invoice adjustment entries against a specific cycle. Format: uuid |
type | string | Required within parent | Invoice adjustment category that determines business rules and downstream invoicing behavior. One of: bonus, commission, deduction, expense, other, overtime, time_off, vat |
Create an invoice adjustment — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Create an invoice adjustment — 201 response body — data Container object with identifiers, status, and creation metadata for the newly created invoice adjustment. |
Referenced models: Create an invoice adjustment — 201 response body — data
Create an invoice adjustment — 201 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Container object with identifiers, status, and creation metadata for the newly created invoice adjustment. |
created | boolean | Required within parent | Indicates whether the invoice adjustment record was successfully created by this request. |
created_at | JSON | Optional | |
created_at (anyOf 1) | string | Alternative | ISO-8601 timestamp recording the exact moment the invoice adjustment was created in the system. Format: date-time |
created_at (anyOf 2) | null | Alternative | ISO-8601 timestamp recording the exact moment the invoice adjustment was created in the system. Format: date-time |
id | Model | Optional | Expand Create an invoice adjustment — 201 response body — data id Unique identifier returned for the created invoice adjustment resource after persistence succeeds. |
status | JSON | Optional | Current processing status assigned to the invoice adjustment after the create workflow finishes executing. |
status (anyOf 1) | string | Alternative | Current processing status assigned to the invoice adjustment after the create workflow finishes executing. Known values: approved, declined, new, not_payable, paid, pending, processing |
status (anyOf 2) | null | Alternative |
Referenced models: Create an invoice adjustment — 201 response body — data id
Create an invoice adjustment — 201 response body — data id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Unique identifier returned for the created invoice adjustment resource after persistence succeeds. |
$ (anyOf 1) | string | Alternative | |
$ (anyOf 2) | JSON | Alternative | |
$ (anyOf 2) (anyOf 1) | integer | Alternative | Format: int64 |
$ (anyOf 2) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.invoiceadjustments_createinvoiceadjustment. Catalog operation: invoiceadjustments_createinvoiceadjustment. 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: ["invoice-adjustments:write", "worker:write"]
Pinned headers: {"X-Version": "2026-01-01"}