0

I am using Adobe Sign API /agreements and /events endpoints in python to first pull in all agreements sent using a particular account and then pulling in all relevant events for those agreements based on the agreementId returned. Code for pulling in all agreements:

url = "https://api.na1.adobesign.com/api/rest/v6/agreements"
payload={}
headers = {
  'x-api-user': 'email:'+from_email,
  'Authorization': 'Bearer ' + token,
  'cursor':cursor
}
response = requests.request("GET", url, headers=headers, data=payload)

This is working great other than the fact that each time it runs, it pulls all agreements over and over. I need to pass the displayDate as a filter/parameter when making the GET /agreements request so that it only pulls in agreements that have a status change today/yesterday. I tried changing the request URL to include the filter in the URL. I am not sure if it needs to be a part of the payload/header - have not been able to find it in documentation yet.

url = "https://api.na1.adobesign.com/api/rest/v6/agreements?displayDate>'8-21-2023'"
    payload={}
    headers = {
      'x-api-user': 'email:'+from_email,
      'Authorization': 'Bearer ' + token,
      'cursor':cursor
    }

But this does not make a difference and it still pulls ALL the agreements. This is another variation of the url I tried that still doesn't work:

url = "https://api.na1.adobesign.com/api/rest/v6/agreements?displayDate=2022-08-01..2022-08-02"

Any thoughts on how to filter to pull agreements only after a certain displayDate because I cannot believe that there isn't a way to do that - that makes it really inefficient so I'm convinced I'm just missing something

bourgeoisna
  • 95
  • 1
  • 11

0 Answers0