1. U4 ERPx
  2. API Reference
  3. Common
  4. Document Archive

Document Archive

The Document Archive API manages all aspects of document archive data, including creation, update, revision, and soft deletion (termination). It enables external systems to store, retrieve, and manage documents with metadata, indexes, and thumbnails across the ERPx platform.

Purpose:
The ERPx API manages document archive, supporting create, read, update, and delete (CRUD) operations.

Base URL:
/v1/documents /v1/document-revisions

Authentication:
All APIs require a Client ID and Client Secret.
Refer to the global authentication documentation for details.

System Parameters:
System parameters for this API are available in Online Help → Document Management → Document Archive → Fixed Registers → System Parameters.    

Supported Methods

HTTP MethodEndpointDescriptionLimits & Notes
POST/v1/documentsCreate a single document recordOnly 1 document per call. FileContent must be in base64.
GET/v1/documentsRetrieve multiple documentsReturns array of documents. Supports pagination and filtering.
GET/v1/documents/{id}Retrieve single document dataReturns complete document information including base64 content. One document per call.
GET/v1/documents/{id}/thumbnailRetrieve document thumbnailReturns thumbnail image. Supports custom width/height parameters.
PATCH/v1/documents/{id}Update document dataOne document per call. Cannot update: FileName, FileContent, MimeType, Status, DocSize, Id, RevisionNo.
DELETE/v1/documents/{id}Terminate (soft-delete) a documentChanges status to ‘T’ (terminated). Does not permanently delete.
GET/v1/document-revisions/{id}Retrieve document revisions based on document IDResponse always contains FileContent. Supports pagination.
GET/v1/document-revisions/{id}/{revisionNo}Retrieve a specific document revisionOne document revision per call. Response contains file content in base64.
GET/v1/document-revisions/{id}/{revisionNo}/thumbnailRetrieve document thumbnailOne thumbnail per call. Default size 96x96 pixels. Accepts application/octet-stream, application/json.
POST/v1/document-revisionsCreate a new document revisionOne revision per call. FileContent must be in base64. RevisionNo is auto-generated.
   

Swagger / Schema

Version v1

   

