GET api/v1/reports/product-comparison/report/{productId}?type={type}&attribute={attribute}&flavor={flavor}

Gathers data for the Product Comparison Report

Request Information

URI Parameters

NameDescriptionTypeAdditional information
productId

The product id to report on

integer

Required

type

The type of report to run, "Exact" or "Similar"

ProductComparisonReportType

Default value is Exact

attribute

An optional attribute to filter the results by

string

None.

flavor

An optional flavor to filter the results by

string

None.

Body Parameters

None.

Response Information

Resource Description

A product comparison report

ProductReportResponse
NameDescriptionTypeAdditional information
attributes

Collection of string

None.

flavors

Collection of string

None.

count

integer

None.

items

Collection of ProductReportProduct

None.

_links

Collection of Link

None.

_languages

Collection of LanguagesLink

None.

Response Codes

CodeDescriptionAdditional information
200OKThe request returned without error
204No ContentThe request was successful but no results were returned
400Bad RequestA parameter was missing or invalid
404Not FoundThe requested resource was not found

Response Formats

application/json, text/json

Sample:
{
  "_links": [
    {
      "rel": "sample string 1",
      "locale": "sample string 4",
      "href": "sample string 2",
      "templated": true
    },
    {
      "rel": "sample string 1",
      "locale": "sample string 4",
      "href": "sample string 2",
      "templated": true
    }
  ],
  "_languages": [
    {
      "rel": "sample string 1",
      "locale": "sample string 3",
      "name": "sample string 4",
      "href": "sample string 2"
    },
    {
      "rel": "sample string 1",
      "locale": "sample string 3",
      "name": "sample string 4",
      "href": "sample string 2"
    }
  ],
  "count": 1,
  "items": [
    {
      "cpnum": 1,
      "manufacturer": "sample string 2",
      "offMarket": "2023-02-07T01:38:24.1949452-05:00",
      "equivalenceCodes": [
        "sample string 1",
        "sample string 2"
      ],
      "attributes": [
        "sample string 1",
        "sample string 2"
      ],
      "flavor": "sample string 3",
      "ingredients": [
        "sample string 1",
        "sample string 2"
      ],
      "productId": 4,
      "productName": "sample string 5",
      "_links": [
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        }
      ],
      "_languages": [
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        }
      ]
    },
    {
      "cpnum": 1,
      "manufacturer": "sample string 2",
      "offMarket": "2023-02-07T01:38:24.1949452-05:00",
      "equivalenceCodes": [
        "sample string 1",
        "sample string 2"
      ],
      "attributes": [
        "sample string 1",
        "sample string 2"
      ],
      "flavor": "sample string 3",
      "ingredients": [
        "sample string 1",
        "sample string 2"
      ],
      "productId": 4,
      "productName": "sample string 5",
      "_links": [
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 4",
          "href": "sample string 2",
          "templated": true
        }
      ],
      "_languages": [
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        },
        {
          "rel": "sample string 1",
          "locale": "sample string 3",
          "name": "sample string 4",
          "href": "sample string 2"
        }
      ]
    }
  ],
  "attributes": [
    "sample string 1",
    "sample string 2"
  ],
  "flavors": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<productReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Reports.ProductReport">
  <_languages xmlns="">
    <languageslink>
      <rel>sample string 1</rel>
      <locale>sample string 3</locale>
      <name>sample string 4</name>
      <href>sample string 2</href>
    </languageslink>
    <languageslink>
      <rel>sample string 1</rel>
      <locale>sample string 3</locale>
      <name>sample string 4</name>
      <href>sample string 2</href>
    </languageslink>
  </_languages>
  <_links xmlns="">
    <link>
      <rel>sample string 1</rel>
      <locale>sample string 4</locale>
      <href>sample string 2</href>
      <templated>true</templated>
    </link>
    <link>
      <rel>sample string 1</rel>
      <locale>sample string 4</locale>
      <href>sample string 2</href>
      <templated>true</templated>
    </link>
  </_links>
  <count xmlns="">1</count>
  <items xmlns:d2p1="http://schemas.datacontract.org/2004/07/ElsevierGSContentServices.Models.Reports.ProductReport" xmlns="">
    <d2p1:product>
      <_languages>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
      </_languages>
      <_links>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
      </_links>
      <d2p1:productId>4</d2p1:productId>
      <d2p1:productName>sample string 5</d2p1:productName>
      <d2p1:attributes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:attributes>
      <d2p1:cpnum>1</d2p1:cpnum>
      <d2p1:equivalenceCodes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:equivalenceCodes>
      <d2p1:flavor>sample string 3</d2p1:flavor>
      <d2p1:ingredients xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:ingredients>
      <d2p1:manufacturer>sample string 2</d2p1:manufacturer>
      <d2p1:offMarket>2023-02-07T01:38:24.1949452-05:00</d2p1:offMarket>
    </d2p1:product>
    <d2p1:product>
      <_languages>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
        <languageslink>
          <rel>sample string 1</rel>
          <locale>sample string 3</locale>
          <name>sample string 4</name>
          <href>sample string 2</href>
        </languageslink>
      </_languages>
      <_links>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
        <link>
          <rel>sample string 1</rel>
          <locale>sample string 4</locale>
          <href>sample string 2</href>
          <templated>true</templated>
        </link>
      </_links>
      <d2p1:productId>4</d2p1:productId>
      <d2p1:productName>sample string 5</d2p1:productName>
      <d2p1:attributes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:attributes>
      <d2p1:cpnum>1</d2p1:cpnum>
      <d2p1:equivalenceCodes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:equivalenceCodes>
      <d2p1:flavor>sample string 3</d2p1:flavor>
      <d2p1:ingredients xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:ingredients>
      <d2p1:manufacturer>sample string 2</d2p1:manufacturer>
      <d2p1:offMarket>2023-02-07T01:38:24.1949452-05:00</d2p1:offMarket>
    </d2p1:product>
  </items>
  <attributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </attributes>
  <flavors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </flavors>
</productReport>