Skip to main content

Business List

A request to the following endpoint returns a list of all merchant businesses for the logged in merchant

Request​

GET - {{url}}/api/public/merchant/business

Headers
{
"Accept": "application/json",
"Authorization": "Bearer {{ token }}",
"Content-Type": "application/json",
"X-tenant": "{{ tenant }}",
}

Allowed Filters And Attributes​

  • paginate : Integer - Specifies the pagination to use for the response object
  • noPagination - Ignores pagination and return a list of all businesses

Response​

Status - 200 - OK

Sample Response Object
{
"data": [
{
"id": 2,
"ref_no": "MB-0002",
"merchant_id": 2,
"business_bank_detail_id": 2,
"business_name": "Iphone Store",
"is_default": true,
"created_at": "2022-02-12T12:21:02.000000Z",
"updated_at": "2022-02-12T12:21:02.000000Z"
},
{
"id": 3,
"ref_no": "MB-0003",
"merchant_id": 2,
"business_bank_detail_id": 3,
"business_name": "Macbook Center",
"is_default": false,
"created_at": "2022-02-19T16:29:58.000000Z",
"updated_at": "2022-02-19T16:29:58.000000Z"
}
],
"links": {
"first": "http://v1.api.curfox.com/api/public/merchant/business?page=1",
"last": "http://v1.api.curfox.com/api/public/merchant/business?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://v1.api.curfox.com/api/public/merchant/business?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://v1.api.curfox.com/api/public/merchant/business",
"per_page": 15,
"to": 2,
"total": 2
}
}

ERRORS​

Invalid Bearer Token
{
"message": "Unauthenticated."
}