Method Details - Documents

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
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown companyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown companyID
HTTP Code403
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Document is created
ElementDetails
Scenario IDPOST_003
Scenario NameDocument is created
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUT
THEN201 response is returned; Document is created
Example Error MessageResponse object with content, (same as GET response object)
POST_004 - Client-supplied docSize is ignored
ElementDetails
Scenario IDPOST_004
Scenario NameClient-supplied docSize is ignored
HTTP Code201
GIVENA new document needs to be created with posted docSize
WHENCalling the POST method of the API with “docSize”:100
BUTdocSize is ignored and calculated by the API
THEN201 response is returned; Document is created
Example Error MessageResponse object with content, (same as GET response object)
POST_005 - Client-supplied revisionNo is ignored
ElementDetails
Scenario IDPOST_005
Scenario NameClient-supplied revisionNo is ignored
HTTP Code201
GIVENA new document needs to be created with posted revisionNo
WHENCalling the POST method of the API with revisionNo:5
BUTrevisionNo is ignored and set as 1 by the API
THEN201 response is returned; Document is created
Example Error MessageResponse object with content, (same as GET response object)
POST_006 - Client-supplied status is ignored
ElementDetails
Scenario IDPOST_006
Scenario NameClient-supplied status is ignored
HTTP Code201
GIVENA new document needs to be created with posted status
WHENCalling the POST method of the API with status:C
BUTstatus is ignored and set as N by the API
THEN201 response is returned; Document is created
Example Error MessageResponse object with content, (same as GET response object)
POST_007 - Client-supplied id (GUID) is ignored
ElementDetails
Scenario IDPOST_007
Scenario NameClient-supplied id (GUID) is ignored
HTTP Code201
GIVENA new document needs to be created with posted id
WHENCalling the POST method of the API with “id”: “81891c64-1cb0-4d40-9f6f-083fc8084fd0”
BUTID is ignored and new ID is created
THEN201 response is returned; Document is created
Example Error MessageResponse object with content, (same as GET response object)
POST_008 - Missing required field – fileName
ElementDetails
Scenario IDPOST_008
Scenario NameMissing required field – fileName
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTfileName is missing or empty
THENDocument 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
ElementDetails
Scenario IDPOST_009
Scenario NameMissing required field – docType
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTDocType is missing or empty
THENDocument 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
ElementDetails
Scenario IDPOST_010
Scenario NameMissing required field – companyId
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTcompanyID is missing
THEN201 response is returned; Document is created with user default companyID
Example Error MessageResponse object with content, (same as GET response object)
POST_011 - Missing required field – fileContent
ElementDetails
Scenario IDPOST_011
Scenario NameMissing required field – fileContent
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTfileContent is missing or empty
THENDocument 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
ElementDetails
Scenario IDPOST_012
Scenario NamefileContent is not in base64
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTfileContent is not in base64 format
THENDocument 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
ElementDetails
Scenario IDPOST_013
Scenario NameIndex is not a valid value
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTOne of the indexes has an invalid value
THENDocument 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
ElementDetails
Scenario IDPOST_014
Scenario NameIndex is empty or missing
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTOne of the indexes is empty or missing
THENDocument 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
ElementDetails
Scenario IDPOST_015
Scenario NameOne of the required indexes is not passed
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTDocument type requires 3 indexes but the last one was not provided
THENDocument 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
ElementDetails
Scenario IDPOST_016
Scenario NameMissing required field – title
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API and a valid body provided
BUTtitle is missing or empty
THENDocument 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
ElementDetails
Scenario IDPOST_017
Scenario NameExpiryDate before today → reject
HTTP Code400
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTExpiryDate is before today
THENDocument 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
ElementDetails
Scenario IDPOST_018
Scenario NameExpiryDate equals today → accept
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTSystem date fixed to 2025-10-28; valid body with ExpiryDate= “2025-10-28”
THENDocument is created
Example Error MessageResponse object with content, (same as GET response object)
POST_019 - ExpiryDate in the future – accept
ElementDetails
Scenario IDPOST_019
Scenario NameExpiryDate in the future → accept
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTSystem date fixed to 2025-10-28; valid body with ExpiryDate=“2025-10-29”
THENDocument is created
Example Error MessageResponse object with content, (same as GET response object)
POST_020 - ExpiryDate not passed with expiry enabled
ElementDetails
Scenario IDPOST_020
Scenario NameExpiryDate not passed but document type has expiry date enabled
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTDSystem date fixed to 2025-10-28; valid body with no expiry date
THENDocument is created and expiry date is calculated by the system
Example Error MessageResponse object with content, (same as GET response object)
POST_021 - ExpiryDate passed with expiry enabled
ElementDetails
Scenario IDPOST_021
Scenario NameExpiryDate passed and document type has expiry date enabled
HTTP Code201
GIVENA new document needs to be created
WHENCalling the POST method of the API
BUTSystem date fixed to 2025-10-28; valid body with no expiry date
THENDocument is created and expiry date from payload is used
Example Error MessageResponse 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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENData from an existing document needs to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENData from an existing document needs to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Document is found
ElementDetails
Scenario IDGET_003
Scenario NameDocument is found
HTTP Code200
GIVENData from an existing document needs to be retrieved
WHENCalling the GET method of the API
BUT
THEN200 response is returned together with the document information
Example Error MessageRESPONSE: Document information is retrieved
GET_004 - Document is not found
ElementDetails
Scenario IDGET_004
Scenario NameDocument is not found
HTTP Code404
GIVENData from an existing document needs to be retrieved
WHENCalling the GET method of the API
BUTDocument ID does not exist for the companyId
THENDocument 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
ElementDetails
Scenario IDGET_005
Scenario NameDocument belongs to a different company
HTTP Code404
GIVENDocument 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists but with companyId= EN
WHENCalling the GET method of the API with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO
BUT-
THENDocument 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
ElementDetails
Scenario IDGET_006
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENData from an existing document needs to be retrieved
WHENCalling the GET method of the API with malformed ID
BUT-
THENDocument 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
ElementDetails
Scenario IDGET_007
Scenario NameInvalid id is not in a GUID
HTTP Code400
GIVENExisting document needs to be retrieved
WHENCalling the GET method of the API with /v1/documents/11
BUT-
THENDocument 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.

