List SKUs 📦

GET /skus/{segment_key}

Returns the list of SKUs available to your corporation for a given segment, or for all segments at once (leave segment_key empty in that case)

Only product id information is provided by this endpoint. Full information is available through the Fetch product information endpoint

Path parameters

  • segment_key string

    The segment key of the SKUs, as returned by list products endpoint. Leave empty for all segments

    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.

Query parameters

  • sku_type string

    Set to the sku type key for which you want to get SKU list. It can be useful if you handle several SKU types in your corporation, but you want information on a different SKU type which is not the default one

Responses

  • 200 application/json

    Successfully returned SKUs with their product ids

    Hide response attributes Show response attributes object
    • status string
    • result object
      Hide result attribute Show result attribute object
      • skus array[object]
        Hide skus attributes Show skus attributes object
        • code string

          The unique code of the SKU

        • product_segment_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.

        • product_id string

          Id to identify the product, unique segment-wise

  • 404 application/json

    Unknown segment key

    Hide response attributes Show response attributes object
    • status string
    • message string
  • 403 application/json

    Unauthorized segment

    Hide response attributes Show response attributes object
    • status string
    • message string
GET /skus/{segment_key}
curl \
 --request GET 'https://api.ppe-analytics.com/api/v1/skus/surface-cleaning' \
 --header "PPEApiKey: $API_KEY"
Response examples (200)
{
  "status": "OK",
  "result": {
    "skus": [
      {
        "code": "789-111",
        "product_id": "f50938a24830edb8b1c2ecc3f7dd88a3",
        "product_segment_key": "surface-cleaning"
      },
      {
        "code": "789-12",
        "product_id": "89e6848c8f1f91404c224393340b1fad",
        "product_segment_key": "surface-cleaning"
      },
      {
        "code": "789-112",
        "product_id": "79e6848c8f1f91404c224393340b1fad",
        "product_segment_key": "surface-cleaning"
      }
    ]
  }
}
Response examples (404)
{
  "status": "ERROR",
  "message": "Unknown segment key 'book-protection'"
}
Response examples (403)
{
  "status": "ERROR",
  "message": "Unauthorized access to segment 'secret-agent'"
}