-
Notifications
You must be signed in to change notification settings - Fork 0
Client API
atsanan edited this page Sep 16, 2020
·
5 revisions
GET /api/v1/client/list?page=0&limit=10
| Field | Description | Optional | Default | Auth |
|---|---|---|---|---|
| page | Current page of Card list | Yes | 0 | Yes |
| limit | Maximum page of Card list | Yes | 10 | Yes |
{
"data": {
"client": [
{
"_id": "5bb772fc68efd87103266963",
"created_at": "2020-09-16T11:22:16.859Z",
"clientKey":"M4wJXSXEhIZJEAUDBLD",
"clientCode":"card2u",
"clientName":"Card2U Client",
"email":"card2u@ecartstudio.com",
"mobile":"987654321",
"status":true,
"updated_at": "2020-09-16T22:35:30Z"
}
],
"pageIndex": -1,
"pageLimit": -1,
"pages": 1,
"paging": {
"next": "",
"previous": ""
}
},
"isSuccess": true
}GET /api/v1/client/{id:string}
{
"data": {
"client": {
"_id": "5bb772fc68efd87103266963",
"created_at": "2020-09-16T11:22:16.859Z",
"clientKey":"M4wJXSXEhIZJEAUDBLD",
"clientCode":"card2u",
"clientName":"Card2U Client",
"email":"card2u@ecartstudio.com",
"mobile":"987654321",
"status":true,
"updated_at": "2020-09-16T22:35:30Z"
},
},
"isSuccess": true
}POST /api/v1/client/add
| Field | Description | Optional | Auth |
|---|---|---|---|
| clientKey | No | ||
| clientCode | No | ||
| clientName | No | ||
| No | |||
| mobile | No | ||
| status | No |
{
"data": {
"client": {
"_id": "5bb772fc68efd87103266963",
"created_at": "2020-09-16T11:22:16.859Z",
"clientKey":"M4wJXSXEhIZJEAUDBLD",
"clientCode":"card2u",
"clientName":"Card2U Client",
"email":"card2u@ecartstudio.com",
"mobile":"987654321",
"status":true,
"updated_at": "2020-09-16T22:35:30Z"
},
},
"isSuccess": true
}POST /api/v1/client/{id}
| Field | Description | Optional | Auth |
|---|---|---|---|
| clientKey | No | ||
| clientCode | No | ||
| clientName | No | ||
| No | |||
| mobile | No | ||
| status | No |
{
"data": {
"client": {
"_id": "5bb772fc68efd87103266963",
"created_at": "2020-09-16T11:22:16.859Z",
"clientKey":"M4wJXSXEhIZJEAUDBLD",
"clientCode":"card2u",
"clientName":"Card2U Client",
"email":"card2u@ecartstudio.com",
"mobile":"987654321",
"status":true,
"updated_at": "2020-09-16T22:35:30Z"
},
},
"isSuccess": true
}DELETE /api/v1/client/{id}
{
"data": {
"message": "Success Delete"
},
"isSuccess": true
}