Bulk records execution Problem in WCO API

When we are sending bulk records(Ex:250) using API to WCO, we are able to create 135 records in WCO but after 135 records we are getting 401 - UnAuthorized error. Is there any time limit for the API connection or API Keys.

Best Answer

  • @manjusha.batchu

    I assume you are sending each request concurrently because we do not have the functionality of sending bulk request.

    No we do not have a time limit for the API connection or API key as each request establishes a new connection.

    The reason you may be getting a 401 is because the date header value you are sending would be getting outdated after 135 requests. The dateheader value sent in the request should be exact as per the GMT clock, although we allow a leeway of 40 to 50 seconds on the timestamp but anything more than that we consider the date header value to be expired and send a 401 to avoid replay attack.

    Kindly send a fresh date header value for each request instead of using the same timestamp for all your concurrent request. This can be done by defining a new date header value for each request instead of using the same dateheader value for every concurrent request.

Answers

  • Hello @Irfan,

    Thank you so much for your reply. Now i am able to send bulk request at a time with out hitting any unauthorised access after sending the date value header as GMT for each request .

  • @manjusha.batchu

    That's great news and I am glad to hear that the API calls are being sent concurrently.

    Kindly accept the answer so that our other users can get benefitted by your question.

  • Hi @Irfan.Khan
    I would like to know know one more question regarding update request of WCO API.
    previously i have observed that when i run postman application using put request with the individual/Organisation data, it would update the data what we sent irrespective of remaining fileds like secondary/custom (the data would remain as usual). but later on i came to notice that when I use the same PUT request i saw only the fields that were send was updated and remaining secondary/custom fields remains Null(empty). this was so surprising for me.kindly help me whether the API calls of WCO has been changed Recently?? so as to change the code accordingly.

  • @manjusha.batchu

    I understand your concern, but can you raise a new post for your question so that I may help you out.