Retrieve the contract details and PDF URL for a specific escrow transaction. Only standard mode escrows have a contract — for quick or instant escrows this endpoint returns 404. You must be the seller or buyer of the escrow to access the contract. The response includes the contract terms, signing status, and a presigned URL to download the contract PDF.
curl -X GET https://dhmad.tn/api/v1/escrows/507f1f77bcf86cd799439011/contract \
-H "Authorization: Bearer sk_live_your_api_key_here"
{
"contract": {
"id": "507f1f77bcf86cd799439012",
"escrow": "507f1f77bcf86cd799439011",
"terms": "The seller agrees to deliver a fully functional website within 7 days. The buyer agrees to pay the amount upon completion.",
"language": "en",
"pdfUrl": "https://dhmad.tn/contracts/507f1f77bcf86cd799439012.pdf",
"sellerSignature": {
"signedAt": "2024-01-15T10:30:00Z",
"signatureImage": "data:image/png;base64,..."
},
"buyerSignature": {
"signedAt": "2024-01-16T14:00:00Z",
"signatureImage": "data:image/png;base64,..."
},
"isFullySigned": true,
"pdfVersions": [
{
"type": "fully-signed",
"url": "https://cdn.dhmad.tn/contracts/507f1f77bcf86cd799439012/1705406400000.pdf",
"mimeType": "application/pdf",
"createdAt": "2024-01-16T14:00:00Z"
}
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-16T14:00:00Z"
}
}
Path Parameters
Response Fields
Error Responses
401 Unauthorized
{
"error": "Unauthorized"
}
403 Forbidden
No Associated User Account
{
"error": "Forbidden",
"message": "Developer account must be associated with a user account. Please associate your account in the developer dashboard."
}
Not Your Escrow
{
"error": "Forbidden",
"message": "You do not have access to this escrow. You can only view escrows where you are the seller or buyer."
}
404 Not Found
Escrow Not Found
{
"error": "Escrow not found"
}
Contract Not Found
{
"error": "Contract not found for this escrow"
}
Authenticate using your API key via the Authorization: Bearer sk_live_... header or the X-API-Key: sk_live_... header.