I try to get information about items using Amazon Product API (for example http://webservices.amazon.com/scratchpad/index.html# ).
There is no problem for items from amazon.com(US), but for some items from amazon.fr, amazon.de API returns:
Error! AWS.InvalidParameterValue HTTP Status 200: Success B01B8E8OP4
is not a valid value for ItemId. Please change this value and retry
your request.
But https://www.amazon.fr/Ravensburger-24011-Jeu-Educatif-Colorino/dp/B01B8E8OP4/ref=lp_10946356031_1_1?s=toys&ie=UTF8&qid=1515158225&sr=1-1 is present.
I have registration as associate at amazon.fr and use appropriate associate tag.
For amazon.de:
Error! AWS.InvalidParameterValue HTTP Status 200: Success B014FSAOYE
is not a valid value for ItemId. Please change this value and retry
your request.
but https://www.amazon.de/dp/B014FSAOYE/ref=sspa_dk_detail_5?psc=1
What do you think about it?
It's because different API endpoins for each location https://docs.aws.amazon.com/AWSECommerceService/latest/DG/Locales.html
And enpoind URL for request must be:
https://webservices.amazon.fr/onca/xml
Related
I am a newbie on this so my question looks a bit more simple.
i am working on a logic app where the steps are like:
Run the logic app on a scheduled trigger to get a list of orders that have a specific status (e.g. not processed) from an endpoint (endpoint1).
Process each orderNumber and send a request to another endpoint (endpoint2) to retrieve the status of each order number.
Get that status and send it back to endpoint1 along with the orderNumber with an updated status (endpoint1 Update method with the orderNumber and orderStatus)
Problem:
I can do step 1 by doing "When a HTTP request is received" but need to know how can I run a scheduled job to get a list of orderNumbers and then pass them in For-Each loop.
In For-Each, I am sending a request against each orderNumber and getting the response, but don't know how can I use that response to update the orderNumber with the new status in endpoint1.
Appreciate if someone can guide me on this.
For scheduled workflows, choose the "Recurrence" trigger.
In the For-Each loop, with the assumption that the response of your first http request is in JSON format, you will first need a "Parse Json" step. In 'Content' you should have the response from your http step. Then use a sample response payload to generate the response schema. Once this is done, you can use another http request to fire the next API call. You should be able to use the response fields from the first API call to make the next call.
I am trying to access the status_code of a valid url, however a 404 is returned although the link exists. Here is the line of code that returns me a 404:
print(requests.get("https://www.moh.gov.sg/docs/librariesprovider5/local-situation-report/situation-report-21-jul-2020.pdf").status_code)
This is the link of the PDF that i am trying to access: https://www.moh.gov.sg/docs/librariesprovider5/local-situation-report/situation-report-21-jul-2020.pdf
Is anyone able to explain to me why i get a 404 from trying to access a valid url? Thank You.
It is giving status code 404 not found because you didn't pass the mandatory header Accept while requesting. Accept request-header field is to specify certain media types which are acceptable for the response.
print(requests.get("https://www.moh.gov.sg/docs/librariesprovider5/local-situation-report/situation-report-21-jul-2020.pdf",
headers={"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3"},
verify = False))
Try the above code you will get status code 200
Added an image of google developer network section for more clarity.
I'm calling the Shipment/ConfirmShipment endpoint, and it's returning success in both .NET and Postman, but using Postman the shipment actually gets confirmed, while in .NET it doesn't.
In Postman, I'm doing a POST with the body containing JSON for the shipment number:
{"entity":{"ShipmentNbr":{"value":"022025"}}}
In .NET, I'm doing a HttpClient.PostAsync() to the same URL and with the same JSON as above. They both return success with a 202 Accepted response. However, as I mentioned, the Postman call confirms the shipment (Confirm = 1, Status = F), but in .NET, the POST doesn't actually confirm the shipment. Any ideas of what might be preventing it?
API v17.200.001
The status 202 Accepted might be a bit confusing but it does not mean that the action has completed succefully.
It only means that the execution request is valid and has been accepted by the system.
If you want to monitor the status of the Action itself you will need to use the address given in the header of the 202 Accepted response (the Location header)
So in my example that follows, you can see that my action has been accepted and that when I request the status of the operation I then get the 204 No Content which is the Success response.
Here I have requested the execution of the Confirm Shipment action and it has been accepted and I can see the url where I can fetch the status of the action
Here I have requested the status of the the action and can see the successful result
You can find more information here about the execution of an action through the REST API.
I recommend taking a look at the response section.
https://help-2017r2.acumatica.com/(W(1))/Main?ScreenId=ShowWiki&pageid=91bf9106-062a-47a8-be1f-b48517a54324
Here is more information about the 202 and the 204 http response:
https://httpstatuses.com/202
https://httpstatuses.com/204
How can I send a capture request to cybersource using hybris CIS payment. Below is the method I am using but it is giving me 102 as response code with reply message as
The following request field(s) is either invalid or missing: auth_request_id
I am able to see the capture request when I login to EBCtest but it does not have any details.
Below is the code which I am using, trying to capture the amount by hard coding the amount, transaction id and authorization ids
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000"),"D99OZS1FU15J", cisPaymentRequest);
The authorization request ID you are sending is invalid: auth_request_id=831000
Here is an example of a valid authorization request ID: 5499176942776634304004
The authorization request ID is returned by CyberSource in the response to an authorization request.
Here is how it got resolved-
I changed the url and corrected the transaction id
Authorization ID
OLD - https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor?auth_request_id=831000
Correct- https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000
Transaction id
OLD - D99OZS1FU15J
Correct - 5512968196316020204007
CisPaymentRequest cisPaymentRequest=new CisPaymentRequest();
//cisPaymentRequest.setParameters(new AnnotationHashMap(getAnnotationHashMap()));
cisPaymentRequest.setAmount(new BigDecimal(58.55));
cisPaymentRequest.setCurrency("USD");
final CisPaymentTransactionResult captureResult = getCisClientPaymentService().capture(CLIENT_REF, "single",new URI("https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/831000"),"5512968196316020204007", cisPaymentRequest);
I am calling Envelopes: listStatusChanges api to fetch envelope statuses. I am passing envelope ids(comma seperated list) as a parameter to this method, upto 50 envelope ids it gives me result but as soon as I pass more than 50 envelope ids it gives me following error. I aslo tried with Docusign Apiexplorer by passing same envelope ids list but the result is same. Is there any limitation on passing these envelope ids?
'error: " 404 - File or directory not found. Server Error 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. "'
The 404 error is being thrown by the webserver as the length of the URL of your HTTP GET request is too long. See more detailed explanation here
You can instead use other parameters(for ex: from_date) on the listStatusChanges api to query the list of envelopes. You can then filter the response based on envelopeId's you are looking for.
Another more efficient option would be to use Docusign Connect to get notifications on Envelope Status changes.