Skip to main content

Edit Process

POST/{resource}/editprivate keyprk_

This service lets you put a process into edit state so you can send it again with changes: replace the PDF, correct a contract's data, or add and remove documents from a package.

Editing takes two steps. First you mark the process with this service, then you overwrite it by resending the full payload to the matching creation service. The process keeps its identifier.

{resource} says what you are editing and accepts two values:

ResourceWhat it editsIdentifier
documentA document or a contractcode, 9 or 10 characters
packageA package and all of its documentspackage, 24 characters
caution

Putting a process into edit resets the signatures. Collected signatures, identity validations and the links already sent to participants are discarded. When you resend it, everyone is notified again with new links.

There is no way to cancel an edit: a marked process waits until you resend it.


Authentication​

Include your private key in the Authorization header.

Authorization: prk_xxx...

Mark the process​

Parameters​

NameTypeDescription
codeString conditionalCode of the document or contract. Only for /document/edit.
packageString conditionalPackage identifier, 24 characters. Only for /package/edit.

Process requirements​

You can only edit a process that is not signed, rejected, expired or already in edit. A contract must also be in approved status.

A document that belongs to a package is not edited on its own: edit the whole package.

curl --location 'https://api.auco.ai/v1.5/ext/package/edit' \
--header 'Authorization: prk_private_key_company' \
--header 'Content-Type: application/json' \
--data-raw '{
"package": "6a95b55966dd1c779500b962"
}'

Response​

{
"message": "PACKAGE_MODIFIED"
}

For a document the response is DOCUMENT_MODIFIED.


Read the process in edit​

GET/{resource}/editprivate keyprk_

Returns the marked process, with download links for its PDFs valid for 5 minutes. Use it to inspect what is in edit; the payload you resend is your own.

NameTypeDescription
codeString conditionalCode of the document or contract. Only for /document/edit.
packageString conditionalPackage identifier. Only for /package/edit.
curl --location 'https://api.auco.ai/v1.5/ext/package/edit?package=6a95b55966dd1c779500b962' \
--header 'Authorization: prk_private_key_company'

A package returns its data and the detail of every document under documents:

{
"name": "Lease agreements",
"subject": "Sign the agreements",
"message": "Please sign the attached documents",
"signers": [{ "name": "Luz Marina López", "email": "luz@example.com", "status": "pending" }],
"documents": [
{
"code": "CRSD8I9AJ1",
"name": "Lease agreement",
"url": "https://documents.auco.ai/...",
"signProfile": [{ "name": "Luz Marina López", "email": "luz@example.com" }]
}
]
}

Overwrite the process​

Once marked, resend the process to its creation service along with its identifier. The payload is the same as a regular creation, plus one field:

ProcessServiceIdentifier field
Document or contractUpload PDF or Create from templatecode
PackageCreate packagepackage
Resending replaces everything

Whatever you leave out is removed. Omit folder and the process moves to the root; omit tags and it ends up with none. Resend the full payload, not only what changed.

The identifier and the creation date are preserved.

In a package, the documents from the previous submission are deleted and new codes are generated — that is what lets you add and remove files freely. The credits of the previous package are refunded and the new ones are charged, so you end up paying for the final number of documents.

The id of the signers Auco does not notify is also regenerated on overwrite, for documents and packages alike. Any access you handed out with the previous ones stops working: take the new ones from the response or read them with GET /document.

curl --location 'https://api.auco.ai/v1.5/ext/document/many' \
--header 'Authorization: prk_private_key_company' \
--header 'Content-Type: application/json' \
--data-raw '{
"package": "6a95b55966dd1c779500b962",
"email": "manager@auco.ai",
"name": "Lease agreements",
"documents": [
{
"name": "Lease agreement",
"signProfile": [
{ "name": "Luz Marina López", "email": "luz@example.com", "type": "signature" }
]
}
]
}'

Errors​

MessageCause
DOCUMENT_NOT_FOUNDThe document does not exist, is not yours, or is not in an editable state
PACKAGE_NOT_FOUNDSame for a package. On overwrite, also when the package is not marked for edit
PACKAGE_ID_INVALIDThe package identifier is not 24 hexadecimal characters
INVALID_RESOURCEThe {resource} in the path is neither document nor package