List Service Areas

This section shows how to get a list of active service areas, that we currently support

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/list-service-areas
  2. Authenticate the request as per directions here

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/list-service-areas"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"

Call Responses

Here's is a typical success response expressed in a table with description

Key Sample value Description
status success No errors found
data

    [
        {
            "state_name": "Lagos",
            "state_code": "LA",
            "country_name": "Nigeria",
            "country_code": "NG"
        },
        {
            "state_name": "Texas",
            "state_code": "TX",
            "country_name": "United States",
            "country_code": "US"
        },
        {
            "state_name": "Georgia",
            "state_code": "GA",
            "country_name": "United States",
            "country_code": "US"
        },
        {
            "state_name": "Ogun",
            "state_code": "OG",
            "country_name": "Nigeria",
            "country_code": "NG"
        },
        {
            "state_name": "California",
            "state_code": "CA",
            "country_name": "United States",
            "country_code": "US"
        },
        {
            "state_name": "Dubayy",
            "state_code": "DU",
            "country_name": "United Arab Emirates",
            "country_code": "AE"
        },
        ...
    ]
                            

List Order Delay Types

This section shows how to get a list of supported order delay times

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/list-order-delay-types
  2. Authenticate the request as per directions here

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/list-order-delay-types"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"

Call Responses

Here's is a typical success response expressed in a table with description

Key Sample value Description
status success No errors found
data
[
    "ASAP",
    "30",
    "ANYTIME",
    "45",
    "180",
    "120",
    "60"
]
                            

Kindly use only values that are returned from this API call

ASAP means no delays

ANYTIME means order can return anytime

30 means delays for 30 minutes

180 means delay for 180 minutes

List Vehicle Types

This section shows how to get a list of supported vehicles, as well as their cost ratio as compared to bike cost for the same order conditions

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/list-vehicle-types
  2. Authenticate the request as per directions here

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/list-vehicle-types"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"

Call Responses

Here's is a typical success response expressed in a table with description

Key Sample value Description
status success No errors found
data
[
    {
        "label":"Bike",
        "code":"1",
        "cost_ratio":"1"
    },
    {
        "label":"Car",
        "code":"2",
        "cost_ratio":"1.25"
    },
    {"label":"Truck","code":"3","cost_ratio":"4.5"},
    {"label":"Bicycle","code":"5","cost_ratio":".65"}
]
                            

Label: The name of the vehicle type

Code: The code of the vehicle type. Use this in preferred_vehicle parameter to place orders

Cost ratio as it compares to bikes. A cost ratio of 1.25 means the cost of using this vehicle will be 1.25 as costly as the cost of using bikes to complete same order in same condition

Webhooks

This section explains how you get notifications through webhooks.

Merchants are notified of orders and order status through the webhook url supplied from their merchant dashboard

Once you have supplied an endpoint to receive notification then listen as follows:

  1. Listen for POST calls with field order_data The order data should contain details about a given order with example as follows:
                            {
                                "order_id": "0288372928",
                                "status"=> "delivered",
                                "driver_name"=> "John Doe",
                                "driver_contact"=> "01234567",
                                "order_time"=> "1741698009",
                                "time_assigned"=> "1741698009",
                                "time_trip_started"=> "1741698009",
                                "delivery_time"=> "1741698009"
                            }
                        
    Depending on the status of the order, some of the fields might be empty, but you should always get the order_id and status fields
  2. We recommend a check to verify the caller of the webhook. As part of the call, we have supplied a header: X-FASTRYDERS-SIGNATURE with value equal to the HMAC 512 of the POST field order_data signed using the merchant's token - as retrieved from the merchant's dashboard