Páginas filhas
  • DR VA Integração API V2 Transação - Requisições de Transação

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Totvs custom tabs box
tabsRequisitos,Cadastrar Pré-Venda,Buscar Pré-Venda
idsrequisitos,gerarprevenda,buscarprevenda
Totvs custom tabs box items
defaultyes
referenciarequisitos

01. INTRODUÇÃO

Para utilização das APIs de Transação, primeiramente é necessário obter um token de autenticação. Para obtê-lo, basta seguir os procedimentos documentados no link a seguir:

  • Link para documentação referente a obtenção de token: obter token
Totvs custom tabs box items
defaultno
referenciagerarprevenda

01. INTRODUÇÃO

Requisição que tem a finalidade criar uma transação de pré-venda, com capa e itens.

02. UTILIZAÇÃO


Totvs custom tabs box
tabsEnvio, Retorno
idsenvio,retorno
Totvs custom tabs box items
defaultyes
referenciaenvio
Totvs custom tabs box
tabsURL, Body, Exemplo de Requisição
idsurlE,corpoE,exE
Totvs custom tabs box items
defaultyes
referenciaurlE
Totvs custom tabs box items
defaultno
referenciacorpoE
Bloco de código
languagexml
themeRDark
firstline1
titleBody
linenumberstrue
{
  "personDocument": "string",
  "companyDocument": "string",
  "movementDate": "2020-03-05T18:09:54.957Z",
  "operationId": 0,
  "sellerId": 0,
  "orderNumber": 0,
  "checkout": "string",
  "items": [
    {
      "productCode": "string",
      "productDescription": "string",
      "grossTotalValue": 0,
      "discountTotalValue": 0,
      "discounItemValue": 0,
      "netTotalValue": 0,
      "requestedQuantity": 0
    }
  ]
}
Totvs custom tabs box items
defaultno
referenciaexE

URL


HEADER

AuthorizationBearer {{token}}


BODY


Bloco de código
languagexml
themeRDark
firstline1
titleBody
linenumberstrue
{
  "personDocument": "string",
  "companyDocument": "string",
  "movementDate": "2020-03-05T18:09:54.957Z",
  "operationId": 0,
  "sellerId": 0,
  "orderNumber": 0,
  "checkout": "string",
  "items": [
    {
      "productCode": "string",
      "productDescription": "string",
      "grossTotalValue": 0,
      "discountTotalValue": 0,
      "discounItemValue": 0,
      "netTotalValue": 0,
      "requestedQuantity": 0
    }
  ]
}



Totvs custom tabs box items
defaultno
referenciaretorno
Totvs custom tabs box
tabsSucesso, Erro
idssucesso,erro
Totvs custom tabs box items
defaultyes
referenciasucesso
Bloco de código
languagexml
themeRDark
firstline1
titleStatus 200 OK
linenumberstrue
{
    "success":true
}
Totvs custom tabs box items
defaultno
referenciaerro
Bloco de código
languagexml
themeRDark
firstline1
titleStatus 400. 401 e 404
linenumberstrue
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": {status code},
    "traceId": {traceId},
    "errors": {
        [lista de erros]
    }
}
Totvs custom tabs box items
defaultno
referenciabuscarprevenda

01. INTRODUÇÃO

Requisição que tem a finalidade buscar uma lista de transações de pré-venda, com capa e itens.

02. UTILIZAÇÃO


Totvs custom tabs box
tabsEnvio, Retorno
idsenvio2,retorno2
Totvs custom tabs box items
defaultyes
referenciaenvio2
Totvs custom tabs box
tabsURL, Body, Exemplo de Requisição
idsurlE2,corpoE2,exE2
Totvs custom tabs box items
defaultyes
referenciaurlE2
Totvs custom tabs box items
defaultno
referenciacorpoE2
Bloco de código
languagexml
themeRDark
firstline1
titleBody
linenumberstrue
{
  "companyDocument": "string",
  "transactionNumber": 0,
  "transactionDate": "2020-03-20",
  "personDocument": "string",
  "sellerId": 0,
  "orderNumber": 0,
  "checkout": "string"
}
Totvs custom tabs box items
defaultno
referenciaexE2

URL


HEADER

AuthorizationBearer {{token}}


BODY


Bloco de código
languagexml
themeRDark
firstline1
titleBody
linenumberstrue
{
  "companyDocument": "string",
  "transactionNumber": 0,
  "transactionDate": "2020-03-20",
  "personDocument": "string",
  "sellerId": 0,
  "orderNumber": 0,
  "checkout": "string"
}



Totvs custom tabs box items
defaultno
referenciaretorno2
Totvs custom tabs box
tabsSucesso, Erro
idssucesso2,erro2
Totvs custom tabs box items
defaultyes
referenciasucesso2
Bloco de código
languagexml
themeRDark
firstline1
titleStatus 200 OK
linenumberstrue
{
    "success":true,
    "data": [
        {
            "companyId": 1,
            "number": 1,
            "date": "2020-03-16T00:00:00",
            "personIdpersonDocument": 100000002"11122233344",
            "operationId": 6595,
            "paymentTermsId": 1,
            "settlementCompanyId": 1,
            "companyGroupId": 1,
            "situationType": 1,
            "originType": "1",
            "addressSequential": 1,
            "sellerId": 10,
            "operationType": "S",
            "discountPercentage": null,
            "transactionValue": null,
            "discountValue": null,
            "totalValue": null,
            "additionalTransactionInfo": {
                "preSaleNumber": 49,
                "orderNumber": 2,
                "checkout": "f7980a87-6e19-4241-a799-d9f7fca7ca0e"
            },
            "items": [
                {
                    "number": 1,
                    "companyGroupId": 1,
                    "productCode": "123456",
                    "productId": 118252,
                    "productDescription": "ITEM3 CAMISA 151611 RSA UN",
                    "settlementCompanyId": 1,
                    "specieId": null,
                    "sellerId": 10,
                    "grossTotalValue": 100,
                    "discountTotalValue": 10,
                    "discountItemValue": 0,
                    "netTotalValue": 95,
                    "requestedQuantity": 1,
                    "satisfiedQuantity": 0,
                    "balance": 1,
                    "unitaryGrossTotalValue": 100,
                    "unitaryDiscountTotalValue": 10,
                    "unitaryDiscounItemValue": 0,
                    "unitaryNetTotalValue": 95,
                    "discountPercentage": 0.1
                }
            ]
        }
    ]
}
Totvs custom tabs box items
defaultno
referenciaerro2
Bloco de código
languagexml
themeRDark
firstline1
titleStatus 400. 401 e 404
linenumberstrue
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": {status code},
    "traceId": {traceId},
    "errors": {
        [lista de erros]
    }
}