POST api/Promotion/CheckPromotionProgram
Request Information
URI Parameters
None.
Body Parameters
CheckPromotionRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| CustomerOid | globally unique identifier |
None. |
|
| Code | string |
None. |
|
| ApplyForEnvironment | ApplyForEnvironmentEnum |
None. |
|
| TenantRefOid | globally unique identifier |
None. |
|
| DeliveringType | POSDeliveringType |
None. |
|
| OrderAmount | decimal number |
None. |
|
| OrderDetails | Collection of OrderDetail |
None. |
|
| IsInvalid | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"CustomerOid": "4b5e3d58-939c-484d-8ce6-664d20ab1b20",
"Code": "sample string 2",
"ApplyForEnvironment": 0,
"TenantRefOid": "666c4e9b-6ac4-492b-94ea-e5803025027a",
"DeliveringType": 0,
"OrderAmount": 1.0,
"OrderDetails": [
{
"ProductId": "sample string 1",
"ItemRefOid": "sample string 2",
"Price": 3.0,
"Quantity": 4.0
},
{
"ProductId": "sample string 1",
"ItemRefOid": "sample string 2",
"Price": 3.0,
"Quantity": 4.0
}
],
"IsInvalid": false
}
application/xml, text/xml
Sample:
<CheckPromotionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NASDMS.KCoffeeMobile.Api.Models.Promotion">
<ApplyForEnvironment>All</ApplyForEnvironment>
<Code>sample string 2</Code>
<CustomerOid>4b5e3d58-939c-484d-8ce6-664d20ab1b20</CustomerOid>
<DeliveringType>NA</DeliveringType>
<OrderAmount>1</OrderAmount>
<OrderDetails>
<OrderDetail>
<ItemRefOid>sample string 2</ItemRefOid>
<Price>3</Price>
<ProductId>sample string 1</ProductId>
<Quantity>4</Quantity>
</OrderDetail>
<OrderDetail>
<ItemRefOid>sample string 2</ItemRefOid>
<Price>3</Price>
<ProductId>sample string 1</ProductId>
<Quantity>4</Quantity>
</OrderDetail>
</OrderDetails>
<TenantRefOid>666c4e9b-6ac4-492b-94ea-e5803025027a</TenantRefOid>
</CheckPromotionRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
CheckPromotionResult| Name | Description | Type | Additional information |
|---|---|---|---|
| PromotionOid | globally unique identifier |
None. |
|
| PromotionTypeName | string |
None. |
|
| GiftCode | string |
None. |
|
| StatusCode | string |
None. |
|
| TotalDiscountRate | decimal number |
None. |
|
| MaximumDiscountAmount | decimal number |
None. |
|
| DiscountItems | Collection of DiscountItem |
None. |
Response Formats
application/json, text/json
Sample:
{
"PromotionOid": "aab2b9a9-77be-41dc-9d35-2111230604be",
"PromotionTypeName": "sample string 1",
"GiftCode": "sample string 2",
"StatusCode": "sample string 3",
"TotalDiscountRate": 4.0,
"MaximumDiscountAmount": 5.0,
"DiscountItems": [
{
"ProductId": "sample string 1",
"ItemRefOid": "sample string 2",
"DiscountPercentage": 3.0,
"PriceAfterDiscount": 4.0,
"Quantity": 5.0
},
{
"ProductId": "sample string 1",
"ItemRefOid": "sample string 2",
"DiscountPercentage": 3.0,
"PriceAfterDiscount": 4.0,
"Quantity": 5.0
}
]
}
application/xml, text/xml
Sample:
<CheckPromotionResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NASDMS.KCoffeeMobile.Api.Models.Promotion">
<DiscountItems>
<DiscountItem>
<DiscountPercentage>3</DiscountPercentage>
<ItemRefOid>sample string 2</ItemRefOid>
<PriceAfterDiscount>4</PriceAfterDiscount>
<ProductId>sample string 1</ProductId>
<Quantity>5</Quantity>
</DiscountItem>
<DiscountItem>
<DiscountPercentage>3</DiscountPercentage>
<ItemRefOid>sample string 2</ItemRefOid>
<PriceAfterDiscount>4</PriceAfterDiscount>
<ProductId>sample string 1</ProductId>
<Quantity>5</Quantity>
</DiscountItem>
</DiscountItems>
<GiftCode>sample string 2</GiftCode>
<MaximumDiscountAmount>5</MaximumDiscountAmount>
<PromotionOid>aab2b9a9-77be-41dc-9d35-2111230604be</PromotionOid>
<PromotionTypeName>sample string 1</PromotionTypeName>
<StatusCode>sample string 3</StatusCode>
<TotalDiscountRate>4</TotalDiscountRate>
</CheckPromotionResult>