Discounts

Update Discount

Update an existing discount lines for an existing orden

put/orders/{id}/discount_lines/{discount_lines_id}

Request

Path parameters

idstring required
Example:6307a60c41de27127515a575

Identifier of the resource

discount_lines_idstring required
Example:dis_lin_2tQ974hSHcsdeSZHG

discount line id identifier

Headers

Accept-Language'es' | 'en'

Use for knowing which language to use

X-Child-Company-Idstring

In the case of a holding company, the company id of the child company to which will process the request.

Request body

amountinteger
codestring

Discount code.

typestring

Example request

{
  "amount": 500,
  "code": "123",
  "type": "loyalty"
}

Response

successful

amountinteger required

The amount to be deducted from the total sum of all payments, in cents.

codestring required

Discount code.

typestring required

It can be 'loyalty', 'campaign', 'coupon' o 'sign'

idstring required

The discount line id

objectstring required

The object name

parent_idstring required

The order id

Example response

{
  "amount": 500,
  "code": "123",
  "type": "loyalty",
  "id": "dis_lin_2tQQ58HPgPw7StE8z",
  "object": "discount_line",
  "parent_id": "ord_2tPAmKCEJqh8RE6nY"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.