Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
feat(checkout): CHECKOUT-7756 Update docs around item-level discount
Browse files Browse the repository at this point in the history
  • Loading branch information
valentindellangela committed Nov 21, 2023
1 parent 16bf158 commit 128d4f1
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions reference/checkouts.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1599,12 +1599,19 @@ paths:
description: |-
Adds a discount to an existing *checkout*.
This discount only applies to `line_items`. When you call this API, you clear out all existing discounts applied to line items, including product and order-based discounts.
This endpoint splits the discount between line items based on the item value.
Use this endpoint to apply the following discounts:
* Apply a manual discount to a cart. In this case, you can distribute the discount between each line items in the cart based on the item value.
* Apply a manual discount against a specific line item.
Apply a manual discount at the item level along with a cart level discount.
Notes:
* When you call this API, you clear out all existing discounts applied to line items, including product and order-based discounts.
* You cannot apply a manual discount against a specific line item if you have already applied a coupon/automatic promotion to this item.
Required Fields
* discounted_amount
* discounted_amount at the cart level or at the item level
operationId: post-store_hash-v3-checkouts-checkoutId-discounts
parameters:
- $ref: '#/components/parameters/storeHash'
Expand Down Expand Up @@ -1633,6 +1640,17 @@ paths:
name:
type: string
example: manual
line_items:
type: array
items:
type: object
properties:
id:
type: string
example: 8edef915-8e8e-4ebd-bece-31fbb1191a7e
discounted_amount:
type: number
example: 15
required: false
responses:
'200':
Expand Down

0 comments on commit 128d4f1

Please sign in to comment.