Get segment data model
The data model of a segment consists of several properties identified by their key. Each property has a type depending on the data it can contain.
Several types are available: boolean, string, enum, enum_list, json, arbo_enum, arbo_enum_list
In the case of types enum and enum_list, the list of possible values is provided, identified by their key.
Path parameters
-
The segment key, as returned by the
List segments
endpoint.Values are
hand-protection
,foot-protection
,head-protection
,eye-protection
,body-protection
,ear-protection
,fall-protection
,respiratory-protection
,ergonomy
,safety-first-aid
,hygiene
,lockout-tagout
,electrical
,lightening
,safety-signs
, orsurface-cleaning
.
GET /segments/{segment_key}
curl \
-X GET https://api.ppe-analytics.com/api/v1/segments/surface-cleaning \
-H "PPEApiKey: $API_KEY"
Response examples (200)
{
"status": "OK",
"result": {
"segment": {
"key": "hand-protection",
"trads": {
"en": "Hand protection",
"fr": "Protection de la main"
},
"picto_url": "https://app.ppe-analytics.com/static/pictos/300w/epi-hand.png",
"api_get_products": "/api/v1/products/hand-protection",
"api_get_properties": "/api/v1/segments/hand-protection"
},
"languages": [
"en fr it es"
],
"properties": [
{
"key": "color",
"type": "enum_list",
"group": "description",
"trads": {
"de": "Farbe",
"en": "Color",
"fr": "Couleur"
},
"values": [
{
"key": "red",
"rank": 1,
"trads": {
"de": "Rot",
"en": "Red",
"fr": "Rouge"
},
"picto_url": "https://app.ppe-analytics.com/static/pictos/150w/e32e0f84-7889-414d-ab17-3be2d1f47f9a.jpg"
},
{
"key": "green",
"rank": 2,
"trads": {
"de": "Grün",
"en": "Green",
"fr": "Vert"
},
"picto_url": "https://app.ppe-analytics.com/static/pictos/150w/5872a29a-0059-4342-82cc-cb1e1965d629.jpg"
}
],
"picto_url": "https://app.ppe-analytics.com/static/pictos/300w/fc6d75d7-8366-424e-b526-4bc333a390b5.jpg"
}
]
}
}
Response examples (404)
{
"status": "ERROR",
"message": "Unknown segment key 'book-protection'"
}
Response examples (403)
{
"status": "ERROR",
"message": "Unauthorized access to segment 'secret-agent'"
}