API version: unstable
API version: 2021-04 Release candidate
API version: 2021-01 Latest
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

orderEditAddLineItemDiscount mutation

Version unstable

Add a discount to an item added during this order edit.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
discount ( OrderEditAppliedDiscountInput! ) required

The discount to apply to the line item.

id ( ID! ) required

The ID of the calculated order to add the discount to.

lineItemId ( ID! ) required

The ID of a line item added during this edit to add the discount to.

OrderEditAppliedDiscountInput fields

  • description (String)

    The description of the discount.

  • fixedValue (MoneyInput)

    The value of the discount as a fixed amount.

  • percentValue (Float)

    The value of the discount as a percentage.

Return fields

Version 2021-04 (Release candidate)

Add a discount to an item added during this order edit.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
discount ( OrderEditAppliedDiscountInput! ) required

The discount to apply to the line item.

id ( ID! ) required

The ID of the calculated order to add the discount to.

lineItemId ( ID! ) required

The ID of a line item added during this edit to add the discount to.

OrderEditAppliedDiscountInput fields

  • description (String)

    The description of the discount.

  • fixedValue (MoneyInput)

    The value of the discount as a fixed amount.

  • percentValue (Float)

    The value of the discount as a percentage.

Return fields

Version 2021-01 (Latest)

Add a discount to an item added during this order edit.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
discount ( OrderEditAppliedDiscountInput! ) required

The discount to apply to the line item.

id ( ID! ) required

The ID of the calculated order to add the discount to.

lineItemId ( ID! ) required

The ID of a line item added during this edit to add the discount to.

OrderEditAppliedDiscountInput fields

  • description (String)

    The description of the discount.

  • fixedValue (MoneyInput)

    The value of the discount as a fixed amount.

  • percentValue (Float)

    The value of the discount as a percentage.

Return fields

Version 2020-10

Add a discount to an item added during this order edit.

Required access

write_order_edits access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
discount ( OrderEditAppliedDiscountInput! ) required

The discount to apply to the line item.

id ( ID! ) required

The ID of the calculated order to add the discount to.

lineItemId ( ID! ) required

The ID of a line item added during this edit to add the discount to.

OrderEditAppliedDiscountInput fields

  • description (String)

    The description of the discount.

  • fixedValue (MoneyInput)

    The value of the discount as a fixed amount.

  • percentValue (Float)

    The value of the discount as a percentage.

Return fields