Create Rider
curl --request POST \
--url https://dev.api.fleets.usedora.com/api/v1/riders/createimport requests
url = "https://dev.api.fleets.usedora.com/api/v1/riders/create"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://dev.api.fleets.usedora.com/api/v1/riders/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.api.fleets.usedora.com/api/v1/riders/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dev.api.fleets.usedora.com/api/v1/riders/create"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.api.fleets.usedora.com/api/v1/riders/create")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.fleets.usedora.com/api/v1/riders/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"uuid": "9dbb0847-a2ba-4cdb-b904-72fd9ab2f3bc",
"riderid": 45689646,
"name": "Nice Chimaobi",
"address": "Aso housing estate, lugbe",
"phone_number": "08028492844",
"phone_code": "234",
"email": "king@gmail.com",
"vehicle_plate_number": "Ae93480G",
"photo": "https://usedora-bucket-dev.s3.amazonaws.com/photos/oNhnn9x1fxoiPkJ3kbJUxYWNa6L4iusIChYI2B8G.jpg",
"created_at": "2023-12-03T07:47:46.000000Z"
}
}
Manage Riders
Create Rider
Create Rider
curl --request POST \
--url https://dev.api.fleets.usedora.com/api/v1/riders/createimport requests
url = "https://dev.api.fleets.usedora.com/api/v1/riders/create"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://dev.api.fleets.usedora.com/api/v1/riders/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.api.fleets.usedora.com/api/v1/riders/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dev.api.fleets.usedora.com/api/v1/riders/create"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dev.api.fleets.usedora.com/api/v1/riders/create")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.fleets.usedora.com/api/v1/riders/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"uuid": "9dbb0847-a2ba-4cdb-b904-72fd9ab2f3bc",
"riderid": 45689646,
"name": "Nice Chimaobi",
"address": "Aso housing estate, lugbe",
"phone_number": "08028492844",
"phone_code": "234",
"email": "king@gmail.com",
"vehicle_plate_number": "Ae93480G",
"photo": "https://usedora-bucket-dev.s3.amazonaws.com/photos/oNhnn9x1fxoiPkJ3kbJUxYWNa6L4iusIChYI2B8G.jpg",
"created_at": "2023-12-03T07:47:46.000000Z"
}
}
📝 Summary
This endpoint allows the creation of a new rider profile in the system. It collects essential rider details, such as personal information, contact details, and identification, enabling them to start performing delivery tasks.Requests
Example
Show child attributes
Show child attributes
{
"rider_emails": [
"kingddsassa@gmail.com"
],
"commission_value": 10,
"commission_type": "commission"
}
Params
Show child attributes
Show child attributes
Description:
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
body | body | object | no | none |
rider_emails | body | [string] | yes | none |
commission_value | body | integer | yes | none |
commission_type | body | string | yes | none |
Responses
| HTTP Status Code | Meaning | Description | Data schema |
|---|---|---|---|
| 200 | OK | none | Inline |
| 422 | Bad Request | none | Inline |
{
"status": "success",
"data": {
"uuid": "9dbb0847-a2ba-4cdb-b904-72fd9ab2f3bc",
"riderid": 45689646,
"name": "Nice Chimaobi",
"address": "Aso housing estate, lugbe",
"phone_number": "08028492844",
"phone_code": "234",
"email": "king@gmail.com",
"vehicle_plate_number": "Ae93480G",
"photo": "https://usedora-bucket-dev.s3.amazonaws.com/photos/oNhnn9x1fxoiPkJ3kbJUxYWNa6L4iusIChYI2B8G.jpg",
"created_at": "2023-12-03T07:47:46.000000Z"
}
}
⌘I