Search Locations

In order to place orders on the App., valid locations are required.
This section will show you how to get valid locations that will serve as inputs to complete placing user orders

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/search-locations
  2. Authenticate the request as per directions here
  3. POST some data according to the table below
Field Sample Value Required Description
query Ikeja Shopping Mall YES A string that specifies the location you want to search or verify
The more detailed the string, supplied, the more relevant the results returned
location 6.4,3.4 NO Location parameter should be supplied in the order: latitude,longitude.
When provided, would help refine search and produce more relevant results as pertaining the specified location

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/search-locations"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"
  4. --form "phone_number=2348012345678"
  5. --form "app_token=7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn"
  6. --form "query=Ikeja Shopping Mall"
  7. --form "location=6.4,3.4"

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
    [
        {
            "name": "Ikeja City Mall",
            "address": "Obafemi Awolowo Way, Alausa 101233, Ojodu, Nigeria",
            "label": "Ikeja City Mall",
            "latlng": [
                6.6143564,
                3.3581327
            ]
        },
        {
            "name": "Ikeja",
            "address": "Ipodo St, Allen 101233, Ikeja, Nigeria",
            "label": "Ikeja",
            "latlng": [
                6.5970494,
                3.343663
            ]
        },
    ...
    ]
                            

Place Orders

In order to place orders on the App., valid locations are required.

To get valid locations, look at the section on this document on how to go about that

Here are the steps to place an order

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/place-order
  2. Authenticate the request as per directions here
  3. POST some data according to the table below
Field Sample Value Required Description
app_token 7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn YES If user_type is regular then

User’s app token, as returned after account creation

Else if user_type is merchant

then merchant’s account token as generated by merchant
app_user 2348012345678 YES If user_type is regular then

User’s phone number as returned after account creation

Else if user_type is merchant

Merchant's account email address
user_type regular NO (YES for merchant users) Values can be either regular or merchant. This is the user type of the user for which order is being placed for. Default value is regular.

Users whose accounts were created from this API, will likely use the the regular value
pick_up
    {
        "name": "Ikeja City Mall",
        "address": "Obafemi Awolowo Way, Alausa 101233, Ojodu, Nigeria",
        "label": "Ikeja City Mall",
        "latlng": [
            6.6143564,
            3.3581327
        ]
    }
                            
YES An JSON of type (order) returned by search locations section of this documentation
drop_off
    {
        "name": "Ikeja City Mall",
        "address": "Obafemi Awolowo Way, Alausa 101233, Ojodu, Nigeria",
        "label": "Ikeja City Mall",
        "latlng": [
            6.6143564,
            3.3581327
        ]
    },
                            
YES An JSON of type (order) returned by search locations section of this documentation
receiver_name Jane Doe YES Item receiver’s name
receiver_phone 2348012345678 YES Item receiver’s number properly formatted like in the phone_number field
payment_method cash YES Payment method

Values can either cash or wallet
test_params yes YES Possible values are yes or no

When yes is passed, then the field values will be tested and wrong values are reported, when found, or fare estimate is returned if no wrong values are found.

Order is not placed if yes is passed.

When no is passed, then order is placed. Only pass no after yes have been initially passed to test and confirm the order

stops
[
    {
        "name": "Main St",
        "address": "Main St, Denver, CO 80238, USA",
        "label": "Main St",
        "latlng": [
        39.782267,
        -104.8919341
        ]
    },
    {
        "name": "Main St",
        "address": "Main St, Denver, CO 80238, USA",
        "label": "Main St",
        "latlng": [
        39.782267,
        -104.8919341
        ]
    }
]
                            
NO An ARRAY-LIKE JSON of the valid locations.

Max. of two (2) stop locations are currently accepted
order_delay ANYTIME NO This is the length of time a rider should delay before starting and order request.

Common values includes ASAP, which translates to, do not delay, ANYTIME which translates to start delivery at anytime.

ANYTIME is set as default, if you do not specify this parameter

Check the reference section of this documentation to see how to get other valid delay values to use
preferred_vehicle 1 NO An Integer representing the preferred vehicle that should be used to complete order

Default is 1 which is a Bike

Different vehicle types affect the final cost of delivery

We will try to use your preferred vehicle type, but we will any other vehicle (usually a bike) in a case we don't find your preferred vehicle type

Check the reference section of this documentation to see how to get a list of supported vehicles.
item_mass 1000 NO Mass of the item in grams.
item_worth 5000 NO Worth of the item in your local currency
item_images ["https://example.com/public/images/item1.jpg"] NO An ARRAY-LIKE JSON of item image URLs.

