Yet DocumentsStandard Scope
DocumentsStandard Scope
Standard Scope
Back | List of Articles

How to send and retrieve documents?

Last changed in 11/08/2026

This article covers how to send documents (for EDI communication or as PDFs) and how to consult documents and their states through the API.

Send documents

This endpoint allows you to send documents, either for EDI communication or by sending PDFs.

To send a document, send the following request:

TypePOST
Productionhttps://yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction/Outbound
Testinghttps://st.yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction/Outbound
Body{
"mainDocument": { // required IF EDI communication
"content": "", // byte[] base64 string
"extension": "xml", // string: xml
"fileName": "", // string
"fileTag": "document", // string: document
"fileType": "xml", // string: xml|pdf|txt
"mimeType": "text/xml", // string: text/xml|application/pdf
"id": "",
"createdAt": "" // datetime
},
"mainDocumentPdf": { // required IF sending PDF
"content": "", // byte[] in base64 string
"extension": "pdf", // string: pdf
"fileName": "", // string
"fileTag": "document", // string: document
"fileType": "pdf", // string: pdf
"mimeType": "application/pdf", // string: application/pdf
"id": "",
"createdAt": "" // datetime
},
"attachmentsLits": [ // optional
{
"content": "", // byte[] base64 string
"extension": "pdf", // string: pdf|xml|zip|txt
"fileName": "", // string
"fileTag": "Attachment", // string: Attachment
"fileType": "pdf", // string: pdf|xml|zip|txt
"mimeType": "application/pdf",
"id": "",
"createdAt": "" // datetime
}
]
}
Response201 Created:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"docType": "string",
"docNumber": "string",
"docDate": "2025-02-23T15:43:04.887Z",
"docDescription": "string",
"buyerGln": "string",
"deliveryGln": "string",
"invoiceToGln": "string",
"supplierGln": "string",
"b2centity": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"codeIdentifier": "string",
"email": "string",
"mobilePhone": "string",
"contacts": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"email": "string",
"enable": true,
"mobilePhone": "string",
"sendMailType": "CC"
}
]
},
"documentType": "Generic",
"documentExtenion": "EDI",
"comercialRelation": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"senderOrganization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationType": "AS2",
"integrationType": "EDI",
"documentExtension": "EDI",
"b2bformat": "PRI",
"erpProviderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identifier": "string",
"inboundPath": "string",
"outboundPath": "string",
"name": "string",
"invoiceRepository": true,
"autoComercialRelation": true,
"mainDeliveryPlace": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6","code": "string",
"name": "string",
"address": "string",
"city": "string",
"country": "string",
"postalCode": "string",
"vatNumber": "string"
},
"organizationInfo": {
"billingCommission": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"vatNumber": "string",
"organizationType": "string"
}
},
"receiverOrganization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationType": "AS2",
"integrationType": "EDI",
"documentExtension": "EDI",
"b2bformat": "PRI",
"erpProviderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identifier": "string",
"inboundPath": "string",
"outboundPath": "string",
"name": "string",
"invoiceRepository": true,
"autoComercialRelation": true,
"mainDeliveryPlace": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"address": "string",
"city": "string",
"country": "string",
"postalCode": "string",
"vatNumber": "string"
},
"organizationInfo": {
"billingCommission": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"vatNumber": "string",
"organizationType": "string"
}
},

"documentType": "Generic",
"van": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"username": "string",
"password": "string",
"inboundPath": "string",
"outboundPath": "string",
"ssl": "string",
"port": "string",
"testName": "string",
"testUsername": "string",
"testPassword": "string",
"testInboundPath": "string",
"testOutboundPath": "string",
"testSSL": "string",
"testPort": "string",
"endPointUrl": "string",
"useWs": true
},
"active": true,
"isOnTeste": true,
"mapName": "string",
"isPDFMandatory": true,
"isJasminSync": true,
"layoutReceiver": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationType": "AS2",
"integrationType": "EDI",
"documentExtension": "EDI",
"b2bformat": "PRI",
"erpProviderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identifier": "string",
"inboundPath": "string",
"outboundPath": "string",
"name": "string",
"invoiceRepository": true,
"autoComercialRelation": true,
"mainDeliveryPlace": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"address": "string",
"city": "string",
"country": "string",

