.NET library for interacting with the Lamoda B2B Platform API
NuGet\Install-Package LamodaB2B.NET -Version *version_number*
dotnet add package LamodaB2B.NET --version *version_number*
- Orders:
- Get all orders
- Get detailed order
- Update order / order item status
- Create order
- Add partner order number
- Update custom info
- Get / set order delivery method
- Get allowed shipment methods and intervals
- Get allowed pickup points
- Send notifications
- Shipments:
- Get shipments
- Get detailed shipment
- Get shipment items
- Create shipment (basic / fulfilment / pack shipment)
- Send shipment status notification
- Set shipment status
- Stock: get / set stock states
- Nomenclatures:
- Get nomenclatures
- Create nomenclature (basic or pack nomenclature)
- Update nomenclature
- Fbs:
- Get shipment products / packages
- Generate label
- Fbo:
- Get sell settings
- Update sell settings
- Dbs: add shipment info
- Certificates:
- Generate certificate
- Get certificates
- Get balance
- Change certificates status
There are several samples. The principle of working with the library is shown below.
var client = new LamodaDemoClient();
var authorizationRequest = new AuthorizationRequest()
{
GrantType = GrantType.ClientCredentials,
СlientId = "my-client-id",
ClientSecret = "my-client-secret"
};
try
{
await client.AuthorizeAsync(authorizationRequest);
}
catch (LamodaException ex)
{
Console.WriteLine(ex.Message);
}
...
await client.AuthorizeAsync(authorizationRequest);
...
try
{
var ordersService = new OrdersService(client);
var orders = await ordersService.GetOrders();
}
catch (LamodaException ex)
{
Console.WriteLine(ex.Message);
}