GET api/Search?userGuid={userGuid}&ApiKey={ApiKey}&Article={Article}&Brand={Brand}&Sources[0]={Sources[0]}&Sources[1]={Sources[1]}&includeAnalogs={includeAnalogs}&ContragentGuid={ContragentGuid}

Поиск по бренду и артикулу. Возвращает цены и наличие

Информация о запросе

URI параметры

ИмяОписаниеТипДополнительная информация
userGuid

Ваш UserGuid

globally unique identifier

Required

ApiKey

Ваш ApiKey

string

Required

Article

Артикул

string

Required

Brand

Бренд

string

Required

Sources

Массив источников товаров 1 - Товары в наличии на складах Phaeton 2 - Товары локальных поставщиков 3 - Товары удаленных поставщиков

Коллекция ProdutsSource

Required

includeAnalogs

Включить аналоги в результат (если в Sources задано значение 3, то аналоги будут включены в любом случае)

boolean

Default value is True

ContragentGuid

Guid контрагента, если не задан будет использован контрагент пользователя по умолчанию

globally unique identifier

Нет.

Параметры тела запроса

Нет.

Пример запроса

/api/Search?Article=1002101&Brand=LEMFORDER&Sources[]=1&Sources[]=2&Sources[]=3&includeAnalogs=true&UserGuid=00000000-0000-0000-0000-000000000000&ApiKey=dss333dddd333

Информация об ответе

Описание ресурсов

Возвращает список найденных товаров

SearchProductResponse
ИмяОписаниеТипДополнительная информация
Items

Список товаров

Коллекция ProductItem

Нет.

IsError

Указывает завершился ли запрос с ошибкой или нет

boolean

Нет.

ErrorMessage

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

string

Нет.

Форматы ответа

application/json, text/json

Пример:
{
  "Items": [
    {
      "CleanArticle": "sample string 1",
      "Presence": "sample string 2",
      "Price": 3,
      "CurrencyCode": "sample string 4",
      "ExpectedShipmentDays": 5,
      "GuaranteedShipmentDays": 6,
      "CountInPack": 7,
      "WarehouseId": "729ad741-d6a4-4fcd-8364-bac0c80ec844",
      "Warehouse": "sample string 9",
      "Unit": "sample string 10",
      "CategoryId": "4cd08c92-2986-438e-9b9f-bfef0a21f8af",
      "ItemId": "29b10cef-35f5-4e64-b1cf-88090b6e461b",
      "Discount": "sample string 13",
      "TotalDiscount": 14,
      "PriceWithoutDiscount": 15,
      "IsnotProduced": "sample string 16",
      "AvailableCount": 17,
      "SupplierCode": "sample string 18",
      "ExpectedDelivery": 1,
      "GuaranteedDelivery": 1,
      "DeliveryProbability": 1.1,
      "Brand": "sample string 19",
      "Article": "sample string 20",
      "Name": "sample string 21"
    },
    {
      "CleanArticle": "sample string 1",
      "Presence": "sample string 2",
      "Price": 3,
      "CurrencyCode": "sample string 4",
      "ExpectedShipmentDays": 5,
      "GuaranteedShipmentDays": 6,
      "CountInPack": 7,
      "WarehouseId": "729ad741-d6a4-4fcd-8364-bac0c80ec844",
      "Warehouse": "sample string 9",
      "Unit": "sample string 10",
      "CategoryId": "4cd08c92-2986-438e-9b9f-bfef0a21f8af",
      "ItemId": "29b10cef-35f5-4e64-b1cf-88090b6e461b",
      "Discount": "sample string 13",
      "TotalDiscount": 14,
      "PriceWithoutDiscount": 15,
      "IsnotProduced": "sample string 16",
      "AvailableCount": 17,
      "SupplierCode": "sample string 18",
      "ExpectedDelivery": 1,
      "GuaranteedDelivery": 1,
      "DeliveryProbability": 1.1,
      "Brand": "sample string 19",
      "Article": "sample string 20",
      "Name": "sample string 21"
    }
  ],
  "IsError": true,
  "ErrorMessage": "sample string 2"
}

application/xml, text/xml

Пример:
<SearchProductResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PhaetonExternalApi.ViewModels">
  <ErrorMessage>sample string 2</ErrorMessage>
  <IsError>true</IsError>
  <Items>
    <ProductItem>
      <Article>sample string 20</Article>
      <Brand>sample string 19</Brand>
      <Name>sample string 21</Name>
      <AvailableCount>17</AvailableCount>
      <CategoryId>4cd08c92-2986-438e-9b9f-bfef0a21f8af</CategoryId>
      <CleanArticle>sample string 1</CleanArticle>
      <CountInPack>7</CountInPack>
      <CurrencyCode>sample string 4</CurrencyCode>
      <DeliveryProbability>1.1</DeliveryProbability>
      <Discount>sample string 13</Discount>
      <ExpectedDelivery>1</ExpectedDelivery>
      <ExpectedShipmentDays>5</ExpectedShipmentDays>
      <GuaranteedDelivery>1</GuaranteedDelivery>
      <GuaranteedShipmentDays>6</GuaranteedShipmentDays>
      <IsnotProduced>sample string 16</IsnotProduced>
      <ItemId>29b10cef-35f5-4e64-b1cf-88090b6e461b</ItemId>
      <Presence>sample string 2</Presence>
      <Price>3</Price>
      <PriceWithoutDiscount>15</PriceWithoutDiscount>
      <SupplierCode>sample string 18</SupplierCode>
      <TotalDiscount>14</TotalDiscount>
      <Unit>sample string 10</Unit>
      <Warehouse>sample string 9</Warehouse>
      <WarehouseId>729ad741-d6a4-4fcd-8364-bac0c80ec844</WarehouseId>
    </ProductItem>
    <ProductItem>
      <Article>sample string 20</Article>
      <Brand>sample string 19</Brand>
      <Name>sample string 21</Name>
      <AvailableCount>17</AvailableCount>
      <CategoryId>4cd08c92-2986-438e-9b9f-bfef0a21f8af</CategoryId>
      <CleanArticle>sample string 1</CleanArticle>
      <CountInPack>7</CountInPack>
      <CurrencyCode>sample string 4</CurrencyCode>
      <DeliveryProbability>1.1</DeliveryProbability>
      <Discount>sample string 13</Discount>
      <ExpectedDelivery>1</ExpectedDelivery>
      <ExpectedShipmentDays>5</ExpectedShipmentDays>
      <GuaranteedDelivery>1</GuaranteedDelivery>
      <GuaranteedShipmentDays>6</GuaranteedShipmentDays>
      <IsnotProduced>sample string 16</IsnotProduced>
      <ItemId>29b10cef-35f5-4e64-b1cf-88090b6e461b</ItemId>
      <Presence>sample string 2</Presence>
      <Price>3</Price>
      <PriceWithoutDiscount>15</PriceWithoutDiscount>
      <SupplierCode>sample string 18</SupplierCode>
      <TotalDiscount>14</TotalDiscount>
      <Unit>sample string 10</Unit>
      <Warehouse>sample string 9</Warehouse>
      <WarehouseId>729ad741-d6a4-4fcd-8364-bac0c80ec844</WarehouseId>
    </ProductItem>
  </Items>
</SearchProductResponse>