Search products 🔍

POST /products/search

Returns the list of products available to your API access, with their name matching a given input text.

Only basic product information is provided by this endpoint, including product id. Additional info can be reached through the links provided in basic information.

Body

The search request infos

  • The text to search for, typically from user input

  • max_count integer

    The maximum number of results to return

    Default value is 10.

  • language string

    Available languages depend on your corporation settings

    Value is en fr it es de hu ja be pt es fi ro tr pt-BR es-AR.

  • filters array[string]

    Optional filters that will reduce the product population to search into

Responses

  • 200 object

    Successfully returned products (can be empty if no results)

    • status string
    • result object
      • products array[object]
        • 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.

        • id string

          Id to identify the product, unique segment-wise

        • name string

          The name of the product

        • level string

          The level of the product in the product hierarchy. Products which are not part of any hierarchy are marked as 'single'

          Values are single, parent, or variant.

        • Date of last modification on product

        • The API endpoint to get all information on the product

        • The URL of the main picture for the product

        • The URL of the public product page

POST /products/search
curl \
 -X POST https://api.ppe-analytics.com/api/v1/products/search \
 -H "PPEApiKey: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"input_text":"Awesome 123","max_count":20,"language":"it","filters":["my-prop1~my-value","other-prop2~other-value"]}'
Request example
{
  "input_text": "Awesome 123",
  "max_count": 20,
  "language": "it",
  "filters": [
    "my-prop1~my-value",
    "other-prop2~other-value"
  ]
}
Response example (200)
{
  "status": "OK",
  "result": {
    "products": [
      {
        "segment_key": "lightening",
        "id": "f50938a24830edb8b1c2ecc3f7dd88a3",
        "name": "Awesome light 123",
        "level": "variant",
        "last_modified": "2022-06-24 17:14:46 +0200",
        "api_get_product": "/api/v1/product/lightening/f50938a24830edb8b1c2ecc3f7dd88a3",
        "main_picture_url": "https://app.ppe-analytics.com/static/pictures/300/lightening/f50938a24830edb8b1c2ecc3f7dd88a3.jpg",
        "product_page_url": "https://my-website.it/lightening/f50938a24830edb8b1c2ecc3f7dd88a3"
      },
      {
        "segment_key": "head-protection",
        "id": "89e6848c8f1f91404c224393340b1fad",
        "name": "Awesome helmet 1234",
        "level": "single",
        "last_modified": "2022-06-22 10:04:02 +0200",
        "api_get_product": "/api/v1/product/head-protection/89e6848c8f1f91404c224393340b1fad",
        "main_picture_url": "https://app.ppe-analytics.com/static/pictures/300/head-protection/89e6848c8f1f91404c224393340b1fad.jpg",
        "product_page_url": "https://my-website.it/head-protection/89e6848c8f1f91404c224393340b1fad"
      }
    ]
  }
}