GuiStracini.Mandae 1.2.24

There is a newer version of this package available.
See the version list below for details.
dotnet add package GuiStracini.Mandae --version 1.2.24                
NuGet\Install-Package GuiStracini.Mandae -Version 1.2.24                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GuiStracini.Mandae" Version="1.2.24" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GuiStracini.Mandae --version 1.2.24                
#r "nuget: GuiStracini.Mandae, 1.2.24"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GuiStracini.Mandae as a Cake Addin
#addin nuget:?package=GuiStracini.Mandae&version=1.2.24

// Install GuiStracini.Mandae as a Cake Tool
#tool nuget:?package=GuiStracini.Mandae&version=1.2.24                

Mandaê API

The (unnoficial) Mandaê API client

Build status GuiStracini.Mandae NuGet Version GuiStracini.Mandae NuGet Downloads Github All Releases

This is an unnoficial client for the Mandaê API V2. (https://dev.mandae.com.br/api/index.html)


NuGet package: https://www.nuget.org/packages/GuiStracini.Mandae

Install-Package GuiStracini.Mandae

Features

This client supports the following operations/features of the API:

  1. Register customer (collect location - distribution center)
  2. Get available vehicles for a collect location (pickup packages from collect location based on postal code)
  3. Get rates for a delivery (postal code and package dimensions)
  4. Get the available hours to pickup order(s) in a selected date
  5. Schedule a collect (register a collect in the customer distribution center with one or more packages. Each package can have one or more items/skus)
  6. Cancel the whole collect schedule (Cancel a previous collect scheduler)
  7. Cancel a schedule item (Cancel a item/package from a collect order)
  8. Get tracking data of a shipment (Get all tracking data available from one package - tracking code is supplied via WebHook)
  9. WebHooks schema ready (The web hooks models/schemas)

All operations supports sync and async!


Setup the MandaeClient

Initializes a new instance of MandaeClient class.

Example:

//Request your API token to ti@mandae.com.br 
//Each environment has it's own API token!
var apiToken = "my API token";

//Call the constructor with the API token and de API environment (SANDBOX | PRODUCTION).
//var client = new MandaeClient(apiTOken); //<= Environment.SANDBOX is the default environment.
var client = new MandaeClient(apiToken, Environment.PRODUCTION);

Register a customer (pickup/collect location)

How to register a customer (pickup/collect location).

Example:

//The MandaeClient
var client = new MandaeClient("my API token")

//The CustomerModel
var model = new CustomerModel 
{
    Document = "00000000000191", //CPF or CNPJ
    Email = "example@example.com",
    FullName = "Guilherme Branco Stracini",
    Phone = new Phone 
    {
        AreaCode = "11",
        Number = "33445566"
    },
    Store = new Store 
    {
        Name = "Sample store",
        Url = "https://example.com"
    }
};

//The response id should be stored anywhere for future use (where the packages will be collected). This id is used in the RegisterOrder method
var customer = client.RegisterCustomer(model);   

Get available vehicles

Get all available vehicles for a pickup in a source postal code (distribution center / origin location).

Example:

//The MandaeClient
var client = new MandaeClient("my API token");

var vehicles = client.GetVehicles("03137020");
if(vehicles.Any(v=>v.CAR))
{
    //Car is available for the pickup in this postal code!
}

Get rates for a package/delivery

Get the rates (Rápido & Econômico) values and delivery time for a specified postal code and package dimensions.

Example:

//The MandaeClient
var client = new MandaeClient("my API token");

//The RatesModel
var delivery = new RatesModel {
	PostalCode = "22041080",
	...
}
var rates = client.GetRates(delivery);
var fast = rates.ShippingServices.Single(s => s.Name == "Rápido");
var economic = rates.ShippingServices.Single(s => s.Name == "Econômico");
var option = ShippingService.ECONOMICO;
if(fast.Price < economic.Price)
    option = ShippingService.RAPIDO;

//The OrderModel (order collect request model)
var order = new OrderModel { ... };
order.Items = new [] {
    new NewItem 
    {
        ....
        ShippingService = option
    }
};
var order = client.RegisterOrderCollectRequest(order);

Get available hours for pickup

Gets the available hours for pickup/collect packages in the distribuiton center for a specified date.

Example:

//The MandaeClient
var client = new MandaeClient("my API token");

//Check the available hours for tomorrow
var date= DateTime.Now.AddDays(1);

//The list os avaiable hours for pickup tomorrow
var avaiableHours = client.GetAvaiableHours(date);

Schedule a collect request

Schedule a collect request (pickup in distribution center / origin location).

Inform which type of Vehicle (GetVehicles), when (GetAvailableHours), which rate (Rapido | Economico) and the order items (a.k.a packages or clients orders).

Each package means a order/volume, that can have one or more items (SKUs).

Example: [TODO: Pending test result]

Get the latest order collect request status

Gets the last order collect request for a customer (by customerId).

Example:

//The MandaeClient
var client = new MandaeClient("my API token");

//The customerId 
var customerId = "sampleCustomerId";
var status = client.GetLatestOrderCollectStatus(customerId);

//Tracking url for the order collect request
var url = status.Url;

Cancel a schedule collect request

Example: [TODO | Pending test result]

Cancel a schedule item (package) collect request

Example: [TODO | Pending test result]

Get tracking of a package

Example: [TODO | Pending test result]

Product Compatible and additional computed target framework versions.
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.705 27 12/2/2024
8.0.702 20 12/2/2024
8.0.697 28 12/2/2024
8.0.687 77 11/25/2024
8.0.682 71 11/25/2024
8.0.675 75 11/18/2024
8.0.672 76 10/28/2024
8.0.666 89 10/21/2024
8.0.663 115 10/14/2024
8.0.660 95 10/2/2024
8.0.657 87 10/2/2024
8.0.652 87 9/23/2024
8.0.649 96 9/23/2024
8.0.643 123 9/16/2024
8.0.640 120 9/10/2024
8.0.629 111 9/3/2024
8.0.623 91 8/29/2024
8.0.616 91 8/29/2024
8.0.613 102 8/29/2024
8.0.606 90 8/28/2024
8.0.599 100 8/27/2024
8.0.594 105 8/26/2024
8.0.591 96 8/26/2024
8.0.586 96 8/26/2024
8.0.581 92 8/26/2024
8.0.566 115 8/19/2024
8.0.563 107 8/12/2024
8.0.560 72 7/29/2024
8.0.557 99 7/22/2024
8.0.549 94 7/16/2024
8.0.546 95 7/16/2024
8.0.541 94 7/16/2024
8.0.532 100 7/16/2024
8.0.529 92 7/16/2024
8.0.501 119 6/19/2024
8.0.500 116 6/18/2024
8.0.498 123 6/18/2024
8.0.492 98 6/3/2024
8.0.489 102 6/3/2024
8.0.484 91 5/28/2024
8.0.481 103 5/28/2024
8.0.476 109 5/28/2024
8.0.469 100 5/28/2024
8.0.460 86 5/20/2024
8.0.457 80 5/15/2024
8.0.442 101 4/29/2024
8.0.439 94 4/29/2024
8.0.434 100 4/29/2024
8.0.427 96 4/29/2024
8.0.418 111 4/22/2024
8.0.415 88 4/22/2024
8.0.410 105 4/22/2024
8.0.403 129 4/15/2024
8.0.400 127 4/15/2024
8.0.395 122 4/15/2024
8.0.388 112 4/15/2024
8.0.379 145 4/8/2024
8.0.376 132 4/8/2024
8.0.371 135 4/8/2024
8.0.364 152 4/1/2024
8.0.361 169 3/25/2024
8.0.358 162 3/25/2024
8.0.353 183 3/18/2024
8.0.350 182 3/18/2024
8.0.345 230 3/11/2024
8.0.342 278 2/26/2024
8.0.339 267 2/26/2024
8.0.334 259 2/26/2024
8.0.327 263 2/26/2024
8.0.318 289 2/19/2024
8.0.310 285 2/19/2024
8.0.303 291 2/19/2024
8.0.294 295 2/14/2024
8.0.288 310 2/12/2024
8.0.285 341 2/5/2024
8.0.282 325 2/5/2024
8.0.277 347 1/30/2024
8.0.272 353 1/29/2024
8.0.269 346 1/29/2024
8.0.264 350 1/29/2024
8.0.254 385 1/22/2024
8.0.251 359 1/22/2024
8.0.246 355 1/22/2024
8.0.239 357 1/22/2024
8.0.230 410 1/16/2024
8.0.227 383 1/16/2024
8.0.222 385 1/15/2024
8.0.215 418 1/8/2024
8.0.212 410 1/8/2024
8.0.207 459 12/25/2023
8.0.204 445 12/25/2023
8.0.199 445 12/25/2023
8.0.192 445 12/25/2023
8.0.183 462 12/18/2023
8.0.178 451 12/18/2023
8.0.166 455 12/14/2023
8.0.157 468 12/12/2023
8.0.154 450 12/12/2023
8.0.149 459 12/12/2023
8.0.142 454 12/11/2023
8.0.137 455 12/11/2023
8.0.134 448 12/11/2023
8.0.114 484 12/8/2023
8.0.111 462 12/8/2023
8.0.108 483 12/8/2023
8.0.105 460 12/8/2023
8.0.96 457 12/8/2023
8.0.85 493 12/8/2023
8.0.59 1,490 11/14/2023
8.0.54 496 11/14/2023
8.0.49 477 11/13/2023
8.0.44 467 11/13/2023
8.0.37 516 11/9/2023
8.0.32 515 11/7/2023
8.0.27 496 11/6/2023
8.0.24 557 10/30/2023
8.0.21 518 10/30/2023
8.0.18 506 10/30/2023
8.0.13 555 10/22/2023
7.1.346 556 10/9/2023
7.1.343 534 10/9/2023
7.1.338 555 10/9/2023
7.1.335 557 10/9/2023
7.1.330 556 10/9/2023
7.1.323 563 10/7/2023
7.1.313 574 9/25/2023
7.1.308 578 9/24/2023
7.1.305 569 9/24/2023
7.1.298 577 9/23/2023
7.1.294 608 9/13/2023
7.1.287 614 9/13/2023
7.1.284 588 9/12/2023
7.1.281 586 9/12/2023
7.1.271 759 8/28/2023
7.1.263 824 8/14/2023
7.1.260 666 8/13/2023
7.1.227 663 8/13/2023
7.1.220 881 7/29/2023
7.1.218 738 7/29/2023
7.1.204 729 7/28/2023
7.1.200 752 7/25/2023
7.1.197 752 7/25/2023
7.1.190 803 7/19/2023
7.1.182 713 7/19/2023
7.1.157 952 6/27/2023
7.1.150 752 6/26/2023
7.1.145 840 6/19/2023
7.1.138 779 6/19/2023
7.1.135 746 6/19/2023
7.1.126 738 6/18/2023
7.1.107 915 6/6/2023
7.1.104 756 6/6/2023
7.1.95 752 6/6/2023
7.1.75 805 6/5/2023
7.1.17 1,170 5/4/2023
7.1.16 741 5/2/2023
7.1.15 817 4/28/2023
7.1.10 780 4/21/2023
7.1.8 796 4/21/2023
7.1.2 960 4/10/2023
7.0.101 782 4/8/2023
7.0.97 823 4/4/2023
7.0.92 918 4/3/2023
7.0.86 840 4/3/2023
7.0.64 892 3/26/2023
7.0.59 833 3/26/2023
7.0.43 849 3/22/2023
7.0.36 941 2/4/2023
7.0.31 1,007 1/24/2023
7.0.28 905 1/24/2023
7.0.25 913 1/24/2023
7.0.13 899 1/23/2023
7.0.8 867 1/23/2023
6.0.46 1,176 1/16/2023
6.0.43 928 1/16/2023
6.0.31 927 1/9/2023
6.0.30 943 12/25/2022
6.0.29 870 12/25/2022
6.0.17 1,845 4/24/2020
6.0.13 1,158 4/24/2020
6.0.12 1,161 4/18/2020
6.0.11 1,168 4/18/2020
6.0.10 1,170 4/18/2020
6.0.9 1,179 4/18/2020
6.0.8 1,239 9/24/2019
6.0.5 1,255 9/24/2019
5.0.37 1,285 6/18/2019
4.0.33 1,317 2/23/2019
4.0.30 1,255 2/23/2019
4.0.28 1,284 2/23/2019
4.0.27 1,355 2/14/2019
4.0.26 1,321 2/14/2019
4.0.25 1,340 2/14/2019
4.0.24 1,328 2/12/2019
4.0.23 1,326 1/29/2019
3.1.20 1,426 12/5/2018
3.1.17 1,505 9/8/2018
3.1.16 1,551 9/8/2018
3.1.15 1,441 9/8/2018
3.1.14 1,440 9/7/2018
3.1.13 1,442 9/7/2018
3.1.12 1,475 9/7/2018
3.1.11 1,512 8/23/2018
3.1.10 1,509 8/22/2018
3.1.8 1,466 8/16/2018
3.1.6 1,551 8/1/2018
3.1.5 1,459 8/1/2018
3.1.4 1,533 7/27/2018
3.1.3 1,500 7/27/2018
3.1.2 1,507 7/27/2018
3.1.1 1,480 7/26/2018
2.0.5 1,483 7/19/2018
2.0.4 1,683 5/24/2018
2.0.3 1,602 5/24/2018
2.0.1 1,654 5/9/2018
1.4.8 1,611 4/18/2018
1.4.7 1,571 4/18/2018
1.4.5 1,736 1/9/2018
1.4.1 1,700 1/9/2018
1.3.25 1,643 1/9/2018
1.3.19 1,690 12/20/2017
1.3.18 1,550 12/18/2017
1.3.17 1,639 12/15/2017
1.3.16 1,660 12/15/2017
1.3.14 1,658 12/15/2017
1.3.9 1,689 12/15/2017
1.3.8 1,667 12/15/2017
1.3.7 1,698 12/15/2017
1.3.5 1,672 12/15/2017
1.3.4 1,753 12/15/2017
1.3.3 1,700 12/15/2017
1.3.2 1,612 12/15/2017
1.3.1 1,589 11/30/2017
1.2.36 1,521 11/30/2017
1.2.34 1,574 11/29/2017
1.2.33 1,564 11/29/2017
1.2.31 1,549 11/29/2017
1.2.29 1,539 10/5/2017
1.2.28 1,548 10/4/2017
1.2.26 1,591 10/3/2017
1.2.25 1,559 10/3/2017
1.2.24 1,687 10/3/2017