> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Fetch PO Details

GET https://heimdall.eka.io/apis/external/po/fetchPoDetails

### Fetch Purchase Order Details

This endpoint retrieves the details of a specific purchase order (PO) using the provided `orderId`. The request is made via an HTTP GET method.

#### Request Parameters

* **orderId** (string, required): The unique identifier for the purchase order you wish to fetch. For example, `PO-INDIAN-00407`.

#### Response

On a successful request, the server responds with a status code of **200** and a JSON object containing the following key details:

* **remarks** (string): Any remarks associated with the PO.

* **warnings** (array): A list of warnings related to the PO, if any.

* **grns** (array): An array of Goods Receipt Notes (GRNs) associated with the PO, each containing:

  * **id** (integer): Unique identifier for the GRN.

  * **status** (string): Current status of the GRN.

  * **grnId** (string): ID of the GRN.

  * **invoiceId** (string): Associated invoice ID.

  * **invoiceAmount** (number): Amount on the invoice.

  * **currency** (string): Currency type.

  * **partial** (boolean): Indicates if the GRN is partial.

  * **date** (integer): Date of the GRN.

  * **createdAt** (integer): Timestamp when the GRN was created.

  * **amend** (boolean): Indicates if the GRN has been amended.

* **attrs** (object): Contains various attributes related to the PO, such as owner details, currency amount, and address.

* **orderId** (string): The unique order ID.

* **title** (string): Title of the PO.

* **currency** (string): Currency used in the PO.

* **shipTo** (object): Shipping details including tags.

* **billingTo** (object): Billing details including name, registered name, address, and GSTIN.

* **vendor** (object): Information about the vendor, including ID, name, GSTIN, and address.

* **payments** (array): Payment details associated with the PO.

* **publicComments** (array): Any public comments related to the PO.

* **procured** (array): Details of procured items, including quantity, price, and status.

* **invoices** (array): List of invoices related to the PO.

#### Example Response

