GuiStracini.Mandae
7.1.204
See the version list below for details.
Requires NuGet 2.12 or higher.
dotnet add package GuiStracini.Mandae --version 7.1.204
NuGet\Install-Package GuiStracini.Mandae -Version 7.1.204
<PackageReference Include="GuiStracini.Mandae" Version="7.1.204" />
paket add GuiStracini.Mandae --version 7.1.204
#r "nuget: GuiStracini.Mandae, 7.1.204"
// Install GuiStracini.Mandae as a Cake Addin #addin nuget:?package=GuiStracini.Mandae&version=7.1.204 // Install GuiStracini.Mandae as a Cake Tool #tool nuget:?package=GuiStracini.Mandae&version=7.1.204
Mandaê SDK
The (unofficial) Mandaê API client for .NET projects.
Para a versão em português, por favor siga me.
This is an unofficial client for the Mandaê API V2
CI/CD
Build status | Last commit | Tests | Coverage | Code Smells | LoC |
---|---|---|---|---|---|
Code Quality (main branch)
Installation
Github Releases
Download the latest zip file from the Release page.
Nuget package manager
Package | Version | Downloads |
---|---|---|
GuiStracini.Mandae |
Features
This client supports the following operations/features of the API:
- Get rates for a delivery (postal code and package dimensions)
- Schedule a collect (register a collect in the customer distribution center with one or more packages. Each package can have one or more items/sku)
- Get tracking data of a shipment (Get all tracking data available from one package - tracking code is set by the customer or provided by webhook)
- WebHooks schema ready (The web hooks models, ready for implementation)
- Experimental Querying orders (API V1 - non-public API)
- Experimental Querying occurrences (API V1 - non-public API). Issue #1
- Experimental Querying reverses (API V1 - non-public API). Issue #2
- Experimental Request reverse (API V1 - non-public API). Issue #3
Usage
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);
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);
Schedule a collect request
Schedule a collect request (pickup in distribution center / origin location).
Inform which type of Vehicle, when, 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:
//The MandaeClient
var client = new MandaeClient("my API token");
//The OrderModel (order collect request model)
var order = new OrderModel { ... };
order.Items = new [] {
new NewItem
{
....
ShippingService = option
}
};
//Makes the request
var order = client.RegisterOrderCollectRequest(order);
//order.Id is the id for further use (maybe cancel the request ?)
Get tracking of a package
Example:
//The MandaeClient
var client = new MandaeClient("my API token");
//The tracking identifier (Generate by the Mandae or sent by the order collect request
var trackingId = "MyCompany-00001";
var tracking = client.GetTracking(trackingId);
//tracking.CarrierName;
//tracking.CarrierCode;
//tracking.Events;
Querying orders (API V1 - Search) EXPERIMENTAL/NON-PUBLIC API
For the V1 you'll need to use the e-mail/password combination of the Mandaê panel to login in V1 API.
Example:
//The MandaeClient
var client = new MandaeClient("V2 API token");
client.ConfigureV1Authentication("myEmail@example.com", "password");
var trackingCode = "XYZ000001";//The tracking code of some order
var result = client.Search(SearchMethod.TRACKING_CODE, trackingCode);
if(result.Total == 1)
Console.WriteLine(result.Orders.Single().SituationDescription);
Release notes
- Release v6.0.0 and higher DEPRECATED methods: Get Latest Order
- Release v5.0.0 and higher DEPRECATED methods: Large Request, Cancel Request, Cancel Item Request
- Release v3.0.0 and higher changes the V1 authentication method. Now use your e-mail/password of the Mandaê panel to login in the V1 API.
- Release v1.4.1 and higher also includes a experimental (non-public) V1 endpoint for search/querying orders (the same interface as available through the Mandaê administration panel).
The API V1 is not officially public, so there is no warranty that it will still working
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net47 is compatible. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- GuiStracini.SDKBuilder (>= 3.0.290)
- Microsoft.AspNet.WebApi.Client (>= 5.2.9)
- Newtonsoft.Json (>= 13.0.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
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.652 | 65 | 9/23/2024 |
8.0.649 | 78 | 9/23/2024 |
8.0.643 | 106 | 9/16/2024 |
8.0.640 | 87 | 9/10/2024 |
8.0.629 | 95 | 9/3/2024 |
8.0.623 | 81 | 8/29/2024 |
8.0.616 | 81 | 8/29/2024 |
8.0.613 | 92 | 8/29/2024 |
8.0.606 | 81 | 8/28/2024 |
8.0.599 | 91 | 8/27/2024 |
8.0.594 | 96 | 8/26/2024 |
8.0.591 | 87 | 8/26/2024 |
8.0.586 | 87 | 8/26/2024 |
8.0.581 | 83 | 8/26/2024 |
8.0.566 | 107 | 8/19/2024 |
8.0.563 | 100 | 8/12/2024 |
8.0.560 | 65 | 7/29/2024 |
8.0.557 | 91 | 7/22/2024 |
8.0.549 | 85 | 7/16/2024 |
8.0.546 | 87 | 7/16/2024 |
8.0.541 | 87 | 7/16/2024 |
8.0.532 | 92 | 7/16/2024 |
8.0.529 | 87 | 7/16/2024 |
8.0.501 | 114 | 6/19/2024 |
8.0.500 | 109 | 6/18/2024 |
8.0.498 | 117 | 6/18/2024 |
8.0.492 | 93 | 6/3/2024 |
8.0.489 | 95 | 6/3/2024 |
8.0.484 | 85 | 5/28/2024 |
8.0.481 | 96 | 5/28/2024 |
8.0.476 | 105 | 5/28/2024 |
8.0.469 | 96 | 5/28/2024 |
8.0.460 | 80 | 5/20/2024 |
8.0.457 | 75 | 5/15/2024 |
8.0.442 | 96 | 4/29/2024 |
8.0.439 | 89 | 4/29/2024 |
8.0.434 | 95 | 4/29/2024 |
8.0.427 | 90 | 4/29/2024 |
8.0.418 | 106 | 4/22/2024 |
8.0.415 | 82 | 4/22/2024 |
8.0.410 | 101 | 4/22/2024 |
8.0.403 | 124 | 4/15/2024 |
8.0.400 | 121 | 4/15/2024 |
8.0.395 | 116 | 4/15/2024 |
8.0.388 | 107 | 4/15/2024 |
8.0.379 | 141 | 4/8/2024 |
8.0.376 | 124 | 4/8/2024 |
8.0.371 | 131 | 4/8/2024 |
8.0.364 | 148 | 4/1/2024 |
8.0.361 | 166 | 3/25/2024 |
8.0.358 | 156 | 3/25/2024 |
8.0.353 | 177 | 3/18/2024 |
8.0.350 | 177 | 3/18/2024 |
8.0.345 | 225 | 3/11/2024 |
8.0.342 | 272 | 2/26/2024 |
8.0.339 | 258 | 2/26/2024 |
8.0.334 | 255 | 2/26/2024 |
8.0.327 | 259 | 2/26/2024 |
8.0.318 | 284 | 2/19/2024 |
8.0.310 | 280 | 2/19/2024 |
8.0.303 | 286 | 2/19/2024 |
8.0.294 | 289 | 2/14/2024 |
8.0.288 | 306 | 2/12/2024 |
8.0.285 | 334 | 2/5/2024 |
8.0.282 | 320 | 2/5/2024 |
8.0.277 | 341 | 1/30/2024 |
8.0.272 | 345 | 1/29/2024 |
8.0.269 | 342 | 1/29/2024 |
8.0.264 | 343 | 1/29/2024 |
8.0.254 | 379 | 1/22/2024 |
8.0.251 | 351 | 1/22/2024 |
8.0.246 | 349 | 1/22/2024 |
8.0.239 | 352 | 1/22/2024 |
8.0.230 | 387 | 1/16/2024 |
8.0.227 | 378 | 1/16/2024 |
8.0.222 | 378 | 1/15/2024 |
8.0.215 | 412 | 1/8/2024 |
8.0.212 | 404 | 1/8/2024 |
8.0.207 | 455 | 12/25/2023 |
8.0.204 | 441 | 12/25/2023 |
8.0.199 | 441 | 12/25/2023 |
8.0.192 | 439 | 12/25/2023 |
8.0.183 | 458 | 12/18/2023 |
8.0.178 | 443 | 12/18/2023 |
8.0.166 | 450 | 12/14/2023 |
8.0.157 | 460 | 12/12/2023 |
8.0.154 | 443 | 12/12/2023 |
8.0.149 | 452 | 12/12/2023 |
8.0.142 | 448 | 12/11/2023 |
8.0.137 | 451 | 12/11/2023 |
8.0.134 | 443 | 12/11/2023 |
8.0.114 | 479 | 12/8/2023 |
8.0.111 | 458 | 12/8/2023 |
8.0.108 | 478 | 12/8/2023 |
8.0.105 | 454 | 12/8/2023 |
8.0.96 | 452 | 12/8/2023 |
8.0.85 | 487 | 12/8/2023 |
8.0.59 | 1,369 | 11/14/2023 |
8.0.54 | 491 | 11/14/2023 |
8.0.49 | 471 | 11/13/2023 |
8.0.44 | 462 | 11/13/2023 |
8.0.37 | 510 | 11/9/2023 |
8.0.32 | 507 | 11/7/2023 |
8.0.27 | 491 | 11/6/2023 |
8.0.24 | 553 | 10/30/2023 |
8.0.21 | 513 | 10/30/2023 |
8.0.18 | 502 | 10/30/2023 |
8.0.13 | 549 | 10/22/2023 |
7.1.346 | 550 | 10/9/2023 |
7.1.343 | 528 | 10/9/2023 |
7.1.338 | 550 | 10/9/2023 |
7.1.335 | 552 | 10/9/2023 |
7.1.330 | 549 | 10/9/2023 |
7.1.323 | 557 | 10/7/2023 |
7.1.313 | 568 | 9/25/2023 |
7.1.308 | 573 | 9/24/2023 |
7.1.305 | 564 | 9/24/2023 |
7.1.298 | 571 | 9/23/2023 |
7.1.294 | 602 | 9/13/2023 |
7.1.287 | 609 | 9/13/2023 |
7.1.284 | 583 | 9/12/2023 |
7.1.281 | 581 | 9/12/2023 |
7.1.271 | 752 | 8/28/2023 |
7.1.263 | 819 | 8/14/2023 |
7.1.260 | 660 | 8/13/2023 |
7.1.227 | 658 | 8/13/2023 |
7.1.220 | 876 | 7/29/2023 |
7.1.218 | 732 | 7/29/2023 |
7.1.204 | 723 | 7/28/2023 |
7.1.200 | 747 | 7/25/2023 |
7.1.197 | 747 | 7/25/2023 |
7.1.190 | 797 | 7/19/2023 |
7.1.182 | 707 | 7/19/2023 |
7.1.157 | 946 | 6/27/2023 |
7.1.150 | 746 | 6/26/2023 |
7.1.145 | 833 | 6/19/2023 |
7.1.138 | 772 | 6/19/2023 |
7.1.135 | 741 | 6/19/2023 |
7.1.126 | 733 | 6/18/2023 |
7.1.107 | 910 | 6/6/2023 |
7.1.104 | 751 | 6/6/2023 |
7.1.95 | 746 | 6/6/2023 |
7.1.75 | 800 | 6/5/2023 |
7.1.17 | 1,165 | 5/4/2023 |
7.1.16 | 735 | 5/2/2023 |
7.1.15 | 811 | 4/28/2023 |
7.1.10 | 774 | 4/21/2023 |
7.1.8 | 790 | 4/21/2023 |
7.1.2 | 954 | 4/10/2023 |
7.0.101 | 777 | 4/8/2023 |
7.0.97 | 819 | 4/4/2023 |
7.0.92 | 912 | 4/3/2023 |
7.0.86 | 835 | 4/3/2023 |
7.0.64 | 886 | 3/26/2023 |
7.0.59 | 827 | 3/26/2023 |
7.0.43 | 843 | 3/22/2023 |
7.0.36 | 934 | 2/4/2023 |
7.0.31 | 1,001 | 1/24/2023 |
7.0.28 | 898 | 1/24/2023 |
7.0.25 | 907 | 1/24/2023 |
7.0.13 | 893 | 1/23/2023 |
7.0.8 | 862 | 1/23/2023 |
6.0.46 | 1,169 | 1/16/2023 |
6.0.43 | 921 | 1/16/2023 |
6.0.31 | 920 | 1/9/2023 |
6.0.30 | 938 | 12/25/2022 |
6.0.29 | 863 | 12/25/2022 |
6.0.17 | 1,839 | 4/24/2020 |
6.0.13 | 1,151 | 4/24/2020 |
6.0.12 | 1,154 | 4/18/2020 |
6.0.11 | 1,145 | 4/18/2020 |
6.0.10 | 1,164 | 4/18/2020 |
6.0.9 | 1,170 | 4/18/2020 |
6.0.8 | 1,234 | 9/24/2019 |
6.0.5 | 1,248 | 9/24/2019 |
5.0.37 | 1,279 | 6/18/2019 |
4.0.33 | 1,309 | 2/23/2019 |
4.0.30 | 1,249 | 2/23/2019 |
4.0.28 | 1,279 | 2/23/2019 |
4.0.27 | 1,349 | 2/14/2019 |
4.0.26 | 1,315 | 2/14/2019 |
4.0.25 | 1,333 | 2/14/2019 |
4.0.24 | 1,323 | 2/12/2019 |
4.0.23 | 1,319 | 1/29/2019 |
3.1.20 | 1,420 | 12/5/2018 |
3.1.17 | 1,494 | 9/8/2018 |
3.1.16 | 1,540 | 9/8/2018 |
3.1.15 | 1,432 | 9/8/2018 |
3.1.14 | 1,431 | 9/7/2018 |
3.1.13 | 1,435 | 9/7/2018 |
3.1.12 | 1,465 | 9/7/2018 |
3.1.11 | 1,505 | 8/23/2018 |
3.1.10 | 1,498 | 8/22/2018 |
3.1.8 | 1,458 | 8/16/2018 |
3.1.6 | 1,544 | 8/1/2018 |
3.1.5 | 1,452 | 8/1/2018 |
3.1.4 | 1,526 | 7/27/2018 |
3.1.3 | 1,491 | 7/27/2018 |
3.1.2 | 1,501 | 7/27/2018 |
3.1.1 | 1,475 | 7/26/2018 |
2.0.5 | 1,476 | 7/19/2018 |
2.0.4 | 1,674 | 5/24/2018 |
2.0.3 | 1,595 | 5/24/2018 |
2.0.1 | 1,645 | 5/9/2018 |
1.4.8 | 1,602 | 4/18/2018 |
1.4.7 | 1,562 | 4/18/2018 |
1.4.5 | 1,729 | 1/9/2018 |
1.4.1 | 1,691 | 1/9/2018 |
1.3.25 | 1,633 | 1/9/2018 |
1.3.19 | 1,681 | 12/20/2017 |
1.3.18 | 1,544 | 12/18/2017 |
1.3.17 | 1,630 | 12/15/2017 |
1.3.16 | 1,650 | 12/15/2017 |
1.3.14 | 1,651 | 12/15/2017 |
1.3.9 | 1,682 | 12/15/2017 |
1.3.8 | 1,659 | 12/15/2017 |
1.3.7 | 1,690 | 12/15/2017 |
1.3.5 | 1,663 | 12/15/2017 |
1.3.4 | 1,743 | 12/15/2017 |
1.3.3 | 1,692 | 12/15/2017 |
1.3.2 | 1,602 | 12/15/2017 |
1.3.1 | 1,583 | 11/30/2017 |
1.2.36 | 1,514 | 11/30/2017 |
1.2.34 | 1,567 | 11/29/2017 |
1.2.33 | 1,557 | 11/29/2017 |
1.2.31 | 1,542 | 11/29/2017 |
1.2.29 | 1,530 | 10/5/2017 |
1.2.28 | 1,541 | 10/4/2017 |
1.2.26 | 1,581 | 10/3/2017 |
1.2.25 | 1,553 | 10/3/2017 |
1.2.24 | 1,679 | 10/3/2017 |