Documents
Estimate document-from-template cost
Changed onEstimate the cost of creating a document from a template without creating it. Contact information is not required — only the role_id and optionally a verification or notification method are needed. Each document always consumes 1 document from the plan's monthly allowance; if exhausted, the ExtraDocument cost is charged from credits (needs_extra_document = true). blocking_reason may be PendingPayment, InsufficientDocuments, or InsufficientCredits.
post/v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost
Request
- Base URLhttps://api.assinafy.com.br
- URLhttps://api.assinafy.com.br/v1/accounts/{accountId}/templates/{templateId}/documents/estimate-cost
- Auth
- HTTP bearer
- or API key in header X-Api-Key
Path parameters
accountIdstring required
Workspace account ID.
templateIdstring required
The template ID.
Request body
Example request
{
"signers": [
{
"role_id": "fa8c14f32d732271e071998246e",
"verification_method": "Whatsapp",
"notification_methods": [
"Whatsapp"
]
}
]
}Response
Cost estimate
Example response
{
"status": 200,
"data": {
"documents": 1,
"credits": 0.9,
"needs_extra_document": true,
"extra_document_cost": 1,
"total_credits": 1.9,
"breakdown": [
{
"code": "NotificationWhatsapp",
"name": "Whatsapp Notification",
"cost": 0.9,
"quantity": 2,
"unit_cost": 0.45
}
],
"credit_balance": 10,
"has_sufficient_resources": true
}
}Changes
- info
added the new
IdDocumentFaceMatchBasicenum value to the request property//
- info