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.

application/json

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 application/json

    Successfully returned products (can be empty if no results)

    Hide response attributes Show response attributes object
    • status string
    • result object

      Additional properties are allowed.

      Hide result attribute Show result attribute object
      • products array[object]
        Hide products attributes Show products attributes 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

        • The manufacturer key for 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 id of the parent product (if level is "variant")

        • 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

        • The status of the product in the PIM. It is only available on products on which your are the owner

          Values are draft, ready, or archived.

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 examples
{
  "input_text": "Awesome 123",
  "max_count": 20,
  "language": "it",
  "filters": [
    "my-prop1~my-value",
    "other-prop2~other-value"
  ]
}
Response examples (200)
{
  "status": "OK",
  "result": {
    "products": [
      {
        "id": "f50938a24830edb8b1c2ecc3f7dd88a3",
        "name": "Awesome light 123",
        "level": "variant",
        "segment_key": "lightening",
        "manufacturer": "petzl",
        "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"
      },
      {
        "id": "89e6848c8f1f91404c224393340b1fad",
        "name": "Awesome helmet 1234",
        "level": "single",
        "segment_key": "head-protection",
        "manufacturer": "jsp",
        "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"
      }
    ]
  }
}