POST api/goods/GoodlistAction

Добавление, изменение, получение информации о товарах в списке товаров, с пагинацией и фильтрами

Request Information

URI Parameters

None.

Body Parameters

GoodlistActionRequest
NameDescriptionTypeAdditional information
Name

Наименование списка товаров (для Create и Update)

string

None.

ActionType

Тип действия, которое необходимо произвести (Create, Update, Info, Delete)

string

None.

Active

Признак активации списка (для Update)

boolean

None.

NoActive

Признак деактивации списка (для Update)

boolean

None.

GoodsId

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

Collection of GoodlistActionGoodsIdStr

None.

GoodListId

Идентификатор списка который будут менять или в котором будут произодить изменения (для Update, Delete, Info)

integer

None.

Detail

Признак, что нужно вернуть селект с детализацией по товарам

boolean

None.

Start

Пагинация: от какой записи возвращать данные, включая указанную (для Info c detail = 1)

integer

None.

Length

Пагинация: количество записей, которые нужно вернуть (для Info c detail = 1)

integer

None.

GoodsName

Входной фильтр: наименование товара в списке товаров (для Info c detail = 1)

string

None.

Goods

Входной фильтр: идентификатор товара в списке товаров (для Info c detail = 1)

integer

None.

Operator

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

integer

None.

Token

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

integer

None.

SiteCode

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

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "ActionType": "sample string 2",
  "Active": true,
  "NoActive": true,
  "GoodsId": [
    {
      "Id": 1,
      "Goods": 1
    },
    {
      "Id": 1,
      "Goods": 1
    }
  ],
  "GoodListId": 1,
  "Detail": true,
  "Start": 1,
  "Length": 1,
  "GoodsName": "sample string 3",
  "Goods": 1,
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 4"
}

application/xml, text/xml

Sample:
<GoodlistActionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.GoodsRequest">
  <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>
  <ActionType>sample string 2</ActionType>
  <Active>true</Active>
  <Detail>true</Detail>
  <GoodListId>1</GoodListId>
  <Goods>1</Goods>
  <GoodsId>
    <GoodlistActionRequest.GoodlistActionGoodsIdStr>
      <Goods>1</Goods>
      <Id>1</Id>
    </GoodlistActionRequest.GoodlistActionGoodsIdStr>
    <GoodlistActionRequest.GoodlistActionGoodsIdStr>
      <Goods>1</Goods>
      <Id>1</Id>
    </GoodlistActionRequest.GoodlistActionGoodsIdStr>
  </GoodsId>
  <GoodsName>sample string 3</GoodsName>
  <Length>1</Length>
  <Name>sample string 1</Name>
  <NoActive>true</NoActive>
  <Start>1</Start>
</GoodlistActionRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

GoodlistActionResponse
NameDescriptionTypeAdditional information
GoodList

Идентификатор созданного списка товаров(для Create)

integer

None.

CountGoods

Количество товаров в списке

integer

None.

Caption

Наименование списка товара (для Info)

string

None.

ProcTime

Дата и время создания списка (для Info)

date

None.

GoodListActive

Статус активности списка товаров, с точки зрения отображения в ЛК (для Info)

boolean

None.

TotalRows

Количество записей всего (для Info c detail = 1)

integer

None.

TotalRowsSelect

Количество записей в запросе (для Info c detail = 1)

integer

None.

Goods

Массив товаров

Collection of GoodlistActionGoodsStr

None.

ErrorCode

Код ошибки

integer

None.

Message

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

string

None.

Response Formats

application/json, text/json

Sample:
{
  "GoodList": 1,
  "CountGoods": 1,
  "Caption": "sample string 1",
  "ProcTime": "2024-04-29T17:54:32.0765426+03:00",
  "GoodListActive": true,
  "TotalRows": 1,
  "TotalRowsSelect": 1,
  "Goods": [
    {
      "Id": 1,
      "Goods": 1,
      "Name": "sample string 1",
      "Guid": "sample string 2",
      "Partner": 1,
      "PartnerName": "sample string 3",
      "GoodsCatalogPosition": 1,
      "GoodsCatalogName": "sample string 4"
    },
    {
      "Id": 1,
      "Goods": 1,
      "Name": "sample string 1",
      "Guid": "sample string 2",
      "Partner": 1,
      "PartnerName": "sample string 3",
      "GoodsCatalogPosition": 1,
      "GoodsCatalogName": "sample string 4"
    }
  ],
  "ErrorCode": 2,
  "Message": "sample string 3"
}

application/xml, text/xml

Sample:
<GoodlistActionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.GoodsResponse">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">2</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 3</Message>
  <Caption>sample string 1</Caption>
  <CountGoods>1</CountGoods>
  <GoodList>1</GoodList>
  <GoodListActive>true</GoodListActive>
  <Goods>
    <GoodlistActionResponse.GoodlistActionGoodsStr>
      <Goods>1</Goods>
      <GoodsCatalogName>sample string 4</GoodsCatalogName>
      <GoodsCatalogPosition>1</GoodsCatalogPosition>
      <Guid>sample string 2</Guid>
      <Id>1</Id>
      <Name>sample string 1</Name>
      <Partner>1</Partner>
      <PartnerName>sample string 3</PartnerName>
    </GoodlistActionResponse.GoodlistActionGoodsStr>
    <GoodlistActionResponse.GoodlistActionGoodsStr>
      <Goods>1</Goods>
      <GoodsCatalogName>sample string 4</GoodsCatalogName>
      <GoodsCatalogPosition>1</GoodsCatalogPosition>
      <Guid>sample string 2</Guid>
      <Id>1</Id>
      <Name>sample string 1</Name>
      <Partner>1</Partner>
      <PartnerName>sample string 3</PartnerName>
    </GoodlistActionResponse.GoodlistActionGoodsStr>
  </Goods>
  <ProcTime>2024-04-29T17:54:32.0765426+03:00</ProcTime>
  <TotalRows>1</TotalRows>
  <TotalRowsSelect>1</TotalRowsSelect>
</GoodlistActionResponse>