Get agreement document
Returns the signed agreement document: account holder details, payment schedule, terms and authorization.
Parameters
Send as application/x-www-form-urlencoded.
typestringrequiredSelects the operation. Always
get_agreement_docfor this endpoint.tokenstringrequiredYour API token from Log in. See Authentication.
Your DCDial company ID.
Example101ID of the payment agreement.
Example5521
curl https://api.dcdial.com/api/ \ -d type=get_agreement_doc \ -d token="$DCDIAL_TOKEN" \ -d company_id=101 \ -d agreement_id=5521<?php$ch = curl_init('https://api.dcdial.com/api/');curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => http_build_query([ 'type' => 'get_agreement_doc', 'token' => getenv('DCDIAL_TOKEN'), 'company_id' => 101, 'agreement_id' => 5521, ]),]);$result = json_decode(curl_exec($ch), true);curl_close($ch);
if (($result['response']['success'] ?? 0) != 1) { throw new RuntimeException($result['response']['error'] ?? 'Request failed');}const res = await fetch('https://api.dcdial.com/api/', { method: 'POST', body: new URLSearchParams({ type: "get_agreement_doc", token: process.env.DCDIAL_TOKEN, company_id: "101", agreement_id: "5521", }),});const { response } = await res.json();if (response.success != 1) throw new Error(response.error);import osimport requests
r = requests.post( "https://api.dcdial.com/api/", data={ "type": "get_agreement_doc", "token": os.environ["DCDIAL_TOKEN"], "company_id": 101, "agreement_id": 5521, }, timeout=30,)response = r.json()["response"]if str(response.get("success")) != "1": raise RuntimeError(response.get("error")){ "response": { "agreement_content": "[base64 encoded content]", "message": "[response info]", "ip_address": "[IP Address value]", "success": "[1|0]" }}Try it