Home > Software design >  Commercetool Incremental Pull
Commercetool Incremental Pull

Time:12-29

I was trying to pull incremental data from commercetool api using QueryPredicates by sending last modified datetime but the api is giving full data.

https://api.{region}.commercetools.com/{projectkey}/categories?where=lastModifiedAt > 2022-04-06T00:46:32.037Z

In the documentation, it is mentioned as below Include a time range, for example lastModifiedAt > $1-week-ago and ... (replace $1-week-ago with an actual date

I tried sending last modified datetime as mentioned in documentation and was expecting it to return data greater than that but it's not working

CodePudding user response:

The datetime string must be enclosed with double quotes. And the whole predicate must be urlencoded.

lastModifiedAt > "2022-04-06T00:46:32.037Z"

  • Related