Open mxmissile opened 2 months ago
Same here. I'm also interested in a working solution.
OK, now I understand how it works. The problem was this part: ?trackingnumber=string
Valid URLs look like this:
https://wwwcie.ups.com/api/shipments/v2403/void/cancel/{SHIPMENTID}
(to delete the whole shipment with the id {SHIPMENTID}
)
https://wwwcie.ups.com/api/shipments/v2403/void/cancel/{SHIPMENTID}?trackingnumber={TRACKINGNO}
(to delete the package with the trackingnumber {TRACKINGNO}
from the shipment with the id {SHIPMENTID}
)
something like https://wwwcie.ups.com/api/shipments/v2403/void/cancel/{SHIPMENTID}?trackingnumber=["{TRACKINGNO1}","{TRACKINGNO2}"]
(to delete the packages with the trackingnumbers {TRACKINGNO1}
and {TRACKINGNO2}
from the shipment with the id {SHIPMENTID}
. But that doesn't work for me, even if I encode the "
as %22
, as seen at the bottom of this post)
The number that you used in your example (1Z2220060291994175
) is, according to the documentation, a package number (and not a shipment id), but you're using it as a shipment id.
Try this instead:
https://wwwcie.ups.com/api/shipments/v2403/void/cancel/1Z2220060294314162?trackingnumber=1Z2220060291994175
I realised voiding wasn't working last week. Having looked at the documentation, v1 now shows deprecated and replaced by v2403. However, v1 was returning the misleading error "No shipment found within the allowed void period". This error was resolved by changing version to v2403.
I was wondering if v2403 was even in the documentation a couple of months ago.
Still having issue with v2403
First issue is with the inconsitency between the doc and the actual behaviour.
Testing show the API working as expected with one tracking number
https://wwwcie.ups.com/api/shipments/v2403/void/cancel/1Z2220060294314162?trackingnumber=1Z2220060291994175
However when dealing with 2 packages, the format is not ["trackingnumber","trackingnumber"]
but [trackingnumber,trackingnumber]
You can reproduce with this URL
DELETE /shipments/v2403/void/cancel/1ZISDE016691609089?trackingnumber=%5B1ZISDE016694068891%2C1ZISDE016690889305%5D
Second issue is the response is incorrectly formated, getting extra formating data in the decoded response.
Sending a dev/test Delete request for a void using one the of the tracking numbers listed here. With this URL:
https://wwwcie.ups.com/api/shipments/v2403/void/cancel/1Z2220060291994175?trackingnumber=string
No matter which number I send it always returns
{"response":{"errors":[{"code":"190102","message":"No shipment found within the allowed void period"}]}}
The documentation says "A successful response will be returned for a package level void request. The request will void the package in the shipment."
Any ideas what I am doing wrong?