Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method description

...

No Format
/v2/categorycontext/{client_id}/preview?categoryId={categoryId}&categoryEqualize={customEqualize}&categoryEqualizeEvents={customEqualizeEvents}

URL example

No Format
/v2/categorycontext/ebdemo/preview?categoryId=125151632&categoryEqualize={"price":5,"stock":4,"color":1}&categoryEqualizeEvents={"browseProduct":1,"browseCheckout":3}

Path Parameters

Parameter nameRequiredDescription
client_id(tick)Client identifier on the system

URI Parameters

Parameter nameRequiredDescriptionDefaultMax Example
categoryEqualize(tick)Custom equalize to obtain products scores related to.--categoryEqualize={"price":5,"stock":4,"color":1}
categoryEqualizeEvents(tick)Events weights to affect scores.--categoryEqualizeEvents={"browseProduct":1,"browseCheckout":3}
categoryId(tick)CategoryId to get the product scores.--categoryId=125151632
lang(error)Language of the category to request.There is a default lang in service configuration.-lang=en
field(error)Field name to get value from the products in the preview.{"eb_name", "eb_image"}-field=tittle&field=image_url...
maxProducts(error)Maximum of products in the output result.50100maxProducts=100

Responses

200 - successful request

...

Code Block
titleExample application/json
[
  {
      "pid": "656296",
      "eb_name": "Product 1",
      "eb_image": "../assets/product1.jpg",
      "scores": {
            "price": 0.3055021834061135,
            "stock": 0.054012821703985886,
            "color": 0.20550218340611354
      },
      "score": 0.565017188516213
  },
  {
      "pid": "2352351",
      "eb_name": "Product 2",
      "eb_image": "../assets/product2.jpg",
      "scores": {
            "price": 0.30078602620087336,
            "stock": 0.062488153860447836,
            "color": 0.20078602620087338
      },
      "score": 0.5640602062621946
  },
  {
      "pid": "7515814",
      "eb_name": "Product 3",
      "eb_image": "../assets/product3.jpg",
      "scores": {
            "price": 0.3005240174672489,
            "stock": 0.02924742172256806,
            "color": 0.20052401746724893
      },
      "score": 0.5302954566570659
  },
  ...
]
400 - mandatory query parameter is missing

...