POST api/sertcard/PurchaseStatus

Проверка подарочного сертификата на возможность его продажи или возврата

Request Information

URI Parameters

None.

Body Parameters

PurchaseStatusRequest
NameDescriptionTypeAdditional information
PosCode

Код торговой точки

string

None.

SertCard

Номер сертификата

integer

None.

Refund

Признак проверки проведения возврата

boolean

None.

Operator

Идентификатор оператора программы лояльности

integer

None.

Token

Токен пользователя, который инициирует данный запрос

integer

None.

SiteCode

Уникальный код виджета по продаже подарочных сертификатов, который инициирует запрос

string

None.

Request Formats

application/json, text/json

Sample:
{
  "PosCode": "sample string 1",
  "SertCard": 1,
  "Refund": true,
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 2"
}

application/xml, text/xml

Sample:
<PurchaseStatusRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.SertCardRequest">
  <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 2</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <PosCode>sample string 1</PosCode>
  <Refund>true</Refund>
  <SertCard>1</SertCard>
</PurchaseStatusRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

PurchaseStatusResponse
NameDescriptionTypeAdditional information
AllowPurchase

Признак разрешения на продажу или на возврат (true = разрешено; false = не разрешено)

boolean

None.

ErrorCode

Код ошибки

integer

None.

Message

Сообщение об ошибке

string

None.

Response Formats

application/json, text/json

Sample:
{
  "AllowPurchase": true,
  "ErrorCode": 1,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<PurchaseStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.SertCardResponse">
  <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>
  <AllowPurchase>true</AllowPurchase>
</PurchaseStatusResponse>