{"id":18851021,"url":"https://github.com/teatalkinternal/opencarpool_api","last_synced_at":"2025-10-24T02:52:30.197Z","repository":{"id":138146120,"uuid":"299199269","full_name":"TeaTalkInternal/opencarpool_api","owner":"TeaTalkInternal","description":"Restful APi's written in Php backed with mysql for ride sharing or carpooling.","archived":false,"fork":false,"pushed_at":"2020-09-28T07:40:20.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T15:58:10.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeaTalkInternal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-28T05:34:56.000Z","updated_at":"2023-09-25T08:31:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4e2b0f8-ebc1-4c7e-a52a-42253ea532e1","html_url":"https://github.com/TeaTalkInternal/opencarpool_api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaTalkInternal%2Fopencarpool_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaTalkInternal%2Fopencarpool_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaTalkInternal%2Fopencarpool_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaTalkInternal%2Fopencarpool_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeaTalkInternal","download_url":"https://codeload.github.com/TeaTalkInternal/opencarpool_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239787571,"owners_count":19697045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T03:33:11.416Z","updated_at":"2025-10-24T02:52:25.164Z","avatar_url":"https://github.com/TeaTalkInternal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencarpool_api\nRestful APi's written in Php backed with mysql for ride sharing or carpooling.\n\n#### You access via POSTMAN too https://documenter.getpostman.com/view/12807879/TVKHVvPi\n\n# Steps to setup\n\n- Please host opencarpool_api in your hosting environment\n- Setup your mysql using the SQL_dump.sql file\n- Add your credentials in db_connect_credentials.php\n\n\n#### You may also use the following API hosted at http://teatalk.one/open_carpool\n\n\n## Indices\n\n* [Ungrouped](#ungrouped)\n\n  * [accept_trip_request](#1-accept_trip_request)\n  * [book_trip](#2-book_trip)\n  * [create_trip](#3-create_trip)\n  * [delete_trip](#4-delete_trip)\n  * [edit_trip](#5-edit_trip)\n  * [fetch_booked_trips](#6-fetch_booked_trips)\n  * [fetch_lat_longs](#7-fetch_lat_longs)\n  * [fetch_profile](#8-fetch_profile)\n  * [login](#9-login)\n  * [reject_trip_request](#10-reject_trip_request)\n  * [show_all_trips](#11-show_all_trips)\n  * [show_my_trips](#12-show_my_trips)\n  * [sign_up](#13-sign_up)\n  * [trip_details](#14-trip_details)\n  * [unbook_trip](#15-unbook_trip)\n  * [update_device_token](#16-update_device_token)\n\n\n--------\n\n\n## Ungrouped\n\n\n\n### 1. accept_trip_request\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/accept_trip_request.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\"ownerEmail\" : \"kevinvishal347@gmail.com\",\n\t\"bookedTripID\" : 1526959522,\n\t\"bookieEmail\" : \"moni@gmail.com\",\n\t\"seatsBooked\" : 2\n}\n```\n\n\n\n### 2. book_trip\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/book_trip.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\t\"bookieEmail\" : \"moni@gmail.com\",\n\t\"seatsBooked\" : \"1\",\n\t\"totalSeatsOffered\" : \"5\",\n\t\"ownerEmail\" : \"kevinvishal347@gmail.com\",\n\t\"bookiePhoneNumber\" : \"8147002674\",\n\t\"bookieName\" : \"kevinvishal347\",\n\t\"bookedTripID\" : 1518873360,\n\t\"ownerPhoneNumber\" : \"8147002674\",\n\t\"deviceType\" : 1\n}\n```\n\n\n\n### 3. create_trip\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/create_trip.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n| Authorization | Basic NTU2NzIwOldlbGNvbWVAMTIz |  |\n\n\n\n***Body:***\n\n```js        \n{\n  \"trip_path\": \"\",\n  \"source_name\": \"Koramangala\",\n  \"destination_name\": \"Tavant Technologies\",\n  \"source_lat\": 12.9027774,\n  \"source_lng\": 77.5881542,\n  \"destination_lat\": 12.9279232,\n  \"destination_lng\": 77.6271078,\n  \"tripDate\": \"2019-Aug-27\",\n  \"schedule_type\": 1,\n  \"time_leaving_source\": \"11:51\",\n  \"time_leaving_destination\": \"12:52\",\n  \"number_of_seats\": 2,\n  \"traveller_type\": 1,\n  \"trip_type\": 1,\n  \"total_trip_time\": \"62mins\",\n  \"trip_via\": \"100 Feet Ring Rd/Outer Ring Rd\",\n  \"total_trip_distance\": \"7.3 km\",\n  \"phone_number\": \"8147002674\",\n  \"email\": \"vaibhav.koppal@tavant.com\",\n  \"is_trip_live\": 1,\n  \"isBooked\": 0,\n  \"isPending\": 0,\n  \"day1\": 1,\n  \"day2\": 1,\n  \"day3\": 1,\n  \"day4\": 1,\n  \"day5\": 1,\n  \"day6\": 0,\n  \"day7\": 0,\n  \"records\": [\n    {\n      \"distance\": \"0.3 km\",\n      \"duration\": \"2 mins\",\n      \"latitude\": \"12.9148937\",\n      \"longitude\": \"77.5882616\",\n      \"rawInstructions\": 67267362763\n    },\n    {\n      \"distance\": \"0.2 km\",\n      \"duration\": \"1 min\",\n      \"latitude\": \"12.9119933\",\n      \"longitude\": \"77.5877879\",\n      \"rawInstructions\": \"Turn left after Trendy Pre - School (on the left)\",\n      \"routeId\": 67267362763\n    },\n    {\n      \"distance\": \"1.3 km\",\n      \"duration\": \"4 mins\",\n      \"latitude\": \"12.9105318\",\n      \"longitude\": \"77.58773189999999\",\n      \"rawInstructions\": \"Turn left onto 9th Cross RdPass by Sree Tirumalagiri Lakshmi Venkateshwara Devasthanam (on the right)\",\n      \"routeId\": 67267362763\n    },\n    {\n      \"distance\": \"0.4 km\",\n      \"duration\": \"1 min\",\n      \"latitude\": \"12.9106421\",\n      \"longitude\": \"77.60000719999999\",\n      \"rawInstructions\": \"Turn left at Jayadev Junction 2 onto 100 Feet Ring Rd/Bannerghatta Main Rd/Outer Ring RdPass by Shilpa Kala Mantap (on the left)\",\n      \"routeId\": 67267362763\n    },\n    {\n      \"distance\": \"2.4 km\",\n      \"duration\": \"6 mins\",\n      \"latitude\": \"12.9142517\",\n      \"longitude\": \"77.5998867\",\n      \"rawInstructions\": \"Keep right to continue on Bannerghatta Main RdPass by the pharmacy (on the left in 1.0\u0026nbsp,km)\",\n      \"routeId\": 67267362763\n    }\n  ]\n}\n```\n\n\n\n### 4. delete_trip\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/delete_trip.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n| Authorization | Basic NTU2NzIwOldlbGNvbWVAMTIz |  |\n\n\n\n***Body:***\n\n```js        \n{\n\t\"unique_trip_id\" : 1561617741,\n\t\"ownerEmail\" : \"kevin.v@tavant.com\"\n}\n```\n\n\n\n### 5. edit_trip\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/update_trip.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\t\"unique_trip_id\" : 1560880618,\n\t\"trip_path\" : \"\",\n\t\"source_name\" : \"J P Nagar Phase 2\",\n\t\"destination_name\" : \"Jayanagar 9 th phase\",\n\t\"source_lat\" : 12.9027774,\n\t\"source_lng\" : 77.5881542,\n\t\"destination_lat\" : 12.9279232,\n\t\"destination_lng\" : 77.6271078,\n\t\"tripDate\":\"2019-Aug-17\",\n\t\"schedule_type\":1,\n\t\"time_leaving_source\" : \"09:00\",\n\t\"time_leaving_destination\" : \"18:00\",\n\t\"number_of_seats\" : 1,\n\t\"traveller_type\" : 1,\n\t\"trip_type\" : 1,\n\t\"total_trip_time\" : \"63 mins\",\n\t\"trip_via\" : \"100 Feet Ring Rd/Outer Ring Rd\",\n\t\"total_trip_distance\" : \"7.3 km\",\n\t\"phone_number\" : \"8147002674\",\n\t\"email\" : \"kevinvishal347@gmail.com\",\n\t\"is_trip_live\" : 1,\n\t\"isBooked\" : 0,\n\t\"isPending\" : 0,\n\t\"day1\" : 1,\n\t\"day2\" : 1,\n\t\"day3\" : 1,\n\t\"day4\" : 1,\n\t\"day5\" : 1,\n\t\"day6\" : 0,\n\t\"day7\" : 0,\n\t\"records\" : [\n   {\n      \"distance\":\"0.3 km\",\n      \"duration\":\"2 mins\",\n      \"latitude\":\"12.9148937\",\n      \"longitude\":\"77.5882616\",\n      \"rawInstructions\":67267362763\n   },\n   {\n      \"distance\":\"0.2 km\",\n      \"duration\":\"1 min\",\n      \"latitude\":\"12.9119933\",\n      \"longitude\":\"77.5877879\",\n      \"rawInstructions\":\"Turn left after Trendy Pre - School (on the left)\",\n      \"routeId\":67267362763\n   },\n   {\n      \"distance\":\"1.3 km\",\n      \"duration\":\"4 mins\",\n      \"latitude\":\"12.9105318\",\n      \"longitude\":\"77.58773189999999\",\n      \"rawInstructions\":\"Turn left onto 9th Cross RdPass by Sree Tirumalagiri Lakshmi Venkateshwara Devasthanam (on the right)\",\n      \"routeId\":67267362763\n   },\n   {\n      \"distance\":\"0.4 km\",\n      \"duration\":\"1 min\",\n      \"latitude\":\"12.9106421\",\n      \"longitude\":\"77.60000719999999\",\n      \"rawInstructions\":\"Turn left at Jayadev Junction 2 onto 100 Feet Ring Rd/Bannerghatta Main Rd/Outer Ring RdPass by Shilpa Kala Mantap (on the left)\",\n      \"routeId\":67267362763\n   },\n   {\n      \"distance\":\"2.4 km\",\n      \"duration\":\"6 mins\",\n      \"latitude\":\"12.9142517\",\n      \"longitude\":\"77.5998867\",\n      \"rawInstructions\":\"Keep right to continue on Bannerghatta Main RdPass by the pharmacy (on the left in 1.0\u0026nbsp,km)\",\n      \"routeId\":67267362763\n   }]\n}\n```\n\n\n\n### 6. fetch_booked_trips\n\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/fetch_booked_trips.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| email | moni@gmail.com |  |\n\n\n\n### 7. fetch_lat_longs\n\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/fetchLatLongs.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| routeId | 1519959519 |  |\n\n\n\n### 8. fetch_profile\n\n\nfetch profile\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/fetch_profile.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| email | kevin.v@tavant.com |  |\n\n\n\n### 9. login\n\n\nLogin\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/login_pool.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\"email\" : \"vaibhav.koppal@tavant.com\",\n\"deviceToken\" : \"676eruvfeg78r3ewurb3y3d3hkir439r3rhkfh\",\n\"deviceType\" : 2,\n\"password\" : \"123456\"\n}\n\n```\n\n\n\n### 10. reject_trip_request\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/reject_trip_request.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\t\"ownerEmail\" : \"kevinvishal347@gmail.com\",\n\t\"bookedTripID\" : 1560880618,\n\t\"bookieEmail\" : \"moni@gmail.com\",\n\t\"seatsBooked\" : 2\n}\n```\n\n\n\n### 11. show_all_trips\n\n\nShow All Trips\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/show_all_trips_with_filter.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| email | vaibhav.koppal@tavant.com |  |\n\n\n\n### 12. show_my_trips\n\n\nMy Trips\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/show_my_trips.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| email | kevinvishal347@gmail.com |  |\n\n\n\n### 13. sign_up\n\n\nSign Up\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/sign_up_pool.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\"username\" : \"Vaibhav126\",\n\"email\" : \"vaibhav12678@gmail.com\",\n\"phonenumber\" : \"8147002675\",\n\"deviceToken\" : \"676eruvfeg78r3ewurb3y3d3hkir439r3rhkfh\",\n\"deviceType\" : 2,\n\"password\" : \"123456\"\n\n}\n\n\n```\n\n\n\n### 14. trip_details\n\n\nTrip Details\n\n\n***Endpoint:***\n\n```bash\nMethod: GET\nType: \nURL: {{OpenCarpool_Base_URL}}/fetch_trip_via_id.php\n```\n\n\n\n***Query params:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| trip_id | 1518873360 |  |\n\n\n\n### 15. unbook_trip\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/unbook_trip.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\t\"bookieEmail\" : \"kevinvishal347@gmail.com\",\n\t\"bookedTripID\" : 1526959522,\n\t\"ownerEmail\" : \"moni@gmail.com\",\n\t\"seatsBooked\" : 2\n}\n```\n\n\n\n### 16. update_device_token\n\n\n\n***Endpoint:***\n\n```bash\nMethod: POST\nType: RAW\nURL: {{OpenCarpool_Base_URL}}/update_device_token.php\n```\n\n\n***Headers:***\n\n| Key | Value | Description |\n| --- | ------|-------------|\n| Content-Type | application/json |  |\n\n\n\n***Body:***\n\n```js        \n{\n\"email\" : \"moni@gmail.com\",\n\"deviceToken\" : \"555556MMMM76eruvfeg78r3ewurb3y3d3hkir439r3rhkfh\",\n\"deviceType\" : 2\n}\n\n```\n\n\n\n---\n[Back to top](#opencarpool)\n\u003e Made with \u0026#9829; by [thedevsaddam](https://github.com/thedevsaddam) | Generated at: 2020-09-28 13:07:45 by [docgen](https://github.com/thedevsaddam/docgen)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteatalkinternal%2Fopencarpool_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteatalkinternal%2Fopencarpool_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteatalkinternal%2Fopencarpool_api/lists"}