Get document PDF
curl --request GET \
--url https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}Document
Get document PDF
v1 is deprecated — use the v2 endpoint instead. Returns the rendered PDF file for a document. The PDF uses the invoice templates and document settings configured on your Swipe account. Pass delivery_challan=1 to get a delivery-challan copy instead.
GET
/
v1
/
doc
/
pdf
/
{doc_hash_id}
Get document PDF
curl --request GET \
--url https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getswipe.in/api/partner/v1/doc/pdf/{doc_hash_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}{
"success": false,
"error_code": "INVALID_HASH_ID",
"message": "Some error occurred",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Response
File will be downloaded

