POST api/cheque/RuleForCheque
Получение информации о правилах на покупки и правилах на события, которые сработали в чек, по идентификатору чека
Request Information
URI Parameters
None.
Body Parameters
RuleForChequeRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| ChequeId |
Идентификатор чека |
integer |
None. |
| ItemId |
Идентификатор позиции чека |
integer |
None. |
| Operator |
Идентификатор оператора программы лояльности |
integer |
None. |
| Token |
Токен пользователя, который инициирует данный запрос |
integer |
None. |
| SiteCode |
Уникальный код виджета по продаже подарочных сертификатов, который инициирует запрос |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"ChequeId": 1,
"ItemId": 1,
"Operator": 1,
"Token": 1,
"SiteCode": "sample string 1"
}
application/xml, text/xml
Sample:
<RuleForChequeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.ChequeRequest"> <Operator xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Operator> <SiteCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 1</SiteCode> <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token> <ChequeId>1</ChequeId> <ItemId>1</ItemId> </RuleForChequeRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
RuleForChequeResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ChequeRules |
Массив правил на покупки |
Collection of RuleForChequeChequeRuleRow |
None. |
| EventRules |
Массив правил на события |
Collection of RuleForChequeEventRuleRow |
None. |
| ErrorCode |
Код ошибки |
integer |
None. |
| Message |
Сообщение об ошибке |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"ChequeRules": [
{
"Id": 1,
"ChequeId": 1,
"Item": 1,
"ItemName": "sample string 1",
"Bonus": 1.0,
"ChequeRule": 1,
"ChequeRuleName": "sample string 2",
"ChequeRuleTypeName": "sample string 3",
"Discount": 1.0
},
{
"Id": 1,
"ChequeId": 1,
"Item": 1,
"ItemName": "sample string 1",
"Bonus": 1.0,
"ChequeRule": 1,
"ChequeRuleName": "sample string 2",
"ChequeRuleTypeName": "sample string 3",
"Discount": 1.0
}
],
"EventRules": [
{
"Id": 1,
"ChequeId": 1,
"EventRule": 1,
"EventRuleName": "sample string 1",
"EventRuleTypeName": "sample string 2",
"Bonus": 1.0,
"Discount": 1.0
},
{
"Id": 1,
"ChequeId": 1,
"EventRule": 1,
"EventRuleName": "sample string 1",
"EventRuleTypeName": "sample string 2",
"Bonus": 1.0,
"Discount": 1.0
}
],
"ErrorCode": 1,
"Message": "sample string 2"
}
application/xml, text/xml
Sample:
<RuleForChequeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.ChequeResponse">
<ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</ErrorCode>
<Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 2</Message>
<ChequeRules>
<RuleForChequeResponse.RuleForChequeChequeRuleRow>
<Bonus>1</Bonus>
<ChequeId>1</ChequeId>
<ChequeRule>1</ChequeRule>
<ChequeRuleName>sample string 2</ChequeRuleName>
<ChequeRuleTypeName>sample string 3</ChequeRuleTypeName>
<Discount>1</Discount>
<Id>1</Id>
<Item>1</Item>
<ItemName>sample string 1</ItemName>
</RuleForChequeResponse.RuleForChequeChequeRuleRow>
<RuleForChequeResponse.RuleForChequeChequeRuleRow>
<Bonus>1</Bonus>
<ChequeId>1</ChequeId>
<ChequeRule>1</ChequeRule>
<ChequeRuleName>sample string 2</ChequeRuleName>
<ChequeRuleTypeName>sample string 3</ChequeRuleTypeName>
<Discount>1</Discount>
<Id>1</Id>
<Item>1</Item>
<ItemName>sample string 1</ItemName>
</RuleForChequeResponse.RuleForChequeChequeRuleRow>
</ChequeRules>
<EventRules>
<RuleForChequeResponse.RuleForChequeEventRuleRow>
<Bonus>1</Bonus>
<ChequeId>1</ChequeId>
<Discount>1</Discount>
<EventRule>1</EventRule>
<EventRuleName>sample string 1</EventRuleName>
<EventRuleTypeName>sample string 2</EventRuleTypeName>
<Id>1</Id>
</RuleForChequeResponse.RuleForChequeEventRuleRow>
<RuleForChequeResponse.RuleForChequeEventRuleRow>
<Bonus>1</Bonus>
<ChequeId>1</ChequeId>
<Discount>1</Discount>
<EventRule>1</EventRule>
<EventRuleName>sample string 1</EventRuleName>
<EventRuleTypeName>sample string 2</EventRuleTypeName>
<Id>1</Id>
</RuleForChequeResponse.RuleForChequeEventRuleRow>
</EventRules>
</RuleForChequeResponse>