Max. of two (2) item images are accepted.

Ensure that images are generally lightweight (less than 1MB is preferrable). Heavier images might produce unexpected results

Only JPEG and PNG images are accepted
notes Call me when you get to delivery location NO Some notes from item sender
no_of_movers 1 NO No. of movers needed
courier_tip 10 NO Percentage of total fare value to add as tip for courier
no_of_items 0 NO If item is a package, then the no. of individual packages
promo_code FAST100 NO Valid promo code that applies to user

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/search-locations"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"
  4. --form "app_token=7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn"
  5. --form "phone_number=2348012345678"
  6. --form "pick_up={\"name\":\"Grand Square Supermarket and Stores\",\"address\":\"Plot Y, Mobolaji Johnson Ave, Alausa, Lagos, Nigeria\",\"label\":\"Grand Square Supermarket and Stores\",\"latlng\":[6.609385199999999,3.3688216]}"
  7. --form "drop_off={\"name\":\"Grand Square Supermarket and Stores\",\"address\":\"Plot Y, Mobolaji Johnson Ave, Alausa, Lagos, Nigeria\",\"label\":\"Grand Square Supermarket and Stores\",\"latlng\":[6.609385199999999,3.3688216]}"
  8. --form "receiver_name=Oby Adams"
  9. --form "receiver_phone=2348012345678"
  10. --form "payment_method=cash"
  11. --form "test_params=yes"

Call Responses

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

Key Sample value Description
status success No errors found
message Order tested positive and ready to complete Message can be either Order tested positive and ready to complete

or Order placed successfully

depending on if test_params is yes or no respectively
data
{
    "cost_estimate":"400",
    "init_cost":"450",
    "promo_discount":"50"
}
                            
Data returned will be depending on if

test_params is yes or no respectively.

When test_params is yes, below is the description of data returned

Key Description
cost_estimate The cost estimate of delivery. It might remain the same even after order delivery depending on delay cost. If there was no pickup delays, then price will remain the same after delivery
init_cost Cost of the delivery without promo discount. It will be the same with cost_estimate if no valid promo codes were processed
promo_discount Discount associated with promo code submitted, if any was submitted

When test_params is no, below is the description of data returned

Key Description
order_id The ID of the order. It can be used to further query this order

List Orders

This section describes how to get a list of all orders placed by a user

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/list-orders
  2. Authenticate the request as per directions here
  3. POST some data according to the table below
Field Sample Value Required Description
app_token 7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn YES If user_type is regular then

User’s app token, as returned after account creation

Else if user_type is merchant

then merchant’s account token as generated by merchant
app_user 2348012345678 YES If user_type is regular then

User’s phone number as returned after account creation

Else if user_type is merchant

Merchant's account email address
user_type regular NO (YES for merchant users) Values can be either regular or merchant. This is the user type of the user for which list of orders is being requested. Default value is regular.

