πTransport Unions
Manage transport union and it's branches
Transport Unions
Fetch all mother transport unions and their branches
This fetch all transport unions registered to operate in Ghana with their respective branches.
GET https://api.data.tapngogh.com/transport-unions/all
Query Parameters
code
String
code of the transport union
shortName
String
shortname of transport Union
limit
Number
number of elements to fetch
Headers
Authorization*
String
[
{
"_id": "632af57fd788233a09a97c65",
"name": "GPRTU",
"createdAt": "2022-09-21T11:29:03.567Z",
"updatedAt": "2022-09-21T11:29:03.567Z",
"__v": 0,
"branches": [
{
"_id": "6370c3749bb28dd5a97463f2",
"name": "Circle GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GM-323-32",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T10:14:12.155Z",
"updatedAt": "2022-11-13T10:14:12.155Z",
"__v": 0,
"zones": []
},
{
"_id": "6370c662972e191d52079e97",
"name": "Ablekle GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GM-323-32",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T10:26:42.470Z",
"updatedAt": "2022-11-15T12:14:56.292Z",
"__v": 0,
"zones": [
{
"_id": "6362fad392d12dfb4517903f",
"name": "Madina",
"assembly": "632ae03b5a28c948af732b6c",
"routes": [
{
"_id": "6362f92c92d12dfb45179015",
"name": "Madina Main Station",
"alt": "Madina, La Nkwantanang Madina, Ankpa Kooko Abbey Street",
"digitalAddress": "GM-017-8261",
"location": {
"type": "Point",
"coordinates": [
-0.171465819164803,
5.676921532767728
]
}
},
{
"_id": "6362faa492d12dfb4517903a",
"name": "Atomic-Junction Station",
"alt": "Madina, La Nkwantanang Madina, Haatso-Atomic Road",
"digitalAddress": "GM-033-4545",
"location": {
"type": "Point",
"coordinates": [
-0.177619279240847,
5.667209065326109
]
}
}
],
"createdAt": "2022-11-02T23:18:43.135Z",
"updatedAt": "2022-11-02T23:18:43.135Z",
"__v": 0
},
{
"_id": "6373810924aaa20c74acd04f",
"name": "Atomic Zone 1",
"assembly": "632ae03b5a28c948af732b6c",
"routes": [
{
"_id": "6362f92c92d12dfb45179015",
"name": "Madina Main Station",
"alt": "Madina, La Nkwantanang Madina, Ankpa Kooko Abbey Street",
"digitalAddress": "GM-017-8261",
"location": {
"type": "Point",
"coordinates": [
-0.171465819164803,
5.676921532767728
]
}
},
{
"_id": "6362faa492d12dfb4517903a",
"name": "Atomic-Junction Station",
"alt": "Madina, La Nkwantanang Madina, Haatso-Atomic Road",
"digitalAddress": "GM-033-4545",
"location": {
"type": "Point",
"coordinates": [
-0.177619279240847,
5.667209065326109
]
}
}
],
"createdAt": "2022-11-15T12:07:37.599Z",
"updatedAt": "2022-11-15T12:07:37.599Z",
"__v": 0
}
]
},
{
"_id": "6370d163f9af0011dbbade73",
"name": "Amasaman GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GR-32-123",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T11:13:39.593Z",
"updatedAt": "2022-11-13T11:13:39.593Z",
"__v": 0,
"zones": []
},
{
"_id": "6370f085806b0131a82054af",
"name": "Madina GPRTU",
"transportUnion": "632af57fd788233a09a97c65",
"digitalAddress": "GR-324-242",
"contactNumber": "0548215801",
"email": "[email protected]",
"createdAt": "2022-11-13T13:26:29.325Z",
"updatedAt": "2022-11-13T13:26:29.325Z",
"__v": 0,
"zones": []
}
]
}
]Create Transport Unions
This section allows you to create transport Union eg: GPRTU
Summary
POST https://api.data.tapngogh.com/transport-unions/add
This endpoint allows you to create union
Headers
Authorization*
String
Auth Code
Request Body
name*
String
Name of Union
code*
String
unique code of union
shortName*
String
unique short name of union
Fetch Union Branches
This shows how you can fetch all branches of all the various transport unions.
You can query by the _id of a transport union to get all the branches for that union
GET https://api.data.tapngogh.com/transport-unions/branches
Returns an array of all branches for all transport unions
Query Parameters
transportUnion
String
_id value of union
code
String
Code of transport union branch
Headers
Authorization*
String
Authorization
Create Union Branches
Add a transport union branch to a union.
POST https://api.data.tapngogh.com/transport-unions/branch/add
Headers
Authorization*
String
Merchant authorization code
Request Body
name*
String
Name of union branch
transportUnion*
_id
Id of the parent transport union
digitalAddress*
String
Digital Address of branch
contactNumber*
String
Contact Number of Branch
String
Email of branch
Edit Union Branch
POST https://api.data.tapngogh.com/transport-unions/branch/edit
Edit a transport union branch
Headers
Authorization*
String
Auth code for merchant
Request Body
code*
String
code of the union branch you want to edit
edits*
Object
{
status: "Something"
}
Last updated
Was this helpful?