> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Product Importer Statistics

The *Product Importer Statistics* endpoint provides the statistics of Import Job for partners who use Product Importer API to import their products into Criteo's catalog system.

# Statistics object

The API endpoint offers the following parameters:

<table>
  <thead>
    <tr>
      <th>
        <p>
          Field Name
        </p>
      </th>

      <th>
        <p>
          Type
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          startDate
        </p>
      </td>

      <td>
        <p>
          Datetime
        </p>
      </td>

      <td>
        <p>
          Start of streaming products collection
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          endDate
        </p>
      </td>

      <td>
        <p>
          Datetime
        </p>
      </td>

      <td>
        <p>
          End date of streaming products collection
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          total
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          variant
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of product variants at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          displayable
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of displayable products at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          nonDisplayable
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of non-displayable products at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          added
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The number of inserted products during the period between startDate and endDate
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          deleted
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The number of deleted products during the period between startDate and endDate
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          updated
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The number of updated products during the period between startDate and endDate
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          blacklisted
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of blacklisted products at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          outOfStock
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of out-of-stock products at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          missingImage
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products with a missing image at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          missingUrl
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products with a missing URL at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          missingPrice
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products with a missing price at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          missingName
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products with a missing name at endDate moment
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          missingDescription
        </p>
      </td>

      <td>
        <p>
          Long (int64)
        </p>
      </td>

      <td>
        <p>
          The total number of products with a missing description at endDate moment
        </p>
      </td>
    </tr>
  </tbody>
</table>

# Get statistics

You can use this endpoint to retrieve the statistics based on two parameters:

<table>
  <thead>
    <tr>
      <th>
        <p>
          Parameter
        </p>
      </th>

      <th>
        <p>
          Required / Optional
        </p>
      </th>

      <th>
        <p>
          Default value
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          merchantId
        </p>
      </td>

      <td>
        <p>
          Required
        </p>
      </td>

      <td>
        <p>
          *
        </p>
      </td>

      <td>
        <p>
          The merchantId to retrieve the stats
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          lastNumHours
        </p>
      </td>

      <td>
        <p>
          Required
        </p>
      </td>

      <td>
        <ul>
          <li>
            default:\_ 24
          </li>

          <li>
            max:\_ 1000
          </li>
        </ul>
      </td>

      <td>
        <p>
          The last number of hours from NOW to query the statistics records.
        </p>
      </td>
    </tr>
  </tbody>
</table>

```http Sample Request theme={null}
GET /catalog/stats/marchants/3456?lastNumHours=100
```

**Sample Response**:

<CodeGroup>
  ```json Sample Success Response expandable theme={null}
  {
     "data": {
        "statisticsRecordList": [
        {
          "startDate": "2023-03-02T10:00:00.000Z",
          "endDate": "2023-03-02T11:00:00.000Z",
          "total": "3622816",
          "displayable": "3622815",
          "nonDisplayable": "1",
          "inserted": "1002",
          "deleted": "1",
          "updated": "2",
          "blacklisted": "0",
          "outOfStock": "1",
          "missingImage": "0",
          "missingUrl": "0",
          "missingPrice": "0",
          "missingName": "0",
          "missingDescription": "40"
        },
        {
          "startDate": "2023-03-02T09:00:00.000Z",
          "endDate": "2023-03-02T10:00:00.000Z",
          "total": "3621812",
          "displayable": "3621811",
          "nonDisplayable": "1",
          "inserted": "1002",
          "deleted": "1",
          "updated": "2",
          "blacklisted": "0",
          "outOfStock": "1",
          "missingImage": "0",
          "missingUrl": "0",
          "missingPrice": "0",
          "missingName": "0",
          "missingDescription": "40"
        }]
       }
      }
  ```

  ```json Sample Failure response theme={null}
  {
    "errors": [
      {
        "traceId": "00000000000000003632af6188a75e4c",
        "type": "validation",
        "code": "json-format",
        "instance": "/catalog/stats/merchants/72532",
        "title": "A request was rejected due to one or more errors.",
        "detail": "lastNumHours: must be between 1 and 1000"
      }
    ],
    "warnings": []
  }
  ```
</CodeGroup>

## Responses

<table>
  <thead>
    <tr>
      <th>
        <p>
          Response
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          200
        </p>
      </td>

      <td>
        <p>
          The successful response of GET stats request.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          404
        </p>
      </td>

      <td>
        <p>
          Not found.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          401
        </p>
      </td>

      <td>
        <p>
          Unauthorized. Allowed error types and errors: \[(type="authentication", code="not-authenticated")]
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          403
        </p>
      </td>

      <td>
        <p>
          Forbidden. Allowed error types and errors: \[(type="authorization", code="not-authorized")]
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          429
        </p>
      </td>

      <td>
        <p>
          Too Many Requests. Allowed error types and errors: \[(type="availability", code="too-many-requests")]
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          500
        </p>
      </td>

      <td>
        <p>
          Internal Server Error. Allowed error types and errors: \[(type="availability", code="internal-error")]
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          503
        </p>
      </td>

      <td>
        <p>
          Service Unavailable. Allowed error types and errors: \[(type="availability", code="service-unavailable")]
        </p>
      </td>
    </tr>
  </tbody>
</table>
