Appearance
Unit
Allowed query parameters
None
Create a unit
post
/unit
| Attribute (* required) | Type | Description |
|---|---|---|
name * | String | Short name (eg. l) |
description | String? | Descriptive name (eg. liters) |
Example response
json
// HTTP 201 Created
{
// a unit object
}Update a unit
put
/unit/{id}
| Attribute (* required) | Type | Description |
|---|---|---|
name | String | Short name (eg. l) |
description | String? | Descriptive name (eg. liters) |
Example response
json
// HTTP 200 OK
{
// a unit object
}Retrieve a unit
get
/unit/{id}
Example response
json
// HTTP 200 OK
{
"id": "8y3AdBxwPL",
"name": "l",
"description": "Liter"
}Delete a unit
delete
/unit/{id}
Example response
json
// HTTP 204 No ContentList units
get
/unit
The list endpoint accepts the same parameters as in Retrieve a unit and returns a paginated array of the same unit object in the data property.
Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.