...
Bloco de código |
---|
language | js |
---|
title | Lote de mensagens - simpleBatch |
---|
|
POST /totvseai/standardmessage/v1/transactions?batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962 // batchType = simpleBatch é implícito
{
"itemsItems" : [
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "async",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
},{
"headerHeader" : {
"UUID" : "",
...
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
...
"deliveryTypeDeliveryType" : "async"
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
}
]
} |
Bloco de código |
---|
language | js |
---|
title | Lote de mensagens - businessTransaction |
---|
|
POST /totvseai/standardmessage/v1/transactions?batchType=businessTransaction&batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962
{
"itemsItems" : [
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "async",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
},{
"headerHeader" : {
"UUID" : "",
...
"transactionTransaction" : "item",
"versionVersion" : "3.001",
...
"deliveryTypeDeliveryType" : "sync" // Rejeitar toda a requisição e informar que só aceita assíncrono
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
}
]
} |
Submeter uma única mensagem de inclusão/alteração
...
Bloco de código |
---|
|
POST /totvseai/standardmessage/v1/transactions/
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"companyIdCompanyId" : "",
"branchIdBranchId" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "sync",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
} |
Submeter uma mensagem de eliminação
...
Bloco de código |
---|
|
DELETE /totvseai/standardmessage/v1/transactions/customerVendor_2_001/10|ABC123
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"companyIdCompanyId" : "",
"branchIdBranchId" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "sync",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
}
|
Submeter um lote de mensagens de eliminação
...
Bloco de código |
---|
|
DELETE /totvseai/standardmessage/v1/transactions?batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962
{
"itemsItems" : [
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "async",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
},
{
"headerHeader" : {
"UUID" : "",
"typeType" : "BusinessMessage",
"subTypeSubType" : "event",
"transactionTransaction" : "customerVendor",
"versionVersion" : "2.001",
"sourceApplicationSourceApplication": "",
"productNameProductName" : "",
"productVersionProductVersion" : "",
"generatedOnGeneratedOn" : "",
"deliveryTypeDeliveryType" : "async",
},
"contentContent" : {
"atributo1Atributo1" : "",
"atributo2Atributo2" : "",
...
"atributoNAtributoN" : ""
}
}
]
}
|
Endpoint /contents
...
Bloco de código |
---|
|
GET /totvseai/standardmessage/v1/contents/customervendor_1_000
{
"hasNextHasNext" : "true",
"itemsItems" : [
{
"atributo1Atributo1" : "",
"atributo2Atributo2" : ""
},
{
"atributo1Atributo1" : "",
"atributo2Atributo2" : ""
}
]
} |
Recuperar uma entidade
...
Bloco de código |
---|
|
GET /totvseai/standardmessage/v1/contents/customervendor_1_000/10|30
{
"atributo1Atributo1" : "valor1",
"atributo2Atributo2" : "valor2"
} |
Submeter uma entidade
...
Bloco de código |
---|
|
POST /totvseai/standardmessage/v1/contents/updateContractParcel_2_001/
{
"atributo1Atributo1" : "valor1",
"atributo2Atributo2" : "valor2"
}
|
Submeter um lote de entidades
...
Bloco de código |
---|
|
POST /totvseai/standardmessage/v1/contents/customervendor_1_000/
{
"itemsItems" : [
{
"atributo1Atributo1" : "valorA1",
"atributo2Atributo2" : "valorA2"
},
{
"atributo1Atributo1" : "valorB1",
"atributo2Atributo2" : "valorB2"
}
]
}
|
Alterar uma entidade
...
Bloco de código |
---|
|
PUT /totvseai/standardmessage/v1/contents/customervendor_1_000/10|30
{
"atributo1Atributo1" : "valorA1",
"atributo2Atributo2" : "valorA2"
} |
Eliminar uma entidade
...
A eliminação de um lote de entidades não é possível, pois necessitaria dos internalIDs Internal IDs que, por sua vez, deveriam constar no corpo da mensagem.
...