"postalCode": "string",
"vatNumber": "string"
},
"organizationInfo": {
"billingCommission": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"vatNumber": "string",
"organizationType": "string"
}
},
"layoutDocument": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"layoutId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"documentTypeEnum": "Generic",
"direction": true,
"mapa": "string",
"formatTypeEnum": "XML",
"segmento": "string",
"separator": "string",
"senderStart": "string",
"senderEnd": "string",
"receiverStart": "string",
"receiverEnd": "string",
"documentTypeStart": "string",
"documentTypeEnd": "string",
"documentTypeFileCode": "string",
"numberStart": "string",
"numberEnd": "string",
"dateStart": "string",
"dateEnd": "string",
"dateFormat": "string",
"bpPreExecution": "string",
"bpPosExecution": "string",
"layout": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"layoutDocuments": [
"string"
]
},
"van": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"username": "string",
"password": "string",

"inboundPath": "string",
"outboundPath": "string",
"ssl": "string",
"port": "string",
"testName": "string",
"testUsername": "string",
"testPassword": "string",
"testInboundPath": "string",
"testOutboundPath": "string",
"testSSL": "string",
"testPort": "string",
"endPointUrl": "string",
"useWs": true
}
},
"layoutDefault": true
},
"layoutSender": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationType": "AS2",
"integrationType": "EDI",
"documentExtension": "EDI",
"b2bformat": "PRI",
"erpProviderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identifier": "string",
"inboundPath": "string",
"outboundPath": "string",
"name": "string",
"invoiceRepository": true,
"autoComercialRelation": true,
"mainDeliveryPlace": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"name": "string",
"address": "string",
"city": "string",
"country": "string",
"postalCode": "string",
"vatNumber": "string"
},
"organizationInfo": {
"billingCommission": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"vatNumber": "string",

"testOutboundPath": "string",
"testSSL": "string",
"testPort": "string",
"endPointUrl": "string",
"useWs": true
}
},
"layoutDefault": true
}
},
"van": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"username": "string",
"password": "string",
"inboundPath": "string",
"outboundPath": "string",
"ssl": "string",
"port": "string",
"testName": "string",
"testUsername": "string",
"testPassword": "string",
"testInboundPath": "string",
"testOutboundPath": "string",
"testSSL": "string",
"testPort": "string",
"endPointUrl": "string",
"useWs": true
},
"transactionState": "PendingParser",
"transactionType": "QuickInvoice",
"organizationOwner": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"communicationType": "AS2",
"integrationType": "EDI",
"documentExtension": "EDI",
"b2bformat": "PRI",
"erpProviderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identifier": "string",
"inboundPath": "string",
"outboundPath": "string",
"name": "string",
"invoiceRepository": true,
"autoComercialRelation": true,
"mainDeliveryPlace": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",

"name": "string",
"address": "string",
"city": "string",
"country": "string",
"postalCode": "string",
"vatNumber": "string"
},
"organizationInfo": {
"billingCommission": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"vatNumber": "string",
"organizationType": "string"
}
},
"alreadySent": true,
"direction": true,
"createdAt": "2025-02-23T15:43:04.888Z",
"documentDetails": "string"
}
409 Conflict or 500 Internal Server Error:
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}

Get sent documents

This request returns all the documents sent. You can set the top and skip parameters, which allow you to define the number of documents you want to get.

To retrieve sent documents, send the following request:

TypeGET
Productionhttps://yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction?$count=true&$top=100&$skip=100
Testinghttps://st.yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction?$count=true&$top=100&$skip=100
Response200 Ok:
[
{
"transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"files": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fileType": "JSON",
"fileTag": "CertificateContractSent",
"content": "string",
"extension": "string",
"mimeType": "string",
"fileName": "string",
"createdAt": "2025-02-23T15:45:02.788Z"
}
]
}
]
404 Not Found or 500 Internal Server Error:
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}

Get a specific document

It is possible to obtain a specific document via its identifier. This identifier is returned by the Send Documents request, above.

To retrieve a specific document, send the following request:

TypeGET
Productionhttps://yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction/{{transactionId}}
Testinghttps://st.yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction/{{transactionId}}
Route paramstransactionId: “guid” // ID of the created document
Response200 Ok: Same response 4.1
404 Not Found or 500 Internal Server Error:
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}

Received documents

This request returns the documents to be received, in "To Export" state. After this request, all the exported documents will be in "Exported" state.

To retrieve received documents, send the following request:

TypeGET
Productionhttps://yet.cegid.cloud/EDIV2/api/v1.3/External/Transaction/ExportAll
Testinghttps://st.yet.cegid.cloud/EDIV2/api/v1. 3/External/Transaction/ExportAll
Response200 OK
[
{
"transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"files": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fileType": "JSON",
"fileTag": "CertificateContractSent",
"content": "string",
"extension": "string",
"mimeType": "string",
"fileName": "string",
"createdAt": "2025-02-23T15:46:42.018Z"
}
]
}
]
404 Not Found or 500 Internal Server Error:
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
How to check document traceability and notifications? How to send and retrieve documents? How to check document traceability and notifications?