ParameterValueDescriptionData TypeDefault Value
companyIdrequiredCompany filter. If not provided, user’s default company is used.stringuser’s default
doctyperequiredDocument type filter. Must be a valid attribute value.stringnone
titleoptionalTitle prefix filter (case-insensitive). Max 255 characters. Matches documents whose titles start with this value.stringnone
indexesoptionalIndexes filter. Values concatenated and split by semicolon (;). Must match in exact order. Case-insensitive.stringnone
startoptionalZero-based offset for pagination.integer0
limitoptionalPage size. Must be between 0 and 50000.integer10
withFileContentoptionalInclude base64 file content for each document.booleanfalse

   

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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised”
GET_003 - Invalid companyID
ElementDetails
Scenario IDGET_003
Scenario NameNot existing field in select parameter
HTTP Code403
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTCompanyId does not exist or have a valid value
THENAPI is not reached; 403 response is returned
Example Error MessageUser is not authorised
GET_004 - Happy path – minimal parameters
ElementDetails
Scenario IDGET_004
Scenario NameHappy path – minimal parameters
HTTP Code200
GIVENDocuments exist for the company
WHENCalling the GET method of the API
BUTNo limit is passed
THENReturns list of documents limited to first 10
Example Error MessageBody contains an array of 10 documents
GET_005 - Happy path – all filters + files
ElementDetails
Scenario IDGET_005
Scenario NameHappy path – all filters + files
HTTP Code200
GIVENMatching documents exist
WHENCall GET with companyId, doctype, title, indexes, withFileContent=true
BUT
THENReturns filtered documents with Base64 fileContent
Example Error Message
GET_006 - Negative limit
ElementDetails
Scenario IDGET_006
Scenario NameNegative limit
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTLimit has a negative value
THENValidation error; no data retrieved
Example Error Message“Limit value must be between 0 and 50000”
GET_007 - Limit above 50000
ElementDetails
Scenario IDGET_007
Scenario NameLimit above 50000
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTLimit is above 50000
THENValidation error; no data retrieved
Example Error Message“Limit value must be between 0 and 50000”
GET_008 - No limit passed
ElementDetails
Scenario IDGET_008
Scenario NameNo limit passed
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTNo limit parameters are passed
THENReturns the list of documents for companyId; default limit to 10 is applied
Example Error MessageBody contains an array of 10 documents
GET_009 - Filtering by doctype
ElementDetails
Scenario IDGET_009
Scenario NameFiltering by doctype
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling the GET method with a valid doctype value
BUT
THENReturns the list of documents
Example Error MessageDocument list is retrieved
GET_010 - Empty title – no title filter
ElementDetails
Scenario IDGET_010
Scenario NameEmpty title – no title filter
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling the GET method with title = ""
BUT
THENNo title filtering is applied
Example Error MessageDocument list is retrieved
GET_011 - Title prefix match (case-insensitive)
ElementDetails
Scenario IDGET_011
Scenario NameTitle prefix match (case-insensitive)
HTTP Code200
GIVENMultiple documents exist with titles containing “report”
WHENCalling GET with title = report
BUT
THENOnly titles starting with “report” (case-insensitive) are returned
Example Error MessageDocument list is retrieved, including items like: Report Q1, Report Q2;
excludes: Monthly Report
GET_012 - Title not starting with prefix – empty
ElementDetails
Scenario IDGET_012
Scenario NameTitle prefix mismatch
HTTP Code200
GIVENMultiple documents exist
WHENCalling GET with title = report
BUTNo document starts with the prefix
THENReturns empty list; no error
Example Error Message{ "start":0,"limit":10,"count":0,"total":0,"items":[] }
GET_013 - Title wildcard not supported
ElementDetails
Scenario IDGET_013
Scenario NameTitle wildcard is not supported
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling GET with title = *
BUT
THENReturns empty list; no error
Example Error Message{ "start":0,"limit":10,"count":0,"total":0,"items":[] }
GET_014 - Title is not trimmed before matching
ElementDetails
Scenario IDGET_014
Scenario NameTitle not trimmed
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling GET with title " report "
BUT
THENLeading/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
ElementDetails
Scenario IDGET_015
Scenario NameTitle prefix with doctype & indexes
HTTP Code200
GIVENDocuments across doctypes/indexes
WHENCalling the GET method of the API with title = report and doctype = invoice and indexes = A;B
BUT
THENOnly returns the documents whose titles start with “report” and the matching doctype and indexes
Example Error MessageDocument list is retrieved
GET_016 - Start < 0
ElementDetails
Scenario IDGET_016
Scenario NameStart < 0
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling GET with start = -1
BUT
THENReturns the list of documents (used default query parameters)
Example Error MessageDocument list is retrieved
GET_017 - Start beyond range
ElementDetails
Scenario IDGET_017
Scenario NameStart beyond available records
HTTP Code200
GIVENTotal = 120
WHENCalling the GET method of the API with start = 1000
BUTStart exceeds total
THENEmpty list returned
Example Error Message{ "start":1000,"limit":10,"count":0,"total":827,"items":[] }
GET_018 - Start omitted
ElementDetails
Scenario IDGET_018
Scenario NameStart defaults to 0
HTTP Code200
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API without start
BUT
THENStart=0 applied
Example Error Message{ "start":0,"limit":10,"count":0,"total":827,"items":[] }
GET_019 - Start is non-numeric
ElementDetails
Scenario IDGET_019
Scenario NameStart is non-numeric (string)
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API with start=ten
BUTNot an integer
THENReturns 400 Bad Request
Example Error Message“Start must be an integer”
GET_020 - Start is float
ElementDetails
Scenario IDGET_020
Scenario NameStart is float
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API with start=10.5
BUTNot an integer
THENReturns 400 Bad Request
Example Error Message“Start must be an integer”
GET_021 - Start equals total
ElementDetails
Scenario IDGET_021
Scenario NameStart equals total (edge)
HTTP Code200
GIVENtotal=120
WHENCalling the GET method of the API with start=120
BUT
THENReturns an empty list
Example Error Message{ "start":120,"limit":10,"count":0,"total":120,"items":[] }
GET_022 - Boundary with limit
ElementDetails
Scenario IDGET_022
Scenario NameBoundary with limit
HTTP Code200
GIVENtotal=1000
WHENCalling the GET method of the API with start=995&limit=10
BUT
THENReturns last partial page (5 items)
Example Error MessageDocument list is retrieved
GET_023 - Indexes – single value
ElementDetails
Scenario IDGET_023
Scenario NameIndexes – single value
HTTP Code200
GIVENDocuments exist with Index1 = IDX-1
WHENCalling the GET method of the API with indexes=IDX-1
BUT
THENOnly returns the documents that have the IDX-1 as value of the first index
Example Error MessageDocument list is retrieved
GET_024 - Indexes – multiple values
ElementDetails
Scenario IDGET_024
Scenario NameIndexes – multiple values
HTTP Code200
GIVENSome documents have A and B
WHENCalling the GET method of the API with indexes=A;B
BUT
THENOnly returns the documents that have provided all indexes
Example Error MessageDocument list is retrieved
GET_025 - Correct indexes values but in wrong order
ElementDetails
Scenario IDGET_025
Scenario NameCorrect indexes values but in wrong order
HTTP Code200
GIVENSome documents have both A and B, indexes
WHENCalling the GET method of the API with indexes=B;A
BUTOrder mismatch
THENEmpty 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
ElementDetails
Scenario IDGET_026
Scenario NameIndexes not trimmed
HTTP Code200
GIVENSome documents have both A and B, indexes
WHENCalling the GET method of the API with indexes= B; A
BUT
THENEmpty list is returned because indexes values are not trimmed
Example Error Message{"items":[]}
GET_028 - Index value mismatch at position 1
ElementDetails
Scenario IDGET_028
Scenario NameIndex value mismatch at position 1 even if position 2 would match
HTTP Code200
GIVENIndex1=EN, Index2=100
WHENCalling the GET method of the API with indexes=PL;100
BUTFirst index mismatched
THENReturns an empty list; no documents are with the first index
Example Error Message{"items":[]}
GET_029 - Too many indexes provided
ElementDetails
Scenario IDGET_029
Scenario NameToo many indexes
HTTP Code200
GIVENThe document has 2 indexes
WHENCalling the GET method of the API with indexes=EN;100;XTR
BUT
THENReturns an empty list
Example Error Message{"items":[]}
GET_030 - Empty middle index treated as required
ElementDetails
Scenario IDGET_030
Scenario NameEmpty middle index is treated as a required empty slot
HTTP Code200
GIVENThe document has 3 indexes
WHENCalling the GET method of the API with indexes=EN;;100
BUT
THENReturns an empty list; the empty index is treated as the correct value
Example Error Message{"items":[]}
GET_031 - Indexes case-insensitive
ElementDetails
Scenario IDGET_031
Scenario Nameindexes case – insensitive (single slot)
HTTP Code200
GIVENDocuments have Index1=EN
WHENCalling the GET method of the API with indexes=en
BUT
THENReturns the documents with Index1=EN
Example Error MessageDocument list is retrieved
GET_032 - Index is combined with other filters
ElementDetails
Scenario IDGET_032
Scenario NameIndex + doctype combined
HTTP Code200
GIVENDocuments : doctype=invoice, Index1=EN, Index2=100
WHENCalling the GET method of the API with doctype=invoice&indexes=en;100
BUT
THENOnly returns the documents that meet the doctype and indexes values
Example Error MessageDocument list is retrieved
GET_033 - Mixed casing across positions
ElementDetails
Scenario IDGET_033
Scenario NameMixed casing across index positions
HTTP Code200
GIVENDocuments have Index1=EN
WHENCalling the GET method of the API with indexes=eN
BUT
THENReturns the documents with Index1=EN
Example Error MessageDocument 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

