Customer is a group of your payer.
Method | Desciption | URI |
---|---|---|
Create Customer | /api/v2/customer |
|
Get Customers | /api/v2/customer |
|
Get Customer By Id | /api/v2/customer/{ID) |
|
Update Customer | /api/v2/customer/{ID} |
|
Delete Customer | /api/v2/customer/{ID} |
Key | Value |
---|---|
Accept | application/json |
Content-Type | application/json |
Authorization | Bearer {ACCESS-TOKEN} |
Method | URI |
---|---|
/api/v2/customer |
Key | Type | Required |
---|---|---|
first_name | string |
Yes |
last_name | string |
Yes |
address | string |
No |
string |
Yes |
|
mobile | string |
Yes |
{
"first_name": "Example-first-name",
"last_name": "Example-last-name",
"address": "Kedah",
"email": "example@email.com",
"mobile": "010xxxxxxx"
}
{success} Success code :
200
{
"success": true,
"data": {
"id": {ID},
"acc_no": "111111111111",
"first_name": "Example-first-name",
"last_name": "Example-last-name",
"address": "Kedah",
"email": "example@email.com",
"mobile": "010xxxxxxx",
"organization_id": {ID},
"created_at": "2020-06-25 07:38:11",
"updated_at": "2020-06-25 07:38:11",
"deleted_at": null
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 07:38:11 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/customer |
Key | Type |
---|---|
organization | /api/v2/customer?include=organization |
account-groups | /api/v2/customer?include=account-groups |
account-groups.group | /api/v2/collections?include=account-groups.group |
{success} Success code :
200
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": {ID},
"acc_no": "111111111111",
"first_name": "Example-first-name",
"last_name": "Example-last-name",
"address": "Kedah",
"email": "example@email.com",
"mobile": "010xxxxxxx",
"organization_id": {ID},
"created_at": "2020-06-25 07:38:11",
"updated_at": "2020-06-25 07:38:11",
"deleted_at": null
},
{
"id": {ID},
"acc_no": "2222222222222",
"first_name": "Example-first-name-second",
"last_name": "Example-last-name-second",
"address": "Kedah",
"email": "example2@email.com",
"mobile": "010xxxxxxx",
"organization_id": {ID},
"created_at": "2020-06-26 07:38:11",
"updated_at": "2020-06-26 07:38:11",
"deleted_at": null
},
],
"first_page_url": "{SERVER-URL}/api/v2/customer?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "{SERVER-URL}/api/v2/customer?page=3",
"next_page_url": "{SERVER-URL}/api/v2/customer?page=2",
"path": "{SERVER-URL}/api/v2/customer",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 2
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 08:09:34 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/customer/{ID} |
{success} Success code :
200
{
"success": true,
"data": {
"id": {ID},
"acc_no": "111111111111",
"first_name": "Example-first-name",
"last_name": "Example-last-name",
"address": "Kedah",
"email": "example@email.com",
"mobile": "010xxxxxxx",
"organization_id": {ID},
"created_at": "2020-06-25 07:38:11",
"updated_at": "2020-06-25 07:38:11",
"deleted_at": null
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 08:17:30 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/customer/{id} |
Key | Type | Required |
---|---|---|
first_name | string |
no |
last_name | string |
no |
address | string |
no |
mobile | string |
no |
{
"first_name": "Example-updated-first-name",
"last_name": "Example-updated-last-name",
"address": "Kedah",
"mobile": "010xxxxxxx"
}
{success} Success code :
200
{
"success": true,
"data": {
"id": {ID},
"acc_no": "11111111111111",
"first_name": "Example-updated-first-name",
"last_name": "Example-updated-last-name",
"address": "Kedah",
"email": "xample@email.com",
"mobile": "010xxxxxxx",
"organization_id": {ID}},
"created_at": "2020-06-25 07:38:11",
"updated_at": "2020-06-25 08:29:17",
"deleted_at": null
},
"errors": null,
"meta": {
"timestamp": "2020-06-25 08:29:17 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors
Method | URI |
---|---|
/api/v2/customer/{id} |
{success} Success code :
200
{
"success": true,
"data": [],
"errors": null,
"meta": {
"timestamp": "2020-06-25 08:32:46 UTC",
"timezone": "UTC"
}
}
{info} For Error Reference, Related guide:
Errors