Client

class FwClient
__init__() None

Intializes an instance and allocates resources for it.

Note: Requires a running event loop.

Raises:
async close() None

Finalizes an instance releasing its resources.

Note: An object and its child objects must not be used after calling this method.

Raises:
merchant(token: str) Merchant

Makes a child object for a merchant.

Parameters:

token (str) – Merchant’s bearer token; non-empty string limited to 4095 chars

Returns:

A new merchant child object

Return type:

FwClient.Merchant

Raises:
class FwClient.Merchant(client: FwClient, token: str)
async get_shops(status=FwShopStatus.ACTIVE, page=0, limit=50, *, shop_ids: list[int] | None = None) FwPage[FwShop]

Retrieves paged shops of the merchant from endpoint [/apiseller/shops](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#post-apiseller-shops).

Note: The endpoint does not take empty id lists into account, so passing empty shop_ids will be equal to not specifying it at all.

Parameters:
  • status (FwShopStatus) – Status of shops to be requested

  • page (int) – Number of page to be requested; non-negative integer

  • limit (int) – Max page size; integer in [1, 50] range

  • shop_ids (list[int] | None) – IDs of shops to be requested; list of integers in [1, 2^32-1] range

Returns:

A page of requested shops

Return type:

FwPage[FwShop]

Raises:
shop(shop_id: int) Shop

Makes a child object for a shop.

Parameters:

shop_id (int) – Shop ID; integer in [1, 2^32-1] range

Returns:

A new shop child object

Return type:

FwClient.Shop

Raises:
class FwClient.Shop(merchant: Merchant, shop_id: int)
async get_products(page=0, limit=1000, *, ids: FwProductIdQueryList | FwOfferIdQueryList | None = None, category_ids: list[int] | None = None, product_type: int | None = None) FwPage[FwProduct]

Retrieves paged products of the shop from endpoint [/apiseller/products](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#post-apiseller-products).

Note: The endpoint does not take empty id lists into account, so passing empty ids or category_ids will be equal to not specifying them at all.

Parameters:
  • page (int) – Number of page to be requested; non-negative integer

  • limit (int) – Max page size; integer in [1, 1000] range

  • ids (FwProductIdQueryList | FwOfferIdQueryList | None) – Product/Offer IDs of products to be requested

  • category_ids (list[int] | None) – Category IDs of products to be requested; list of integers in [1, 2^32-1] range

  • product_type (int | None) – Product Type ID of products to be requested; integer in {1, 2, 3} set

Returns:

A page of requested products

Return type:

FwPage[FwProduct]

Raises:
async map_offers(mappings: Iterable[FwOfferMapping]) list[FwOfferMappingRespErr]

Maps specified external offer IDs with corresponding products via endpoint [/apiseller/products/offersMappings](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#post-apiseller-products-offersmappings).

Requested changes may be applied partially. In that case, a list of errors will be returned.

Parameters:

offer_ids (Iterable[FwOfferMapping]) – Offer ID to product ID mappings

Returns:

A list of partial errors

Return type:

list[FwOfferMappingRespErr]

Raises:
async set_product_active(offer_ids: Iterable[str], active: bool) list[FwProductActiveRespErr]

Hides or unhides specified products via either endpoint [/apiseller/products/hide](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#post-apiseller-products-hide) or [/apiseller/products/unhide](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#post-apiseller-products-unhide).

Requested changes may be applied partially. In that case, a list of errors will be returned.

Parameters:
  • offer_ids (Iterable[str]) – Offer IDs of products to be hid/unhid; non-empty strings limited to 50 chars

  • active (bool) – False to hide, True to unhide

Returns:

A list of partial errors

Return type:

list[FwProductActiveRespErr]

Raises:
async update_stocks(changes: Iterable[FwProductStock]) list[FwStockUpdatingRespErr]

Updates stock quantities of specified products via endpoint [/apiseller/stocks/put](https://seller-docs.flowwow.com/4.-instrumenty-prodavca/4.1.-integracii-i-api/dokumentaciya-i-podderzhka-po-api/otkrytoe-api-dlya-prodavcov-0.0.1#put-apiseller-stocks-put).

Requested changes may be applied partially. In that case, a list of errors will be returned.

Parameters:

changes (Iterable[FwProductStock]) – Changes in product stocks to be pushed

Returns:

A list of partial errors

Return type:

list[FwStockUpdatingRespErr]

Raises: