# Get all GRN Details

## Get Grn Details along with multiple filter options

<mark style="color:blue;">`GET`</mark> `https://{{workspace}}.myeshopbox.com/api/v1/grnDetails`

This endpoint allows you to get details of Grn.

#### Query Parameters

| Name              | Type    | Description                                                                          |
| ----------------- | ------- | ------------------------------------------------------------------------------------ |
| sort\_order       | string  | `sort_order` either `desc` or `asc`                                                  |
| sort\_by          | string  | Sort the attribute                                                                   |
| page              | integer | The number of pages used to offset the results                                       |
| per\_page         | integer | The number of items to be return per page                                            |
| status            | String  | For fetching Grn details, w\.r.t applied filter in response.(Created and Completed)  |
| grnId             | String  | Grn Id                                                                               |
| consignmentNumber | String  | Consignment Number of which Grn details should be fetch                              |
| referenceNumber   | String  | Purchase order number in your ERP for the particular consignment created in Eshopbox |
| documentNumber    | String  | Invoice number of the consignment                                                    |
| inwardOnTo        | Date    | Date on which grn items are added                                                    |
| inwardOnFrom      | String  | Date on which grn items are added                                                    |

#### Headers

| Name                                        | Type   | Description                                              |
| ------------------------------------------- | ------ | -------------------------------------------------------- |
| Authentication                              | string | The Bearer token which allows to grant access to the API |
| proxyHost<mark style="color:red;">\*</mark> | String | Account slug                                             |

{% tabs %}
{% tab title="200 Grn details successfully retrieved." %}

```
{
    "total": 1,
    "perPage": 10,
    "data": [
        {
            "consignmentNumber": "CON/22-23/664563",
            "referenceNumber": "PO/24/A001",
            "documentNumber": "ABC",
            "documentDate": "2022-01-12 00:00:00",
            "fromLocation": "xyz",
            "toLocation": "123A",
            "totalOrderedQty": 30,
            "totalReceviedQty": 30,
            "pendingQty": 0,
            "shortageQty": "0",
            "overageQty": "7",
            "consignmentType": "Expected",
            "status": "COMPLETED",
            "totalGrnCount": 3,
            "grnDetails": [
                {
                    "grnId": "G-G0010",
                    "sku": "ProductTest1",
                    "esin": "T1YV73H0TCS",
                    "quantityOrdered": 10,
                    "quantityReceived": 10,
                    "boxNumber":"12345-1",
                    "eshopboxBoxNumber":"123451",
                    "acceptedQty": 7,
                    "rejectedQty": 3,
                    "rejectedDetails": [
                        "Brand name missing",
                        "mrp missing",
                        "tag missing"
                    ],
                    "itemMrp": 30000.0,
                    "unitPrice": 10000.0,
                    "brandName": "DummyBrand",
                    "batchTrackingEnabled": false,
                    "batchingInfo": {
                        "batchingMethod": null
                    },
                    "inwardOn": "2023-01-13 12:00:00"
                },
                {
                    "grnId": "G-G001000",
                    "sku": "ProduTest1",
                    "esin": "T1YVH0TCS",
                    "rejectedDetails": [],
                    "acceptedQty": 10,
                    "quantityOrdered": 10,
                    "quantityReceived": 10,
                    "boxNumber":"12345-2",
                    "eshopboxBoxNumber":"123452",
                    "rejectedQty": 0,
                    "itemMrp": 30000.0,
                    "batchTrackingEnabled": false,
                    "batchingInfo": {
                        "batchingMethod": null
                    },
                    "brandName": "DummyBrand",
                    "unitPrice": 10000.0,
                    "inwardOn": "2023-01-13 12:00:00"
                },
                {
                    "grnId": "G-G001000",
                    "sku": "ProduTest1",
                    "esin": "T1YVH0TCS",
                    "rejectedDetails": [
                        "damaged Product"
                    ],
                    "acceptedQty": 9,
                    "quantityOrdered": 10,
                    "quantityReceived": 10,
                    "boxNumber":"12345-3",
                    "eshopboxBoxNumber":"123453",
                    "rejectedQty": 1,
                    "itemMrp": 30000.0,
                    "unitPrice": 10000.0,
                    "brandName": "DummyBrand",
                    "batchTrackingEnabled": false,
                    "batchingInfo": {
                        "batchingMethod": null
                    },
                    "inwardOn": "2023-01-13 12:00:00"
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location -g --request GET 'https://{{workspace}}.myeshopbox.com/api/v1/grnDetails?page=1&perPage=10&inwardOnFrom=2023-01-09&inwardOnTo=2023-01-31
--header 'Content-Type: application/json'
--header 'proxyHost: AccountSlug'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eshop.gitbook.io/eshopbox-developers/consignment/inward-consignment/get-all-inward-consignments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
