janssenr/MyParcelApi.Net

Why is ObjectId[] returned from AddShipment ?

Closed this issue · 2 comments

In AddShipment ObjectId[] is returned. According to the API specs it should return Shipment[].

The problem is that when we want to get the tracking info, we have to call GetShipment in order to get the Barcode (tracking#), and then TrackShipment to get the rest of the tracking info.

One person I guess at MyParcel.nl decided it was unnecessary to in include the tracking# (Barcode) in TrackShipment????? (Yes it can be parsed from trackingURL, but a very bad practice to do so)

So that's why we need the Barcode to be returned from AddShipment, so we dont have to call GetShipment just to get the Barcode.

If for some reason returning Shipment[] in AddShipment causes problems, then please at least return Barcode.

According to which API specs it should return Shipment[]?
https://myparcelnl.github.io/api/#6_B These are the API specs from MyParcel.
Response body: ShipmentIds
Response example:
HTTP/1.1 200 OK Content-Type:application/json;charset=utf-8
{
"data": {
"ids": [{
"id": 12345,
"reference_identifier":"FOO-222-BAR-42"
}, {
"id": 68794,
"reference_identifier":"FOO-223-BAR-43"
}]
}
}

If one person at MyParcel.nl decided so, you have to complain to MyParcel.nl, not to me.

The only way to get the barcode (at the moment) is to Call GetShipment after calling AddShipment.

Sorry. I misread the documentation :-)

And I was not complaining about you, just about this person that decided it was a good idea to not include tracking# in TrackShipment.

And actually I have complained about this to my contact in MyParcel.be :-)