Deliveries
GET Delivery Pricing
Get the delivery price from departure to arrival
GET https://api.gorider.co/api/oauth2/v1/delivery/pricing
Query Parameters
client_id*
String
client_secret_id*
String
departure*
String
arrival*
String
Headers
Bearer Token*
String
API_KEY
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"
})GET Your Deliveries
Get your deliveries
GET https://api.gorider.co/api/oauth2/v1/deliveries
Query Parameters
client_id*
String
client_secret_id*
String
$limit*
Number
By default set to 10
$page*
Number
Headers
Bearer Token*
String
curl https://api.gorider.co/v1/deliveries?client_id={client_id}&client_secret_id={client_secret_id}
-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 deliveries = await grClient.deliveries.getDeliveries({
$page: 1,
$limit: 20,
})GET Your Delivery
Get a delivery
GET https://api.gorider.co/api/oauth2/v1/delivery/:deliveryId
Path Parameters
deliveryId*
String
Query Parameters
client_id*
String
client_secret_id*
String
Headers
Bearer Token*
String
curl https://api.gorider.co/v1/delivery/:deliveryId?client_id={client_id}&client_secret_id={client_secret_id}
-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 deliveryId = 'YOUR_DELIVERY_ID'
const delivery = await grClient.deliveries.getDelivery(deliveryId)GET Deliveries Statistics
GET https://api.gorider.co/api/oauth2/v1/deliveries/stats?
Path Parameters
deliveryId
String
Query Parameters
client_id*
String
client_secret_id*
String
$startDate
Date
$endDate
Date
Headers
Bearer Token*
String
curl https://api.gorider.co/v1/delivery/statistics?client_id={client_id}&client_secret_id={client_secret_id}
-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 deliveriesStatistics = await grClient.deliveries.getStatistics({
$startDate: new Date("2022-05-31T22:00:00.000Z"),
$endDate: new Date("2022-06-30T22:00:00.000Z"),
})UPDATE Deliveries Settings
Update deliveries settings
PUT https://api.gorider.co/api/oauth2/v1/delivery/settings
Query Parameters
client_id*
String
client_secret_id
String
Headers
Bearer Token
String
Request Body
maxRadius
String
curl -XPUT https://api.gorider.co/v1/delivery/settings?client_id={client_id}&client_secret_id={client_secret_id}
-H "Authorization: Bearer {token}"
-H "Content-Type: application/json"
-d '{"maxRadius": 5000}'// 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
POST https://api.gorider.co/api/oauth2/v1/delivery
Query Parameters
client_id*
String
client_secret_id*
String
Headers
Bearer Token*
String
Request Body
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: '[email protected]',
},
},
arrival: {
placeId: deliveryPricing.arrivalPlaceId,
contact: {
firstname: 'Jean',
lastname: 'LeReceveur',
companyName: 'Receiver',
phoneNumber: '+33123433221',
email: '[email protected]',
},
},
amount: deliveryPricing.totalAmount, // used only to check
})CANCEL Ongoing Delivery
POST https://api.gorider.co/api/oauth2/v1/delivery/:delivery/cancel
Path Parameters
deliveryId*
String
Query Parameters
client_id*
String
client_secret_id*
String
Headers
Bearer Token*
String
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"
})UPDATE Ongoing Delivery
PUT https://api.gorider.co/api/oauth2/v1/delivery/:delivery/update
Path Parameters
deliveryId
String
Query Parameters
client_id*
String
Headers
String
curl -XPUT https://api.gorider.co/v1/delivery/:deliveryId?client_id={client_id}&client_secret_id={client_secret_id}
-H "Authorization: Bearer {token}"
-H "Content-Type: application/json"
-d '{ "arrival": { "placeId": "ChIJh_jHSBFu5kcRATQwxUT8k7o", "contact": { "phoneNumber": "+33633443344" } } }'// 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
})Last updated