ParameterValueDescriptionData TypeDefault Value
companyIdrequiredFilters thumbnails by the company the document belongs tostringempty
widthoptionalWidth of the thumbnail to returninteger96
heightoptionalHeight of the thumbnail to returninteger96

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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENExisting document needs to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENExisting document needs to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Document thumbnail is found (default size)
ElementDetails
Scenario IDGET_003
Scenario NameHappy path – document thumbnail is found
HTTP Code200
GIVENDocument {id} exists
WHENCalling the GET method of the API
BUT
THENReturns the document thumbnail with default size 96×96 px
Example Error MessageThumbnail json as in the sample response
GET_004 - Thumbnail returned with expected width & height
ElementDetails
Scenario IDGET_004
Scenario NameHappy path – expected width/height provided
HTTP Code200
GIVENDocument {id} exists
WHENCalling the GET method with width=500 and height=100
BUT
THENReturns thumbnail sized 500×100 px
Example Error MessageThumbnail json as in the sample response
GET_005 - Thumbnail returned with expected width only
ElementDetails
Scenario IDGET_005
Scenario NameExpected width only
HTTP Code200
GIVENDocument {id} exists
WHENCalling GET with width=500 and empty height
BUT
THENReturns width 500 px and height 96 px as the default value
Example Error MessageThumbnail json as in the sample response
GET_006 - Thumbnail returned with expected height only
ElementDetails
Scenario IDGET_006
Scenario NameExpected height only
HTTP Code200
GIVENDocument {id} exists
WHENCalling GET with height=500 and empty width
BUT
THENReturns height 500 px, width 96 px as the default value
Example Error MessageThumbnail json as in the sample response
GET_007 - Document not found
ElementDetails
Scenario IDGET_007
Scenario NameDocument is not found
HTTP Code404
GIVENNo document with ID {6cf38e81-07d3-4a72-ae16-032eb29a3a05} for companyId=EN
WHENGET called with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=EN
BUT
THEN404 Not Found response is returned
Example Error MessageNo content
GET_008 - Document belongs to a different company
ElementDetails
Scenario IDGET_008
Scenario NameDocument belongs to another company
HTTP Code404
GIVENDocument with ID {6cf38e81-07d3-4a72-ae16-032eb29a3a05} exists but with companyId=EN
WHENGET called with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO
BUT
THEN404 Not Found response is returned
Example Error MessageNo content
GET_009 - Invalid GUID format
ElementDetails
Scenario IDGET_009
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENExisting document needs to be retrieved
WHENCalling the GET method of the API with a malformed {id} (e.g., not a GUID)
BUT
THEN400 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
ElementDetails
Scenario IDGET_010
Scenario NameInvalid id is not a GUID
HTTP Code400
GIVENExisting document needs to be retrieved
WHENGET called with /v1/documents/11 endpoint
BUT
THEN400 Bad Request response is returned
Example Error Messagejson { "message": "Unrecognised GUID format.", "messageType": "Information", "code": null, "path": null }
GET_011 - Happy path – PDF document
ElementDetails
Scenario IDGET_011
Scenario NameThumbnail for PDF
HTTP Code200
GIVENDocument {id} exists
WHENCalling the GET method of the API with the existing document Id
BUTD ocument is in PDF file
THENReturns default Base64 PDF icon
Example Error MessageThumbnail json as in the sample response
GET_012 - Happy path – WORD document
ElementDetails
Scenario IDGET_012
Scenario NameThumbnail for Word
HTTP Code200
GIVENDocument {id} exists
WHENCalling the GET method of the API with the existing document Id
BUTDocument is in WORD file
THENReturns default Base64 WORD icon
Example Error MessageThumbnail json as in the sample response
GET_013 - Happy path – Unknown mimeType
ElementDetails
Scenario IDGET_013
Scenario NameHappy path – document thumbnail for file with an unknown mimeType
HTTP Code200
GIVENDocument {id} exists
WHENCalling the GET method of the API with the existing document Id
BUTDocument is in FILE file
THENReturns default Base64 FILE icon
Example Error MessageThumbnail 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

