PUBLIC SERVICES [PROD]
  1. Documents Manager
PUBLIC SERVICES [PROD]
  • Introduction
  • Document Management
  • External Integration
  • Authentication
    • Generate a token to access ROIT APIs
      POST
  • Invoice-to-Pay
    • Documents Manager
      • Create document export request
        POST
      • Get export request by id
        GET
      • Delete export request by id
        DELETE
      • Generate signed URLs for export files by id
        GET
    • External System Integration
      • Register delivery integration
      • Get pending entities to be integrated
      • Update integration status
      • Get all documents attached to a request
      • Reprocess a specific request
    • Upload Document
      • Upload document as base64
  • Tax Reform
    • Data Integration
      • Create a new request
      • Update request status
      • List requests
      • Get request by ID
      • List Requests
      • Update request by ID
      • Delete request by ID
      • Generate signed URL
      • Process callback
  1. Documents Manager

Create document export request

HOM
https://hom.roit.ai
HOM
https://hom.roit.ai
POST
/assembler-documents-manager/api/v1/export/requests

Request

Header Params
Authorization
string 
required
token generated
Body Params application/json
master
string 
optional
Master identifier
Example:
anyMasterId
preference
enum<string> 
required
Preference
Allowed values:
roitoriginal
Default:
original
Example:
original
filters
object (BaseFiltersModel) 
required
type
object 
required
Query operators to search by extension of the file. Example: .jpg, .xml, .pdf ...
Example:
{"in":[".xml",".pdf"]}
createAt
object 
required
Query operators to search by createAt attribute. createAt is when the file first appeared on smart flow
Example:
{"gte":"2025-01-10T03:00:00.000Z"}
issueDate
object 
required
Query operators to search by issue date of the file
Example:
{"gte":"2025-01-10T03:00:00.000Z"}
entryDate
object 
required
Query operators to search by entry date of the file
Example:
{"gte":"2025-01-10T03:00:00.000Z"}
clientTree
array [object {1}] 
optional
Query operators to search by client tree attributes
classification
object 
optional
Query operators to search by classification of the file
Example:
{"in":["/fiscal/nfe","/fiscal/cte"]}
step
object 
optional
Query operators to search by currently step of the file
Example:
{"in":["COMPLEMENTATION"]}
origin
object 
optional
Query operators to search by origin of the file upload
Example:
{"nin":["SITE","FORMS"]}
isConsolidated
object 
optional
Query operators to search by isConslidated. isConslidated equals true means the document has been processed
Example:
{"eq":false}
finalized
object 
optional
Query operators to search by finalized attribute. Finalized equals true means the document has been processed and finished
Example:
{"eq":false}
originCity
object 
optional
Query operators to search by the city of the issuer. Example: for CURITIBA use the code 4106902
Example:
{"in":["12345","67890"]}
destinyCity
object 
optional
Query operators to search by the city of the provider. Example: for CURITIBA use the code 4106902
Example:
{"in":["12345","67890"]}
number
object 
optional
Query operators to search by invoice number on string format
Example:
{"gte":"100"}
totalValue
object 
optional
Query operators to search by total value shown on smart flow
Example:
{"gte":100,"lte":10000}
internalId
object 
optional
Query operators to search by document id
Example:
{"in":["docId1","docId2","docId3"]}
serviceMadeCity
object 
optional
Query operators to search by the city that the service was provided. Example: for CURITIBA use the code 4106902
Example:
{"in":["12345","67890"]}
supplierDocumentNumber
object 
optional
Query operators to search by supplier national register on string format
Example:
{"in":["1234567890"]}
hasIssRetention
object 
optional
Query operators to search by hasIssRetention on boolean format
Example:
{"eq":true}
accessKey
object 
optional
Query operators to search by accessKey on string format
Example:
{"eq":"accessKey123"}
purchaseOrder
object 
optional
Query operators to search by purchaseOrder that exists in an array
Example:
{"in":["purchaseOrder123","purchaseOrder456"]}
movement
object 
optional
Query operators to search by movement type
Example:
{"in":["INPUT","OUTPUT"]}
classTypeEvent
object 
optional
Query operators to search by event type inside classType
Example:
{"eq":"eventType123"}
message
object 
optional
Query operators to search by messages
Example:
{"eq":"message123"}
Example
Request example
{
    "master": "anyMasterId",
    "preference": "original",
    "filters": {
        "type": {
            "in": [
                ".xml",
                ".pdf"
            ]
        },
        "createAt": {
            "gte": "2025-01-10T03:00:00.000Z"
        },
        "issueDate": {
            "lte": "2025-01-10T03:00:00.000Z"
        },
        "entryDate": {
            "gte": "2025-01-10T03:00:00.000Z"
        },
        "clientTree": [
            {
                "identifier": {
                    "in": [
                        "1234567890"
                    ]
                }
            }
        ],
        "classification": {
            "in": [
                "/fiscal/nfe",
                "/fiscal/cte"
            ]
        },
        "step": {
            "in": [
                "COMPLEMENTATION"
            ]
        },
        "origin": {
            "nin": [
                "SITE",
                "FORMS"
            ]
        },
        "isConsolidated": {
            "eq": false
        },
        "finalized": {
            "eq": false
        },
        "originCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "destinyCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "number": {
            "gte": "100"
        },
        "totalValue": {
            "gte": 100,
            "lte": 10000
        },
        "internalId": {
            "in": [
                "docId1",
                "docId2",
                "docId3"
            ]
        },
        "serviceMadeCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "supplierDocumentNumber": {
            "in": [
                "1234567890"
            ]
        },
        "hasIssRetention": {
            "eq": true
        },
        "accessKey": {
            "eq": "accessKey123"
        },
        "purchaseOrder": {
            "in": [
                "purchaseOrder123",
                "purchaseOrder456"
            ]
        },
        "movement": {
            "in": [
                "movementType12345",
                "movementType67890"
            ]
        },
        "classTypeEvent": {
            "eq": "eventType123"
        },
        "message": {
            "eq": "message123"
        }
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://hom.roit.ai/assembler-documents-manager/api/v1/export/requests' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "master": "anyMasterId",
    "preference": "original",
    "filters": {
        "type": {
            "in": [
                ".xml",
                ".pdf"
            ]
        },
        "createAt": {
            "gte": "2025-01-10T03:00:00.000Z"
        },
        "issueDate": {
            "lte": "2025-01-10T03:00:00.000Z"
        },
        "entryDate": {
            "gte": "2025-01-10T03:00:00.000Z"
        },
        "clientTree": [
            {
                "identifier": {
                    "in": [
                        "1234567890"
                    ]
                }
            }
        ],
        "classification": {
            "in": [
                "/fiscal/nfe",
                "/fiscal/cte"
            ]
        },
        "step": {
            "in": [
                "COMPLEMENTATION"
            ]
        },
        "origin": {
            "nin": [
                "SITE",
                "FORMS"
            ]
        },
        "isConsolidated": {
            "eq": false
        },
        "finalized": {
            "eq": false
        },
        "originCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "destinyCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "number": {
            "gte": "100"
        },
        "totalValue": {
            "gte": 100,
            "lte": 10000
        },
        "internalId": {
            "in": [
                "docId1",
                "docId2",
                "docId3"
            ]
        },
        "serviceMadeCity": {
            "in": [
                "12345",
                "67890"
            ]
        },
        "supplierDocumentNumber": {
            "in": [
                "1234567890"
            ]
        },
        "hasIssRetention": {
            "eq": true
        },
        "accessKey": {
            "eq": "accessKey123"
        },
        "purchaseOrder": {
            "in": [
                "purchaseOrder123",
                "purchaseOrder456"
            ]
        },
        "movement": {
            "in": [
                "movementType12345",
                "movementType67890"
            ]
        },
        "classTypeEvent": {
            "eq": "eventType123"
        },
        "message": {
            "eq": "message123"
        }
    }
}'

