Get business details

Requires authentication

HTTP Request

GET connector/api/business-details

Example request:

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

Example response (200):

{
"data": {
"id": 1,
"name": "Awesome Shop",
"currency_id": 2,
"start_date": "2018-01-01",
"tax_number_1": "3412569900",
"tax_label_1": "GSTIN",
"tax_number_2": null,
"tax_label_2": null,
"default_sales_tax": null,
"default_profit_percent": 25,
"owner_id": 1,
"time_zone": "America\/Phoenix",
"fy_start_month": 1,
"accounting_method": "fifo",
"default_sales_discount": "10.00",
"sell_price_tax": "includes",
"logo": null,
"sku_prefix": "AS",
"enable_product_expiry": 0,
"expiry_type": "add_expiry",
"on_product_expiry": "keep_selling",
"stop_selling_before": 0,
"enable_tooltip": 1,
"purchase_in_diff_currency": 0,
"purchase_currency_id": null,
"p_exchange_rate": "1.000",
"transaction_edit_days": 30,
"stock_expiry_alert_days": 30,
"keyboard_shortcuts": {
"pos": {
"express_checkout": "shift+e",
"pay_n_ckeckout": "shift+p",
"draft": "shift+d",
"cancel": "shift+c",
"recent_product_quantity": "f2",
"weighing_scale": null,
"edit_discount": "shift+i",
"edit_order_tax": "shift+t",
"add_payment_row": "shift+r",
"finalize_payment": "shift+f",
"add_new_product": "f4"
}
},
"pos_settings": {
"amount_rounding_method": null,
"disable_pay_checkout": 0,
"disable_draft": 0,
"disable_express_checkout": 0,
"hide_product_suggestion": 0,
"hide_recent_trans": 0,
"disable_discount": 0,
"disable_order_tax": 0,
"is_pos_subtotal_editable": 0
},
"weighing_scale_setting": {
"label_prefix": null,
"product_sku_length": "4",
"qty_length": "3",
"qty_length_decimal": "2"
},
"manufacturing_settings": null,
"essentials_settings": null,
"ecom_settings": null,
"woocommerce_wh_oc_secret": null,
"woocommerce_wh_ou_secret": null,
"woocommerce_wh_od_secret": null,
"woocommerce_wh_or_secret": null,
"enable_brand": 1,
"enable_category": 1,
"enable_sub_category": 1,
"enable_price_tax": 1,
"enable_purchase_status": 1,
"enable_lot_number": 0,
"default_unit": null,
"enable_sub_units": 0,
"enable_racks": 0,
"enable_row": 0,
"enable_position": 0,
"enable_editing_product_from_purchase": 1,
"sales_cmsn_agnt": null,
"item_addition_method": 1,
"enable_inline_tax": 1,
"currency_symbol_placement": "before",
"enabled_modules": [
"purchases",
"add_sale",
"pos_sale",
"stock_transfers",
"stock_adjustment",
"expenses",
"account",
"tables",
"modifiers",
"service_staff",
"booking",
"kitchen",
"subscription",
"types_of_service"
],
"date_format": "m\/d\/Y",
"time_format": "24",
"ref_no_prefixes": {
"purchase": "PO",
"purchase_return": null,
"stock_transfer": "ST",
"stock_adjustment": "SA",
"sell_return": "CN",
"expense": "EP",
"contacts": "CO",
"purchase_payment": "PP",
"sell_payment": "SP",
"expense_payment": null,
"business_location": "BL",
"username": null,
"subscription": null
},
"theme_color": null,
"created_by": null,
"enable_rp": 0,
"rp_name": null,
"amount_for_unit_rp": "1.0000",
"min_order_total_for_rp": "1.0000",
"max_rp_per_order": null,
"redeem_amount_per_unit_rp": "1.0000",
"min_order_total_for_redeem": "1.0000",
"min_redeem_point": null,
"max_redeem_point": null,
"rp_expiry_period": null,
"rp_expiry_type": "year",
"repair_settings": null,
"email_settings": {
"mail_driver": "smtp",
"mail_host": null,
"mail_port": null,
"mail_username": null,
"mail_password": null,
"mail_encryption": null,
"mail_from_address": null,
"mail_from_name": null
},
"sms_settings": {
"url": null,
"send_to_param_name": "to",
"msg_param_name": "text",
"request_method": "post",
"param_1": null,
"param_val_1": null,
"param_2": null,
"param_val_2": null,
"param_3": null,
"param_val_3": null,
"param_4": null,
"param_val_4": null,
"param_5": null,
"param_val_5": null,
"param_6": null,
"param_val_6": null,
"param_7": null,
"param_val_7": null,
"param_8": null,
"param_val_8": null,
"param_9": null,
"param_val_9": null,
"param_10": null,
"param_val_10": null
},
"custom_labels": {
"payments": {
"custom_pay_1": null,
"custom_pay_2": null,
"custom_pay_3": null
},
"contact": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"product": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"location": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"user": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"purchase": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"sell": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
},
"types_of_service": {
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null
}
},
"common_settings": {
"default_datatable_page_entries": "25"
},
"is_active": 1,
"created_at": "2018-01-04 02:15:19",
"updated_at": "2020-06-04 22:33:01",
"locations": [
{
"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,
"default_payment_accounts": {
"cash": {
"is_enabled": "1",
"account": null
},
"card": {
"is_enabled": "1",
"account": null
},
"cheque": {
"is_enabled": "1",
"account": null
},
"bank_transfer": {
"is_enabled": "1",
"account": null
},
"other": {
"is_enabled": "1",
"account": null
},
"custom_pay_1": {
"is_enabled": "1",
"account": null
},
"custom_pay_2": {
"is_enabled": "1",
"account": null
},
"custom_pay_3": {
"is_enabled": "1",
"account": 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"
}
],
"currency": {
"id": 2,
"country": "America",
"currency": "Dollars",
"code": "USD",
"symbol": "$",
"thousand_separator": ",",
"decimal_separator": ".",
"created_at": null,
"updated_at": null
},
"printers": []
}
}

javascript

const url = new URL(
"http://erp.dstadvertising.com/connector/api/business-details"
);
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));