Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

By default, the assigned offers will have the same rules as the ones configured in Sanity. If you want to override some of these with custom rules, for example, a custom End Date & Start Date, you can pass the following arguments:

Code Block
"ruleParams": {
    "startDate": "{{ "now" | date:"%F" }}",
    "endDate": "{{ "now" | date:'%s' | plus:604800| date:"%F" }}"
  }

In the above example, we set the Start Date to be the time when the Offer was assigned, and we set the End Date to be 7 days after the offer was assigned (now + 604800 seconds).

Request headers

  • Scroll down to request headers section and click “Add New Header” 3 times

  • Then input the below headers keys and their values (Content-type, x-region, and x-api-key)

...

Content-type
Code Block
languagejson
Content-Type: application/json

...