List segments

GET /segments

Returns the list of segments available to your perimeter.

A segment is a product family in which the products share common technical properties and where comparison between them make sense.

Each segment has a customized data model, allowing for very fine definition without bothering products from other segments with properties that would never be used.

Responses

  • 200 application/json

    Successfully returned available segments

    Hide response attributes Show response attributes object
    • status string
    • result object
      Hide result attribute Show result attribute
      • segments array[object]
        Hide segments attributes Show segments attributes object
        • key string

          Unique slug to identify the segment

          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, or surface-cleaning.

        • The URL of the pictogram for the segment.

        • The API endpoint to get all available properties of the segment

        • The API endpoint to get all available products of the segment

        • trads object

          Translations for the object. Available languages depend on your corporation settings

          Hide trads attributes Show trads attributes
GET /segments
curl \
 -X GET https://api.ppe-analytics.com/api/v1/segments \
 -H "PPEApiKey: $API_KEY"
Response examples (200)
{
  "status": "OK",
  "result": {
    "segments": [
      {
        "key": "head-protection",
        "picto_url": "https://app.ppe-analytics.com/static/pictos/300w/epi-head.png",
        "api_get_properties": "/api/v1/segments/hand-protection",
        "api_get_products": "/api/v1/products/hand-protection",
        "trads": {
          "en": "Head protection",
          "fr": "Protection de la tête"
        }
      },
      {
        "key": "fall-protection",
        "picto_url": "https://app.ppe-analytics.com/static/pictos/300w/epi-head.png",
        "api_get_properties": "/api/v1/segments/head-protection",
        "api_get_products": "/api/v1/segments/head-protection",
        "trads": {
          "en": "Fall protection",
          "fr": "Protection antichute"
        }
      }
    ]
  }
}