Get the specified expense

Requires authentication

HTTP Request

GET connector/api/expense/{expense}

URL Parameters

Parameter Status Description
expense required comma separated ids of the expenses

Example request:

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

Example response (200):

{
"data": [
{
"id": 59,
"business_id": 1,
"location_id": 1,
"payment_status": "due",
"ref_no": "EP2020\/0001",
"transaction_date": "2020-07-03 12:58:00",
"total_before_tax": "50.0000",
"tax_id": null,
"tax_amount": "0.0000",
"final_total": "50.0000",
"expense_category_id": null,
"document": null,
"created_by": 9,
"is_recurring": 0,
"recur_interval": null,
"recur_interval_type": null,
"recur_repetitions": null,
"recur_stopped_on": null,
"recur_parent_id": null,
"created_at": "2020-07-03 12:58:23",
"updated_at": "2020-07-03 12:58:24",
"transaction_for": {
"id": 1,
"user_type": "user",
"surname": "Mr",
"first_name": "Admin",
"last_name": null,
"username": "admin",
"email": "admin@example.com",
"language": "en",
"contact_no": null,
"address": null,
"business_id": 1,
"max_sales_discount_percent": null,
"allow_login": 1,
"essentials_department_id": null,
"essentials_designation_id": null,
"status": "active",
"crm_contact_id": null,
"is_cmmsn_agnt": 0,
"cmmsn_percent": "0.00",
"selected_contacts": 0,
"dob": null,
"gender": null,
"marital_status": null,
"blood_group": null,
"contact_number": null,
"fb_link": null,
"twitter_link": null,
"social_media_1": null,
"social_media_2": null,
"permanent_address": null,
"current_address": null,
"guardian_name": null,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null,
"bank_details": null,
"id_proof_name": null,
"id_proof_number": null,
"deleted_at": null,
"created_at": "2018-01-04 02:15:19",
"updated_at": "2018-01-04 02:15:19"
}
}
]
}

javascript

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