(documents)
- find - Find documents
- get - Get document
- create_v0 - Create document
- update - Update document
- delete - Delete document
- move_to_team - Move document
- distribute - Distribute document
- redistribute - Redistribute document
- duplicate - Duplicate document
Find documents based on a search criteria
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.find()
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
query |
Optional[str] | ➖ | The search query. |
page |
Optional[float] | ➖ | The pagination page number, starts at 1. |
per_page |
Optional[float] | ➖ | The number of items per page. |
template_id |
Optional[float] | ➖ | Filter documents by the template ID used to create it. |
source |
Optional[models.QueryParamSource] | ➖ | Filter documents by how it was created. |
status |
Optional[models.QueryParamStatus] | ➖ | Filter documents by the current status |
order_by_column |
Optional[models.OrderByColumn] | ➖ | N/A |
order_by_direction |
Optional[models.OrderByDirection] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentFindDocumentsResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentFindDocumentsBadRequestError | 400 | application/json |
models.DocumentFindDocumentsNotFoundError | 404 | application/json |
models.DocumentFindDocumentsInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Returns a document given an ID
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.get(document_id=7003.47)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentGetDocumentWithDetailsByIDResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentGetDocumentWithDetailsByIDBadRequestError | 400 | application/json |
models.DocumentGetDocumentWithDetailsByIDNotFoundError | 404 | application/json |
models.DocumentGetDocumentWithDetailsByIDInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
You will need to upload the PDF to the provided URL returned. Note: Once V2 API is released, this will be removed since we will allow direct uploads, instead of using an upload URL.
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.create_v0(title="<value>")
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
title |
str | ✔️ | The title of the document. |
external_id |
Optional[str] | ➖ | The external ID of the document. |
visibility |
Optional[models.VisibilityAccount] | ➖ | The visibility of the document. |
global_access_auth |
Optional[models.DocumentCreateDocumentTemporaryGlobalAccessAuthRequest] | ➖ | The type of authentication required for the recipient to access the document. |
global_action_auth |
Optional[models.GlobalActionAuthAccount] | ➖ | The type of authentication required for the recipient to sign the document. This field is restricted to Enterprise plan users only. |
form_values |
Dict[str, models.FormValuesRequest] | ➖ | N/A |
recipients |
List[models.RecipientAccount] | ➖ | N/A |
meta |
Optional[models.DocumentCreateDocumentTemporaryMeta] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentCreateDocumentTemporaryResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentCreateDocumentTemporaryBadRequestError | 400 | application/json |
models.DocumentCreateDocumentTemporaryInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Update document
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.update(document_id=8574.78)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | N/A |
data |
Optional[models.DocumentUpdateDocumentData] | ➖ | N/A |
meta |
Optional[models.DocumentUpdateDocumentMeta] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentUpdateDocumentResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentUpdateDocumentBadRequestError | 400 | application/json |
models.DocumentUpdateDocumentInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Delete document
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.delete(document_id=5459.07)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentDeleteDocumentResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentDeleteDocumentBadRequestError | 400 | application/json |
models.DocumentDeleteDocumentInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Move a document from your personal account to a team
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.move_to_team(document_id=8301.72, team_id=6724.78)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | The ID of the document to move to a team. |
team_id |
float | ✔️ | The ID of the team to move the document to. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentMoveDocumentToTeamResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentMoveDocumentToTeamBadRequestError | 400 | application/json |
models.DocumentMoveDocumentToTeamInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Send the document out to recipients based on your distribution method
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.distribute(document_id=4115.92)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | The ID of the document to send. |
meta |
Optional[models.DocumentSendDocumentMeta] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentSendDocumentResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentSendDocumentBadRequestError | 400 | application/json |
models.DocumentSendDocumentInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Redistribute the document to the provided recipients who have not actioned the document. Will use the distribution method set in the document
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.redistribute(document_id=5758.65, recipients=[
])
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | N/A |
recipients |
List[float] | ✔️ | The IDs of the recipients to redistribute the document to. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentResendDocumentResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentResendDocumentBadRequestError | 400 | application/json |
models.DocumentResendDocumentInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |
Duplicate document
from documenso_sdk import Documenso
import os
with Documenso(
api_key=os.getenv("DOCUMENSO_API_KEY", ""),
) as documenso:
res = documenso.documents.duplicate(document_id=3523.11)
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
document_id |
float | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DocumentDuplicateDocumentResponse
Error Type | Status Code | Content Type |
---|---|---|
models.DocumentDuplicateDocumentBadRequestError | 400 | application/json |
models.DocumentDuplicateDocumentInternalServerError | 500 | application/json |
models.APIError | 4XX, 5XX | */* |