Created
February 24, 2021 17:52
-
-
Save davixz/c863fb7b588d6bf15811d732b821dbc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REQUEST | |
estimateCreateOrder( | |
shopId: 1 | |
pickups: [{ | |
address: { | |
lat: -23.5703022 | |
lng: -46.6473154 | |
address: "Av. Paulista, 100 - Bela Vista, São Paulo - SP, Brasil" | |
complement: "8o andar" | |
} | |
}] | |
packages: [{ | |
pickupIndex: 0 | |
recipient: { | |
name: "Cliente A" | |
phone: "11912345678" | |
} | |
address: { | |
lat: -23.635334 | |
lng: -46.529835 | |
address: "Av. Estados Unidos, 505 - Parque das Nações, Santo André - SP, Brasil" | |
complement: "Apto 133" | |
} | |
dimensions: { | |
width: 44 | |
height: 38 | |
weight: 3000 | |
length: 38 | |
} | |
charge: { | |
value: "10.00" | |
method: 2 | |
change: "5.00" | |
} | |
}, { | |
pickupIndex: 0 | |
recipient: { | |
name: "Client B" | |
phone: "11987654312" | |
} | |
address: { | |
lat: -23.635334 | |
lng: -46.529835 | |
address: "Av. Brasil, 2000 - Jardim Paulista, São Paulo - SP, 01429-011" | |
complement: "Apto" | |
} | |
dimensions: { | |
width: 10 | |
height: 10 | |
weight: 1000 | |
length: 1 | |
} | |
charge: { | |
value: "10.00" | |
method: 2 | |
change: "5.00" | |
} | |
}, { | |
pickupIndex: 0 | |
recipient: { | |
name: "Client C" | |
phone: "11987656789" | |
} | |
address: { | |
lat: -23.635334 | |
lng: -46.529835 | |
address: "Rua Groenlândia, 12 - Jardim Europa, São Paulo - SP" | |
complement: "Apto 21" | |
} | |
dimensions: { | |
width: 10 | |
height: 10 | |
weight: 1000 | |
length: 15 | |
} | |
}] | |
) | |
RESPONSE | |
{ | |
"data": { | |
"estimateCreateOrder": { | |
"totalEstimate": { | |
"totalCost": "42.40", | |
"totalEta": 3455.0, | |
"totalDistance": 29.58 | |
}, | |
"ordersEstimate": [ | |
{ | |
"packages": [ | |
{ | |
"isReturn": false, | |
"cost": "25.92", | |
"eta": 3455.0, | |
"outOfCoverageArea": false, | |
"outOfCityCover": false, | |
"originalIndex": 1, | |
"resolvedAddress": "Av. Estados Unidos, 505 - Parque das Nações, Santo André - SP, 09210-300, Brazil" | |
} | |
], | |
"optimized": { | |
"cost": "25.92", | |
"eta": 3455.0, | |
"distance": 20.01 | |
} | |
}, | |
{ | |
"packages": [ | |
{ | |
"isReturn": false, | |
"cost": "12.94", | |
"eta": 1923.0, | |
"outOfCoverageArea": false, | |
"outOfCityCover": false, | |
"originalIndex": 3, | |
"resolvedAddress": "Rua Groenlândia, 12 - Jardim America, São Paulo - SP, 01434-000, Brazil" | |
}, | |
{ | |
"isReturn": false, | |
"cost": "3.54", | |
"eta": 3121.0, | |
"outOfCoverageArea": false, | |
"outOfCityCover": false, | |
"originalIndex": 2, | |
"resolvedAddress": "Av. Brasil, 2000 - Jardim America, São Paulo - SP, 01430-001, Brazil" | |
} | |
], | |
"optimized": { | |
"cost": "16.48", | |
"eta": 3121.0, | |
"distance": 9.57 | |
} | |
} | |
], | |
"packagesWithErrors": [] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment