Skip to content

List a contract's documents

GET
/contracts/{id}/documents
curl --request GET \
--url 'https://api.vendorica.com/v1/contracts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents?includeSuperseded=true' \
--header 'Authorization: Bearer <token>'

Current documents only. ?includeSuperseded=true adds the ones later uploads replaced — a superseded agreement must never appear beside the live one with nothing distinguishing them.

id
required
string format: uuid
includeSuperseded
string
Allowed values: true false

Success

Media typeapplication/json
object
success
required
boolean
data
required
Array<object>
object
id
required
string format: uuid
contractId
required
string format: uuid
docType
required
string
fileId
required
string | null format: uuid
filename
required
string | null
mimeType
required
string | null
sizeBytes
required
integer | null
scanStatus
required
string | null
addedByUserId
required
string | null format: uuid
createdAt
required
string | null format: date-time
supersededById
required
string | null format: uuid
supersededAt
required
string | null format: date-time
timestamp
required
string format: date-time
requestId
string
message
string
Example
{
"success": true,
"data": [
{
"id": "22645569-8ef2-4771-89b2-087605434b76",
"contractId": "f1954f47-930b-499f-878e-6094a52202b0",
"docType": "string",
"fileId": "f99dfa3f-30b0-4e07-8a86-b04cba078158",
"filename": "string",
"mimeType": "string",
"sizeBytes": 1,
"scanStatus": "string",
"addedByUserId": "b7c06ef7-38ee-4baf-8bb8-3fc4f30c5b40",
"createdAt": "2026-08-19T09:41:12.004Z",
"supersededById": "403c6db6-d320-425c-8b78-cb8da82868ab",
"supersededAt": "2026-08-19T09:41:12.004Z"
}
],
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H",
"message": "string"
}

Validation error

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Bad request",
"code": "BAD_REQUEST",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Unauthorized

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Unauthorized",
"code": "UNAUTHORIZED",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Forbidden — missing scope

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Forbidden",
"code": "FORBIDDEN",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Not found

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Resource not found",
"code": "NOT_FOUND",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Rate limit exceeded

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Too many requests",
"code": "TOO_MANY_REQUESTS",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}