---
title: "This method will return product count for a given search criteria."
method: POST
path: "/V1/product/count"
tags: ["FetchProduct"]
---

# This method will return product count for a given search criteria.

`POST /V1/product/count`

## Request

- Base URL: `https://content1-api.1worldsync.com`
- URL: `https://content1-api.1worldsync.com/V1/product/count`
- Auth: none declared. Required headers: `appid`, `hashcode`
- TypeScript: <https://skmtc.dev/1worldsync/apis/1worldsync-content1-api/docs/V1/product/count/post.ts> (a function with typed inputs; its response is checked against the schema)

This method will return product count for a given search criteria.

## Query parameters

- `timestamp` string, required

## Headers

- `appid` string, required
- `hashcode` string, required
- `gln` unknown

## Request body

- ItemFetchRequest: Product search criteria object
  - `gtins` string[]
  - `pullHierarchy` boolean, nullable: Flag to indicate whether to include hierarchy in the response
  - `gtin` string[], nullable: Item GTIN array
  - `ipGln` string, d{14}, nullable: Information Provider GLN
  - `targetMarket` string, nullable: Target Market
  - `lastModifiedDate` LastModifiedDate, nullable: Item last modified date
    - `from` DateField: LastModifiedDate To
      - `date` string: Date
      - `op` 'GT' | 'GTE' | 'LT' | 'LTE' | 'EQ': Date comparison operation type (ENUM)
    - `to` DateField: LastModifiedDate To
      - `date` string: Date
      - `op` 'GT' | 'GTE' | 'LT' | 'LTE' | 'EQ': Date comparison operation type (ENUM)
  - `brandName` string, nullable: Brand name (supports wildcard)
  - `productType` string, nullable: Product Type
  - `isConsumerUnit` string, nullable: Consumer Unit
  - `gpcCode` string, nullable: GPC code or name (supports wildcard)
  - `upcCode` string, nullable: UPC code (supports wildcard)
  - `sortFields` SortField[], nullable: Fields that will be sorted upon
    - `field` string: Fields that will be sorted upon. Ex: gtin, informationProviderGLN and targetMarket etc.
    - `desc` boolean
  - `fields` FetchFields, nullable: Fields to be include or exclude in result; By default all fields will be included
    - `include` string[]: To retrieve subset of attributes from item. Ex: ["gtin","informationProviderGLN","targetMarket","lastModifiedDate","brandName","gpcCategory","externalFileLink"]
    - `exclude` string[]: To abandon some of attributes from item. Ex: ["*.gln","externalFileLink.authorizedRecipients"]
  - `searchAfter` object[], nullable: This field is used to fetch item in batch. To retrieve the next page of the items. You need to set searchAfter in search criteria from previous result.

## Response `200`

will return count of products on a given criteria

- ItemCount: Product count result
  - `count` integer: This is total product count for given criteria.

## Other responses

- `401`: For any Authorization, Authentication and validation error
- `500`: when error occurred in processing

---

[API](https://skmtc.dev/1worldsync/apis/1worldsync-content1-api.md) - [All operations](https://skmtc.dev/1worldsync/apis/1worldsync-content1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/1worldsync/apis/1worldsync-content1-api/revisions/6f66dfce857e?raw)
