Skip to main content
POST
Convert a shipped order to company use

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.

Headers

Idempotency-Key
string

Client-generated unique key for idempotent POST/PATCH/DELETE operations. Alias for the Idempotency parameter. Max 255 chars. On retry with the same key, the original response is returned without re-executing the operation. Keys expire after 24 hours. A second request with the same key sent while the first is still running waits for it and returns its answer; if the first is still running after 20 seconds the second answers 409 idempotency_key_in_use (retryable, nothing done). An answer carrying retryable: true is not cached. Reusing a key with a different request body answers 409 idempotency_key_collision (nothing done; send the new request with a fresh key). The replay, the wait and these two 409 codes come from the idempotency layer, so they apply to the operations that run it, each of which can answer the two codes whether or not its own 409 response lists them. The handlers of these operations take the header but do not run the layer, so on them the key neither replays nor answers either code: createPaymentPlan, chargePaymentPlanInstallment, setProductLocations, updateOrder, emailOrder, updateOrderItem, confirmPickup, markOrderNoShow, applyExistingPaymentToInvoices, updatePackage, movePackageItem, changePackageBox, changePackageCarrier, voidPackageLabel, printPackageLabel, emailPackage, setProNumberV1, setPackageProNumber, sendPurchaseOrderToVendorV1, notifyRevisionPurchaseOrderV1, addMaintenanceLog, generateBOLV1, createReportJobV1 and customerAcknowledgeRevision; recordVendorPrepaymentV1 and recordCustomerDepositV1 hand the key to their own write instead.

Maximum string length: 255

Path Parameters

id
string<uuid>
required

Body

application/json
notes
string
required

Why these goods went to the company (required). Kept on the order and on every entry.

Maximum string length: 400
entry_date
string<date>

The day the entries post (default today). On or after the order's ship date and never after today; the posting-date window and closed periods apply.

backdate_reason
string

The reason that allows an entry_date before the posting-date window, for a user who may override it.

gl_account_id
string<uuid>

The expense account the cost moves to. Omitted: the company-use account set in Settings > AR & Invoicing. A value other than that default is refused 403 company_use_account_choice_requires_user for an API key.

accrue_use_tax
boolean
default:false

Also accrue use tax on the cost: debit the same expense account and credit the liability.

use_tax_rate
number

The use tax rate in percent, above 0 and at most 25. Omitted: the entity's rate at the shipping warehouse, else the rate the order was taxed at.

use_tax_account_id
string<uuid>

The liability the use tax is credited to. Omitted: sales tax payable. Any other value is refused 403 company_use_account_choice_requires_user for an API key.

notify_customer
boolean
default:false

Email the customer that the invoice is voided.

expect
object

The order as the caller last read it. When a named field has changed the endpoint returns 409 company_use_pre_image_moved and changes nothing.

Response

The order is converted. The dry run (POST /orders/{id}/company-use/dry-run) answers the same shape with dry_run true.

data
object