```json
{
    "remarks": "",
    "warnings": [],
    "grns": [
        {
            "id": 19612,
            "status": "COMPLETED",
            "grnId": "GRN-INDIAN-00307",
            "invoiceId": "VI-INDIAN-000001723",
            "invoiceAmount": 1500.0,
            "currency": "INR",
            "partial": false,
            "date": 1704133800000,
            "createdAt": 1704176202179,
            "amend": false
        }
    ],
    "attrs": {
        "ownerType": "EMPLOYEE",
        "admin.id": "118",
        "amount": "1500",
        "currency_amount": "1500",
        "address": "1347",
        "admin.name": "Admin",
        "test": "dfgh",
        "document": "https://static.eka.io/v2/INDIAN/orders/PO-INDIAN-00407.pdf",
        "admin": "karanshrm44@gmail.com",
        "office": "1347",
        "ownerId": "0001",
        "last_approver_email": "testuser3@antrepriz.com",
        "workflow.current": "1704176158871",
        "budgeted": "yes",
        "last_approver_name": "karanss kumar",
        "last_approver_time": "1704176158836",
        "grn.start": "1704176158873",
        "po_released": "1704176158875",
        "fds": "2024-01-02",
        "stage": "Grn",
        "service": "karan",
        "admin.email": "karanshrm44@gmail.com",
        "last_approver_code": "0001",
        "workflow.start": "1704176158861"
    },
    "orderId": "PO-INDIAN-00407",
    "title": "fghb",
    "currency": "INR",
    "shipTo": {
        "tags": {}
    },
    "billingTo": {
        "name": "Pune_",
        "registered_name": "",
        "address": "",
        "gstin": "27AAZCS7239P1Z1",
        "country": "India",
        "city": "Pune",
        "entityName": "GRNY",
        "entityRegisterName": "",
        "tags": {
            "one": "two",
            "sample test 11": "value"
        }
    },
    "vendorConditions": "rgfs",
    "category": {
        "id": 129,
        "name": "karan"
    },
    "conditions": [],
    "payments": [],
    "paymentData": {
        "advancePaymentTerms": [],
        "paymentTerms": [],
        "alertUsers": []
    },
    "currencyAmount": 1500.0,
    "grossAmount": 1500.0,
    "details": {
        "raisedBy": {
            "id": 17253,
            "ownerType": "EMPLOYEE",
            "ownerId": "0001",
            "ownerName": "karanss kumar"
        },
        "createdAt": 1704176082890,
        "updatedAt": 1724765235699,
        "addressName": "Pune_",
        "addressId": 1347,
        "officeName": "Pune_",
        "officeGstin": "27AAZCS7239P1Z1",
        "officeAddress": "",
        "officeCity": "Pune",
        "officeId": 1347
    },
    "grnOwner": {
        "ownerName": "Karan k",
        "ownerId": "0001",
        "ownerType": "EMPLOYEE",
        "officeTags": {},
        "customFields": {}
    },
    "submission": false,
    "completed": false,
    "status": "INVOICE",
    "stage": "Grn",
    "recurringId": 0,
    "poDocument": "https://static.eka.io/v2/INDIAN/orders/PO-INDIAN-00407.pdf",
    "additionalEmail": "",
    "vendor": {
        "id": 287032,
        "vendorId": "CONTACT-INDIAN-0000063",
        "name": "BAKKIREDDY SRINIVASULU REDDY",
        "gstin": "27AAACI1195H5ZI",
        "email": "sriniivastest@yopmail.com",
        "mobile": "7993435403",
        "pan": " AFQPA7358J",
        "address": {
            "id": "10abef6c-a743-4616-b6a0-fc4fe2bbeb49",
            "title": "PUNE",
            "address": "PUNE",
            "city": "Satara",
            "state": "Maharashtra",
            "country": "INDIA",
            "pincode": "415011",
            "gstin": "27AAACI1195H5ZI",
            "gstinValid": true,
            "businessAddress": false,
            "attrs": {},
            "forms": [],
            "locationId": "",
            "filterKey": "",
            "bankIds": []
        },
        "currency": "INR"
    },
    "publicComments": [],
    "procured": [
        {
            "id": 131886,
            "qtty": 10.0,
            "price": 150.0,
            "tax": 0.0,
            "taxSlab": 0.0,
            "base": 1500.0,
            "amount": 1500.0,
            "status": "TAGGED",
            "approved": 10.0,
            "invoicedQty": 0.0,
            "asnQty": 0.0,
            "blocked": false,
            "allowBlockedItemSubmission": false,
            "amends": 0.0,
            "name": "Macbook",
            "productCode": "PRODUCT-INDIAN-0000004",
            "vendor": "BAKKIREDDY SRINIVASULU REDDY",
            "vendorId": 287032,
            "createdAt": 1704176045017,
            "updatedAt": 1704200184788,
            "image": "",
            "officeId": 1347,
            "officeName": "Pune_",
            "officeAddress": "",
            "officeRegisteredName": "",
            "officeGstin": "27AAZCS7239P1Z1",
            "officePin": "411045",
            "officeCity": "Pune",
            "purchaseId": "RFQ-INDIAN-00325",
            "purchase": 23813,
            "serviceName": "karan",
            "poId": "PO-INDIAN-00407",
            "po": 42912,
            "owner": {
                "id": 17253,
                "ownerType": "EMPLOYEE",
                "ownerId": "0001",
                "ownerName": "karanss kumar"
            },
            "hsn": "hiosp",
            "productId": 37468,
            "sku": "IO",
            "unit": "kg",
            "deliveryDate": 1706767782933,
            "notes": "fwdsa",
            "specs": "",
            "description": "Macbook",
            "quoteId": 79678,
            "grnQty": 10.0,
            "grnNos": [
                "GRN-INDIAN-00307"
            ],
            "productAttrs": {
                "po_generated": "YES",
                "toggle": "yes"
            },
            "shortClosure": false,
            "shortClosureQtty": 0.0,
            "attrs": {
                "notes": "fwdsa"
            },
            "quotationId": "fsda",
            "skipFar": false
        }
    ],
    "invoices": [
        {
            "service": "karan",
            "category": "karan",
            "owner": {
                "id": 17253,
                "ownerType": "EMPLOYEE",
                "ownerId": "0001",
                "ownerName": "karanss kumar"
            },
            "createdAt": 1704176278166,
            "file": "https://static.eka.io/v2/INDIAN/receipts/2024/01/3282f964-7fce-457b-87d5-14a748078340.png",
            "status": "DECLINED",
            "id": 439857,
            "invoiceId": "VI-INDIAN-000001704",
            "stage": "approver",
            "duplicate": false,
            "integration": {
                "done": false
            },
            "currencyAmount": 1500.0,
            "currency": "INR",
            "billNumber": "KL23990Z"
        },
        {
            "service": "karan",
            "category": "karan",
            "owner": {
                "id": 17253,
                "ownerType": "EMPLOYEE",
                "ownerId": "0001",
                "ownerName": "karanss kumar"
            },
            "createdAt": 1704178300775,
            "file": "https://static.eka.io/v2/INDIAN/receipts/2024/01/fc43148d-ad2c-4dc1-b16f-178830d6ebf6.png",
            "status": "DECLINED",
            "id": 439923,
            "invoiceId": "VI-INDIAN-000001711",
            "stage": "test",
            "duplicate": false,
            "integration": {
                "done": false
            },
            "currencyAmount": 1500.0,
            "currency": "INR",
            "billNumber": "KL23990Z"
        },
        {
            "service": "karan",
            "category": "karan",
            "owner": {
                "id": 287032,
                "ownerType": "CONTACT",
                "ownerId": "287032",
                "ownerName": "BAKKIREDDY SRINIVASULU REDDY"
            },
            "createdAt": 1704178527831,
            "file": "https://static.eka.io/v2/receipts/2024/01/a9f0a711-976a-43d0-99f5-b14816d0f529.png",
            "status": "DECLINED",
            "id": 439931,
            "invoiceId": "VI-INDIAN-000001712",
            "stage": "xd",
            "duplicate": false,
            "integration": {
                "done": false
            },
            "currencyAmount": 1500.0,
            "currency": "INR",
            "billNumber": "KL23990Z"
        },
        {
            "service": "karan",
            "category": "karan",
            "owner": {
                "id": 17253,
                "ownerType": "EMPLOYEE",
                "ownerId": "0001",
                "ownerName": "karanss kumar"
            },
            "createdAt": 1704200006728,
            "status": "DECLINED",
            "id": 440467,
            "invoiceId": "VI-INDIAN-000001723",
            "stage": "test",
            "duplicate": false,
            "integration": {
                "done": false
            },
            "currencyAmount": 1500.0,
            "currency": "INR",
            "billNumber": "dsds"
        }
    ],
    "logs": [],
    "conditionalPos": {},
    "budgeted": true,
    "asnRequired": false,
    "budgetIds": [],
    "budgetCheckExecuted": false
}

```

