POST api/sertcard/NumberFromGoods

Генерация номера сертификата на основании продажи товара типа "Сертификат"

Request Information

URI Parameters

None.

Body Parameters

NumberFromGoodsRequest
NameDescriptionTypeAdditional information
PosCode

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

string

None.

SertCardSeries

Идентификатор серии сертификатов

integer

None.

OrderNumber

Номер покупки/заказа, в рамках которого производится продажа сертификата

string

None.

Refund

Признак, что это чек возврата сертификата

boolean

None.

Client

Идентификатор участника программы, если покупку совершал участник программы

integer

None.

ClientIShop

Идентификатор клиентв в БД интернет-магазина/внешней системе

integer

None.

Email

E-mail пользователя, который купил сертификат

string

None.

Phone

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

integer

None.

ChequeId

Идентификатор чека покупки в БД mloyalty

integer

None.

Goods

Позиции товаров

Collection of NumberFromGoodsGood

None.

Operator

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

integer

None.

Token

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

integer

None.

SiteCode

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

string

None.

Request Formats

application/json, text/json

Sample:
{
  "PosCode": "sample string 1",
  "SertCardSeries": 1,
  "OrderNumber": "sample string 2",
  "Refund": true,
  "Client": 1,
  "ClientIShop": 1,
  "Email": "sample string 3",
  "Phone": 1,
  "ChequeId": 1,
  "Goods": [
    {
      "Id": 1,
      "Name": "sample string 1",
      "Quantity": 1,
      "Price": 1.0,
      "ItemCode": "sample string 2"
    },
    {
      "Id": 1,
      "Name": "sample string 1",
      "Quantity": 1,
      "Price": 1.0,
      "ItemCode": "sample string 2"
    }
  ],
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 4"
}

application/xml, text/xml

Sample:
<NumberFromGoodsRequest 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 4</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <ChequeId>1</ChequeId>
  <Client>1</Client>
  <ClientIShop>1</ClientIShop>
  <Email>sample string 3</Email>
  <Goods>
    <NumberFromGoodsRequest.NumberFromGoodsGood>
      <Id>1</Id>
      <ItemCode>sample string 2</ItemCode>
      <Name>sample string 1</Name>
      <Price>1</Price>
      <Quantity>1</Quantity>
    </NumberFromGoodsRequest.NumberFromGoodsGood>
    <NumberFromGoodsRequest.NumberFromGoodsGood>
      <Id>1</Id>
      <ItemCode>sample string 2</ItemCode>
      <Name>sample string 1</Name>
      <Price>1</Price>
      <Quantity>1</Quantity>
    </NumberFromGoodsRequest.NumberFromGoodsGood>
  </Goods>
  <OrderNumber>sample string 2</OrderNumber>
  <Phone>1</Phone>
  <PosCode>sample string 1</PosCode>
  <Refund>true</Refund>
  <SertCardSeries>1</SertCardSeries>
</NumberFromGoodsRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

NumberFromGoodsResponse
NameDescriptionTypeAdditional information
SertCards

Сертификаты

Collection of NumberFromGoodsSertCard

None.

ErrorCode

Код ошибки

integer

None.

Message

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

string

None.

Response Formats

application/json, text/json

Sample:
{
  "SertCards": [
    {
      "Number": 1,
      "SecretCode": "sample string 1",
      "Nominal": 1.0,
      "Remain": 1.0,
      "SertExpDate": "2022-08-16T23:16:54.210473+03:00",
      "SertCardStatus": "sample string 2",
      "SertCardStatusPurchase": "sample string 3",
      "AllowRefund": true,
      "AllowRefundPurchase": true,
      "AllowReuse": true
    },
    {
      "Number": 1,
      "SecretCode": "sample string 1",
      "Nominal": 1.0,
      "Remain": 1.0,
      "SertExpDate": "2022-08-16T23:16:54.210473+03:00",
      "SertCardStatus": "sample string 2",
      "SertCardStatusPurchase": "sample string 3",
      "AllowRefund": true,
      "AllowRefundPurchase": true,
      "AllowReuse": true
    }
  ],
  "ErrorCode": 1,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<NumberFromGoodsResponse 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>
  <SertCards>
    <NumberFromGoodsResponse.NumberFromGoodsSertCard>
      <AllowRefund>true</AllowRefund>
      <AllowRefundPurchase>true</AllowRefundPurchase>
      <AllowReuse>true</AllowReuse>
      <Nominal>1</Nominal>
      <Number>1</Number>
      <Remain>1</Remain>
      <SecretCode>sample string 1</SecretCode>
      <SertCardStatus>sample string 2</SertCardStatus>
      <SertCardStatusPurchase>sample string 3</SertCardStatusPurchase>
      <SertExpDate>2022-08-16T23:16:54.210473+03:00</SertExpDate>
    </NumberFromGoodsResponse.NumberFromGoodsSertCard>
    <NumberFromGoodsResponse.NumberFromGoodsSertCard>
      <AllowRefund>true</AllowRefund>
      <AllowRefundPurchase>true</AllowRefundPurchase>
      <AllowReuse>true</AllowReuse>
      <Nominal>1</Nominal>
      <Number>1</Number>
      <Remain>1</Remain>
      <SecretCode>sample string 1</SecretCode>
      <SertCardStatus>sample string 2</SertCardStatus>
      <SertCardStatusPurchase>sample string 3</SertCardStatusPurchase>
      <SertExpDate>2022-08-16T23:16:54.210473+03:00</SertExpDate>
    </NumberFromGoodsResponse.NumberFromGoodsSertCard>
  </SertCards>
</NumberFromGoodsResponse>