...
POST /totvseai/standardmessage/v1/transactions?batchType={batchType}?batchUUID={batchUUID}
Onde:
Requisições em lote serão apenas assíncronas. Do contrário, pode acontecer timeout, prejudicando a integração. Por este motivo, se houver uma mensagem como modo de envio (deliveryType) igual a "sync", todo o lote deve ser rejeitado.
Bloco de código | ||||
---|---|---|---|---|
| ||||
POST /totvseai/standardmessage/v1/transactions?batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962 // batchType = simpleBatch é implícito
{
"items" : [
{
"header" : {
"UUID" : "",
"type" : "BusinessMessage",
"subType" : "event",
"transaction" : "customerVendor",
"version" : "2.001",
"sourceApplication": "",
"productName" : "",
"productVersion" : "",
"generatedOn" : "",
"deliveryType" : "async",
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
},{
"header" : {
"UUID" : "",
...
"transaction" : "customerVendor",
"version" : "2.001",
...
"deliveryType" : "async"
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
}
]
} |
Bloco de código | ||||
---|---|---|---|---|
| ||||
POST /totvseai/standardmessage/v1/transactions?batchType=businessTransaction&batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962
{
"items" : [
{
"header" : {
"UUID" : "",
"type" : "BusinessMessage",
"subType" : "event",
"transaction" : "customerVendor",
"version" : "2.001",
"sourceApplication": "",
"productName" : "",
"productVersion" : "",
"generatedOn" : "",
"deliveryType" : "async",
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
},{
"header" : {
"UUID" : "",
...
"transaction" : "item",
"version" : "3.001",
...
"deliveryType" : "sync" // Rejeitar toda a requisição e informar que só aceita assíncrono
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
}
]
} |
...
POST /totvseai/standardmessage/v1/transactions
O parâmetro Os parâmetros batchType e batchUUID não é relevante são relevantes para esta situação. Logo, se for informadoinformados, deve deverão ser ignoradoignorados.
Bloco de código | ||
---|---|---|
| ||
POST /totvseai/standardmessage/v1/transactions/ { "header" : { "UUID" : "", "type" : "BusinessMessage", "subType" : "event", "transaction" : "customerVendor", "version" : "2.001", "sourceApplication": "", "productName" : "", "productVersion" : "", "companyId" : "", "branchId" : "", "generatedOn" : "", "deliveryType" : "sync", }, "content" : { "atributo1" : "", "atributo2" : "", ... "atributoN" : "" } } |
...
DELETE /totvseai/standardmessage/v1/transactions?batchType={batchType}?batchUUID={batchUUID}
A eliminação em lote utiliza o mesmo endpoint, variando apenas o corpo, onde as mensagens a eliminar estarão dentro de um array JSON. Somente mensagens assíncronas serão aceitas.
O endpoint aceita o parâmetro os parâmetros batchType e batchUUI, e o comportamento será o mesmo descrito para quando um lote de mensagens é submetido. Se o parâmetro batchType for omitido, terá valor "simpleBatch".
Bloco de código | ||
---|---|---|
| ||
DELETE /totvseai/standardmessage/v1/transactions?batchUUID=f0b3695c-1efc-49f2-84a7-1eeb59c5a962
{
"items" : [
{
"header" : {
"UUID" : "",
"type" : "BusinessMessage",
"subType" : "event",
"transaction" : "customerVendor",
"version" : "2.001",
"sourceApplication": "",
"productName" : "",
"productVersion" : "",
"generatedOn" : "",
"deliveryType" : "async",
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
},
{
"header" : {
"UUID" : "",
"type" : "BusinessMessage",
"subType" : "event",
"transaction" : "customerVendor",
"version" : "2.001",
"sourceApplication": "",
"productName" : "",
"productVersion" : "",
"generatedOn" : "",
"deliveryType" : "async",
},
"content" : {
"atributo1" : "",
"atributo2" : "",
...
"atributoN" : ""
}
}
]
}
|
...