For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update order discount

Update order discount

Required permissions: SALES_ORDER,RETURN_ORDER

put
/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/discounts/{orderDiscountUid}
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
storeUidstringRequired

Reference to a Store.

Pattern: ^[A-Za-z0-9-_]+
orderUidstringRequired

Reference to an Order.

Pattern: ^[A-Za-z0-9-_]+
orderDiscountUidstringRequired

Reference to an order discount.

Pattern: ^[A-Za-z0-9-_]+
Body
discountCodestringOptional
typestring · enumOptionalPossible values:
amountintegerOptional
originstring · enumOptionalPossible values:
namestringOptional
productSkusstring[]Optional
validTostring · date-timeOptional
maxUsageintegerOptional
orderItemUidstringOptionalPattern: ^[A-Za-z0-9-_]*
discountReasonCodestringOptional
discountReferencestringOptional
Responses
200

Example response

application/json
orderDiscountUidstringRequiredPattern: ^[A-Za-z0-9-_]+
discountCodestringRequired
typestring · enumRequiredPossible values:
amountintegerRequired
namestringRequired
originstring · enumRequiredPossible values:
validTostring · date-timeRequired
maxUsageintegerRequired
productSkusstring[]Required
orderItemUidsstring[]Required
externalTransactionIdstringRequired
scopestring · enumRequiredPossible values:
discountReasonCodestringRequired
discountReferencestringRequired
createdAtstring · date-timeRequired
createdBystringRequired
lastModifiedAtstring · date-timeRequired
lastModifiedBystringRequired
campaignUidstringRequiredPattern: ^[A-Za-z0-9-_]*
put/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/discounts/{orderDiscountUid}
PUT /v2/tenants/{tenantUid}/stores/{storeUid}/orders/{orderUid}/discounts/{orderDiscountUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 237

{
  "discountCode": "text",
  "type": "PERCENTAGE",
  "amount": 1,
  "origin": "LOYALTY",
  "name": "text",
  "productSkus": [
    "text"
  ],
  "validTo": "2026-01-01T00:00:00.000Z",
  "maxUsage": 1,
  "orderItemUid": "text",
  "discountReasonCode": "text",
  "discountReference": "text"
}
200

Example response

{
  "orderDiscountUid": "text",
  "discountCode": "text",
  "type": "PERCENTAGE",
  "amount": 1,
  "name": "text",
  "origin": "LOYALTY",
  "validTo": "2026-01-01T00:00:00.000Z",
  "maxUsage": 1,
  "productSkus": [
    "text"
  ],
  "orderItemUids": [
    "text"
  ],
  "externalTransactionId": "text",
  "scope": "WHOLE_ORDER",
  "discountReasonCode": "text",
  "discountReference": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "createdBy": "text",
  "lastModifiedAt": "2026-01-01T00:00:00.000Z",
  "lastModifiedBy": "text",
  "campaignUid": "text"
}

Last updated

Was this helpful?