Ecommerce
Country

List

Retrieve the complete list of countries using the GET method, with a filter function and customizable options available for you. Below is the list of routes with their parameters:

https://ecom.coderorbit.com/api/countries
 
headers:{ 
    "Accept": "application/json",   
    "App-Master-Key": `${app_token}`
}

Result

 
  "data": [
    {
 
        "id": 1,
        "sortname": "AF",
        "name": "Afghanistan",
        "status": 0,
        "phonecode": 93
    },
    {
        ...
    }
 
  ]
 

If you want to paginate the list using the GET method, we offer this feature on this route with a parameter such as limit_per_page.

http://ecom.coderorbit.com/api/countries?limit_per_page=1&name=admin&page=1
 
headers:{ 
    "Accept": "application/json",    
    "App-Master-Key" : `${app_token}`
}

Result

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "sortname": "AF",
            "name": "Afghanistan",
            "status": 0,
            "phonecode": 93
        },
        {
            ...
        },
        
    ],
    "first_page_url": "",
    "from": 1,
    "last_page": 17,
    "last_page_url": "",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "",
            "label": "1",
            "active": true
        },
        {
            "url": "",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "",
    "path": "",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15,
    "total": 246
}

If you want to retrieve all data in the list using the GET method, we offer this feature on this route with a parameter such as: data=all.

http://ecom.coderorbit.com/api/countries?data=all
 
headers:{ 
    "Accept": "application/json",    
    "App-Master-Key" : `${app_token}`
}

Result

[
  {
    "id": 2,
    "sortname": "AL",
    "name": "Albania",
    "status": 0,
    "phonecode": 355
  },
  {
    "id": 9,
    "sortname": "AG",
    "name": "Antigua And Barbuda",
    "status": 0,
    "phonecode": 1268
  },
  {
    ...
  }
  ,
]

=== Query Parameters ===

limit_per_page = 1 // Default 15
name = ''
page = 1 // number of page for pagination
data = all

Here is example url:

==============================================================================================================
GET = http://localhost/coder_orbit/ecom/api/countries
==============================================================================================================
GET = http://localhost/master_api/api/countries?limit_per_page=1
==============================================================================================================
GET = http://localhost/master_api/api/countries?name=bangladesh
==============================================================================================================
GET = http://localhost/master_api/api/countries?page=1
==============================================================================================================
GET = http://localhost/master_api/api/countries?data=all&limit_per_page=1&name=admin&page=1
==============================================================================================================

Get District

Retrieve districts in a country using the GET method, with the option to filter by country_id.

https://ecom.coderorbit.com/api/district/{country_id}
headers:{ 
    "Accept": "application/json"    
    "App-Master-Key" : `${app_token}`
}

Result

[
    {
        "id": 1,
        "country_id": 18,
        "name": "Dhaka",
        "bn_name": "āĻĸāĻžāĻ•āĻž"
    },
    {
        "id": 2,
        "country_id": 18,
        "name": "Faridpur",
        "bn_name": "āĻĢāĻ°āĻŋāĻĻāĻĒā§āĻ°"
    },
    {
        ...
    }
    
]

Get Police station

Retrieve police stations in a district using the GET method, with the option to filter by district_id.

https://ecom.coderorbit.com/api/police_station/{district_id}
 
headers:{ 
    "Accept": "application/json"    
    "App-Master-Key" : `${app_token}`
}

Result

[
    {
        "id": 329,
        "district_id": 18,
        "name": "Adamdighi",
        "bn_name": "āĻ†āĻĻāĻŽāĻĻāĻŋāĻ˜ā§€"
    },
    {
        "id": 330,
        "district_id": 18,
        "name": "Bogra Sadar",
        "bn_name": "āĻŦāĻ—ā§ā§œāĻž āĻ¸āĻĻāĻ°"
    },
    {
       .... 
    }
    
]
CODER ORBIT
Bangladesh Office:
Call: 01534-645492
11/C, House-01, Lane-10
Road-11, Dhaka 1216
Email: support@coderorbit.com
Others
Domain & Hosting
Course
Debug
Portfolio
FOLLOW US
SUBSCRIBE US
Subscribe
2018 - 2025 Copyright Š Coder Orbit. All rights reserved.