Users whose accounts were created from this API, will likely use the the regular value

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/list-orders"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"
  4. --form "app_token=7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn"
  5. --form "phone_number=2348012345678"

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
[
    {
      "id": "209039822"
      "status": "delivered",
      "pick_up": "{\"name\":\"Nnamdi Azikiwe University\",\"address\":\"Along Enugu-Onitsha Expressway, Ifite Road, 420110, Awka, Nigeria\",\"label\":\"Nnamdi Azikiwe University\",\"latlng\":[6.245880199999999,7.119894]}",
      "drop_off": "{\"name\":\"Choice Hotel\",\"address\":\"49Arthur, Eze Avenue, Awka, Nigeria\",\"label\":\"Choice Hotel\",\"latlng\":[6.2201517,7.0670817]}",
      "stops": "[]",
      "receiver_name": "John Doe",
      "receiver_number": "8012345678",
      "notes": "This is a sample API Note",
      "no_of_movers": "0",
      "courier_tip": "0",
      "order_time": "1669190452",
      "time_started": "1669190532",
      "delivery_time": "1669190714",
      "total_cost": "237",
      "cost_without_delay_charges": "240.47",
      "payment_method": "cash",
      "est_distance": "9579m",
      "driver": {
        "name": "API Driver",
        "phone": "2348123456789"
      }
    },
    {
      "id": "209039823"
      "status": "assigned",
      "pick_up": "{\"label\":\"G.U.O Transport - Iddo Terminal\",\"address\":\"F9CJ+PXF, Murtala Muhammed, Ijora Olopa 101245, Ikeja, Nigeria\",\"latlng\":[6.471811,3.3824323],\"name\":\"G.U.O Transport - Iddo Terminal\"}",
      "drop_off": "{\"label\":\"Iyana-Ipaja\",\"address\":\"Iyana-Ipaja, Lagos, Nigeria\",\"latlng\":[6.619514499999999,3.2998689],\"name\":\"Iyana-Ipaja\"}",
      "stops": "[]",
      "receiver_name": "Chris Joe",
      "receiver_number": "08101234567",
      "notes": "Please deliver to the gas man at the station",
      "no_of_movers": "0",
      "courier_tip": "10",
      "order_time": "1668596513",
      "time_started": "",
      "delivery_time": "",
      "total_cost": "",
      "cost_without_delay_charges": "1452.0",
      "payment_method": "cash",
      "est_distance": "25611m",
      "driver": {
        "name": "test Rider",
        "phone": "234912345678"
      }
    },
    {
      "id": "209039829"
      "status": "assigned",
      "pick_up": "{\"label\":\"3926 Links Ln\",\"address\":\"3926 Links Ln, Round Rock, TX 78664, USA\",\"latlng\":[30.5014414,-97.5997951],\"name\":\"3926 Links Ln\"}",
      "drop_off": "{\"label\":\"Regus - Round Rock - Old Town Square\",\"address\":\"1 Chisholm Trail Rd Suite 450, Round Rock, TX 78681, United States\",\"latlng\":[30.5141005,-97.6889961],\"name\":\"Regus - Round Rock - Old Town Square\"}",
      "stops": "[]",
      "receiver_name": "test Name",
      "receiver_number": "01928833",
      "notes": "testing",
      "no_of_movers": "0",
      "courier_tip": "0",
      "order_time": "1667951580",
      "time_started": "",
      "delivery_time": "",
      "total_cost": "",
      "cost_without_delay_charges": "28.08",
      "payment_method": "wallet",
      "est_distance": "13452m",
      "driver": {
        "name": "Junex Whyte",
        "phone": "09388443998"
      }
    },
    ...
  ]

                            

Get Single Order Details

This section describes how to get order details for a single order by supplying the order ID

Here are the steps to follow

  1. Make a POST request to the endpoint
    https://api.fastryders.com/user-orders/get-order
  2. Authenticate the request as per directions here
  3. POST some data according to the table below
Field Sample Value Required Description
app_token 7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn YES If user_type is regular then

User’s app token, as returned after account creation

Else if user_type is merchant

then merchant’s account token as generated by merchant
app_user 2348012345678 YES If user_type is regular then

User’s phone number as returned after account creation

Else if user_type is merchant

Merchant's account email address
user_type regular NO (YES for merchant users) Values can be either regular or merchant. This is the user type of the user for which orders is being requested. Default value is regular.

Users whose accounts were created from this API, will likely use the the regular value
order_id 1234567890 YES The order ID for which details is being requested

Here is a sample API CALL

  1. curl --location --request POST "https://api.fastryders.com/user-orders/get-order"
  2. --header "x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
  3. --header "Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"
  4. --form "app_token=7B3qrzcB6HXduA2BXyQgkGnSpQ73k1ITc6UT3y0NgPogqYfrvn"
  5. --form "phone_number=2348012345678"
  6. --form "order_id=1234567890"

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
"details": {
      "id": "209039822"
      "status": "delivered",
      "pick_up": "{\"name\":\"Nnamdi Azikiwe University\",\"address\":\"Along Enugu-Onitsha Expressway, Ifite Road, 420110, Awka, Nigeria\",\"label\":\"Nnamdi Azikiwe University\",\"latlng\":[6.245880199999999,7.119894]}",
      "drop_off": "{\"name\":\"Choice Hotel\",\"address\":\"49Arthur, Eze Avenue, Awka, Nigeria\",\"label\":\"Choice Hotel\",\"latlng\":[6.2201517,7.0670817]}",
      "stops": "[]",
      "receiver_name": "John Doe",
      "receiver_number": "8012345678",
      "notes": "This is a sample API Note",
      "no_of_movers": "0",
      "courier_tip": "0",
      "order_time": "1669190452",
      "time_started": "1669190532",
      "delivery_time": "1669190714",
      "total_cost": "237",
      "cost_without_delay_charges": "240.47",
      "payment_method": "cash",
      "est_distance": "9579m",
      "driver": {
        "name": "API Driver",
        "phone": "2348123456789",
        "location": "{\"lat\":\"0\",\"lng\":\"0\",\"bearing\":\"0\"}"
      }
    }