Stock Availability API

Swagger

The API provides available warehouse and production quantities, with breakdowns by city and colour. 

1. Endpoint and method

GET

http://ea.f1s.org.ua:8080/EA/ru_RU/hs/API/GetInfo

2. Request parameters

Pass a URL-encoded JSON object in the param query parameter. The GET request has no body. Both fields are required.

FieldTypeDescription
tokenStringIndividual access token
includeCharacteristicsBooleanfalse — grouped by product; true — grouped by product and variant

Without variants

curl --get \
  'http://ea.f1s.org.ua:8080/EA/ru_RU/hs/API/GetInfo' \
  --data-urlencode 'param={"token":"<YOUR_TOKEN>","includeCharacteristics":false}'

With variants

curl --get \
  'http://ea.f1s.org.ua:8080/EA/ru_RU/hs/API/GetInfo' \
  --data-urlencode 'param={"token":"<YOUR_TOKEN>","includeCharacteristics":true}'

3. Response fields

FieldTypeDescription
productCodeStringProduct code
articleStringArticle number
productNameStringProduct name
unitStringUnit of measurement
stockQuantityNumberAvailable warehouse quantity
productionQuantityNumberAvailable production quantity
detailsArrayBreakdown by city
priceNumberPrice, included only when price export is enabled
vatStatusString or nullVAT status, included together with price
characteristicCodeStringVariant code; may be empty
characteristicNameStringVariant name
colorStringColour, included only when populated

When includeCharacteristics is true, characteristicCode and characteristicName are also returned. The color field is included only when populated. When price export is disabled, price and vatStatus are omitted. A price of 0 is a numeric value, not an omitted field.

vatStatus: included — VAT included; excluded — VAT excluded; null — status unknown.

4. City and colour breakdown

Each details item contains city (string or null), stockQuantity and productionQuantity (numbers). The optional colors array contains color, stockQuantity and productionQuantity. If no colours are populated, colors is omitted. Quantities with no colour remain in city totals but are not included in colors, so colour subtotals may be lower than city totals. City totals add up to the overall quantities of the response item. An unknown city is returned as city: null.

An empty array [] means no available stock. Store codes as strings to preserve leading zeros.

5. Example without variants

Examples use illustrative data.

[
  {
    "productCode": "0000005870",
    "article": "ЕА-0005870",
    "productName": "Olflex Classic 110 18G1",
    "unit": "м",
    "stockQuantity": 200,
    "productionQuantity": 100,
    "details": [
      {
        "city": "Запоріжжя",
        "stockQuantity": 150,
        "productionQuantity": 100,
        "colors": [
          {
            "color": "Чорний",
            "stockQuantity": 150,
            "productionQuantity": 100
          }
        ]
      },
      {
        "city": "Кам'янець-Подільський",
        "stockQuantity": 50,
        "productionQuantity": 0
      }
    ]
  }
]

6. Example with variants

Examples use illustrative data.

[
  {
    "productCode": "0000005870",
    "article": "ЕА-0005870-000004287",
    "productName": "Olflex Classic 110 18G1",
    "unit": "м",
    "stockQuantity": 40,
    "productionQuantity": 0,
    "price": 42.5,
    "vatStatus": "included",
    "characteristicCode": "000004287",
    "characteristicName": "Відрізок 40 м",
    "details": [
      {
        "city": "Запоріжжя",
        "stockQuantity": 40,
        "productionQuantity": 0
      }
    ]
  }
]

7. Status codes and errors

HTTPDescription
200Data retrieved successfully
400Invalid JSON or request parameters
403Missing or invalid token, or access denied
500Internal error retrieving data or generating the response

The error codes are in English. The message text is in Ukrainian, regardless of the language of this guide. Error examples:

{
  "error": "access_denied",
  "message": "Токен не вказано"
}
{
  "error": "internal_error",
  "message": "Не вдалося отримати залишки. Зверніться до постачальника"
}
Content-Type: application/json; charset=utf-8

If no price is provided, keep the previously stored price. Preserve existing data if the request fails. Keep the access token confidential.