ParameterValueDescriptionData TypeDefault Value
companyIdrequiredSpecify if you wish to update a document that exists in a specific company or client.stringempty

   

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
ElementDetails
Scenario IDPATCH_001
Scenario NameUser is not authorised
HTTP Code403
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 response is returned
Example Error Message“User is not authorised.”
PATCH_002 - Missing mandatory fields
ElementDetails
Scenario IDPATCH_002
Scenario NameMissing mandatory fields
HTTP Code422
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTMandatory field is missing
THENData is not updated; 422 response is returned
Example Error Message“The {0} field is required.”
PATCH_003 - Invalid format of fields
ElementDetails
Scenario IDPATCH_003
Scenario NameInvalid format of fields
HTTP Code422
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTField format is invalid
THENData 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
ElementDetails
Scenario IDPATCH_004
Scenario NameUnknown companyID
HTTP Code422
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTInvalid companyID
THENData is not updated; 422 response is returned
Example Error Message“Unknown {0}.”
PATCH_005 - ID is not in GUID format
ElementDetails
Scenario IDPATCH_005
Scenario NameID is not in GUID format
HTTP Code404
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTID of document is not in GUID format (e.g., id=5)
THENData 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
ElementDetails
Scenario IDPATCH_006
Scenario NameID is not a valid GUID
HTTP Code404
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUTID of document is not in valid GUID format (e.g., id=6cf38e81-07d3-4a72-ae16-032eb29a3a0)
THENData 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)
ElementDetails
Scenario IDPATCH_007
Scenario NameUpdate title (Happy path)
HTTP Code200
GIVENUser needs to modify existing document
WHENCalling PATCH method of the API
BUT
THENReturns 200 response and no content
Example Error MessageNo content
PATCH_008 - Happy path - Update title and description
ElementDetails
Scenario IDPATCH_008
Scenario NameUpdate title and description (Happy path)
HTTP Code200
GIVENUser needs to modify existing document
WHENCalling PATCH method with two operations to replace title and description
BUT
THENReturns 200 response and no content
Example Error MessageNo content
PATCH_009 - Update the Id of the document
ElementDetails
Scenario IDPATCH_009
Scenario NameAttempt to update ID field
HTTP Code400
GIVENUser needs to modify the ID of the document
WHENCalling PATCH method with path:“id”
BUT
THENData 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
ElementDetails
Scenario IDPATCH_010
Scenario NameAttempt to update docType
HTTP Code400
GIVENUser needs to modify the docType of the document
WHENCalling PATCH method with path:“docType”
BUT
THENData 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
ElementDetails
Scenario IDPATCH_011
Scenario NameAttempt to update mimeType
HTTP Code400
GIVENUser needs to modify the mimeType of the document
WHENCalling PATCH method with path:“mimeType”
BUT
THENData 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
ElementDetails
Scenario IDPATCH_012
Scenario NameAttempt to update fileName
HTTP Code400
GIVENUser needs to modify the fileName of the document
WHENCalling PATCH method with path:“fileName”
BUT
THENData 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
ElementDetails
Scenario IDPATCH_013
Scenario NameUpdate document indexes (Happy path)
HTTP Code200
GIVENUser needs to modify the index of the document
WHENCalling PATCH method with [{"op": "replace", "path": "/indexes/1/indexValue", "value": "EN"}]
BUT
THENReturns 200 response and no content
Example Error MessageNo content
PATCH_014 - Incorrect value for index
ElementDetails
Scenario IDPATCH_014
Scenario NameIncorrect value for index
HTTP Code400
GIVENUser needs to modify the index of the document
WHENCalling the PATCH method of the API with [ { "op": "replace", "path": "/indexes/1/indexValue", "value": "TEST" } ]
BUT
THENReturns 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
ElementDetails
Scenario IDPATCH_015
Scenario NameIncorrect value in one of the indexes
HTTP Code400
GIVENUser needs to modify the indexes of the document
WHENCalling PATCH method with replace for all indexes
BUTOne value-for-index is incorrect
THENReturns 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
ElementDetails
Scenario IDPATCH_016
Scenario NameexpiryDate is set to a past date
HTTP Code400
GIVENUser needs to modify the expiryDate of the document
WHENCalling PATCH method with expiryDate=2025-10-27
BUTToday is 2025-10-28
THENReturns 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

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to delete a document that exists in a specific company or client.stringempty

   

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
ElementDetails
Scenario IDDEL_001
Scenario NameUser is not authorised
HTTP Code403
GIVENDocument needs to be deleted
WHENCalling DELETE method of the API
BUTUser is not authorised
THENAPI is not reached; 403 response is returned
Example Error Message or Response“User is not authorised.”
DEL_002 - Missing required parameters
ElementDetails
Scenario IDDEL_002
Scenario NameMissing required parameters
HTTP Code404
GIVENDocument needs to be deleted
WHENCalling DELETE method of the API
BUTRequired parameter is missing
THENAPI 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
ElementDetails
Scenario IDDEL_003
Scenario NameHappy path - document is found
HTTP Code200
GIVENDocument {id} exists for companyId={companyId} and user is authorised
WHENCalling DELETE method with /v1/documents/{id}?companyId={companyID}
BUT
THENDocument is deleted (status is set to ‘T’)
Example Error Message or ResponseNo content
DEL_004 - Document is not found
ElementDetails
Scenario IDDEL_004
Scenario NameDocument is not found
HTTP Code404
GIVENDocument with provided GUID does not exist for companyId = EN
WHENCalling the DELETE method of the API with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=EN
BUTDocument does not exist
THENDocument 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
ElementDetails
Scenario IDDEL_005
Scenario NameDocument belongs to a different company
HTTP Code404
GIVENDocument exists but under a different companyId (EN)
WHENCalling the DELETE method with /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO
BUTDocument does not belong to requested company
THENDocument 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
ElementDetails
Scenario IDDEL_006
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENExisting document needs to be deleted
WHENCalling the DELETE method with malformed {id} (not a GUID)
BUT-
THENDocument 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
ElementDetails
Scenario IDDEL_007
Scenario NameInvalid id is not a GUID
HTTP Code400
GIVENExisting document needs to be deleted
WHENCalling DELETE with /v1/documents/11
BUT-
THENDocument is not found; 400 response is returned
Example Error Message“Unrecognised GUID format”

