Update Charge Mapping
PUT/api/trackstar/integration-instances/:integration_instance/fee-mappings/:mapping
Edit a charge mapping. A display-name-only change takes effect immediately: nothing is re-attributed, and the descriptions of the cost lines already written are renamed. Changing the treatment, cost line type or cost entry type bumps the mapping version and queues re-attribution of that charge type's bills (tracked_job_log_id); affected_bills / affected_amount say how much it touches. Saving a charge type that needs review without moving it (a rename, or keeping its treatment) marks it reviewed (needs_review: false) and re-attributes nothing.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Treatments: order_freight (Shipping charges only), order_fee, return_fee, product_storage, po_receiving, unattributed, exclude. financial_line_type_id must be a cost line type. Requires the integrations.update permission.
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
Response Headers
Unprocessable Content
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.