curl https://api.gorider.co/v1/delivery/pricing?client_id={client_id}&client_secret_id={client_secret_id}&departure="10 rue du paradis, 75010"&arrival="121 rue du faubourg saint-denis, 75010"
-H "Authorization: Bearer {token}"
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryPricing = await grClient.deliveries.getPricing({
departure: "10 rue du paradis, 75010",
arrival: "121 rue du faubourg saint-denis, 75010"
})
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveries = await grClient.deliveries.getDeliveries({
$page: 1,
$limit: 20,
})
By default, the $page is equal to 1 and the $limit is equal to 10
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryId = 'YOUR_DELIVERY_ID'
const delivery = await grClient.deliveries.getDelivery(deliveryId)
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveriesStatistics = await grClient.deliveries.getStatistics({
$startDate: new Date("2022-05-31T22:00:00.000Z"),
$endDate: new Date("2022-06-30T22:00:00.000Z"),
})
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryUpdate = await grClient.deliveries.updateSettings({
maxRadius: '5000' // in meters
})
POST Order Delivery
Order a delivery
POSThttps://api.gorider.co/api/oauth2/v1/delivery
Query Parameters
Name
Type
Description
client_id*
String
client_secret_id*
String
Headers
Name
Type
Description
Bearer Token*
String
Request Body
Name
Type
Description
departure
Object
arrival*
Object
arrival.placeId*
String
arrival.contact*
Object
departure.placeId
String
departure.contact
Object
{
// Response
}
curl https://api.gorider.co/v1/delivery/pricing?client_id={client_id}&client_secret_id={client_secret_id}&departure="10 rue du paradis, 75010"&arrival="121 rue du faubourg saint-denis, 75010"
-H "Authorization: Bearer {token}"
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryPricing = await grClient.deliveries.getPricing({
departure: "10 rue du paradis, 75010", // if it's empty mainAddress is taken
arrival: "121 rue du faubourg saint-denis, 75010"
})
const delivery = await grClient.deliveries.orderDelivery({
departure: { // if it's empty mainAddress is taken
placeId: deliveryPricing.departurePlaceId,
contact: {
firstname: 'Jean',
lastname: 'Goldberg',
companyName: 'Gorider',
phoneNumber: '+33143339933',
email: 'hello@gorider.co',
},
},
arrival: {
placeId: deliveryPricing.arrivalPlaceId,
contact: {
firstname: 'Jean',
lastname: 'LeReceveur',
companyName: 'Receiver',
phoneNumber: '+33123433221',
email: 'hello@receiver.xyz',
},
},
amount: deliveryPricing.totalAmount, // used only to check
})
curl -XPUT https://api.gorider.co/v1/delivery/:deliveryId/cancel?client_id={client_id}&client_secret_id={client_secret_id}
-H "Authorization: Bearer {token}"
-H "Content-Type: application/json"
-d '{ "reason": "Cancelled by the buyer" }'
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryId = 'YOUR_DELIVERY_ID'
const deliveryUpdate = await grClient.deliveries.cancelDelivery({
id: deliveryId,
reason: "Cancelled by the buyer"
})
// require the gorider module and set it up with your keys
const grClient = require('gorider')({client_id, client_secret_id, apiToken});
const deliveryId = 'YOUR_DELIVERY_ID'
const deliveryPricing = await grClient.deliveries.getPricing({
deliveryId: deliveryId
arrival: "121 rue du faubourg saint-denis, 75010"
})
// deliveryPricing will only rebill the distance
const deliveryUpdate = await grClient.deliveries.updateDelivery({
id: deliveryId,
arrival: placeId
})