document_archive v1 API endpoints
/v1/document-revisions
/v1/document-revisions/{id}
/v1/document-revisions/{id}/{revisionNo}
/v1/document-revisions/{id}/{revisionNo}/thumbnail
/v1/documents
/v1/documents/{id}
/v1/documents/{id}/thumbnail
/v1/objects/document-archive
Sample Request
{
"companyId": "EN",
"docType": "PERSONNEL",
"mimeType": "image/tiff",
"id": "6cf38e81-07d3-4a72-ae16-032eb29a3a09",
"status": "N",
"revisionNo": 1,
"fileContent": "[BASE64 Content]",
"fileName": "TEST.tif",
"indexes": [
{ "sequenceNo": 1, "indexValue": "EN" },
{ "sequenceNo": 2, "indexValue": "87010101" }
],
"title": "TEST.tif",
"description": "Test descirption"
}
{
"companyId": "EN",
"docType": "PERSONNEL",
"mimeType": "image/tiff",
"id": "6cf38e81-07d3-4a72-ae16-032eb29a3a09",
"status": "N",
"expiryDate": "2025-11-28T00:00:00.000",
"revisionNo": 1,
"fileContent": "[BASE64 Content]",
"fileName": "TEST.tif",
"indexes": [
{ "sequenceNo": 1, "indexValue": "EN" },
{ "sequenceNo": 2, "indexValue": "87010101" }
],
"title": "TEST.tif",
"description": ""
}
Limits & Notes
- FileContent must be in base64 format.
- documentType must be a valid attribute value for the given client.
- indexes must have valid values for each index type configured for the document type.
Validation Rules for POST Method
POST_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | POST_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | POST_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_003 - Document is created
| Element | Details |
|---|
| Scenario ID | POST_003 |
| Scenario Name | Document is created |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | — |
| THEN | 201 response is returned; Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_004 - Client-supplied docSize is ignored
| Element | Details |
|---|
| Scenario ID | POST_004 |
| Scenario Name | Client-supplied docSize is ignored |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created with posted docSize |
| WHEN | Calling the POST method of the API with “docSize”:100 |
| BUT | docSize is ignored and calculated by the API |
| THEN | 201 response is returned; Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_005 - Client-supplied revisionNo is ignored
| Element | Details |
|---|
| Scenario ID | POST_005 |
| Scenario Name | Client-supplied revisionNo is ignored |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created with posted revisionNo |
| WHEN | Calling the POST method of the API with revisionNo:5 |
| BUT | revisionNo is ignored and set as 1 by the API |
| THEN | 201 response is returned; Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_006 - Client-supplied status is ignored
| Element | Details |
|---|
| Scenario ID | POST_006 |
| Scenario Name | Client-supplied status is ignored |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created with posted status |
| WHEN | Calling the POST method of the API with status:C |
| BUT | status is ignored and set as N by the API |
| THEN | 201 response is returned; Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_007 - Client-supplied id (GUID) is ignored
| Element | Details |
|---|
| Scenario ID | POST_007 |
| Scenario Name | Client-supplied id (GUID) is ignored |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created with posted id |
| WHEN | Calling the POST method of the API with “id”: “81891c64-1cb0-4d40-9f6f-083fc8084fd0” |
| BUT | ID is ignored and new ID is created |
| THEN | 201 response is returned; Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_008 - Missing required field – fileName
| Element | Details |
|---|
| Scenario ID | POST_008 |
| Scenario Name | Missing required field – fileName |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | fileName is missing or empty |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"code": 1010, "message": "The FileName field is required.\n"} |
POST_009 - Missing required field – docType
| Element | Details |
|---|
| Scenario ID | POST_009 |
| Scenario Name | Missing required field – docType |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | DocType is missing or empty |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"code": 1010, "message": "The DocType field is required.\n"} |
POST_010 - Missing required field – companyId
| Element | Details |
|---|
| Scenario ID | POST_010 |
| Scenario Name | Missing required field – companyId |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | companyID is missing |
| THEN | 201 response is returned; Document is created with user default companyID |
| Example Error Message | Response object with content, (same as GET response object) |
POST_011 - Missing required field – fileContent
| Element | Details |
|---|
| Scenario ID | POST_011 |
| Scenario Name | Missing required field – fileContent |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | fileContent is missing or empty |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"code": 1010, "message": "The FileContent field is required.\n"} |
POST_012 - fileContent is not in base64
| Element | Details |
|---|
| Scenario ID | POST_012 |
| Scenario Name | fileContent is not in base64 |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | fileContent is not in base64 format |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"message": "The file content is not base64-encoded.", "messageType": "Information", "code": null, "path": null} |
POST_013 - Index is not a valid value
| Element | Details |
|---|
| Scenario ID | POST_013 |
| Scenario Name | Index is not a valid value |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | One of the indexes has an invalid value |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | "notificationMessages": {"indexes": [{"code": 3010, "message": "Entered company 'TTT' does not exist"}]} |
POST_014 - Index is empty or missing
| Element | Details |
|---|
| Scenario ID | POST_014 |
| Scenario Name | Index is empty or missing |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | One of the indexes is empty or missing |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"code": 1010, "message": "The IndexValue field is required.\n"} |
POST_015 - One of the required indexes is not passed
| Element | Details |
|---|
| Scenario ID | POST_015 |
| Scenario Name | One of the required indexes is not passed |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | Document type requires 3 indexes but the last one was not provided |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | "notificationMessages": {"indexes": [{"code": 3010, "message": "You must enter a value for Resource"}]} |
POST_016 - Missing required field – title
| Element | Details |
|---|
| Scenario ID | POST_016 |
| Scenario Name | Missing required field – title |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API and a valid body provided |
| BUT | title is missing or empty |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | {"code": 1010, "message": "The Title field is required.\n"} |
POST_017 - ExpiryDate before today – reject
| Element | Details |
|---|
| Scenario ID | POST_017 |
| Scenario Name | ExpiryDate before today → reject |
| HTTP Code | 400 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | ExpiryDate is before today |
| THEN | Document is not created; 400 response is returned |
| Example Error Message | "notificationMessages": {"expiryDate": [{"code": 3010, "message": "The date in this field must be after {today}"}]} |
POST_018 - ExpiryDate equals today – accept
| Element | Details |
|---|
| Scenario ID | POST_018 |
| Scenario Name | ExpiryDate equals today → accept |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | System date fixed to 2025-10-28; valid body with ExpiryDate= “2025-10-28” |
| THEN | Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_019 - ExpiryDate in the future – accept
| Element | Details |
|---|
| Scenario ID | POST_019 |
| Scenario Name | ExpiryDate in the future → accept |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | System date fixed to 2025-10-28; valid body with ExpiryDate=“2025-10-29” |
| THEN | Document is created |
| Example Error Message | Response object with content, (same as GET response object) |
POST_020 - ExpiryDate not passed with expiry enabled
| Element | Details |
|---|
| Scenario ID | POST_020 |
| Scenario Name | ExpiryDate not passed but document type has expiry date enabled |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | DSystem date fixed to 2025-10-28; valid body with no expiry date |
| THEN | Document is created and expiry date is calculated by the system |
| Example Error Message | Response object with content, (same as GET response object) |
POST_021 - ExpiryDate passed with expiry enabled
| Element | Details |
|---|
| Scenario ID | POST_021 |
| Scenario Name | ExpiryDate passed and document type has expiry date enabled |
| HTTP Code | 201 |
| GIVEN | A new document needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | System date fixed to 2025-10-28; valid body with no expiry date |
| THEN | Document is created and expiry date from payload is used |
| Example Error Message | Response object with content, (same as GET response object) |
Sample Request
v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a09
Sample Response
{
"companyId": "EN",
"docType": "PERSONNEL",
"mimeType": "image/tiff",
"id": "6cf38e81-07d3-4a72-ae16-032eb29a3a09",
"status": "N",
"revisionNo": 1,
"fileContent": "[BASE64 Content]",
"fileName": "TEST.tif",
"checkoutUserId": "",
"lastUpdate": {
"updatedAt": "2005-10-10T12:12:00.000",
"updatedBy": "SYSEN"
},
"docSize": 0,
"indexes": [
{ "sequenceNo": 1, "indexValue": "EN" },
{ "sequenceNo": 2, "indexValue": "87010101" }
],
"title": "TEST.tif",
"description": ""
}
Limits & Notes
- One document per call.
- documentId must be a valid GUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Validation Rules for GET Method (Single)
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Data from an existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Data from an existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Document is found
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Document is found |
| HTTP Code | 200 |
| GIVEN | Data from an existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | 200 response is returned together with the document information |
| Example Error Message | RESPONSE: Document information is retrieved |
GET_004 - Document is not found
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Document is not found |
| HTTP Code | 404 |
| GIVEN | Data from an existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Document ID does not exist for the companyId |
| THEN | Document is not retrieved; 404 response is returned |
| Example Error Message | {"code": 1040, "message": "Object of a following parameters [id: 6cf38e81-07d3-4a72-ae16-032eb29a3a05, companyId: EN] was not found"} |
GET_005 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Document belongs to a different company |
| HTTP Code | 404 |
| GIVEN | Document 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists but with companyId= EN |
| WHEN | Calling the GET method of the API with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO |
| BUT | - |
| THEN | Document is not retrieved; 404 response is returned |
| Example Error Message | {"code": 1040, "message": "Object of a following parameters [id: 6cf38e81-07d3-4a72-ae16-032eb29a3a09, companyId: NO] was not found"} |
GET_006 - Invalid id (GUID) format
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Data from an existing document needs to be retrieved |
| WHEN | Calling the GET method of the API with malformed ID |
| BUT | - |
| THEN | Document is not retrieved; 400 response is returned |
| Example Error Message | {"message": "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null, "path": null} |
GET_007 - Invalid id is not in a GUID
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Invalid id is not in a GUID |
| HTTP Code | 400 |
| GIVEN | Existing document needs to be retrieved |
| WHEN | Calling the GET method of the API with /v1/documents/11 |
| BUT | - |
| THEN | Document is not retrieved; 400 response is returned |
| Example Error Message | {"message": "Unrecognised Guid format.", "messageType": "Information", "code": null, "path": null} |
Sample Request
GET /v1/documents?companyId=EN
GET /v1/documents?companyId=EN&doctype=INVOICE&limit=50
GET /v1/documents?companyId=EN&title=report&start=0&limit=20
GET /v1/documents?companyId=EN&doctype=CONTRACT&indexes=EN
GET /v1/documents?companyId=EN&withFileContent=true&limit=5
Sample Response
{
"start": 0,
"limit": 10,
"count": 10,
"total": 42,
"items": [
{
"companyId": "EN",
"docType": "PERSONNEL",
"mimeType": "image/tiff",
"id": "6cf38e81-07d3-4a72-ae16-032eb29a3a09",
"status": "N",
"revisionNo": 1,
"fileName": "Copy of 00100205.tif",
"checkoutUserId": "",
"lastUpdate": {
"updatedAt": "2005-10-10T12:12:00.000",
"updatedBy": "SYSEN"
},
"docSize": 0,
"indexes": [
{ "sequenceNo": 1, "indexValue": "EN" },
{ "sequenceNo": 2, "indexValue": "87010101" }
],
"title": "Copy of 00100205.tif",
"description": ""
}
]
}
Query Parameters
Retrieves documents array based on parameters.
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | required | Company filter. If not provided, user’s default company is used. | string | user’s default |
| doctype | required | Document type filter. Must be a valid attribute value. | string | none |
| title | optional | Title prefix filter (case-insensitive). Max 255 characters. Matches documents whose titles start with this value. | string | none |
| indexes | optional | Indexes filter. Values concatenated and split by semicolon (;). Must match in exact order. Case-insensitive. | string | none |
| start | optional | Zero-based offset for pagination. | integer | 0 |
| limit | optional | Page size. Must be between 0 and 50000. | integer | 10 |
| withFileContent | optional | Include base64 file content for each document. | boolean | false |
Limits & Notes
- Returns array of document objects.
- doctype must be a valid attribute value configured in the ERPx.
- companyId must be a valid attribute value configured in the ERPx.
- Pagination envelope always includes: start, limit, count (items on this page), total (matching query).
- start is the zero-based index where results begin. For example, with 1,000 items and start = 100, the response returns items from index 100 onward (900 items).
Validation Rules for GET Method (Multiple)
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised” |
GET_003 - Invalid companyID
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Not existing field in select parameter |
| HTTP Code | 403 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | CompanyId does not exist or have a valid value |
| THEN | API is not reached; 403 response is returned |
| Example Error Message | User is not authorised |
GET_004 - Happy path – minimal parameters
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Happy path – minimal parameters |
| HTTP Code | 200 |
| GIVEN | Documents exist for the company |
| WHEN | Calling the GET method of the API |
| BUT | No limit is passed |
| THEN | Returns list of documents limited to first 10 |
| Example Error Message | Body contains an array of 10 documents |
GET_005 - Happy path – all filters + files
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Happy path – all filters + files |
| HTTP Code | 200 |
| GIVEN | Matching documents exist |
| WHEN | Call GET with companyId, doctype, title, indexes, withFileContent=true |
| BUT | — |
| THEN | Returns filtered documents with Base64 fileContent |
| Example Error Message | — |
GET_006 - Negative limit
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Negative limit |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Limit has a negative value |
| THEN | Validation error; no data retrieved |
| Example Error Message | “Limit value must be between 0 and 50000” |
GET_007 - Limit above 50000
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Limit above 50000 |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Limit is above 50000 |
| THEN | Validation error; no data retrieved |
| Example Error Message | “Limit value must be between 0 and 50000” |
GET_008 - No limit passed
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | No limit passed |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | No limit parameters are passed |
| THEN | Returns the list of documents for companyId; default limit to 10 is applied |
| Example Error Message | Body contains an array of 10 documents |
GET_009 - Filtering by doctype
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Filtering by doctype |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method with a valid doctype value |
| BUT | — |
| THEN | Returns the list of documents |
| Example Error Message | Document list is retrieved |
GET_010 - Empty title – no title filter
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Empty title – no title filter |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method with title = "" |
| BUT | — |
| THEN | No title filtering is applied |
| Example Error Message | Document list is retrieved |
GET_011 - Title prefix match (case-insensitive)
| Element | Details |
|---|
| Scenario ID | GET_011 |
| Scenario Name | Title prefix match (case-insensitive) |
| HTTP Code | 200 |
| GIVEN | Multiple documents exist with titles containing “report” |
| WHEN | Calling GET with title = report |
| BUT | — |
| THEN | Only titles starting with “report” (case-insensitive) are returned |
| Example Error Message | Document list is retrieved, including items like: Report Q1, Report Q2; |
| excludes: Monthly Report | |
GET_012 - Title not starting with prefix – empty
| Element | Details |
|---|
| Scenario ID | GET_012 |
| Scenario Name | Title prefix mismatch |
| HTTP Code | 200 |
| GIVEN | Multiple documents exist |
| WHEN | Calling GET with title = report |
| BUT | No document starts with the prefix |
| THEN | Returns empty list; no error |
| Example Error Message | { "start":0,"limit":10,"count":0,"total":0,"items":[] } |
GET_013 - Title wildcard not supported
| Element | Details |
|---|
| Scenario ID | GET_013 |
| Scenario Name | Title wildcard is not supported |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling GET with title = * |
| BUT | — |
| THEN | Returns empty list; no error |
| Example Error Message | { "start":0,"limit":10,"count":0,"total":0,"items":[] } |
GET_014 - Title is not trimmed before matching
| Element | Details |
|---|
| Scenario ID | GET_014 |
| Scenario Name | Title not trimmed |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling GET with title " report " |
| BUT | — |
| THEN | Leading/trailing spaces are not trimmed. Returns empty list |
| Example Error Message | { "start":0,"limit":10,"count":0,"total":0,"items":[] } |
GET_015 - Title prefix combined with other filters
| Element | Details |
|---|
| Scenario ID | GET_015 |
| Scenario Name | Title prefix with doctype & indexes |
| HTTP Code | 200 |
| GIVEN | Documents across doctypes/indexes |
| WHEN | Calling the GET method of the API with title = report and doctype = invoice and indexes = A;B |
| BUT | — |
| THEN | Only returns the documents whose titles start with “report” and the matching doctype and indexes |
| Example Error Message | Document list is retrieved |
GET_016 - Start < 0
| Element | Details |
|---|
| Scenario ID | GET_016 |
| Scenario Name | Start < 0 |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling GET with start = -1 |
| BUT | — |
| THEN | Returns the list of documents (used default query parameters) |
| Example Error Message | Document list is retrieved |
GET_017 - Start beyond range
| Element | Details |
|---|
| Scenario ID | GET_017 |
| Scenario Name | Start beyond available records |
| HTTP Code | 200 |
| GIVEN | Total = 120 |
| WHEN | Calling the GET method of the API with start = 1000 |
| BUT | Start exceeds total |
| THEN | Empty list returned |
| Example Error Message | { "start":1000,"limit":10,"count":0,"total":827,"items":[] } |
GET_018 - Start omitted
| Element | Details |
|---|
| Scenario ID | GET_018 |
| Scenario Name | Start defaults to 0 |
| HTTP Code | 200 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API without start |
| BUT | — |
| THEN | Start=0 applied |
| Example Error Message | { "start":0,"limit":10,"count":0,"total":827,"items":[] } |
GET_019 - Start is non-numeric
| Element | Details |
|---|
| Scenario ID | GET_019 |
| Scenario Name | Start is non-numeric (string) |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API with start=ten |
| BUT | Not an integer |
| THEN | Returns 400 Bad Request |
| Example Error Message | “Start must be an integer” |
GET_020 - Start is float
| Element | Details |
|---|
| Scenario ID | GET_020 |
| Scenario Name | Start is float |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API with start=10.5 |
| BUT | Not an integer |
| THEN | Returns 400 Bad Request |
| Example Error Message | “Start must be an integer” |
GET_021 - Start equals total
| Element | Details |
|---|
| Scenario ID | GET_021 |
| Scenario Name | Start equals total (edge) |
| HTTP Code | 200 |
| GIVEN | total=120 |
| WHEN | Calling the GET method of the API with start=120 |
| BUT | — |
| THEN | Returns an empty list |
| Example Error Message | { "start":120,"limit":10,"count":0,"total":120,"items":[] } |
GET_022 - Boundary with limit
| Element | Details |
|---|
| Scenario ID | GET_022 |
| Scenario Name | Boundary with limit |
| HTTP Code | 200 |
| GIVEN | total=1000 |
| WHEN | Calling the GET method of the API with start=995&limit=10 |
| BUT | — |
| THEN | Returns last partial page (5 items) |
| Example Error Message | Document list is retrieved |
GET_023 - Indexes – single value
| Element | Details |
|---|
| Scenario ID | GET_023 |
| Scenario Name | Indexes – single value |
| HTTP Code | 200 |
| GIVEN | Documents exist with Index1 = IDX-1 |
| WHEN | Calling the GET method of the API with indexes=IDX-1 |
| BUT | — |
| THEN | Only returns the documents that have the IDX-1 as value of the first index |
| Example Error Message | Document list is retrieved |
GET_024 - Indexes – multiple values
| Element | Details |
|---|
| Scenario ID | GET_024 |
| Scenario Name | Indexes – multiple values |
| HTTP Code | 200 |
| GIVEN | Some documents have A and B |
| WHEN | Calling the GET method of the API with indexes=A;B |
| BUT | — |
| THEN | Only returns the documents that have provided all indexes |
| Example Error Message | Document list is retrieved |
GET_025 - Correct indexes values but in wrong order
| Element | Details |
|---|
| Scenario ID | GET_025 |
| Scenario Name | Correct indexes values but in wrong order |
| HTTP Code | 200 |
| GIVEN | Some documents have both A and B, indexes |
| WHEN | Calling the GET method of the API with indexes=B;A |
| BUT | Order mismatch |
| THEN | Empty list is returned because indexes must be in a correct order |
| Example Error Message | {"items":[]} |
GET_026 - Indexes – spaces and empty segments are NOT ignored
| Element | Details |
|---|
| Scenario ID | GET_026 |
| Scenario Name | Indexes not trimmed |
| HTTP Code | 200 |
| GIVEN | Some documents have both A and B, indexes |
| WHEN | Calling the GET method of the API with indexes= B; A |
| BUT | — |
| THEN | Empty list is returned because indexes values are not trimmed |
| Example Error Message | {"items":[]} |
GET_028 - Index value mismatch at position 1
| Element | Details |
|---|
| Scenario ID | GET_028 |
| Scenario Name | Index value mismatch at position 1 even if position 2 would match |
| HTTP Code | 200 |
| GIVEN | Index1=EN, Index2=100 |
| WHEN | Calling the GET method of the API with indexes=PL;100 |
| BUT | First index mismatched |
| THEN | Returns an empty list; no documents are with the first index |
| Example Error Message | {"items":[]} |
GET_029 - Too many indexes provided
| Element | Details |
|---|
| Scenario ID | GET_029 |
| Scenario Name | Too many indexes |
| HTTP Code | 200 |
| GIVEN | The document has 2 indexes |
| WHEN | Calling the GET method of the API with indexes=EN;100;XTR |
| BUT | — |
| THEN | Returns an empty list |
| Example Error Message | {"items":[]} |
GET_030 - Empty middle index treated as required
| Element | Details |
|---|
| Scenario ID | GET_030 |
| Scenario Name | Empty middle index is treated as a required empty slot |
| HTTP Code | 200 |
| GIVEN | The document has 3 indexes |
| WHEN | Calling the GET method of the API with indexes=EN;;100 |
| BUT | — |
| THEN | Returns an empty list; the empty index is treated as the correct value |
| Example Error Message | {"items":[]} |
GET_031 - Indexes case-insensitive
| Element | Details |
|---|
| Scenario ID | GET_031 |
| Scenario Name | indexes case – insensitive (single slot) |
| HTTP Code | 200 |
| GIVEN | Documents have Index1=EN |
| WHEN | Calling the GET method of the API with indexes=en |
| BUT | — |
| THEN | Returns the documents with Index1=EN |
| Example Error Message | Document list is retrieved |
GET_032 - Index is combined with other filters
| Element | Details |
|---|
| Scenario ID | GET_032 |
| Scenario Name | Index + doctype combined |
| HTTP Code | 200 |
| GIVEN | Documents : doctype=invoice, Index1=EN, Index2=100 |
| WHEN | Calling the GET method of the API with doctype=invoice&indexes=en;100 |
| BUT | — |
| THEN | Only returns the documents that meet the doctype and indexes values |
| Example Error Message | Document list is retrieved |
GET_033 - Mixed casing across positions
| Element | Details |
|---|
| Scenario ID | GET_033 |
| Scenario Name | Mixed casing across index positions |
| HTTP Code | 200 |
| GIVEN | Documents have Index1=EN |
| WHEN | Calling the GET method of the API with indexes=eN |
| BUT | — |
| THEN | Returns the documents with Index1=EN |
| Example Error Message | Document list is retrieved |
Sample Request
[
{
v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a09/thumbnail?width=96&height=96
}
]
Sample Response
{
"id": "6cf38e81-07d3-4a72-ae16-032eb29a3a09",
"revisionNo": 1,
"width": 96,
"height": 96,
"mimeType": "image/tiff",
"fileName": "TEST.tif",
"lastUpdate": {
"updatedAt": "2025-10-28T14:45:16.000",
"updatedBy": "SYSEN"
},
"fileContent": "base 64 Content
}
Additional parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | required | Filters thumbnails by the company the document belongs to | string | empty |
| width | optional | Width of the thumbnail to return | integer | 96 |
| height | optional | Height of the thumbnail to return | integer | 96 |
Limits & Notes
- Retrieves document thumbnail based on its Id and CompanyId.
- One thumbnail per call.
- documentId must be a valid GUID.
Validation Rules for GET Method (thumbnails)
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Existing document needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Document thumbnail is found (default size)
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Happy path – document thumbnail is found |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | Returns the document thumbnail with default size 96×96 px |
| Example Error Message | Thumbnail json as in the sample response |
GET_004 - Thumbnail returned with expected width & height
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Happy path – expected width/height provided |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling the GET method with width=500 and height=100 |
| BUT | — |
| THEN | Returns thumbnail sized 500×100 px |
| Example Error Message | Thumbnail json as in the sample response |
GET_005 - Thumbnail returned with expected width only
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Expected width only |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling GET with width=500 and empty height |
| BUT | — |
| THEN | Returns width 500 px and height 96 px as the default value |
| Example Error Message | Thumbnail json as in the sample response |
GET_006 - Thumbnail returned with expected height only
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Expected height only |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling GET with height=500 and empty width |
| BUT | — |
| THEN | Returns height 500 px, width 96 px as the default value |
| Example Error Message | Thumbnail json as in the sample response |
GET_007 - Document not found
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Document is not found |
| HTTP Code | 404 |
| GIVEN | No document with ID {6cf38e81-07d3-4a72-ae16-032eb29a3a05} for companyId=EN |
| WHEN | GET called with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=EN |
| BUT | — |
| THEN | 404 Not Found response is returned |
| Example Error Message | No content |
GET_008 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Document belongs to another company |
| HTTP Code | 404 |
| GIVEN | Document with ID {6cf38e81-07d3-4a72-ae16-032eb29a3a05} exists but with companyId=EN |
| WHEN | GET called with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO |
| BUT | — |
| THEN | 404 Not Found response is returned |
| Example Error Message | No content |
GET_009 - Invalid GUID format
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Existing document needs to be retrieved |
| WHEN | Calling the GET method of the API with a malformed {id} (e.g., not a GUID) |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null,"path": null} |
GET_010 - Invalid id is not a GUID
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Invalid id is not a GUID |
| HTTP Code | 400 |
| GIVEN | Existing document needs to be retrieved |
| WHEN | GET called with /v1/documents/11 endpoint |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | json { "message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null } |
GET_011 - Happy path – PDF document
| Element | Details |
|---|
| Scenario ID | GET_011 |
| Scenario Name | Thumbnail for PDF |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling the GET method of the API with the existing document Id |
| BUT | D ocument is in PDF file |
| THEN | Returns default Base64 PDF icon |
| Example Error Message | Thumbnail json as in the sample response |
GET_012 - Happy path – WORD document
| Element | Details |
|---|
| Scenario ID | GET_012 |
| Scenario Name | Thumbnail for Word |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling the GET method of the API with the existing document Id |
| BUT | Document is in WORD file |
| THEN | Returns default Base64 WORD icon |
| Example Error Message | Thumbnail json as in the sample response |
GET_013 - Happy path – Unknown mimeType
| Element | Details |
|---|
| Scenario ID | GET_013 |
| Scenario Name | Happy path – document thumbnail for file with an unknown mimeType |
| HTTP Code | 200 |
| GIVEN | Document {id} exists |
| WHEN | Calling the GET method of the API with the existing document Id |
| BUT | Document is in FILE file |
| THEN | Returns default Base64 FILE icon |
| Example Error Message | Thumbnail json as in the sample response |
Sample Request
[
{
"path": "description",
"op": "replace",
"value": "new description"
}
]
[
{ "op": "replace", "path": "/title","value": "New title"},
{ "op": "replace", "path": "/description", "value": "New description"}
]
[
{ "op": "replace", "path": "/indexes/1/indexValue", "value": "87010101" }
]
[
{
"path": "indexes",
"op": "replace",
"value": [
{
"SequenceNo": 1,
"indexValue": "EN"
},
{
"SequenceNo": 2,
"indexValue": "87010101"
}
]
}
]
Additional Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | required | Specify if you wish to update a document that exists in a specific company or client. | string | empty |
Limits & Notes
- Updates document value based on its ID and company ID according to changes specified in the patch document.
- One document per call.
- Possibility to update several fields per call.
- Read-only fields: Cannot modify FileName, FileContent, MimeType, Status, DocSize, Id, RevisionNo, DocType.
Validation Rules for PATCH Method
PATCH_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | PATCH_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 response is returned |
| Example Error Message | “User is not authorised.” |
PATCH_002 - Missing mandatory fields
| Element | Details |
|---|
| Scenario ID | PATCH_002 |
| Scenario Name | Missing mandatory fields |
| HTTP Code | 422 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | Mandatory field is missing |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “The {0} field is required.” |
PATCH_003 - Invalid format of fields
| Element | Details |
|---|
| Scenario ID | PATCH_003 |
| Scenario Name | Invalid format of fields |
| HTTP Code | 422 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | Field format is invalid |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “Invalid date time format…” / “Error converting value {0} to type ‘{1}’…” |
PATCH_004 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | PATCH_004 |
| Scenario Name | Unknown companyID |
| HTTP Code | 422 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | Invalid companyID |
| THEN | Data is not updated; 422 response is returned |
| Example Error Message | “Unknown {0}.” |
PATCH_005 - ID is not in GUID format
| Element | Details |
|---|
| Scenario ID | PATCH_005 |
| Scenario Name | ID is not in GUID format |
| HTTP Code | 404 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | ID of document is not in GUID format (e.g., id=5) |
| THEN | Data is not updated; 404 response is returned |
| Example Error Message | {"message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null} |
PATCH_006 - ID is not a valid GUID
| Element | Details |
|---|
| Scenario ID | PATCH_006 |
| Scenario Name | ID is not a valid GUID |
| HTTP Code | 404 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | ID of document is not in valid GUID format (e.g., id=6cf38e81-07d3-4a72-ae16-032eb29a3a0) |
| THEN | Data is not updated; 404 response is returned |
| Example Error Message | {"message": "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null, "path": null} |
PATCH_007 - Update title (Happy path)
| Element | Details |
|---|
| Scenario ID | PATCH_007 |
| Scenario Name | Update title (Happy path) |
| HTTP Code | 200 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method of the API |
| BUT | — |
| THEN | Returns 200 response and no content |
| Example Error Message | No content |
PATCH_008 - Happy path - Update title and description
| Element | Details |
|---|
| Scenario ID | PATCH_008 |
| Scenario Name | Update title and description (Happy path) |
| HTTP Code | 200 |
| GIVEN | User needs to modify existing document |
| WHEN | Calling PATCH method with two operations to replace title and description |
| BUT | — |
| THEN | Returns 200 response and no content |
| Example Error Message | No content |
PATCH_009 - Update the Id of the document
| Element | Details |
|---|
| Scenario ID | PATCH_009 |
| Scenario Name | Attempt to update ID field |
| HTTP Code | 400 |
| GIVEN | User needs to modify the ID of the document |
| WHEN | Calling PATCH method with path:“id” |
| BUT | — |
| THEN | Data is not updated; 400 response is returned |
| Example Error Message | {"code": 4020, "message": "PatchOperation index 0: Provided path \"id\" is invalid"} |
PATCH_010 - Update the docType of the document
| Element | Details |
|---|
| Scenario ID | PATCH_010 |
| Scenario Name | Attempt to update docType |
| HTTP Code | 400 |
| GIVEN | User needs to modify the docType of the document |
| WHEN | Calling PATCH method with path:“docType” |
| BUT | — |
| THEN | Data is not updated; 400 response is returned |
| Example Error Message | {"code": 4020, "message": "PatchOperation index 0: Provided path \"docType\" is invalid"} |
PATCH_011 - Attempt to update mimeType
| Element | Details |
|---|
| Scenario ID | PATCH_011 |
| Scenario Name | Attempt to update mimeType |
| HTTP Code | 400 |
| GIVEN | User needs to modify the mimeType of the document |
| WHEN | Calling PATCH method with path:“mimeType” |
| BUT | — |
| THEN | Data is not updated; 400 response is returned |
| Example Error Message | {"code": 4020, "message": "PatchOperation index 0: Provided path \"mimeType\" is invalid"} |
PATCH_012 - Attempt to update fileName
| Element | Details |
|---|
| Scenario ID | PATCH_012 |
| Scenario Name | Attempt to update fileName |
| HTTP Code | 400 |
| GIVEN | User needs to modify the fileName of the document |
| WHEN | Calling PATCH method with path:“fileName” |
| BUT | — |
| THEN | Data is not updated; 400 response is returned |
| Example Error Message | {"code": 4020, "message": "PatchOperation index 0: Provided path \"/fileName\" is invalid"} |
PATCH_013 - Happy path - Update document indexes
| Element | Details |
|---|
| Scenario ID | PATCH_013 |
| Scenario Name | Update document indexes (Happy path) |
| HTTP Code | 200 |
| GIVEN | User needs to modify the index of the document |
| WHEN | Calling PATCH method with [{"op": "replace", "path": "/indexes/1/indexValue", "value": "EN"}] |
| BUT | — |
| THEN | Returns 200 response and no content |
| Example Error Message | No content |
PATCH_014 - Incorrect value for index
| Element | Details |
|---|
| Scenario ID | PATCH_014 |
| Scenario Name | Incorrect value for index |
| HTTP Code | 400 |
| GIVEN | User needs to modify the index of the document |
| WHEN | Calling the PATCH method of the API with [ { "op": "replace", "path": "/indexes/1/indexValue", "value": "TEST" } ] |
| BUT | — |
| THEN | Returns 400 response |
| Example Error Message | {"indexes": [{"code": 3010, "message": "Value TEST is not valid for attribute Resource"}]} |
PATCH_015 - Incorrect value in one of the indexes
| Element | Details |
|---|
| Scenario ID | PATCH_015 |
| Scenario Name | Incorrect value in one of the indexes |
| HTTP Code | 400 |
| GIVEN | User needs to modify the indexes of the document |
| WHEN | Calling PATCH method with replace for all indexes |
| BUT | One value-for-index is incorrect |
| THEN | Returns 400 response and no content |
| Example Error Message | {"indexes": [{"code": 3010, "message": "Value test is not valid for attribute Resource"}]} |
PATCH_016 - expiryDate is set to a past date
| Element | Details |
|---|
| Scenario ID | PATCH_016 |
| Scenario Name | expiryDate is set to a past date |
| HTTP Code | 400 |
| GIVEN | User needs to modify the expiryDate of the document |
| WHEN | Calling PATCH method with expiryDate=2025-10-27 |
| BUT | Today is 2025-10-28 |
| THEN | Returns 400 response and no content |
| Example Error Message | {"expiryDate": [{"code": 3010, "message": "The date in this field must be after 10/28/2025 00:00:00"}]} |
Sample Request
DELETE /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a09
Additional Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to delete a document that exists in a specific company or client. | string | empty |
Limits & Notes
- Deletes document based on given document Id.
- One document per call.
- Soft delete: Status is changed to “T” (Terminated). Document is not physically removed from database.
- Document must belong to specified companyId to be deleted.
- Deleted documents may still be retrievable through archive queries depending on system configuration.
Validation Rules for DELETE Method
DEL_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | DEL_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Document needs to be deleted |
| WHEN | Calling DELETE method of the API |
| BUT | User is not authorised |
| THEN | API is not reached; 403 response is returned |
| Example Error Message or Response | “User is not authorised.” |
DEL_002 - Missing required parameters
| Element | Details |
|---|
| Scenario ID | DEL_002 |
| Scenario Name | Missing required parameters |
| HTTP Code | 404 |
| GIVEN | Document needs to be deleted |
| WHEN | Calling DELETE method of the API |
| BUT | Required parameter is missing |
| THEN | API is not reached; 404 response is returned |
| Example Error Message or Response | “No HTTP resource was found matching {0}” |
DEL_003 - Happy path - document is found
| Element | Details |
|---|
| Scenario ID | DEL_003 |
| Scenario Name | Happy path - document is found |
| HTTP Code | 200 |
| GIVEN | Document {id} exists for companyId={companyId} and user is authorised |
| WHEN | Calling DELETE method with /v1/documents/{id}?companyId={companyID} |
| BUT | — |
| THEN | Document is deleted (status is set to ‘T’) |
| Example Error Message or Response | No content |
DEL_004 - Document is not found
| Element | Details |
|---|
| Scenario ID | DEL_004 |
| Scenario Name | Document is not found |
| HTTP Code | 404 |
| GIVEN | Document with provided GUID does not exist for companyId = EN |
| WHEN | Calling the DELETE method of the API with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=EN |
| BUT | Document does not exist |
| THEN | Document is not found; 404 response is returned |
| Example Error Message | { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5","title": "Not Found","status": 404, "traceId": "00-52d574418d3aebf75924a0cc3e6a8011-56e22649b67df2dc-01"} |
DEL_005 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | DEL_005 |
| Scenario Name | Document belongs to a different company |
| HTTP Code | 404 |
| GIVEN | Document exists but under a different companyId (EN) |
| WHEN | Calling the DELETE method with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO |
| BUT | Document does not belong to requested company |
| THEN | Document is not found; 404 response is returned |
| Example Error Message | { "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5", "title": "Not Found", "status": 404, "traceId":"00-742c115481bb220ee9b0976526493382-1fabd1c83c01523d-01" } |
DEL_006 - Invalid ID (GUID) format
| Element | Details |
|---|
| Scenario ID | DEL_006 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Existing document needs to be deleted |
| WHEN | Calling the DELETE method with malformed {id} (not a GUID) |
| BUT | - |
| THEN | Document is not found; 400 response is returned |
| Example Error Message | “GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)” |
DEL_007 - Invalid ID not in GUID format
| Element | Details |
|---|
| Scenario ID | DEL_007 |
| Scenario Name | Invalid id is not a GUID |
| HTTP Code | 400 |
| GIVEN | Existing document needs to be deleted |
| WHEN | Calling DELETE with /v1/documents/11 |
| BUT | - |
| THEN | Document is not found; 400 response is returned |
| Example Error Message | “Unrecognised GUID format” |
Sample Request
GET /v1/document-revisions/a9a66369-ceef-45c8-93ab-760e4e8e5db2?start=0&limit=1
Sample Response
{
"start": 0,
"limit": 1,
"count": 1,
"total": 3,
"items": [
{
"id": "a9a66369-ceef-45c8-93ab-760e4e8e5db2",
"comment": "Revision comment",
"fileContent": “[BASE64 CONTENT]”,
"fileName": "TEST_FILE.jpg",
"revisionNo": 1,
"mimeType": "image/jpeg",
"lastUpdate": {
"updatedAt": "2025-10-28T18:30:29.640",
"updatedBy": "SYSEN"
}
}
]
}
Additional Parameters
The following parameters help retrieve information:
| Parameter | Value | Description | Data Type | Default Value |
|---|
| id | required | Document ID (GUID format) | string | - |
| companyId | optional | Specify if you wish to retrieve revisions that exist in a specific company or client. | string | empty |
| start | optional | Zero-based offset for pagination | integer | 0 |
| limit | optional | Page size (number of revisions to return) | integer | 10 |
Limits & Notes
- Id must be a valid document ID in GUID format.
- companyId must be a valid company attribute value.
- Response always contains FileContent in base64 format.
- Revisions are sorted by revisionNo.
- Limit is 10 by default if not specified.
- Limit 0 results in only the Total value being returned.
- The response uses a standard pagination envelope with start, limit, - count (the number of items returned on this page), total (the total number of records matching the query filters), and items array that contains the current page of results.
Validation Rules for GET Method - List Revisions
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Document revisions need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Document revisions need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path – minimal parameters
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Happy path – minimal parameters |
| HTTP Code | 200 |
| GIVEN | Document revisions need to be retrieved |
| WHEN | Calling the GET method of the API with document Id only |
| BUT | No limit passed |
| THEN | Returns the list of all document revisions with the file contents |
| Example Error Message | Check sample response |
GET_004 - Happy path – minimal parameters
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Happy path – minimal parameters |
| HTTP Code | 200 |
| GIVEN | Document with 3 revisions needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id only |
| BUT | No limit passed |
| THEN | Returns the list of all 3 document revisions with the file contents |
| Example Error Message | Check sample response |
GET_005 - Happy path – with limit parameter
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Happy path – with limit parameter |
| HTTP Code | 200 |
| GIVEN | Document with 3 revisions needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id and limit 1 |
| BUT | — |
| THEN | Returns the list of document revisions containing only one, first revision |
| Example Error Message | Check sample response |
GET_006 - Happy path – with limit and start parameters
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Happy path – with limit and start parameters |
| HTTP Code | 200 |
| GIVEN | Document with 3 revisions needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id, limit 1 and start 2 |
| BUT | — |
| THEN | Returns the list of document revisions containing only one, last revision |
| Example Error Message | Check sample response |
GET_007 - Happy path – with limit=0
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Happy path – with limit=0 |
| HTTP Code | 200 |
| GIVEN | Document with 3 revisions needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id and limit = 0 |
| BUT | — |
| THEN | Returns an empty list of revisions, just a summary with Total:3 |
| Example Error Message | Check sample response |
GET_008 - Happy path – minimal parameters, and 20 revisions
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Happy path – default limit with many revisions |
| HTTP Code | 200 |
| GIVEN | Document with 20 revisions needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id only |
| BUT | No limit passed |
| THEN | Returns the list of 10 document revisions with the file contents. Limit is 10 by default when not passed |
| Example Error Message | Check sample response |
GET_009 - Negative limit
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Negative limit |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Limit has a negative value |
| THEN | Validation error, no data is retrieved |
| Example Error Message | Value may not be negative |
GET_010 - Limit above max int32 value
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Limit above max int32 value |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Limit is above max int32 value |
| THEN | Validation error, no data is retrieved |
| Example Error Message | {"code": 1010, "message": "The value '999999999999' is not valid.\n"} |
GET_011 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | GET_011 |
| Scenario Name | Document belongs to a different company |
| HTTP Code | 200 |
| GIVEN | Document 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists with companyId=EN |
| WHEN | Calling the GET method /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO |
| BUT | - |
| THEN | 200 response is returned but with an empty list |
| Example Error Message | {"start": 0, "limit": 0, "count": 0, "total": 0, "items": []} |
GET_012 - Invalid id (GUID) format
| Element | Details |
|---|
| Scenario ID | GET_012 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method of the API with malformed {id} (e.g., not a GUID) |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null, "path": null} |
GET_013 - Invalid id is not in a GUID
| Element | Details |
|---|
| Scenario ID | GET_013 |
| Scenario Name | Invalid id is not in a GUID |
| HTTP Code | 400 |
| GIVEN | Existing documents need to be retrieved |
| WHEN | Calling the GET method with /v1/document-revisions/1 endpoint |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null} |
Sample Request
/v1/document-revisions/a9a66369-ceef-45c8-93ab-760e4e8e5db2/1
Sample Response
{
"id": "a9a66369-ceef-45c8-93ab-760e4e8e5db2",
"comment": "Revision comment",
"fileContent": “[BASE64 CONTENT]”,
"fileName": "TEST_FILE.jpg",
"revisionNo": 1,
"mimeType": "image/jpeg",
"lastUpdate": {
"updatedAt": "2025-10-28T18:30:29.640",
"updatedBy": "SYSEN"
}
}
Additional Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| id | required | Document ID (GUID format) | string | - |
| revisionNo | required | Revision number | integer | - |
| companyId | optional | Specify if you wish to retrieve a revision that exists in a specific company or client. | string | empty |
Limits & Notes
- Id must be a valid document ID in GUID format.
- revisionNo must be a valid revision number.
- companyId must be a valid company attribute value.
- Response contains file content in base64.
- One revision per call.
Validation Rules for GET Method - Single Revision
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Happy path |
| HTTP Code | 200 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method of the API with document Id and revisionNo |
| BUT | — |
| THEN | 200 response is returned; returns object with existing revision |
| Example Error Message | Check sample response |
GET_004 - Happy path with specific revisions
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Happy path with specific revision |
| HTTP Code | 200 |
| GIVEN | Document with 3 revisions needs to be retrieved |
| WHEN | Calling the GET method with document Id and revisionNo=3 |
| BUT | — |
| THEN | 200 response is returned; returns object with existing revision and file contents |
| Example Error Message | Check sample response |
GET_005 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Document belongs to a different company |
| HTTP Code | 404 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method with companyId=NO |
| BUT | Document belongs to EN company |
| THEN | 404 error response is returned; no data is retrieved |
| Example Error Message | {"code": 1040, "message": "Object of the following parameters [id: a9a66369-ceef-45c8-93ab-760e4e8e5db2, revisionNo: 1, companyId: NO] was not found"} |
GET_006 - Document is not found
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Document is not found |
| HTTP Code | 404 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Document with id does not exist |
| THEN | 404 Not Found response is returned |
| Example Error Message | {"code": 1040, "message": "Object of the following parameters [id: a9a66369-ceef-45c8-93ab-760e4e8e5db1, revisionNo: 1, companyId: EN] was not found"} |
GET_007 - Non-existing revision number
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Non-existing revision number |
| HTTP Code | 404 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method with revisionNo=5 |
| BUT | Document has only 3 revisions |
| THEN | 404 error response is returned; no data is retrieved |
| Example Error Message | {"code": 1040, "message": "Object of the following parameters [id: a9a66369-ceef-45c8-93ab-760e4e8e5db2, revisionNo: 6, companyId: EN] was not found"} |
GET_008 - Revision number is above max int32 value
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Revision number is above max int32 value |
| HTTP Code | 400 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | Revision number is above max int32 value |
| THEN | 400 Validation error response is returned; no data is retrieved |
| Example Error Message | {"code": 1010, "message": "The value '999999999999' is not valid.\n"} |
GET_009 - Invalid id (GUID) format
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method with malformed {id} (e.g., not a GUID) |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null, "path": null} |
GET_010 - Invalid id is not in a GUID
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Invalid id is not in a GUID |
| HTTP Code | 400 |
| GIVEN | Document revision needs to be retrieved |
| WHEN | Calling the GET method with /v1/document-revisions/1 |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null} |
Sample Request
/v1/document-revisions/a9a66369-ceef-45c8-93ab-760e4e8e5db2/1/thumbnail?width=96&height=96
Sample Response
{
"id": "a9a66369-ceef-45c8-93ab-760e4e8e5db2",
"revisionNo": 1,
"width": 96,
"height": 96,
"mimeType": "image/jpeg",
"fileName": "bird.jpg",
"lastUpdate": {
"updatedAt": "2025-10-28T18:30:29.000",
"updatedBy": "SYSEN"
},
"fileContent": "[BASE 64 Content]”
}
Additional Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| id | required | Document ID (GUID format) | string | - |
| revisionNo | required | Revision number | integer | - |
| companyId | optional | Specify if you wish to retrieve a thumbnail that exists in a specific company or client. | string | empty |
| width | optional | Thumbnail width in pixels | integer | 96 |
| height | optional | Thumbnail height in pixels | integer | 96 |
Limits & Notes
- One thumbnail per call.
- documentId must be a valid GUID.
- revisionNo must be a valid number of revisions.
Validation Rules for GET Method - Thumbnail
GET_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path – document thumbnail is found
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Happy path – document thumbnail is found |
| HTTP Code | 200 |
| GIVEN | Document {id} and revisionNo exist |
| WHEN | Calling the GET method of the API |
| BUT | — |
| THEN | Returns the document thumbnail with default size 96px / 96px |
| Example Error Message | Thumbnail JSON as in sample response |
GET_004 - Happy path – thumbnail with custom dimensions
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Happy path – document thumbnail is returned with expected width and height |
| HTTP Code | 200 |
| GIVEN | Document {id} and revisionNo exist |
| WHEN | Calling the GET method with width=500 and height=100 |
| BUT | — |
| THEN | Returns the document thumbnail with expected size, width 500 px / height 100 px |
| Example Error Message | Thumbnail JSON as in sample response |
GET_005 - Happy path – thumbnail with expected width
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Happy path – thumbnail with expected width |
| HTTP Code | 200 |
| GIVEN | Document {id} and revisionNo exist |
| WHEN | Calling the GET method with width=500 and empty height |
| BUT | — |
| THEN | Returns the document thumbnail with width 500 px, height 96 px as default value |
| Example Error Message | Thumbnail JSON as in sample response |
GET_006 - Happy path – thumbnail with expected height
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Happy path – thumbnail with expected height |
| HTTP Code | 200 |
| GIVEN | Document {id} and revisionNo exist |
| WHEN | Calling the GET method with height=500 and empty width |
| BUT | — |
| THEN | Returns the document thumbnail with height 500 px, width 96 px as default value |
| Example Error Message | Thumbnail JSON as in sample response |
GET_007 - Document is not found
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Document is not found |
| HTTP Code | 404 |
| GIVEN | No document with 6cf38e81-07d3-4a72-ae16-032eb29a3a05 for companyId=EN |
| WHEN | Calling the GET method of the API |
| BUT | Document with id does not exist |
| THEN | 404 Not Found response is returned |
| Example Error Message | No content |
GET_008 - Document belongs to a different company
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Document belongs to a different company |
| HTTP Code | 404 |
| GIVEN | Document 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists, but with companyId= EN |
| WHEN | Calling the GET method of the API with companyId=NO |
| BUT | — |
| THEN | 404 Not Found response is returned |
| Example Error Message | No content |
GET_009 - Invalid id (GUID) format
| Element | Details |
|---|
| Scenario ID | GET_009 |
| Scenario Name | Invalid id (GUID) format |
| HTTP Code | 400 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method with malformed {id} (e.g., not a GUID) |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).", "messageType": "Information", "code": null, "path": null} |
GET_010 - Invalid id is not in a GUID
| Element | Details |
|---|
| Scenario ID | GET_010 |
| Scenario Name | Invalid id is not in a GUID |
| HTTP Code | 400 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method with /v1/document-revisions/11/1/thumbnail endpoint |
| BUT | — |
| THEN | 400 Bad Request response is returned |
| Example Error Message | {"message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null} |
GET_011 - Happy path – document thumbnail for PDF
| Element | Details |
|---|
| Scenario ID | GET_011 |
| Scenario Name | Happy path – document thumbnail for PDF |
| HTTP Code | 200 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method with existing document Id |
| BUT | Document is in a PDF file |
| THEN | Returns default Base64 PDF icon |
| Example Error Message | Thumbnail JSON as in sample response |
GET_012 - Happy path – document thumbnail for WORD
| Element | Details |
|---|
| Scenario ID | GET_012 |
| Scenario Name | Happy path – document thumbnail for WORD |
| HTTP Code | 200 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method with existing document Id |
| BUT | Document is in a WORD file |
| THEN | Returns default Base64 WORD icon |
| Example Error Message | Thumbnail JSON as in sample response |
GET_013 - Happy path – document thumbnail for unknown mimeType
| Element | Details |
|---|
| Scenario ID | GET_013 |
| Scenario Name | Happy path – document thumbnail for unknown mimeType |
| HTTP Code | 200 |
| GIVEN | Document revision thumbnail needs to be retrieved |
| WHEN | Calling the GET method with existing document Id |
| BUT | DDocument is in a FILE file |
| THEN | Returns default Base64 FILE icon |
| Example Error Message | Thumbnail JSON as in sample response |
Sample Request
{
"id": "a9a66369-ceef-45c8-93ab-760e4e8e5db2",
"comment": "New document",
"fileContent":"[BASE 64 CONTENT]",
"fileName": "TEST.jpg",
}
Limits & Notes
- One thumbnail per call.
- documentId must be a valid GUID.
- FileContent must be in base64.
- revisionNo cannot be passed - it is always the next value created by system (auto-incremented).
Validation Rules for POST Method
POST_001 - User is not authorised
| Element | Details |
|---|
| Scenario ID | POST_001 |
| Scenario Name | User is not authorised |
| HTTP Code | 403 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_002 - Unknown companyID
| Element | Details |
|---|
| Scenario ID | POST_002 |
| Scenario Name | Unknown companyID |
| HTTP Code | 403 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | companyID does not exist |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
POST_003 - Happy path document revision is created
| Element | Details |
|---|
| Scenario ID | POST_003 |
| Scenario Name | Happy path - document revision is created |
| HTTP Code | 201 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API with a valid body provided |
| BUT | — |
| THEN | 201 response is returned; Document revision is created with the next revisionNo |
| Example Error Message | Response object with content (same as the GET response object) |
POST_004 - Client-supplied revisionNo is ignored
| Element | Details |
|---|
| Scenario ID | POST_004 |
| Scenario Name | Client-supplied revisionNo is ignored |
| HTTP Code | 201 |
| GIVEN | A new Document revision needs to be created with posted revisionNo |
| WHEN | Calling the POST method with revisionNo:5 |
| BUT | revisionNo is ignored and set as 3 by the API |
| THEN | 201 response is returned; Document revision is created |
| Example Error Message | Response object with content (same as the GET response object) |
POST_005 - Missing required field – Comment
| Element | Details |
|---|
| Scenario ID | POST_005 |
| Scenario Name | Missing required field – Comment |
| HTTP Code | 400 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Comment field is missing or empty |
| THEN | 400 response is returned; Document revision is NOT created |
| Example Error Message | {"code": 1010, "message": "The Comment field is required.\n"} |
POST_006 - Missing required field – fileContent
| Element | Details |
|---|
| Scenario ID | POST_006 |
| Scenario Name | Missing required field – fileContent |
| HTTP Code | 400 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | fileContent field is missing or empty |
| THEN | 400 response is returned; Document revision is NOT created |
| Example Error Message | {"code": 1010, "message": "The FileContent field is required.\n"} |
POST_007 - Missing required field – FileName
| Element | Details |
|---|
| Scenario ID | POST_007 |
| Scenario Name | Missing required field – FileName |
| HTTP Code | 400 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | FileName field is missing or empty |
| THEN | 400 response is returned; Document revision is NOT created |
| Example Error Message | {"code": 1010, "message": "The FileName field is required.\n"} |
POST_008 - Missing extension in fileName
| Element | Details |
|---|
| Scenario ID | POST_008 |
| Scenario Name | Missing extension in fileName |
| HTTP Code | 400 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | FileName does not contain extension |
| THEN | 400 response is returned; Document revision is NOT created |
| Example Error Message | "notificationMessages": {"fileName": [{"code": 3010, "message": "File name must include an extension"}]} |
POST_009 - File signature does not match its declared mimeType
| Element | Details |
|---|
| Scenario ID | POST_009 |
| Scenario Name | File signature does not match its declared mimeType |
| HTTP Code | 400 |
| GIVEN | A new Document revision needs to be created |
| WHEN | Calling the POST method of the API |
| BUT | Extension in the FileName is .jpg, but the FileContent is in .png |
| THEN | 400 response is returned; Document revision is NOT created |
| Example Error Message | "notificationMessages": {"mimeType": [{"code": 3010, "message": "File signature does not match its declared mime type."}]} |