2

I am trying to use a POST command in deluge to recall a document. When I make the call I get back a no file found (I have verified the id is correct).

The format should come out like this: POST https://sign.zoho.com/api/v1/requests/[Request ID]/recall https://www.zoho.com/sign/api/#recall-document

What am I doing incorrect?

//Get Zoho Request ID
resp = Sign_ID.toLong();

//add recall command
data = resp + "/recall";

// JSON
response = invokeUrl
[
    url: "https://sign.zoho.com/api/v1/requests/"
    type: POST
    parameters: data.toString()
];

info "Attempting to recall waiver..." + response;

Verified Sign_ID is returning correct value Verified correct API call Verified error code

  • I'm not sure of what the solution is. So here are a few debugging suggestions to hopefully get more information about the problem. – ZohoCoder Jan 02 '23 at 20:11
  • 1
    Add detailed: true to the invokeUrl cmd. This will provide more information in response. Sometimes the additional information is helpful. – ZohoCoder Jan 02 '23 at 20:11
  • Try running the same query using curl on a terminal commandline. This can be useful because if it works in curl then the issue is specific to the deluge script. If it fails in curl then sometimes the error message is different from deluge and helps with debugging. – ZohoCoder Jan 02 '23 at 20:11
  • Here is the example from the Zoho documents: Request Example: curl https://sign.zoho.com/api/v1/requests/[Request ID]/recall -X POST -H "Authorization: Zoho-oauthtoken " – ZohoCoder Jan 02 '23 at 20:12

1 Answers1

1

Other than what @ZohoCoder have mentioned.
From the documentation, it seems what you have done is almost right.

// Get Zoho Request ID
resp = Sign_ID.toLong();

// use a variable for the URL of the request
urlRequest =  "https://sign.zoho.com/api/v1/requests/" + resp + "/recall";

// JSON
response = invokeUrl
[
    url: urlRequest
    type: POST
];

info "Attempting to recall waiver..." + response;