Skip to content

List Product Units

Request

Retrieve the measurement Units available to Products in a Location as JSON:API resource objects. The collection contains shared system Units and any Units configured specifically for the Location.

Use Unit IDs as sale_unit_id and consumable_unit_id in Product data.

Security
BearerPartnerUser
Path
location_idintegerrequired

Location ID

Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Authorizationstringrequired

Bearer {partner_token}, User {user_token}

curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v2/openapi/locations/{location_id}/units' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>'

Responses

Product Units retrieved successfully

Bodyapplication/json
dataArray of objects(Product Unit Resource)required
Response
{ "data": [ { … } ] }