1 min read

Magento SDK

The Poq Magento SDK contains clients for Magento API and Poq specific services to speed up integration of Magento in Poq BFC.

List of Features

The Poq Magento SDK provides Contracts, Clients and Services that facilitates integration of the Poq Platform with the Magento API. Here is the list feature by their namespace.

  • Client contains contacts and clients to use Magento API.
  • Services contains Poq specific services.


Implementation does not fully cover the entire Magento API. Future development should fill in gaps.

Extension Points

Future development will add implementations for missing endpoints. New services will be added to speed up development using Magento SDK.

How to develop on top of this solution

In order to use Magento API directly developers can use Client namespace which is organized as follows:

  • Contract
  • Interfaces
  • AccountClient
  • CartClient
  • CategoryClient
  • ConfigurableProductsClient
  • ProductAttributesClient
  • ProductRenderInfoClient
  • ProductStockStatusClient

The services available in Service namespace are intended to help generating feed files from Magento.

Example Client Usage

Creating an account for user in Magento

var client = new AccountClient(httpClient, magento2Configuration);
var result = await client.RegisterAsync(
new Magento2RegisterRequest()
Customer = new Magento2RegisterCustomer()
FirstName = "TestFirstName",
LastName = "TestLastName",
Email = "aaa12345678@hot.com",
DateOfBirth = DateTime.Now.AddYears(-20)
Password = "HiZqFuDvDdQ7",

Example Service Usage

Loggin user in using AccountService AccountService

var accountService = new AccountService(
new Poq.Client.AccountClient(),
new AccountClient(httpClient, magento2Configuration),
new TokenService(),
new CartClient(),
new CustomerProfileMapper());
var loginResponse = await accountService.LoginAsyncAsync(guestAccessToken, appIdentifier, poqUserId, loginRequst, magentoStoreId);

Breaking Changes

No breaking changes.