Method Details - Documents revision

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:

ParameterValueDescriptionData TypeDefault Value
idrequiredDocument ID (GUID format)string-
companyIdoptionalSpecify if you wish to retrieve revisions that exist in a specific company or client.stringempty
startoptionalZero-based offset for paginationinteger0
limitoptionalPage size (number of revisions to return)integer10

   

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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENDocument revisions need to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENDocument revisions need to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path – minimal parameters
ElementDetails
Scenario IDGET_003
Scenario NameHappy path – minimal parameters
HTTP Code200
GIVENDocument revisions need to be retrieved
WHENCalling the GET method of the API with document Id only
BUTNo limit passed
THENReturns the list of all document revisions with the file contents
Example Error MessageCheck sample response
GET_004 - Happy path – minimal parameters
ElementDetails
Scenario IDGET_004
Scenario NameHappy path – minimal parameters
HTTP Code200
GIVENDocument with 3 revisions needs to be retrieved
WHENCalling the GET method of the API with document Id only
BUTNo limit passed
THENReturns the list of all 3 document revisions with the file contents
Example Error MessageCheck sample response
GET_005 - Happy path – with limit parameter
ElementDetails
Scenario IDGET_005
Scenario NameHappy path – with limit parameter
HTTP Code200
GIVENDocument with 3 revisions needs to be retrieved
WHENCalling the GET method of the API with document Id and limit 1
BUT
THENReturns the list of document revisions containing only one, first revision
Example Error MessageCheck sample response
GET_006 - Happy path – with limit and start parameters
ElementDetails
Scenario IDGET_006
Scenario NameHappy path – with limit and start parameters
HTTP Code200
GIVENDocument with 3 revisions needs to be retrieved
WHENCalling the GET method of the API with document Id, limit 1 and start 2
BUT
THENReturns the list of document revisions containing only one, last revision
Example Error MessageCheck sample response
GET_007 - Happy path – with limit=0
ElementDetails
Scenario IDGET_007
Scenario NameHappy path – with limit=0
HTTP Code200
GIVENDocument with 3 revisions needs to be retrieved
WHENCalling the GET method of the API with document Id and limit = 0
BUT
THENReturns an empty list of revisions, just a summary with Total:3
Example Error MessageCheck sample response
GET_008 - Happy path – minimal parameters, and 20 revisions
ElementDetails
Scenario IDGET_008
Scenario NameHappy path – default limit with many revisions
HTTP Code200
GIVENDocument with 20 revisions needs to be retrieved
WHENCalling the GET method of the API with document Id only
BUTNo limit passed
THENReturns the list of 10 document revisions with the file contents. Limit is 10 by default when not passed
Example Error MessageCheck sample response
GET_009 - Negative limit
ElementDetails
Scenario IDGET_009
Scenario NameNegative limit
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTLimit has a negative value
THENValidation error, no data is retrieved
Example Error MessageValue may not be negative
GET_010 - Limit above max int32 value
ElementDetails
Scenario IDGET_010
Scenario NameLimit above max int32 value
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API
BUTLimit is above max int32 value
THENValidation 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
ElementDetails
Scenario IDGET_011
Scenario NameDocument belongs to a different company
HTTP Code200
GIVENDocument 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists with companyId=EN
WHENCalling the GET method /v1/documents/6cf38e81-07d3-4a72-ae16-032eb29a3a05?companyId=NO
BUT-
THEN200 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
ElementDetails
Scenario IDGET_012
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method of the API with malformed {id} (e.g., not a GUID)
BUT
THEN400 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
ElementDetails
Scenario IDGET_013
Scenario NameInvalid id is not in a GUID
HTTP Code400
GIVENExisting documents need to be retrieved
WHENCalling the GET method with /v1/document-revisions/1 endpoint
BUT
THEN400 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

