A integração consiste em receber e enviar dados do pedido que serão utilizados no E-Commerce. Totvs custom tabs box items |
---|
default | yes |
---|
referencia | passo1 |
---|
| Os dados integrados são: API | PCPEDC | PCPEDI | createData | pcpedc.data | pcpedi.data | id | pcpedc.codcli | pcpedi.codcli | orderId | pcpedc.numped | pcpedi.numped | orderStatus | pcpedc.posicao |
| chargingId | pcpedc.codcob |
| TotalPrice | pcpedc.vltotal |
| paymentPlanId | pcpedc.codplpag |
| saleType | pcpedc.condvenda |
| branchId | pcpedc.codfilial |
| saleOrigin | pcpedc.origemped |
| productSKUERPReferenceKey |
| pcpedi.codprod | sellPrice |
| pcpedi.pvenda | quantity |
| pcpedi.qt | realCost |
| pcpedi.vlcustoreal | warehouseBranchId |
| pcpedi.codfilialretira | position |
| pcpedi.numseq | taxFigureId |
| pcpedi.codst | valueFreight | pcpedc.vlfrete |
| intermediaryCompanyName | pcpedc.descintermediador |
| idIntermediaryEmployer | pcpedc.cnpjintermediador |
| carrierId | pcpedc.codfornecfrete |
| lastChange | pcpedc.dtfat (prioridade 1) |
| lastChange | pcpedc.data (prioridade 2) |
| orderIdHube | pcpedc.numpedhube |
| orderIdMktplace | pcpedc.numpedmktplace |
| saleOrigin | pcpedc.origemped |
| freightDispatch | pcpedc.fretedespacho |
| uniqueSequentialNumber | pcpedc.nsu |
| dateUniqueSequentialNumber | pcpedc.dtnsu |
|
|
Totvs custom tabs box items |
---|
default | no |
---|
referencia | passo2 |
---|
| Exemplo do envio da requisição: Bloco de código |
---|
| method: 'POST',
url: '/api/wholesale/v1/orders/' |
Bloco de código |
---|
language | js |
---|
title | Body Request |
---|
| {
"createData": "2020-03-23T13:24:36.955102+13:24",
"orderIdHube": "string",
"orderIdMktplace": "string",
"orderStatus": "string",
"chargingId": "string",
"DiscountValue": 0.0,
"carrierId": 0,
"paymentPlanId": 0,
"saleType": 0,
"branchId": "string",
"saleOrigin": "W",
"uniqueSequentialNumber": "string",
"dateUniqueSequentialNumber": "string",
"intermediaryCompanyName": "string",
"idIntermediaryEmployer": "string",
"valueFreight": 0,
"otherExpenses": 0
"customer": {
"id": 0
},
"permissions": {
"acceptOrderWithoutTax": true
},
"listOfOrderItem": [
{
"productSKUERPReferenceKey": "string",
"sellPrice":0,
"quantity": 0.0,
"realCost": 0.0,
"warehouseBranchId": "string",
"gift": true,
"giftPrice": 0,
"taxFigureId": 0
}
]
} |
Bloco de código |
---|
language | js |
---|
title | Body Response |
---|
| {
"branchId": "string",
"carrierId": 0,
"chargingId": "string",
"createData": "2021-08-06T15:40:00.000000+15:40",
"customer": {
"activityId": 0,
"addressInfo": "",
"billingAddress": "",
"billingZipCode": "",
"businessDistrict": "",
"cityId": 0,
"commercialAddress": "",
"commercialZipCode": "",
"corporate": false,
"corporatePhone": "",
"countryId": 0,
"email": "",
"finalCostumer": false,
"id": 0,
"paymentPlanId": 0,
"sellerId": 0,
"squareId": 0,
"stateInscription": "",
"tradeName": ""
},
"lastChange": "2021-08-06T15:40:00",
"listOfOrderItem": [
{
"accountingCost": 0.0,
"basePriceRCA": 0.0,
"comissionPercent": 0,
"fecp": 0,
"financialCost": 0.0,
"gift": false,
"giftPrice": 0,
"packingId": 0,
"position": 0,
"productId": 0,
"productSKUERPReferenceKey": "00000-00",
"quantity": 0.0,
"realCost": 0.0,
"replacementCost": 0.0,
"resourceValueCMV": 0,
"resourceValueCustumerCMV": 0,
"sellPrice": 0.0,
"sellPriceBaseST": 0,
"sellPriceIPI": 0,
"sellPriceST": 0,
"stGNRE": 0,
"tablePrice": 0.0,
"tablePriceIPI": 0,
"tablePriceST": 0,
"taxFigureId": 0,
"truncItem": false,
"wantageQuantity": 0,
"warehouseBranchId": "string"
}
],
"permissions": {
"acceptOrderWithoutTax": true
},
"orderId": "string",
"orderIdHube": "string",
"orderIdMktplace: "string",
"orderStatus": "string",
"otherExpenses": 0,
"paymentPlanId": 0,
"saleOrigin": "W",
"saleType": 0,
"saleTypePayment": "string",
"totalValue": "0.0"
}
|
|
Totvs custom tabs box items |
---|
default | no |
---|
referencia | passo3 |
---|
| As consultas referente aos pedido, apresentam o JSON na resposta da requisição: Bloco de código |
---|
| method: 'GET',
url: '/api/wholesale/v1/orders/' -> Passar no Parms o campo orderId, para obter dados do pedido.
OU
url: '/api/wholesale/v1/orders/list' -> Passar na requisição os dados do Parms abaixo. |
Bloco de código |
---|
| branchId : 0 - Código da Filial **requerido
daysOfSearch : 0 - Dias de Pesquisa
orderId : 0 - Número Pedido
lastChange : 2021-03-02T16:43:00 - Última alteração
viewDocument : true/ false - Dados da nota fiscal
saleOrigin : T - Origem Venda (Todas existentes no
order : lastChange - Ordenação de busca
orderStatus : C - Status do Pedido
page : 1 - Número Página
pageSize : 10 - Tamanho da página
hasPedidoMktplace : true/ false - Retorna apenas produtos que contenham id de Marketplace
|
Bloco de código |
---|
language | js |
---|
title | Body Response |
---|
| {
"branchId": "string",
"carrierId": 0,
"chargingId": "string",
"createData": "2021-08-06T15:40:00.000000+15:40",
"customer": {
"activityId": 0,
"addressInfo": "",
"billingAddress": "",
"billingZipCode": "",
"businessDistrict": "",
"cityId": 0,
"commercialAddress": "",
"commercialZipCode": "",
"corporate": false,
"corporatePhone": "",
"countryId": 0,
"email": "",
"finalCostumer": false,
"id": 0,
"paymentPlanId": 0,
"sellerId": 0,
"squareId": 0,
"stateInscription": "",
"tradeName": ""
},
"document": {
"createData": "1900-01-01T00:00:00",
"documentNumber": 0,
"keyDocument": "",
"lastChange": "1900-01-01T00:00:00"
},
"lastChange": "2021-08-06T15:40:00",
"listOfOrderItem": [
{
"accountingCost": 0.0,
"basePriceRCA": 0.0,
"comissionPercent": 0,
"fecp": 0,
"financialCost": 0.0,
"gift": false,
"giftPrice": 0,
"packingId": 0,
"position": 0,
"productId": 0,
"productSKUERPReferenceKey": "00000-00",
"quantity": 0.0,
"realCost": 0.0,
"replacementCost": 0.0,
"resourceValueCMV": 0,
"resourceValueCustumerCMV": 0,
"sellPrice": 0.0,
"sellPriceBaseST": 0,
"sellPriceIPI": 0,
"sellPriceST": 0,
"stGNRE": 0,
"tablePrice": 0.0,
"tablePriceIPI": 0,
"tablePriceST": 0,
"taxFigureId": 0,
"truncItem": false,
"wantageQuantity": 0,
"warehouseBranchId": "string"
}
],
"permissions": {
"acceptOrderWithoutTax": true
},
"orderId": "string",
"orderIdHube": "string",
"orderIdMktplace: "string",
"orderStatus": "string",
"otherExpenses": 0,
"paymentPlanId": 0,
"saleOrigin": "W",
"saleType": 0,
"saleTypePayment": "string",
"totalValue": "0.0"
}
|
|
|