Responses

🟢200OK
application/json
Success response
Body
timestamp
number 
required
Timestamp of the response
Example:
1234567890
status
string 
required
Status of the response
Example:
success
data
object 
required
Export request data
id
string 
optional
Unique identifier for the export request
Example:
123e4567-e89b-12d3-a456-426614174000
user
object 
optional
Information about the user who made the request
Example:
{"id":"user-123","name":"JoC#o Silva","email":"joao.silva@exemplo.com"}
master
string 
required
Identifier of the document type to be exported
Example:
anyMasterId
period
object 
required
Period of documents to be exported
Default:
{"from":"","to":""}
Example:
{"from":"2024-03-01","to":"2024-03-31"}
quantity
number 
required
Total number of documents to be exported
Default:
0
Example:
150
size
number 
required
Total size of documents in bytes
Default:
0
Example:
1024
status
enum<string> 
required
Current status of the export request
Allowed values:
doneprocessingexpirederrorpending
Default:
pending
Example:
pending
preference
enum<string> 
required
Format preference for export
Allowed values:
roitoriginal
Default:
original
Example:
original
filters
object 
optional
Filters applied to the export
totalOfParts
number 
required
Total number of parts the export will be divided into
Default:
0
Example:
5
totalOfPartsProcessed
number 
required
Number of parts already processed
Default:
0
Example:
2
message
string 
required
Message status
Example:
Request received successfully
Example
{
    "timestamp": 1234567890,
    "status": "success",
    "data": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "user": {
            "id": "string",
            "name": "string",
            "email": "string"
        },
        "master": "anyMasterId",
        "period": {
            "from": "2024-03-01",
            "to": "2024-03-31"
        },
        "quantity": 0,
        "size": 0,
        "status": "pending",
        "preference": "original",
        "filters": {
            "type": {
                "in": [
                    ".xml",
                    ".pdf"
                ]
            },
            "createAt": {
                "gte": "2025-01-10T03:00:00.000Z"
            },
            "issueDate": {
                "gte": "2025-01-10T03:00:00.000Z"
            },
            "entryDate": {
                "gte": "2025-01-10T03:00:00.000Z"
            },
            "clientTree": [
                {
                    "identifier": {
                        "in": [
                            "1234567890"
                        ]
                    }
                }
            ],
            "classification": {
                "in": [
                    "/fiscal/nfe",
                    "/fiscal/cte"
                ]
            },
            "step": {
                "in": [
                    "COMPLEMENTATION"
                ]
            },
            "origin": {
                "nin": [
                    "SITE",
                    "FORMS"
                ]
            },
            "isConsolidated": {
                "eq": false
            },
            "finalized": {
                "eq": false
            },
            "originCity": {
                "in": [
                    "12345",
                    "67890"
                ]
            },
            "destinyCity": {
                "in": [
                    "12345",
                    "67890"
                ]
            },
            "number": {
                "gte": "100"
            },
            "totalValue": {
                "gte": 100,
                "lte": 10000
            },
            "internalId": {
                "in": [
                    "docId1",
                    "docId2",
                    "docId3"
                ]
            },
            "serviceMadeCity": {
                "in": [
                    "12345",
                    "67890"
                ]
            },
            "supplierDocumentNumber": {
                "in": [
                    "1234567890"
                ]
            },
            "hasIssRetention": {
                "eq": true
            },
            "accessKey": {
                "eq": "accessKey123"
            },
            "purchaseOrder": {
                "in": [
                    "purchaseOrder123",
                    "purchaseOrder456"
                ]
            },
            "movement": {
                "in": [
                    "INPUT",
                    "OUTPUT"
                ]
            },
            "classTypeEvent": {
                "eq": "eventType123"
            },
            "message": {
                "eq": "message123"
            }
        },
        "totalOfParts": 0,
        "totalOfPartsProcessed": 0
    },
    "message": "Request received successfully"
}
🟠400Bad Request
🟠401Unauthorized
Modified at 2025-05-20 12:11:00
Previous
Generate a token to access ROIT APIs
Next
Get export request by id
Built with