---
title: "Partially update the external references of the discount line item for a sales order"
method: PATCH
path: "/api/sales-orders/{salesOrderId}/discount-line-item"
tags: ["Sales Order Discount Line Item"]
---

# Partially update the external references of the discount line item for a sales order

`PATCH /api/sales-orders/{salesOrderId}/discount-line-item`

## Request

- Base URL: `https://api.fulcrumpro.com`
- URL: `https://api.fulcrumpro.com/api/sales-orders/{salesOrderId}/discount-line-item`
- Auth: none declared

Every operation must have a path at or beneath `/externalReferences`; the line's other members are left as
they are. A reference the patch keeps also keeps the members this API does not expose.

## Path parameters

- `salesOrderId` string, required

## Request body

- JsonPatchOperation[]: Array of operations to perform
  - `op` string
  - `value` unknown
  - `path` string
  - `from` string: Source path — present for move/copy operations, absent otherwise.

## Response `200`

Discount line item

- SalesOrderDiscountLineItemDto: Represents a discount line item on a sales order.
  - `id` string, required: Unique id associated to this entity.
  - `name` string, required: The name of the discount line.
  - `description` string, nullable: The name of the discount line.
  - `isPercentage` boolean, required: Indicates whether FulcrumProduct.PublicApi.Dto.SalesOrder.DiscountLineItem.DiscountLineItemDto.Amount discount is percentage based (else, it's an absolute amount).
  - `amount` number, double, required: The amount of the discount.
  - `externalReferences` object, nullable: Arbitrary key-value-pair like data that can be used to later on search for this line item.
  - `absoluteAmount` number, double, nullable: The absolute amount of the discount.
  - `number` integer: Line number
  - `accountingDetails` CommonAccountingDetailsDto, required: An object that contains all accounting details.
    - `classId` string, nullable: Item class identifier. Please reference /api/item-classes endpoint.
    - `incomeAccountId` string, nullable: Income account (chart of accounts) key identifier. Please reference /api/chart-of-accounts endpoint.
    - `assetAccountId` string, nullable: Asset account (chart of accounts) key identifier. Please reference /api/chart-of-accounts endpoint.
    - `expenseAccountId` string, nullable: Expense account (chart of accounts) key identifier. Please reference /api/chart-of-accounts endpoint.
    - `cogsAccountId` string, nullable: COGS account (chart of accounts) key identifier. Please reference /api/chart-of-accounts endpoint.
  - `price` number, double, nullable: The calculated amount of this discount.

## Other responses

- `400`: An operation's path is outside the external references, or the patch could not be applied — an unknown path, an unsupported operation, or a value the target field cannot hold
- `404`: Sales order or discount line item did not exist

## Changes

- **2026-10-22** `11a78375baed`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fulcrumpro/apis/fulcrum-publicapi/changes/api/sales-orders/:salesOrderId/discount-line-item/patch.md)

---

[API](https://skmtc.dev/fulcrumpro/apis/fulcrum-publicapi.md) - [All operations](https://skmtc.dev/fulcrumpro/apis/fulcrum-publicapi/llms.txt) - [OpenAPI document](https://skmtc.dev/fulcrumpro/apis/fulcrum-publicapi/revisions/c9e6f41852d1?raw)
