Client
Overview
The Client API section provides endpoints for accessing information related to branches and legal documents such as the Privacy Policy and Terms of Service. These endpoints help users locate branches based on their location and preferences, as well as access important legal information.
API Base URL
The base URL for all API endpoints is:
https://lets-trade-client-prod.letstrade.globalNearest branches
POST /v2/get/nearest/branches
Returns branches nearest to the location provided
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
order_type
string
delivery | collection
size
string
Number of records to be returned
center_coordinates
object
latitude (required): The latitude of the user's current location.
longitude (required): The longitude of the user's current location.
Sample request
{
"order_type": "delivery",
"size": "10",
"center_coordinates": {
"latitude": "-26.02479",
"longitude": "28.0029613"
}
}Response
{
"success": true,
"message": "Successfully retrieved 2 branch(es)!",
"content": [
{
"distance": "5.67",
"branch": {
"stock_replacement": {
"replace_by_default": false
},
"banking_details": null,
"integration_settings": {
"_id": "123e47b57f0397adfd19e7ff",
"configurations": []
},
"_id": "12364ad7b3b06c000ed3c091",
"extra_data": [],
"type": "Point",
"client_id": "123423d9de237b000e1cccd6",
"franchise": false,
"display_name": "Sample Branch 001",
"branch_number": "001",
"registered_name": "Sample Registered Name 1",
"registration_number": "1234567890",
"address": {
"_id": "12364ad7b3b06c000ed3c092",
"full_address": "456 Elm St, Springfield, IL, 62701, USA",
"latitude": "39.7817213",
"longitude": "-89.6500001"
},
"contact_number": "555-1234",
"vat_number": "9876543210",
"vat_registered": true,
"email": "[email protected]",
"coordinates": [
-89.6500001,
39.7817213
],
"working_hours": [
{
"_id": "34500c4f14c535000eaa1aab",
"day": "Tuesday",
"from": "09:00",
"to": "17:00"
}
],
"exclusion_areas": [],
"offline": false,
"delivery": {
"delivery_fee_type": "FLAT-FEE",
"_id": "148845d5674ec5000ed9e355",
"delivery": true,
"max_delivery_radius": "50",
"delivery_fee": "50",
"delivery_radii": null,
"delivery_hours": null
},
"image_list": [],
"old_branch_id": "12364ad7b3b06c000ed3c091"
}
},
{
"distance": "12.34",
"branch": {
"stock_replacement": {
"replace_by_default": true
},
"banking_details": null,
"integration_settings": {
"_id": "456e47b57f0397adfd19e7e3",
"configurations": []
},
"_id": "45642854de237b000e1ccf81",
"extra_data": [],
"type": "Point",
"client_id": "456423d9de237b000e1cccd6",
"franchise": true,
"display_name": "Sample Branch 002",
"branch_number": "002",
"registered_name": "Sample Registered Name 2",
"registration_number": "0987654321",
"address": {
"_id": "45642854de237b000e1ccf82",
"full_address": "789 Oak St, Springfield, IL, 62702, USA",
"latitude": "39.8017213",
"longitude": "-89.6700001"
},
"contact_number": "555-5678",
"email": "[email protected]",
"vat_registered": false,
"coordinates": [
-89.6700001,
39.8017213
],
"working_hours": [],
"exclusion_areas": [],
"offline": false,
"delivery": {
"delivery_fee_type": "BASE-RADIUS",
"_id": "24886bad8f48e26dfcca0071",
"delivery_radii": null,
"delivery_hours": null,
"max_delivery_radius": "75",
"delivery": true,
"base_delivery_radius": "75",
"delivery_fee_per_km": "2"
},
"image_list": [],
"old_branch_id": "45642854de237b000e1ccf81"
}
}
]
}Nearest branches by extra Data
POST /v2/get/nearest/branches
Returns branches nearest to the location provided
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
order_type
string
delivery | collection
size
string
Number of records to be returned
center_coordinates
object
latitude (required): The latitude of the user's current location.
longitude (required): The longitude of the user's current location.
extra_data
object
name (required): Key that it needs to be filtered by
value (required): Value of the key to apply when filtering.
Sample request
{
"order_type": "delivery",
"size": "10",
"center_coordinates": {
"latitude": "-26.02479",
"longitude": "28.0029613"
},
"extra_data": {
"name": "type",
"value": "express"
}
}Response
{
"success": true,
"message": "Successfully retrieved 2 branch(es)!",
"content": [
{
"distance": "5.67",
"branch": {
"stock_replacement": {
"replace_by_default": false
},
"banking_details": null,
"integration_settings": {
"_id": "123e47b57f0397adfd19e7ff",
"configurations": []
},
"_id": "12364ad7b3b06c000ed3c091",
"extra_data": [],
"type": "Point",
"client_id": "123423d9de237b000e1cccd6",
"franchise": false,
"display_name": "Sample Branch 001",
"branch_number": "001",
"registered_name": "Sample Registered Name 1",
"registration_number": "1234567890",
"address": {
"_id": "12364ad7b3b06c000ed3c092",
"full_address": "456 Elm St, Springfield, IL, 62701, USA",
"latitude": "39.7817213",
"longitude": "-89.6500001"
},
"contact_number": "555-1234",
"vat_number": "9876543210",
"vat_registered": true,
"email": "[email protected]",
"coordinates": [
-89.6500001,
39.7817213
],
"working_hours": [
{
"_id": "34500c4f14c535000eaa1aab",
"day": "Tuesday",
"from": "09:00",
"to": "17:00"
}
],
"exclusion_areas": [],
"offline": false,
"delivery": {
"delivery_fee_type": "FLAT-FEE",
"_id": "148845d5674ec5000ed9e355",
"delivery": true,
"max_delivery_radius": "50",
"delivery_fee": "50",
"delivery_radii": null,
"delivery_hours": null
},
"image_list": [],
"old_branch_id": "12364ad7b3b06c000ed3c091"
}
},
{
"distance": "12.34",
"branch": {
"stock_replacement": {
"replace_by_default": true
},
"banking_details": null,
"integration_settings": {
"_id": "456e47b57f0397adfd19e7e3",
"configurations": []
},
"_id": "45642854de237b000e1ccf81",
"extra_data": [],
"type": "Point",
"client_id": "456423d9de237b000e1cccd6",
"franchise": true,
"display_name": "Sample Branch 002",
"branch_number": "002",
"registered_name": "Sample Registered Name 2",
"registration_number": "0987654321",
"address": {
"_id": "45642854de237b000e1ccf82",
"full_address": "789 Oak St, Springfield, IL, 62702, USA",
"latitude": "39.8017213",
"longitude": "-89.6700001"
},
"contact_number": "555-5678",
"email": "[email protected]",
"vat_registered": false,
"coordinates": [
-89.6700001,
39.8017213
],
"working_hours": [],
"exclusion_areas": [],
"offline": false,
"delivery": {
"delivery_fee_type": "BASE-RADIUS",
"_id": "24886bad8f48e26dfcca0071",
"delivery_radii": null,
"delivery_hours": null,
"max_delivery_radius": "75",
"delivery": true,
"base_delivery_radius": "75",
"delivery_fee_per_km": "2"
},
"image_list": [],
"old_branch_id": "45642854de237b000e1ccf81"
}
}
]
}Privacy Policy
GET /v2/client/policy
Returns a client's Privacy Policy
Headers
Content-Type
application/json
Authorization
Bearer <token>
Terms of Service
GET /v2/client/terms
Returns a client's Terms of Service
Headers
Content-Type
application/json
Authorization
Bearer <token>
Last updated