Documents

Operations related to document management

Invite a user to sign a document

post
/api/invite-for-sign
Authorizations
AuthorizationstringRequired

Enter the token in the format (Bearer )

Body
uuidstring · uuidRequiredExample: 72dcaac9-7398-408f-b4c0-c058d4a652ed
emailstring · emailRequiredExample: websinghajit@gmail.com
firstnamestringOptionalExample: John
lastnamestringOptionalExample: Doe
pageintegerOptionalExample: 1
xnumber · floatOptionalExample: 100.5
ynumber · floatOptionalExample: 200.5
Responses
200

Invitation email sent successfully

application/json
post
/api/invite-for-sign
POST /api/invite-for-sign HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 145

{
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "email": "websinghajit@gmail.com",
  "firstname": "John",
  "lastname": "Doe",
  "page": 1,
  "x": 100.5,
  "y": 200.5
}
{
  "success": "invitation email sent",
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "email": "websinghajit@gmail.com"
}

Upload a PDF document

post
/api/upload-document

Allows authenticated users to upload a PDF document. The document is stored, and a thumbnail is generated.

Authorizations
Body
filestring · binaryRequired

PDF document file (Only PDF format allowed)

Responses
200

Document uploaded successfully

application/json
post
/api/upload-document
POST /api/upload-document HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "success": "Document uploaded Successfully",
  "url": "https://docufi3d.com/invite/72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed"
}

Delete a document

delete
/api/delete-document

Allows authenticated users to delete a document by its UUID. If the document has not been signed, it is removed along with associated recipients and files.

Authorizations
Query parameters
uuidstring · uuidRequired

The UUID of the document to be deleted

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
Responses
200

Document removed successfully

application/json
delete
/api/delete-document
DELETE /api/delete-document?uuid=72dcaac9-7398-408f-b4c0-c058d4a652ed HTTP/1.1
Host: localhost:8000
Accept: */*
{
  "success": "Document Removed Successfully",
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed"
}

Download a signed document

get
/api/download-document

Allows authenticated users to download a signed document using its UUID.

Authorizations
Query parameters
uuidstring · uuidRequired

The UUID of the signed document to be downloaded

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
Responses
200

Signed document download

get
/api/download-document
GET /api/download-document?uuid=72dcaac9-7398-408f-b4c0-c058d4a652ed HTTP/1.1
Host: localhost:8000
Accept: */*

No content

List all documents

get
/api/documents

Retrieves a list of all documents belonging to the authenticated user.

Authorizations
Responses
200

Successful retrieval of documents

application/json
get
/api/documents
GET /api/documents HTTP/1.1
Host: localhost:8000
Accept: */*
{
  "success": "List of all Documents",
  "documents": [
    {
      "id": 1,
      "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
      "name": "Sample Document",
      "status": 1,
      "created_at": "2024-03-17T12:34:56Z",
      "updated_at": "2024-03-17T12:34:56Z"
    }
  ]
}

Get document status

get
/api/documents/status

Retrieves the status of a specific document belonging to the authenticated user.

Authorizations
Query parameters
uuidstring · uuidRequired

The UUID of the document.

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
Responses
200

Successful retrieval of document status

application/json
get
/api/documents/status
GET /api/documents/status?uuid=72dcaac9-7398-408f-b4c0-c058d4a652ed HTTP/1.1
Host: localhost:8000
Accept: */*
{
  "success": "List of all Documents",
  "documents": [
    {
      "id": 1,
      "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
      "name": "Sample Document",
      "status": 3,
      "created_at": "2024-03-17T12:34:56Z",
      "updated_at": "2024-03-17T12:34:56Z"
    }
  ]
}

Check if a document is signed

get
/api/documents/signed_status

Checks whether a document associated with a given UUID and email has been signed.

Authorizations
Query parameters
uuidstring · uuidRequired

The UUID of the document.

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
emailstring · emailRequired

The email address of the recipient.

Example: websinghajit@gmail.com
Responses
200

Document signed status

application/json
get
/api/documents/signed_status
GET /api/documents/signed_status?uuid=72dcaac9-7398-408f-b4c0-c058d4a652ed&email=websinghajit%40gmail.com HTTP/1.1
Host: localhost:8000
Accept: */*
{
  "success": "Document is signed"
}

Send a reminder email to a recipient

post
/api/documents/reminder

Sends a reminder email to a recipient for signing a document.

Authorizations
Body
uuidstring · uuidRequired

The UUID of the document.

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
emailstring · emailRequired

The email address of the recipient.

Example: websinghajit@gmail.com
Responses
200

Reminder email sent successfully

application/json
post
/api/documents/reminder
POST /api/documents/reminder HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: */*
Content-Length: 80

{
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "email": "websinghajit@gmail.com"
}
{
  "success": "Email to recipients sent successfully",
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "email": "websinghajit@gmail.com"
}

Sign a document

post
/api/sign_document

Allows an authenticated user to sign a document by providing a valid UUID.

Authorizations
Body
uuidstringRequired

Unique identifier of the document

Example: 72dcaac9-7398-408f-b4c0-c058d4a652ed
pageintegerOptional

Page number where the signature should be placed

Example: 1
xintegerOptional

X-coordinate of the signature placement

Example: 50
yintegerOptional

Y-coordinate of the signature placement

Example: 100
Responses
200

Document signed successfully

application/json
post
/api/sign_document
POST /api/sign_document HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "uuid": "72dcaac9-7398-408f-b4c0-c058d4a652ed",
  "page": 1,
  "x": 50,
  "y": 100
}
{
  "success": "document signed successfully."
}

Last updated