#### Notes

* Ensure that the `orderId` is valid to receive accurate details.

* The response may contain multiple GRNs, invoices, and procured items, which provide comprehensive information about the purchase order.

This endpoint retrieves the details of a specific purchase order (PO) using the provided `orderId`. The request is made via an HTTP GET method.

#### Request Parameters

* **orderId** (string, required): The unique identifier for the purchase order you wish to fetch. For example, `PO-INDIAN-00407`.

#### Response

On a successful request, the server responds with a status code of **200** and a JSON object containing the following key details:

* **remarks** (string): Any remarks associated with the PO.

* **warnings** (array): A list of warnings related to the PO, if any.

* **grns** (array): An array of Goods Receipt Notes (GRNs) associated with the PO, each containing:

  * **id** (integer): Unique identifier for the GRN.

  * **status** (string): Current status of the GRN.

  * **grnId** (string): ID of the GRN.

  * **invoiceId** (string): Associated invoice ID.

  * **invoiceAmount** (number): Amount on the invoice.

  * **currency** (string): Currency type.

  * **partial** (boolean): Indicates if the GRN is partial.

  * **date** (integer): Date of the GRN.

  * **createdAt** (integer): Timestamp when the GRN was created.

  * **amend** (boolean): Indicates if the GRN has been amended.

* **attrs** (object): Contains various attributes related to the PO, such as owner details, currency amount, and address.

* **orderId** (string): The unique order ID.

* **title** (string): Title of the PO.

* **currency** (string): Currency used in the PO.

* **shipTo** (object): Shipping details including tags.

* **billingTo** (object): Billing details including name, registered name, address, and GSTIN.

* **vendor** (object): Information about the vendor, including ID, name, GSTIN, and address.

* **payments** (array): Payment details associated with the PO.

* **publicComments** (array): Any public comments related to the PO.

* **procured** (array): Details of procured items, including quantity, price, and status.

* **invoices** (array): List of invoices related to the PO.

#### Notes

* Ensure that the `orderId` is valid to receive accurate details.

* The response may contain multiple GRNs, invoices, and procured items, which provide comprehensive information about the purchase order.

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/purchase-orders-po/fetch-po-details

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Query parameters

- `orderId` (string, optional) — Fetches detailed information of a purchase order using the provided orderId

### Headers

- `DICE-APP-ID` (string, optional)
- `X-CLIENT-ID` (string, optional)
- `X-CLIENT-SECRET` (string, optional)

## Response

### 200

OK

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://heimdall.eka.io/apis/external/po/fetchPoDetails"

querystring = {"orderId":"PO-INDIAN-00407"}

headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407';
const options = {
  method: 'GET',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407', [
  'headers' => [
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407");
var request = new RestRequest(Method.GET);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/po/fetchPoDetails?orderId=PO-INDIAN-00407")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```