Skip to main content

Update Document

Method: PATCH
/api/v1/documents/{documentId}


Description​

This endpoint updates an existing document. It allows modifying the document’s name, associated files, uploader details, and related metadata.


πŸ”‘ Authentication​

This endpoint requires authentication via headers.

ParamValueType
userId{{userId}}string
tenantId{{tenantId}}string

Path Parameter​

NameTypeDescription
documentIdstringThe unique ID of the document to update.

Request Body​

{
"name": "string",
"docs": [
{
"name": "string",
"link": "string"
}
],
"uploadedBy": "SELLER",
"countryCode": "string",
"userId": "string",
"tenantId": "string"
}

Request Body Explanation​

NameTypeDescription
namestringThe updated name of the document.
docsarrayList of associated files for the document.
docs[].namestringThe name of the document file.
docs[].linkstringA URL link to the document file.
uploadedBystringThe role of the uploader (e.g., "SELLER").
countryCodestringThe country code associated with the document.
userIdstringThe ID of the user making the update.
tenantIdstringThe ID of the tenant associated with the document.

Response: 200​

{
"message": "Document updated successfully.",
"documentId": "12345",
"updatedDocument": {
"name": "Updated Document Name",
"docs": [
{
"name": "File1",
"link": "https://example.com/file1.pdf"
},
{
"name": "File2",
"link": "https://example.com/file2.pdf"
}
],
"uploadedBy": "SELLER",
"countryCode": "NG"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /api/v1/documents/{documentId} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!