Fetch Products API

View as Markdown
### Fetch GRNs API This API is to get all Product existing in Dice. | **Params** | **Required** | **Description** | | --- | --- | --- | | start_date | Mandatory | Date filter, from which date the Products needs to be fetched. <br> <br>Format - **dd-MM-yyyy** | | end_date | Mandatory | Date filter, till which date the Products need to be fetched. <br> <br>Format - **dd-MM-yyyy** | | offset | Mandatory | Page Number | | pageSize | Optional | Number of Products to be fetched in a single page. Value cannot be greater than 5000. <br> <br>If not provided along with the request then default value will be 1000 considered. | ### Response Body | Params | Type | Description | | --- | --- | --- | | products | Array | An array containing details of various products. | | active | Boolean | Indicates whether the product is active. | | id | Integer | The unique ID of the product. | | unit | String | The unit of measurement for the product. | | amount | Integer | The amount associated with the product. | | service | String | The service description of the product. | | productId | String | The unique ID of the product. | | currency | String | The currency code for the product. | | title | String | The title or name of the product. | | image | String | The URL or base64-encoded representation of the product's image. | | hsn | String | The Harmonized System Nomenclature (HSN) code for the product. | | sku | String | The Stock Keeping Unit (SKU) for the product. | | glcode | String | The General Ledger (GL) code associated with the product. | | type | String | The type of the product. | | description | String | The description or details of the product. | | tax | String | The tax rate associated with the product. | | orders | Integer | The number of orders for the product. | | orderAt | Integer | Timestamp indicating when the product was ordered. | | sale | Boolean | Indicates whether the product is available for sale. | | purchase | Boolean | Indicates whether the product is available for purchase. | | total | Integer | The total number of products. | | currentPage | Integer | The current page number. | | totalPages | Integer | The total number of pages based on the page size. | ### Response ``` json { "products": [ { "active": true, "id": 29286, "unit": "kg", "amount": 10, "service": "abc", "productId": "test", "currency": "AED", "title": "testt", "image": "https://example.com/image1", "hsn": "test", "sku": "test", "glcode": "test", "type": "product", "description": "est", "tax": "0.0", "orders": 0, "orderAt": 0, "sale": true, "purchase": true }, { "active": false, "id": 33060, "unit": "ton", "amount": 1111, "service": "Budget Test Service 1", "productId": "PRODUCT-INDIAN-0000003", "currency": "INR", "title": "title1", "image": "https://example.com/image2", "hsn": "2312", "sku": "sku1", "glcode": "123123", "type": "product", "description": "desc1", "tax": "0.0", "orders": 0, "orderAt": 0, "sale": false, "purchase": true }, // ... (additional product entries) ], "total": 16, "currentPage": 1, "totalPages": 1 } ```

Headers

DICE-APP-IDstringOptional
Company Code of client
X-CLIENT-IDstringOptional
API Client ID
X-CLIENT-SECRETstringOptional
API Client Secret

Query parameters

offsetintegerOptional

Offset starts from 0 (Page Number), values can be 0, 1, 2

pageSizeintegerOptional
optinal parameter, default is 1000
start_datestringOptional

Date should be in dd-MM-yyyy format and it runs on CreatedAt

end_datestringOptional

Date should be in dd-MM-yyyy format and it runs on CreatedAt

Response

OK
productslist of objects
totalinteger
currentPageinteger
totalPagesinteger