Retail API - Post Image.json - how much does it cost (leaky-bucket)

raphaelraphael Member Posts: 41

Hi,

I am having a hard time validating this data myself, because we do not have a staging environment at LightSpeed.


But some of my debugging information makes me think that the cost of posting an image via the /Item/{{itemId}}/Image.json", might cost more than 10 as written in the documentation.

Can somebody confirm the cost of uploading an image?

Thanks.

1 comment

  • gregaricangregarican Member Posts: 926 

    I know that any POST/PUT request is usually on average gated at one request every 10 seconds. Regardless of which Retail API endpoint you are hitting or how large the payload is. At least according to what I recall and what I see listed in the Retail API docs.

    If you upload a few images using the Retail API capture the traffic and see what the response headers indicate in terms of the call rates. I usually test out using Postman and/or Fiddler to see what's going on behind the scenes.

    In my own code I usually just plan for worst-case call rates and hard-code my routines to observe that. If I was more sophisticated I would parse the response headers and dynamically adjust my request rates. But I'm lazy in that regard and just issue a GET request every second and a POST/PUT request every 10 seconds. Not the most scalable solution I know. 😀

Sign In or Register to comment.