List business locations

Requires authentication

HTTP Request

GET connector/api/business-location

Example request:

curl -X GET \
-G "http://erp.dstadvertising.com/connector/api/business-location" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"

Example response (200):

{
"data": [
{
"id": 1,
"business_id": 1,
"location_id": null,
"name": "Awesome Shop",
"landmark": "Linking Street",
"country": "USA",
"state": "Arizona",
"city": "Phoenix",
"zip_code": "85001",
"invoice_scheme_id": 1,
"invoice_layout_id": 1,
"selling_price_group_id": null,
"print_receipt_on_invoice": 1,
"receipt_printer_type": "browser",
"printer_id": null,
"mobile": null,
"alternate_number": null,
"email": null,
"website": null,
"featured_products": [
"5",
"71"
],
"is_active": 1,
"payment_methods": [
{
"name": "cash",
"label": "Cash",
"account_id": "1"
},
{
"name": "card",
"label": "Card",
"account_id": null
},
{
"name": "cheque",
"label": "Cheque",
"account_id": null
},
{
"name": "bank_transfer",
"label": "Bank Transfer",
"account_id": null
},
{
"name": "other",
"label": "Other",
"account_id": null
},
{
"name": "custom_pay_1",
"label": "Custom Payment 1",
"account_id": null
},
{
"name": "custom_pay_2",
"label": "Custom Payment 2",
"account_id": null
},
{
"name": "custom_pay_3",
"label": "Custom Payment 3",
"account_id": null
}
],
"custom_field1": null,
"custom_field2": null,
"custom_field3": null,
"custom_field4": null,
"deleted_at": null,
"created_at": "2018-01-04 02:15:20",
"updated_at": "2020-06-05 00:56:54"
}
]
}

javascript

const url = new URL(
"http://erp.dstadvertising.com/connector/api/business-location"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));