Ad-hoc add line item

Appends an owner-direct AD_HOC LineItem to the amendment bucket of a LineItemGroup that has not yet been finalized. The agreement bucket is reserved for the original deal at creation; everything added after lands in amendment. | authz_personas=[lig_org_operators] | (LineItemClientCreate1) -> (LineItemGroup1)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

line_item_group_idstringRequired

Request

This endpoint expects an object.
itemenumRequired

TODO - improve domain model notes here.

  • unified catalog for all TG types and other services, e.g. IoT tracking devices
  • some line items will match TG type more frequently
ratedoubleRequired
quantitydoubleRequired
schema_versionintegerOptionalDefaults to 1
commentsstringOptional<=524288 characters
unitsenumOptional
adjustmentdoubleOptional
adjustment_commentsstringOptional<=524288 characters

Response

Successful Response
schema_versioninteger
_idstring
owned_by_org_idstring

Must be a string starting with org_

task_group_idstring
order_idstring
order_short_idstring
order_off_chrt_reference_idstringformat: "^[A-Za-z0-9._~\-]{1,64}$"1-64 characters

Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, ’.’, ’_’, ’~’, ’-’ (RFC 3986 unreserved).

rate_sheet_idstring
agreement_line_item_idslist of strings
agreement_amountdoubleDefaults to 0
amendment_line_item_idslist of strings
amendment_amountdoubleDefaults to 0
pending_line_item_idslist of strings
pending_amountdoubleDefaults to 0
denied_line_item_idslist of strings
denied_amountdoubleDefaults to 0
line_item_group_s3_object_metadata_idslist of strings
statement_idstring
settlement_typeenum
payment_origin_org_idstring

Must be a string starting with org_

payment_origin_off_chrt_shipper_org_idstring
payment_destination_org_idstring

Must be a string starting with org_

payment_destination_off_chrt_provider_org_idstring
payment_destination_driver_idstring
statusenum

LineItemGroup lifecycle.

The pre-FINALIZED window is a single STAGED state — operators compose the bundle (add/remove owner ad-hoc into amendment, propose/approve/deny counterparty items) and then call finalize/v1 to lock it. Every state past STAGED is reached by a deliberate transition (finalize/v1, open_invoice/v1, sync routes).

The legacy PENDING_RATES, PENDING_CALCULATION, and ADJUSTABLE states were tied to the old auto-recalc-on-mutation hooks. Bucket amounts ARE kept in sync on every mutation today (see the “Amounts” section of the module docstring), but that’s a write-time invariant, not a status — modeling “is the amount fresh?” as LIG status duplicates information and was dropped 2026-05-03. The worklist principle (an empty agreement_line_item_ids bucket or an unfilled <vector>_line_item_group_id field IS the operator signal) makes the intermediate states redundant in any case.

finalized_at_timestampdatetime
finalized_by_user_idstring

Must be a string starting with user_

messageslist of objects

Errors

422
Line Item Groups Ad Hoc Add Line Item V1request Unprocessable Entity Error