For AI agents: visit https://onefin.readme.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
Python
import json
import requests
from requests_toolbelt import MultipartEncoder
payload = {
'signatories': [
{
'coordinates': [
{
'llx': <x-coordinate:integer>,
'lly': <y-coordinate:integer>,
'page': <page number:integer>
}
],
'name': '<name>',
'mobile_number': '<mobile number without country code>',
'email': '<email>',
'callback_url': '<callback url>'
}
],
'expiry': <no of minutes before expiry:integer>
}
multipart = MultipartEncoder(
fields={
'pdf_file': (
'<filename>.pdf',
open('/path/to/<filename>.pdf', 'rb'),
'application/pdf'
),
'configuration': json.dumps(payload)
}
)
headers = {
'Authorization': 'Basic <Base64Encoded(ClientID : ClientSecret)>',
'Content-Type': multipart.content_type
}
response = requests.post(url, headers=headers, data=multipart)
print(response.json())