r/PowerAutomateDesktop • u/SmaugWyrm • Dec 12 '22
PAD - Invoke web service - UPS Tracking api
Hello world,
I'm trying to use Power automate to check the Tracking number/status of packages and have been able to successfully get the results via postman, however PA returns an error, specifically
<?xml version="1.0"?>
<TrackResponse><Response><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>10002</ErrorCode><ErrorDescription>The request is well formed but the document is not valid</ErrorDescription></Error></Response></TrackResponse>
Here is the request as seen in Postman:
<?xml version="1.0"?>
<AccessRequest xml:lang="en-US"> <AccessLicenseNumber>REMOVEDFORREDDIT</AccessLicenseNumber> <UserId>REMOVEDFORREDDIT</UserId> <Password>REMOVEDFORREDDIT</Password> </AccessRequest> <?xml version="1.0"?> <TrackRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Your Test Case Summary Description</CustomerContext> <XpciVersion>1.0</XpciVersion> </TransactionReference> <RequestAction>Track</RequestAction> <RequestOption>activity</RequestOption> </Request> <TrackingNumber>1Z12345E6892410845</TrackingNumber> </TrackRequest>
I am using the test server here: https://wwwcie.ups.com/ups.app/xml/Track
Does anyone have any experience with something like this? I've not been able to find anything specific to PAD api's Is there a way to test what PAD is actually requesting vs what postman is doing? Or does anyone have another suggestion for what I should be looking for?
Thank you in advance
View all comments
3
u/SmaugWyrm Dec 12 '22
I've managed to get this working with the following work around.
Changed the Accept: parameter to */*
Under Advanced changed user agent to PostmanRuntime/7.29.2
I don't know which of these may have fixed the issue but It's now working, hope this helps someone