# System Admin Side API 0.1
## BASE URL: https://api.dev.core.restspaces.org/
## 1. Service Category
**(i) Create supplier service category**
```json
POST {{BASE_URL}}/api/v1/service/admin/service-categories/
Request Body:
{
"name": "Clening",
"image": "http://dev-s.s3.aws.com/lkajldkf",
"description": "It is a long established fact that a reader will be distracted",
"work_scope": " by the readable content of a page when looking at its layout."
}
Response:
Status Code: 201
{
"success": true,
"message": "Created",
"data": {
"id": 1,
"created_by": {
"username": "admin",
"profile_pic_url": null,
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"created_at": "2022-03-03T17:14:33.583848Z",
"name": "Clening",
"image": "http://dev-s.s3.aws.com/lkajldkf",
"description": "It is a long established fact that a reader will be distracted",
"work_scope": "by the readable content of a page when looking at its layout."
}
}
```
**(ii) Get service categories list**
```json
GET {{BASE_URL}}/api/v1/service/admin/service-categories/
Request Body:
Response:
Status Code: 200
{
"success": true,
"meta_data": {
"count": 1,
"page_size": 10,
"next": null,
"previous": null
},
"data": [
{
"id": 1,
"created_at": "2022-03-03T17:14:33.583848Z",
"updated_at": "2022-03-03T17:14:33.583923Z",
"created_by": {
"email": null,
"username": "admin",
"last_name": "Shafik",
"first_name": "MSI",
"profile_pic_url": null
},
"updated_by": {},
"name": "Clening",
"image": "http://dev-s.s3.aws.com/lkajldkf",
"description": "It is a long established fact that a reader will be distracted",
"work_scope": "by the readable content of a page when looking at its layout.",
"status": "active"
}
]
}
```
**(iii) Retrive single data of services categories list**
```json
GET {{BASE_URL}}/api/v1/service/admin/service-categories/<id>/
Request Body:
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 1,
"created_at": "2022-03-03T17:14:33.583848Z",
"updated_at": "2022-03-03T17:14:33.583923Z",
"created_by": {
"email": null,
"username": "admin",
"last_name": "Shafik",
"first_name": "MSI",
"profile_pic_url": null
},
"updated_by": {},
"name": "Clening",
"image": "http://dev-s.s3.aws.com/lkajldkf",
"description": "It is a long established fact that a reader will be distracted",
"work_scope": "by the readable content of a page when looking at its layout.",
"status": "active"
}
}
```
**(iv) Update service category**
```json
PATCH {{BASE_URL}}/api/v1/service/admin/service-categories/<id>/
Request Body:
{
"status": "inactive"
}
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 1,
"created_at": "2022-03-03T17:14:33.583848Z",
"updated_at": "2022-03-03T17:17:21.343453Z",
"created_by": {
"email": null,
"username": "admin",
"last_name": "Shafik",
"first_name": "MSI",
"profile_pic_url": null
},
"updated_by": {
"username": "admin",
"profile_pic_url": null,
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"name": "Clening",
"image": "http://dev-s.s3.aws.com/lkajldkf",
"description": "It is a long established fact that a reader will be distracted",
"work_scope": "by the readable content of a page when looking at its layout.",
"status": "inactive"
}
}
```
**(v) Delete category**
```json
PATCH {{BASE_URL}}/api/v1/service/admin/service-categories/<id>/
Request Body:
{
"status": "archived"
}
Response:
Status Code: 200
```
## 3. Supported Country
**(i) Crate supported country api**
```json
POST {{BASE_URL}}/api/v1/business/admin/supported-countries/
Request Body:
{
"name": "United States",
"alpha2_code": "US"
}
Response:
Status Code: 201
{
"success": true,
"message": "Created",
"data": {
"id": 3,
"created_at": "2022-03-14T18:34:04.416206Z",
"updated_at": "2022-03-14T18:34:04.416267Z",
"created_by": {
"username": "admin",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png",
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"updated_by": {},
"name": "United States",
"alpha2_code": "US",
"status": "active"
}
}
```
**(ii) List of supported countries**
```json
GET {{BASE_URL}}/api/v1/business/admin/supported-countries/
Request Body:
Response:
Status Code: 200
{
"success": true,
"meta_data": {
"count": 3,
"page_size": 10,
"next": null,
"previous": null
},
"data": [
{
"id": 1,
"name": "United Arab Emirates",
"alpha2_code": "UA"
},
{
"id": 2,
"name": "Bangladesh",
"alpha2_code": "BD"
},
{
"id": 3,
"name": "United States",
"alpha2_code": "US"
}
]
}
```
**(iii) Retrive supported country**
```json
GET {{BASE_URL}}/api/v1/business/admin/supported-countries/<id>/
Request Body:
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 2,
"name": "Bangladesh",
"alpha2_code": "BD"
}
}
```
**(iv) Uodate supported country information**
```json
PATCH {{BASE_URL}}/api/v1/business/admin/supported-countries/<id>/
Request Body:
{
"status": "inactive"
}
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 2,
"created_at": "2022-03-14T18:16:44.433229Z",
"updated_at": "2022-03-14T18:41:12.398089Z",
"created_by": {
"email": null,
"username": "admin",
"last_name": "Shafik",
"first_name": "MSI",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png"
},
"updated_by": {
"username": "admin",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png",
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"name": "Bangladesh",
"alpha2_code": "BD",
"status": "inactive"
}
}
```
**(v) Delete supported a country**
```json
PATCH {{BASE_URL}}/api/v1/business/admin/supported-countries/<id>/
Request Body:
{
"status": "archived"
}
Response:
Status Code: 200
```
## 4. Supported City
**(i) Crated supported city api**
```json
POST {{BASE_URL}}/api/v1/business/admin/supported-cities/
Request Body:
{
"name": "Jessore",
"country": "BD"
}
Response:
Status Code: 201
{
"success": true,
"message": "Created",
"data": {
"id": 4,
"created_at": "2022-03-14T18:30:16.744925Z",
"updated_at": "2022-03-14T18:30:16.744976Z",
"created_by": {
"username": "admin",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png",
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"updated_by": {},
"name": "Jessore",
"status": "active",
"country": 2
}
}
```
**(ii) Get List of supported city**
```json
GET {{BASE_URL}}/api/v1/business/admin/supported-cities/
Request Body:
Response:
Status Code: 200
{
"success": true,
"meta_data": {
"count": 4,
"page_size": 10,
"next": null,
"previous": null
},
"data": [
{
"id": 1,
"name": "Dubai",
"country": "United Arab Emirates",
"alpha2_code": "UA"
},
{
"id": 2,
"name": "Dhaka",
"country": "Bangladesh",
"alpha2_code": "BD"
},
{
"id": 3,
"name": "Khulna",
"country": "Bangladesh",
"alpha2_code": "BD"
},
{
"id": 4,
"name": "Jessore",
"country": "Bangladesh",
"alpha2_code": "BD"
}
]
}
```
**(iii) Retrive singel data of supported city**
```json
GET {{BASE_URL}}/api/v1/business/admin/supported-cities/<pk>/
Request Body:
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 2,
"name": "Dhaka",
"country": "Bangladesh",
"alpha2_code": "BD"
}
}
```
**(iv) Update supported city information**
```json
PATCH {{BASE_URL}}/api/v1/business/admin/supported-cities/<pk>/
Request Body:
{
"status": "inactive"
}
Response:
Status Code: 200
{
"success": true,
"message": "Status OK",
"data": {
"id": 2,
"created_at": "2022-03-14T18:20:25.062286Z",
"updated_at": "2022-03-14T18:44:02.522687Z",
"created_by": {
"email": null,
"username": "admin",
"last_name": "Shafik",
"first_name": "MSI",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png"
},
"updated_by": {
"username": "admin",
"profile_pic_url": "https://s3-us-west-1.amazonaws.com/development-restspace/auth/klnvuh_male-profile-pic-png",
"first_name": "MSI",
"last_name": "Shafik",
"email": null
},
"name": "Dhaka",
"status": "inactive",
"country": 2
}
}
```
**(v) Delete supported city data**
```json
PATCH {{BASE_URL}}/api/v1/business/admin/supported-cities/<pk>/
Request Body:
{
"status": "archived"
}
Response:
Status Code: 200
```