ParameterValueDescriptionData TypeDefault Value
idrequiredDocument ID (GUID format)string-
revisionNorequiredRevision numberinteger-
companyIdoptionalSpecify if you wish to retrieve a revision that exists in a specific company or client.stringempty

   

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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENDocument revision needs to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENDocument revision needs to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path
ElementDetails
Scenario IDGET_003
Scenario NameHappy path
HTTP Code200
GIVENDocument revision needs to be retrieved
WHENCalling the GET method of the API with document Id and revisionNo
BUT
THEN200 response is returned; returns object with existing revision
Example Error MessageCheck sample response
GET_004 - Happy path with specific revisions
ElementDetails
Scenario IDGET_004
Scenario NameHappy path with specific revision
HTTP Code200
GIVENDocument with 3 revisions needs to be retrieved
WHENCalling the GET method with document Id and revisionNo=3
BUT
THEN200 response is returned; returns object with existing revision and file contents
Example Error MessageCheck sample response
GET_005 - Document belongs to a different company
ElementDetails
Scenario IDGET_005
Scenario NameDocument belongs to a different company
HTTP Code404
GIVENDocument revision needs to be retrieved
WHENCalling the GET method with companyId=NO
BUTDocument belongs to EN company
THEN404 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
ElementDetails
Scenario IDGET_006
Scenario NameDocument is not found
HTTP Code404
GIVENDocument revision needs to be retrieved
WHENCalling the GET method of the API
BUTDocument with id does not exist
THEN404 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
ElementDetails
Scenario IDGET_007
Scenario NameNon-existing revision number
HTTP Code404
GIVENDocument revision needs to be retrieved
WHENCalling the GET method with revisionNo=5
BUTDocument has only 3 revisions
THEN404 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
ElementDetails
Scenario IDGET_008
Scenario NameRevision number is above max int32 value
HTTP Code400
GIVENDocument revision needs to be retrieved
WHENCalling the GET method of the API
BUTRevision number is above max int32 value
THEN400 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
ElementDetails
Scenario IDGET_009
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENDocument revision needs to be retrieved
WHENCalling the GET method with malformed {id} (e.g., not a GUID)
BUT
THEN400 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
ElementDetails
Scenario IDGET_010
Scenario NameInvalid id is not in a GUID
HTTP Code400
GIVENDocument revision needs to be retrieved
WHENCalling the GET method with /v1/document-revisions/1
BUT
THEN400 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

