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": [
{
"productSKUERPReferenceKeybasePriceRCA": "string"0.0,
"sellPricecomissionPercent": 0,
"discountPercentage": 0, "quantity
"fecp": 0.0,
"realCostfinancialCost": 0.0,
"warehouseBranchIdgift": "string"false,
"giftgiftPrice": true0,
"giftPricepackingId": 0,
"taxFigureIdposition": 0
},
]
} | Bloco de código |
---|
language | js |
---|
title | Body Response |
---|
| {
"branchId": "string",
"carrierIdproductId": 0,
"chargingIdproductSKUERPReferenceKey": "string00000-00",
"createData "quantity": "2021-08-06T15:40:00.000000+15:40",
0.0,
"customerrealCost": {0.0,
"activityIdreplacementCost": 0.0,
"addressInforesourceValueCMV": ""0,
"billingAddressresourceValueCustumerCMV": ""0,
"billingZipCodesellPrice": ""0.0,
"businessDistrictsellPriceBaseST": ""0,
"cityIdsellPriceIPI": 0,
"commercialAddresssellPriceST": ""0,
"commercialZipCodestGNRE": ""0,
"corporatetablePrice": false0.0,
"corporatePhonetablePriceIPI": ""0,
"countryIdtablePriceST": 0,
"emailtaxFigureId": ""0,
"finalCostumertruncItem": false,
"idwantageQuantity": 0,
"paymentPlanIdwarehouseBranchId": 0"string",
"sellerIddeliveryType": 0"RI",
"squareIddeliveryStatus": 0,
"R"
}
],
"stateInscriptionpermissions": "",{
"tradeNameacceptOrderWithoutTax": true,
"acceptSearchAutomaticFreightType": false
},
"lastChangeorderId": "2021-08-06T15:40:00string",
"listOfOrderItemorderIdHube": [
{
"accountingCost": 0.0"string",
"orderIdMktplace: "string",
"orderStatus": "string",
"basePriceRCAotherExpenses": 0.0,
"comissionPercentpaymentPlanId": 0,
"saleOrigin": "W",
"fecpsaleType": 0,
"saleTypePayment": "string",
"financialCosttotalValue": "0.0",
"gift": false,
"observation": "string",
"shippingTrackingCodeSale": "string" }
|
|
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 "giftPrice": 0,
"packingId": 0,
"position": 0,
"productId": 0,
- Código da Filial **requerido
daysOfSearch "productSKUERPReferenceKey": "00000-00",
"quantity": 0.0,
0 - Dias de Pesquisa (Se não informado, o padrão será 15 dias)
orderId "realCost": 0.0,
- Número Pedido
lastChange : "replacementCost": 0.0,
"resourceValueCMV": 0,
"resourceValueCustumerCMV": 0,
"sellPrice": 0.0,
"sellPriceBaseST": 0,
"sellPriceIPI": 0,
"sellPriceST": 0,
"stGNRE": 0,
2021-03-02T16:43:00 - Última alteração
viewDocument : true/ false - Dados da nota fiscal
saleOrigin : T - Origem Venda (Todas existentes no Winthor) Padrão W
order : lastChange - Ordenação de busca
orderStatus : C - Status do Pedido
page : 1 - Número Página
pageSize : 10 - Tamanho da página
hasOrderIdHube : true/ false - Pedidos que com id de Hube - Disponível a partir da versão 1.0.84.229(Winthor-pedido-venda)
hasOrderIdMktplace: true/ false - Pedidos que com id de Marketplace - Disponível a partir da versão 1.0.84.229(Winthor-pedido-venda)
integrationOrigin : "tablePrice": 0.0,
- Filtra pela coluna ORIGEMINTEGRACAO - Disponível a "tablePriceIPI": 0,
partir da versão 1.3.0.40(Winthor-pedido-venda)
|
Bloco de código |
---|
language | js |
---|
title | Body Response |
---|
| {
"tablePriceSTbranchId": 0"string",
"taxFigureId"carrierId": 0,
"truncItemchargingId": false"string",
"wantageQuantity"createData": 0,
"2021-08-06T15:40:00.000000+15:40",
"warehouseBranchIdcustomer": "string"{
}
],
"permissionsactivityId": {0,
"acceptOrderWithoutTaxaddressInfo": true"",
},
"orderIdbillingAddress": "string",
"orderIdHube": "string",
"orderStatusbillingZipCode": "string",
"otherExpenses": 0,
"paymentPlanIdbusinessDistrict": 0"",
"saleOrigin": "W",
"saleTypecityId": 0,
"saleTypePaymentcommercialAddress": "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
|
Bloco de código |
---|
language | js |
---|
title | Body Response |
---|
| {
"branchId": "string",
"carrierId": 0 "commercialZipCode": "",
"corporate": false,
"corporatePhone": "",
"countryId": 0,
"email": "",
"finalCostumer": false,
"id": 0,
"paymentPlanId": 0,
"sellerId": 0,
"squareId": 0,
"stateInscription": "",
"tradeName": ""
},
"chargingIddocument": "string",
{
"createData": "20211900-0801-06T1501T00:40:00.000000+15:40"00:00",
"documentNumber": 0,
"customerkeyDocument": {"",
"activityId": 0, "lastChange": "1900-01-01T00:00:00"
},
"addressInfolastChange": "2021-08-06T15:40:00",
/** Somente retornado em caso de utilização do cenário de múltiplas cobranças **/
"billingAddresslistPayment": "",[
{
"billingZipCode": "",
"businessDistrictchargingId" : "string",
"cityIdpaymentPlanId" : 0,
"commercialAddressexpirationDate" : "0000-00-00T00:00:00",
"commercialZipCodevalue" : ""0.0,
"corporatensu" : false,0
"corporatePhone": "",}
],
"countryIdlistOfOrderItem": 0,[
"email": "",
{
"finalCostumer": false,
"idaccountingCost": 0.0,
"paymentPlanIdbasePriceRCA": 0.0,
"sellerId "comissionPercent": 0,
"discountPercentage": 0,
"squareIdfecp": 0,
"stateInscriptionfinancialCost": ""0.0,
"tradeName": ""
"gift": }false,
"document": {
"createDatagiftPrice": "1900-01-01T00:00:00"0,
"documentNumberpackingId": 0,
"keyDocumentposition": ""0,
"lastChangeproductId": "1900-01-01T00:00:00"0,
},
"lastChangeproductSKUERPReferenceKey": "2021-08-06T15:40:00000-00",
"listOfOrderItem": [
{"quantity": 0.0,
"accountingCostrealCost": 0.0,
"basePriceRCAreplacementCost": 0.0,
"comissionPercentresourceValueCMV": 0,
"fecpresourceValueCustumerCMV": 0,
"financialCostsellPrice": 0.0,
"giftsellPriceBaseST": false0,
"giftPricesellPriceIPI": 0,
"packingId"sellPriceST": 0,
"sellPriceIcmsPart": 0,
"positionstGNRE": 0,
"productIdtablePrice": 0.0,
"productSKUERPReferenceKeytablePriceIPI": "00000-00"0,
"quantitytablePriceST": 0.0,
"realCosttaxFigureId": 0.0,
"replacementCosttruncItem": 0.0false,
"resourceValueCMVwantageQuantity": 0,
"warehouseBranchId": "string"
"resourceValueCustumerCMV": 0, }
"sellPricedeductionsCmv": 0.0,
{
"sellPriceBaseSTdiscountsCofins": 0,
"sellPriceIPIdiscountsIcms": 0,
"sellPriceSTdiscountsPis": 0,
"stGNRE": 0,}
],
"permissions": {
"tablePriceacceptOrderWithoutTax": 0.0true,
"acceptSearchAutomaticFreightType": false
},
"tablePriceIPIorderId": 0"string",
"orderIdHube": "string",
"orderIdMktplace: "string",
"tablePriceSTorderStatus": 0"string",
"otherExpenses": 0,
"taxFigureIdpaymentPlanId": 0,
"saleOrigin": "W",
"truncItemsaleType": false0,
"saleTypePayment": "string",
"wantageQuantitytotalValue": "0.0",
"observation": "string",
"shippingTrackingCodeSale": "string" "warehouseBranchId": "string"
}
],
"permissions": {
} |
|
Totvs custom tabs box items |
---|
default | no |
---|
referencia | passo4 |
---|
| As requisições de Cancelamento referente aos pedido, apresentam o JSON na resposta da requisição: Bloco de código |
---|
| method: 'DELETE',
url: '/api/wholesale/v1/orders/' -> Passar "acceptOrderWithoutTax": true
},
"orderId": "string",
"orderIdHube": "string",
"orderStatus": "string",
"otherExpenses": 0,
"paymentPlanId": 0,
"saleOrigin": "W",
"saleType": 0,
"saleTypePayment": "string",
"totalValue": "0.0"
}
no Parms o campo id e Motivo para cancelar o pedido
|
Bloco de código |
---|
| Id : 0 - ID/Número Pedido (Obrigatório)
sendMessageRca : true/ false - Enviar mensagem pro RCA?
reasonCancellation : C - Motivo Cancelamento (Obrigatório) |
|
|