GuiStracini.Mandae
1.2.24
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
<PackageReference Include="GuiStracini.Mandae" Version="1.2.24" />
paket add GuiStracini.Mandae --version 1.2.24
#r "nuget: GuiStracini.Mandae, 1.2.24"
// 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
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:
- Register customer (collect location - distribution center)
- Get available vehicles for a collect location (pickup packages from collect location based on postal code)
- Get rates for a delivery (postal code and package dimensions)
- Get the available hours to pickup order(s) in a selected date
- 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)
- Cancel the whole collect schedule (Cancel a previous collect scheduler)
- Cancel a schedule item (Cancel a item/package from a collect order)
- Get tracking data of a shipment (Get all tracking data available from one package - tracking code is supplied via WebHook)
- 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Microsoft.AspNet.WebApi.Client (>= 5.2.3)
- Newtonsoft.Json (>= 10.0.3)
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.403 | 91 | 4/15/2024 |
8.0.400 | 86 | 4/15/2024 |
8.0.395 | 86 | 4/15/2024 |
8.0.388 | 78 | 4/15/2024 |
8.0.379 | 104 | 4/8/2024 |
8.0.376 | 90 | 4/8/2024 |
8.0.371 | 98 | 4/8/2024 |
8.0.364 | 115 | 4/1/2024 |
8.0.361 | 137 | 3/25/2024 |
8.0.358 | 127 | 3/25/2024 |
8.0.353 | 151 | 3/18/2024 |
8.0.350 | 149 | 3/18/2024 |
8.0.345 | 181 | 3/11/2024 |
8.0.342 | 240 | 2/26/2024 |
8.0.339 | 232 | 2/26/2024 |
8.0.334 | 227 | 2/26/2024 |
8.0.327 | 231 | 2/26/2024 |
8.0.318 | 256 | 2/19/2024 |
8.0.310 | 249 | 2/19/2024 |
8.0.303 | 256 | 2/19/2024 |
8.0.294 | 264 | 2/14/2024 |
8.0.288 | 276 | 2/12/2024 |
8.0.285 | 305 | 2/5/2024 |
8.0.282 | 292 | 2/5/2024 |
8.0.277 | 303 | 1/30/2024 |
8.0.272 | 316 | 1/29/2024 |
8.0.269 | 309 | 1/29/2024 |
8.0.264 | 309 | 1/29/2024 |
8.0.254 | 337 | 1/22/2024 |
8.0.251 | 322 | 1/22/2024 |
8.0.246 | 322 | 1/22/2024 |
8.0.239 | 330 | 1/22/2024 |
8.0.230 | 359 | 1/16/2024 |
8.0.227 | 351 | 1/16/2024 |
8.0.222 | 355 | 1/15/2024 |
8.0.215 | 383 | 1/8/2024 |
8.0.212 | 376 | 1/8/2024 |
8.0.207 | 429 | 12/25/2023 |
8.0.204 | 413 | 12/25/2023 |
8.0.199 | 412 | 12/25/2023 |
8.0.192 | 417 | 12/25/2023 |
8.0.183 | 432 | 12/18/2023 |
8.0.178 | 422 | 12/18/2023 |
8.0.166 | 422 | 12/14/2023 |
8.0.157 | 427 | 12/12/2023 |
8.0.154 | 423 | 12/12/2023 |
8.0.149 | 426 | 12/12/2023 |
8.0.142 | 423 | 12/11/2023 |
8.0.137 | 427 | 12/11/2023 |
8.0.134 | 419 | 12/11/2023 |
8.0.114 | 449 | 12/8/2023 |
8.0.111 | 435 | 12/8/2023 |
8.0.108 | 454 | 12/8/2023 |
8.0.105 | 432 | 12/8/2023 |
8.0.96 | 428 | 12/8/2023 |
8.0.85 | 460 | 12/8/2023 |
8.0.59 | 610 | 11/14/2023 |
8.0.54 | 466 | 11/14/2023 |
8.0.49 | 445 | 11/13/2023 |
8.0.44 | 438 | 11/13/2023 |
8.0.37 | 484 | 11/9/2023 |
8.0.32 | 482 | 11/7/2023 |
8.0.27 | 463 | 11/6/2023 |
8.0.24 | 525 | 10/30/2023 |
8.0.21 | 478 | 10/30/2023 |
8.0.18 | 474 | 10/30/2023 |
8.0.13 | 523 | 10/22/2023 |
7.1.346 | 524 | 10/9/2023 |
7.1.343 | 502 | 10/9/2023 |
7.1.338 | 525 | 10/9/2023 |
7.1.335 | 512 | 10/9/2023 |
7.1.330 | 520 | 10/9/2023 |
7.1.323 | 525 | 10/7/2023 |
7.1.313 | 542 | 9/25/2023 |
7.1.308 | 547 | 9/24/2023 |
7.1.305 | 541 | 9/24/2023 |
7.1.298 | 549 | 9/23/2023 |
7.1.294 | 575 | 9/13/2023 |
7.1.287 | 585 | 9/13/2023 |
7.1.284 | 557 | 9/12/2023 |
7.1.281 | 558 | 9/12/2023 |
7.1.271 | 726 | 8/28/2023 |
7.1.263 | 796 | 8/14/2023 |
7.1.260 | 637 | 8/13/2023 |
7.1.227 | 633 | 8/13/2023 |
7.1.220 | 849 | 7/29/2023 |
7.1.218 | 708 | 7/29/2023 |
7.1.204 | 699 | 7/28/2023 |
7.1.200 | 719 | 7/25/2023 |
7.1.197 | 716 | 7/25/2023 |
7.1.190 | 773 | 7/19/2023 |
7.1.182 | 683 | 7/19/2023 |
7.1.157 | 920 | 6/27/2023 |
7.1.150 | 724 | 6/26/2023 |
7.1.145 | 786 | 6/19/2023 |
7.1.138 | 743 | 6/19/2023 |
7.1.135 | 714 | 6/19/2023 |
7.1.126 | 708 | 6/18/2023 |
7.1.107 | 889 | 6/6/2023 |
7.1.104 | 712 | 6/6/2023 |
7.1.95 | 722 | 6/6/2023 |
7.1.75 | 778 | 6/5/2023 |
7.1.17 | 1,137 | 5/4/2023 |
7.1.16 | 708 | 5/2/2023 |
7.1.15 | 786 | 4/28/2023 |
7.1.10 | 751 | 4/21/2023 |
7.1.8 | 764 | 4/21/2023 |
7.1.2 | 922 | 4/10/2023 |
7.0.101 | 750 | 4/8/2023 |
7.0.97 | 792 | 4/4/2023 |
7.0.92 | 887 | 4/3/2023 |
7.0.86 | 810 | 4/3/2023 |
7.0.64 | 866 | 3/26/2023 |
7.0.59 | 803 | 3/26/2023 |
7.0.43 | 817 | 3/22/2023 |
7.0.36 | 913 | 2/4/2023 |
7.0.31 | 975 | 1/24/2023 |
7.0.28 | 870 | 1/24/2023 |
7.0.25 | 877 | 1/24/2023 |
7.0.13 | 867 | 1/23/2023 |
7.0.8 | 840 | 1/23/2023 |
6.0.46 | 1,142 | 1/16/2023 |
6.0.43 | 888 | 1/16/2023 |
6.0.31 | 898 | 1/9/2023 |
6.0.30 | 914 | 12/25/2022 |
6.0.29 | 839 | 12/25/2022 |
6.0.17 | 1,816 | 4/24/2020 |
6.0.13 | 1,125 | 4/24/2020 |
6.0.12 | 1,128 | 4/18/2020 |
6.0.11 | 1,124 | 4/18/2020 |
6.0.10 | 1,143 | 4/18/2020 |
6.0.9 | 1,151 | 4/18/2020 |
6.0.8 | 1,212 | 9/24/2019 |
6.0.5 | 1,221 | 9/24/2019 |
5.0.37 | 1,253 | 6/18/2019 |
4.0.33 | 1,283 | 2/23/2019 |
4.0.30 | 1,225 | 2/23/2019 |
4.0.28 | 1,260 | 2/23/2019 |
4.0.27 | 1,324 | 2/14/2019 |
4.0.26 | 1,294 | 2/14/2019 |
4.0.25 | 1,304 | 2/14/2019 |
4.0.24 | 1,295 | 2/12/2019 |
4.0.23 | 1,295 | 1/29/2019 |
3.1.20 | 1,395 | 12/5/2018 |
3.1.17 | 1,452 | 9/8/2018 |
3.1.16 | 1,510 | 9/8/2018 |
3.1.15 | 1,401 | 9/8/2018 |
3.1.14 | 1,402 | 9/7/2018 |
3.1.13 | 1,399 | 9/7/2018 |
3.1.12 | 1,440 | 9/7/2018 |
3.1.11 | 1,477 | 8/23/2018 |
3.1.10 | 1,457 | 8/22/2018 |
3.1.8 | 1,425 | 8/16/2018 |
3.1.6 | 1,518 | 8/1/2018 |
3.1.5 | 1,428 | 8/1/2018 |
3.1.4 | 1,501 | 7/27/2018 |
3.1.3 | 1,471 | 7/27/2018 |
3.1.2 | 1,480 | 7/27/2018 |
3.1.1 | 1,450 | 7/26/2018 |
2.0.5 | 1,451 | 7/19/2018 |
2.0.4 | 1,644 | 5/24/2018 |
2.0.3 | 1,572 | 5/24/2018 |
2.0.1 | 1,621 | 5/9/2018 |
1.4.8 | 1,579 | 4/18/2018 |
1.4.7 | 1,538 | 4/18/2018 |
1.4.5 | 1,702 | 1/9/2018 |
1.4.1 | 1,666 | 1/9/2018 |
1.3.25 | 1,604 | 1/9/2018 |
1.3.19 | 1,655 | 12/20/2017 |
1.3.18 | 1,519 | 12/18/2017 |
1.3.17 | 1,605 | 12/15/2017 |
1.3.16 | 1,620 | 12/15/2017 |
1.3.14 | 1,629 | 12/15/2017 |
1.3.9 | 1,661 | 12/15/2017 |
1.3.8 | 1,637 | 12/15/2017 |
1.3.7 | 1,657 | 12/15/2017 |
1.3.5 | 1,642 | 12/15/2017 |
1.3.4 | 1,712 | 12/15/2017 |
1.3.3 | 1,668 | 12/15/2017 |
1.3.2 | 1,583 | 12/15/2017 |
1.3.1 | 1,558 | 11/30/2017 |
1.2.36 | 1,485 | 11/30/2017 |
1.2.34 | 1,546 | 11/29/2017 |
1.2.33 | 1,535 | 11/29/2017 |
1.2.31 | 1,519 | 11/29/2017 |
1.2.29 | 1,508 | 10/5/2017 |
1.2.28 | 1,519 | 10/4/2017 |
1.2.26 | 1,560 | 10/3/2017 |
1.2.25 | 1,530 | 10/3/2017 |
1.2.24 | 1,648 | 10/3/2017 |