ParameterValueDescriptionData TypeDefault Value
idrequiredDocument ID (GUID format)string-
revisionNorequiredRevision numberinteger-
companyIdoptionalSpecify if you wish to retrieve a thumbnail that exists in a specific company or client.stringempty
widthoptionalThumbnail width in pixelsinteger96
heightoptionalThumbnail height in pixelsinteger96

   

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
ElementDetails
Scenario IDGET_001
Scenario NameUser is not authorised
HTTP Code403
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Unknown companyID
ElementDetails
Scenario IDGET_002
Scenario NameUnknown companyID
HTTP Code403
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path – document thumbnail is found
ElementDetails
Scenario IDGET_003
Scenario NameHappy path – document thumbnail is found
HTTP Code200
GIVENDocument {id} and revisionNo exist
WHENCalling the GET method of the API
BUT
THENReturns the document thumbnail with default size 96px / 96px
Example Error MessageThumbnail JSON as in sample response
GET_004 - Happy path – thumbnail with custom dimensions
ElementDetails
Scenario IDGET_004
Scenario NameHappy path – document thumbnail is returned with expected width and height
HTTP Code200
GIVENDocument {id} and revisionNo exist
WHENCalling the GET method with width=500 and height=100
BUT
THENReturns the document thumbnail with expected size, width 500 px / height 100 px
Example Error MessageThumbnail JSON as in sample response
GET_005 - Happy path – thumbnail with expected width
ElementDetails
Scenario IDGET_005
Scenario NameHappy path – thumbnail with expected width
HTTP Code200
GIVENDocument {id} and revisionNo exist
WHENCalling the GET method with width=500 and empty height
BUT
THENReturns the document thumbnail with width 500 px, height 96 px as default value
Example Error MessageThumbnail JSON as in sample response
GET_006 - Happy path – thumbnail with expected height
ElementDetails
Scenario IDGET_006
Scenario NameHappy path – thumbnail with expected height
HTTP Code200
GIVENDocument {id} and revisionNo exist
WHENCalling the GET method with height=500 and empty width
BUT
THENReturns the document thumbnail with height 500 px, width 96 px as default value
Example Error MessageThumbnail JSON as in sample response
GET_007 - Document is not found
ElementDetails
Scenario IDGET_007
Scenario NameDocument is not found
HTTP Code404
GIVENNo document with 6cf38e81-07d3-4a72-ae16-032eb29a3a05 for companyId=EN
WHENCalling the GET method of the API
BUTDocument with id does not exist
THEN404 Not Found response is returned
Example Error MessageNo content
GET_008 - Document belongs to a different company
ElementDetails
Scenario IDGET_008
Scenario NameDocument belongs to a different company
HTTP Code404
GIVENDocument 6cf38e81-07d3-4a72-ae16-032eb29a3a05 exists, but with companyId= EN
WHENCalling the GET method of the API with companyId=NO
BUT
THEN404 Not Found response is returned
Example Error MessageNo content
GET_009 - Invalid id (GUID) format
ElementDetails
Scenario IDGET_009
Scenario NameInvalid id (GUID) format
HTTP Code400
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method with malformed {id} (e.g., not a GUID)
BUT
THEN400 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
ElementDetails
Scenario IDGET_010
Scenario NameInvalid id is not in a GUID
HTTP Code400
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method with /v1/document-revisions/11/1/thumbnail endpoint
BUT
THEN400 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
ElementDetails
Scenario IDGET_011
Scenario NameHappy path – document thumbnail for PDF
HTTP Code200
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method with existing document Id
BUTDocument is in a PDF file
THENReturns default Base64 PDF icon
Example Error MessageThumbnail JSON as in sample response
GET_012 - Happy path – document thumbnail for WORD
ElementDetails
Scenario IDGET_012
Scenario NameHappy path – document thumbnail for WORD
HTTP Code200
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method with existing document Id
BUTDocument is in a WORD file
THENReturns default Base64 WORD icon
Example Error MessageThumbnail JSON as in sample response
GET_013 - Happy path – document thumbnail for unknown mimeType
ElementDetails
Scenario IDGET_013
Scenario NameHappy path – document thumbnail for unknown mimeType
HTTP Code200
GIVENDocument revision thumbnail needs to be retrieved
WHENCalling the GET method with existing document Id
BUTDDocument is in a FILE file
THENReturns default Base64 FILE icon
Example Error MessageThumbnail 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
ElementDetails
Scenario IDPOST_001
Scenario NameUser is not authorised
HTTP Code403
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTUser does NOT have permissions
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_002 - Unknown companyID
ElementDetails
Scenario IDPOST_002
Scenario NameUnknown companyID
HTTP Code403
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTcompanyID does not exist
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
POST_003 - Happy path document revision is created
ElementDetails
Scenario IDPOST_003
Scenario NameHappy path - document revision is created
HTTP Code201
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API with a valid body provided
BUT
THEN201 response is returned; Document revision is created with the next revisionNo
Example Error MessageResponse object with content (same as the GET response object)
POST_004 - Client-supplied revisionNo is ignored
ElementDetails
Scenario IDPOST_004
Scenario NameClient-supplied revisionNo is ignored
HTTP Code201
GIVENA new Document revision needs to be created with posted revisionNo
WHENCalling the POST method with revisionNo:5
BUTrevisionNo is ignored and set as 3 by the API
THEN201 response is returned; Document revision is created
Example Error MessageResponse object with content (same as the GET response object)
POST_005 - Missing required field – Comment
ElementDetails
Scenario IDPOST_005
Scenario NameMissing required field – Comment
HTTP Code400
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTComment field is missing or empty
THEN400 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
ElementDetails
Scenario IDPOST_006
Scenario NameMissing required field – fileContent
HTTP Code400
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTfileContent field is missing or empty
THEN400 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
ElementDetails
Scenario IDPOST_007
Scenario NameMissing required field – FileName
HTTP Code400
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTFileName field is missing or empty
THEN400 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
ElementDetails
Scenario IDPOST_008
Scenario NameMissing extension in fileName
HTTP Code400
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTFileName does not contain extension
THEN400 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
ElementDetails
Scenario IDPOST_009
Scenario NameFile signature does not match its declared mimeType
HTTP Code400
GIVENA new Document revision needs to be created
WHENCalling the POST method of the API
BUTExtension in the FileName is .jpg, but the FileContent is in .png
THEN400 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."}]}

Best Practices

  • Use Swagger UI for testing and schema validation before production calls.
  • Handle error codes gracefully - implement retry/backoff logic according to global rate limits.
  • Always check for deprecation alerts on this endpoint version.
  • Validate document existence before sending DELETE requests to avoid unintentional data loss.

   

Action APIs