Update Sales Order Financial Line
PUT/api/sales-orders/:salesOrder/financial-lines/:financialLine
Updates a financial line on a sales order.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Returns true on success — the response body is literally the JSON boolean true, not the updated record. Re-read the line via the list endpoint to see the stored values.
Authentication: Requires Bearer token.
Request body fields (all optional on update — same meanings as on create):
- financial_line_type_id (integer): Existing financial line type.
- amount (number, min 0): Unit amount in the order currency.
- description (string): Display description.
- quantity (integer, min 1): Quantity.
- discount_rate (number, 0-1): Fractional discount applied to the extended amount.
- tax_allocation (number, min 0): Tax amount for the line; recomputed from tax_rate when not explicitly provided.
- tax_rate_id (integer): Existing tax rate.
- tax_rate (number, min 0): Tax percentage.
- allocate_to_products (boolean): Whether the line's value is prorated across product lines.
- proration_strategy (string): One of revenue_based, cost_based, weight_based, volume_based, quantity_based, specific_line, manual.
- allocate_to_id (integer), allocate_to_type (string): Target line when proration_strategy is specific_line.
- nominal_code_id (integer): Existing accounting nominal code.
Important — omitted nullable fields are cleared:
- If you do not send nominal_code_id, allocate_to_id, or allocate_to_type, they are reset to null on the line.
- Channel and external source references on the line (sales_channel_line_id, external_source_type, external_source_id) are also cleared by every update.
- Send every value you want to keep.
Path parameters:
- salesOrder (required): Sales order ID.
- financialLine (required): Financial line ID.
Requires permission: sales_orders.update
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.