POST api/goods/GoodsDataAction

Получение информации по товару: свойства, склады, изображения и изменение их видимости (отображение) или удаление

Request Information

URI Parameters

None.

Body Parameters

GoodsDataActionRequest
NameDescriptionTypeAdditional information
CatalogId

Идентификатор каталога, по товару которого идёт запрос

integer

None.

GoodId

Идентификатор товара, по данным которого нужно произвести действия

integer

None.

Shown

Команда: отображать запись

boolean

None.

NoShown

Команда: не отображать запись

boolean

None.

Delete

Команда: удалить запись

boolean

None.

GoodsPropertyId

Идентификатор записи для действия: свойство товара

integer

None.

GoodsPriceRemainId

Идентификатор записи для действия: остаток/цена товара на складе

integer

None.

GoodsImagesId

Идентификатор записи для действия: изображение товара

integer

None.

Operator

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

integer

None.

Token

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

integer

None.

SiteCode

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

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CatalogId": 1,
  "GoodId": 1,
  "Shown": true,
  "NoShown": true,
  "Delete": true,
  "GoodsPropertyId": 1,
  "GoodsPriceRemainId": 1,
  "GoodsImagesId": 1,
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 1"
}

application/xml, text/xml

Sample:
<GoodsDataActionRequest 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 1</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <CatalogId>1</CatalogId>
  <Delete>true</Delete>
  <GoodId>1</GoodId>
  <GoodsImagesId>1</GoodsImagesId>
  <GoodsPriceRemainId>1</GoodsPriceRemainId>
  <GoodsPropertyId>1</GoodsPropertyId>
  <NoShown>true</NoShown>
  <Shown>true</Shown>
</GoodsDataActionRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

GoodsDataActionResponse
NameDescriptionTypeAdditional information
GoodMobileShown

Признак текущего отображения товара моб. приложении

boolean

None.

Properties

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

Collection of GoodsDataActionProperty

None.

Storages

Массив складов, на которых есть товар

Collection of GoodsDataActionStorage

None.

Images

Массив изображений товаров

Collection of GoodsDataActionImage

None.

ErrorCode

Код ошибки

integer

None.

Message

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

string

None.

Response Formats

application/json, text/json

Sample:
{
  "GoodMobileShown": true,
  "Properties": [
    {
      "Id": 1,
      "GoodsPropertyId": 1,
      "GoodsCatalogPropertyName": "sample string 1",
      "GoodsCatalogPropertyItemsName": "sample string 2"
    },
    {
      "Id": 1,
      "GoodsPropertyId": 1,
      "GoodsCatalogPropertyName": "sample string 1",
      "GoodsCatalogPropertyItemsName": "sample string 2"
    }
  ],
  "Storages": [
    {
      "Id": 1,
      "GoodsPriceRemainId": 1,
      "StoragesName": "sample string 1",
      "StoragesId": "sample string 2",
      "Price": 1.0,
      "Remain": 1.0
    },
    {
      "Id": 1,
      "GoodsPriceRemainId": 1,
      "StoragesName": "sample string 1",
      "StoragesId": "sample string 2",
      "Price": 1.0,
      "Remain": 1.0
    }
  ],
  "Images": [
    {
      "Id": 1,
      "GoodsImagesId": 1,
      "UrlImage": "sample string 1"
    },
    {
      "Id": 1,
      "GoodsImagesId": 1,
      "UrlImage": "sample string 1"
    }
  ],
  "ErrorCode": 1,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<GoodsDataActionResponse 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">1</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 2</Message>
  <GoodMobileShown>true</GoodMobileShown>
  <Images>
    <GoodsDataActionResponse.GoodsDataActionImage>
      <GoodsImagesId>1</GoodsImagesId>
      <Id>1</Id>
      <UrlImage>sample string 1</UrlImage>
    </GoodsDataActionResponse.GoodsDataActionImage>
    <GoodsDataActionResponse.GoodsDataActionImage>
      <GoodsImagesId>1</GoodsImagesId>
      <Id>1</Id>
      <UrlImage>sample string 1</UrlImage>
    </GoodsDataActionResponse.GoodsDataActionImage>
  </Images>
  <Properties>
    <GoodsDataActionResponse.GoodsDataActionProperty>
      <GoodsCatalogPropertyItemsName>sample string 2</GoodsCatalogPropertyItemsName>
      <GoodsCatalogPropertyName>sample string 1</GoodsCatalogPropertyName>
      <GoodsPropertyId>1</GoodsPropertyId>
      <Id>1</Id>
    </GoodsDataActionResponse.GoodsDataActionProperty>
    <GoodsDataActionResponse.GoodsDataActionProperty>
      <GoodsCatalogPropertyItemsName>sample string 2</GoodsCatalogPropertyItemsName>
      <GoodsCatalogPropertyName>sample string 1</GoodsCatalogPropertyName>
      <GoodsPropertyId>1</GoodsPropertyId>
      <Id>1</Id>
    </GoodsDataActionResponse.GoodsDataActionProperty>
  </Properties>
  <Storages>
    <GoodsDataActionResponse.GoodsDataActionStorage>
      <GoodsPriceRemainId>1</GoodsPriceRemainId>
      <Id>1</Id>
      <Price>1</Price>
      <Remain>1</Remain>
      <StoragesId>sample string 2</StoragesId>
      <StoragesName>sample string 1</StoragesName>
    </GoodsDataActionResponse.GoodsDataActionStorage>
    <GoodsDataActionResponse.GoodsDataActionStorage>
      <GoodsPriceRemainId>1</GoodsPriceRemainId>
      <Id>1</Id>
      <Price>1</Price>
      <Remain>1</Remain>
      <StoragesId>sample string 2</StoragesId>
      <StoragesName>sample string 1</StoragesName>
    </GoodsDataActionResponse.GoodsDataActionStorage>
  </Storages>
</GoodsDataActionResponse>