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

# Place Order

POST http://localhost:1337/ext/v1/placeOrder
Content-Type: application/x-www-form-urlencoded

You can create an order by simply adding the required details from this api. You will get appropriate message on request completion along with reference id of the order.

Reference: https://docs.itpainform.com/itpa/ap-is/place-order

## Request

### Headers

- `clientId` (string, optional)
- `secretKey` (string, optional)

### Body (application/x-www-form-urlencoded)

This endpoint expects an object.

- `city` (string, required) — required
- `name` (string, required) — required
- `state` (string, required)
- `street` (string, required) — required
- `country` (string, required) — required
- `comments` (string, required)
- `isUpdate` (string, required) — required, true/false
- `oldRefNo` (string, required) — required if isUpdate is true
- `postalCode` (string, required)
- `reportType` (string, required) — required, eg. ITPA_BIR - please refer your dev page for supported report types.
- `phoneNumber` (string, required)
- `serviceType` (string, required) — required, eg. NORMAL - please refer your dev page for supported service type

## Response

### 200

OK

- `refNo` (string, required)
- `message` (string, required)

## Examples

**Request**

```json
{
  "city": "string",
  "name": "string",
  "state": "string",
  "street": "string",
  "country": "string",
  "comments": "string",
  "isUpdate": "string",
  "oldRefNo": "string",
  "postalCode": "string",
  "reportType": "string",
  "phoneNumber": "string",
  "serviceType": "string"
}
```

**Response**

```json
{
  "refNo": "1000003",
  "message": "Order Created successfully!"
}
```

**SDK Code**

```python APIs_Place Order_example
import requests

url = "http://localhost:1337/ext/v1/placeOrder"

payload = ""
headers = {
    "clientId": "{{clientid}}",
    "secretKey": "{{secretkeys}}",
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript APIs_Place Order_example
const url = 'http://localhost:1337/ext/v1/placeOrder';
const options = {
  method: 'POST',
  headers: {
    clientId: '{{clientid}}',
    secretKey: '{{secretkeys}}',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

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

```go APIs_Place Order_example
package main

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

func main() {

	url := "http://localhost:1337/ext/v1/placeOrder"

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

	req.Header.Add("clientId", "{{clientid}}")
	req.Header.Add("secretKey", "{{secretkeys}}")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

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

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

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

}
```

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

url = URI("http://localhost:1337/ext/v1/placeOrder")

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

request = Net::HTTP::Post.new(url)
request["clientId"] = '{{clientid}}'
request["secretKey"] = '{{secretkeys}}'
request["Content-Type"] = 'application/x-www-form-urlencoded'

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

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

HttpResponse<String> response = Unirest.post("http://localhost:1337/ext/v1/placeOrder")
  .header("clientId", "{{clientid}}")
  .header("secretKey", "{{secretkeys}}")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://localhost:1337/ext/v1/placeOrder', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
    'clientId' => '{{clientid}}',
    'secretKey' => '{{secretkeys}}',
  ],
]);

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

```csharp APIs_Place Order_example
using RestSharp;

var client = new RestClient("http://localhost:1337/ext/v1/placeOrder");
var request = new RestRequest(Method.POST);
request.AddHeader("clientId", "{{clientid}}");
request.AddHeader("secretKey", "{{secretkeys}}");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift APIs_Place Order_example
import Foundation

let headers = [
  "clientId": "{{clientid}}",
  "secretKey": "{{secretkeys}}",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:1337/ext/v1/placeOrder")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```