Get the specified unit

Requires authentication

HTTP Request

GET connector/api/unit/{unit}

URL Parameters

Parameter Status Description
unit required comma separated ids of the units

Example request:

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

Example response (200):

{
"data": [
{
"id": 1,
"business_id": 1,
"actual_name": "Pieces",
"short_name": "Pc(s)",
"allow_decimal": 0,
"base_unit_id": null,
"base_unit_multiplier": null,
"created_by": 1,
"deleted_at": null,
"created_at": "2018-01-03 15:15:20",
"updated_at": "2018-01-03 15:15:20",
"base_unit": null
}
]
}

javascript

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