> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.nms.go.ug/llms.txt.
> For full documentation content, see https://apidocs.nms.go.ug/llms-full.txt.

# Create Special Order

POST https://testapi.nms.go.ug/api/v1/orders/special
Content-Type: application/json

Reference: https://apidocs.nms.go.ug/api-reference/orders/other-orders/special-order-management/collection/special-orders/create-special-order

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/orders/special:
    post:
      operationId: create-special-order
      summary: Create Special Order
      tags:
        - subpackage_specialOrders
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Special Orders_Create Special
                  Order_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                hfCode:
                  type: string
                hfName:
                  type: string
                loc:
                  type: string
                financialYear:
                  type: string
                cycle:
                  type: string
                itemCode:
                  type: string
                itemDescription:
                  type: string
                uom:
                  type: string
                quantity:
                  type: integer
                comments:
                  type: string
                attribute1:
                  description: Any type
                attribute2:
                  description: Any type
                attribute3:
                  description: Any type
              required:
                - hfCode
                - hfName
                - loc
                - financialYear
                - cycle
                - itemCode
                - itemDescription
                - uom
                - quantity
                - comments
servers:
  - url: https://testapi.nms.go.ug
  - url: http://localhost:8081
  - url: http://localhost:8083
components:
  schemas:
    Special Orders_Create Special Order_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Special Orders_Create Special Order_Response_200
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python
import requests

url = "https://testapi.nms.go.ug/api/v1/orders/special"

payload = {
    "hfCode": "{{facility_code}}",
    "hfName": "BUBULO HCIV",
    "loc": "MANAFWA",
    "financialYear": "{{financial_year}}",
    "cycle": "{{cycle}}",
    "itemCode": "217070",
    "itemDescription": "RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL",
    "uom": "1",
    "quantity": 5,
    "comments": "Emergency stock replenishment after animal bite outbreak"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://testapi.nms.go.ug/api/v1/orders/special';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"hfCode":"{{facility_code}}","hfName":"BUBULO HCIV","loc":"MANAFWA","financialYear":"{{financial_year}}","cycle":"{{cycle}}","itemCode":"217070","itemDescription":"RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL","uom":"1","quantity":5,"comments":"Emergency stock replenishment after animal bite outbreak"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://testapi.nms.go.ug/api/v1/orders/special"

	payload := strings.NewReader("{\n  \"hfCode\": \"{{facility_code}}\",\n  \"hfName\": \"BUBULO HCIV\",\n  \"loc\": \"MANAFWA\",\n  \"financialYear\": \"{{financial_year}}\",\n  \"cycle\": \"{{cycle}}\",\n  \"itemCode\": \"217070\",\n  \"itemDescription\": \"RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL\",\n  \"uom\": \"1\",\n  \"quantity\": 5,\n  \"comments\": \"Emergency stock replenishment after animal bite outbreak\"\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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://testapi.nms.go.ug/api/v1/orders/special")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"hfCode\": \"{{facility_code}}\",\n  \"hfName\": \"BUBULO HCIV\",\n  \"loc\": \"MANAFWA\",\n  \"financialYear\": \"{{financial_year}}\",\n  \"cycle\": \"{{cycle}}\",\n  \"itemCode\": \"217070\",\n  \"itemDescription\": \"RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL\",\n  \"uom\": \"1\",\n  \"quantity\": 5,\n  \"comments\": \"Emergency stock replenishment after animal bite outbreak\"\n}"

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.post("https://testapi.nms.go.ug/api/v1/orders/special")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"hfCode\": \"{{facility_code}}\",\n  \"hfName\": \"BUBULO HCIV\",\n  \"loc\": \"MANAFWA\",\n  \"financialYear\": \"{{financial_year}}\",\n  \"cycle\": \"{{cycle}}\",\n  \"itemCode\": \"217070\",\n  \"itemDescription\": \"RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL\",\n  \"uom\": \"1\",\n  \"quantity\": 5,\n  \"comments\": \"Emergency stock replenishment after animal bite outbreak\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://testapi.nms.go.ug/api/v1/orders/special', [
  'body' => '{
  "hfCode": "{{facility_code}}",
  "hfName": "BUBULO HCIV",
  "loc": "MANAFWA",
  "financialYear": "{{financial_year}}",
  "cycle": "{{cycle}}",
  "itemCode": "217070",
  "itemDescription": "RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL",
  "uom": "1",
  "quantity": 5,
  "comments": "Emergency stock replenishment after animal bite outbreak"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://testapi.nms.go.ug/api/v1/orders/special");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"hfCode\": \"{{facility_code}}\",\n  \"hfName\": \"BUBULO HCIV\",\n  \"loc\": \"MANAFWA\",\n  \"financialYear\": \"{{financial_year}}\",\n  \"cycle\": \"{{cycle}}\",\n  \"itemCode\": \"217070\",\n  \"itemDescription\": \"RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL\",\n  \"uom\": \"1\",\n  \"quantity\": 5,\n  \"comments\": \"Emergency stock replenishment after animal bite outbreak\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "hfCode": "{{facility_code}}",
  "hfName": "BUBULO HCIV",
  "loc": "MANAFWA",
  "financialYear": "{{financial_year}}",
  "cycle": "{{cycle}}",
  "itemCode": "217070",
  "itemDescription": "RABIES VACCINE + SOLVENT 0.5ML INJ 1 DOSE VIAL",
  "uom": "1",
  "quantity": 5,
  "comments": "Emergency stock replenishment after animal bite outbreak"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://testapi.nms.go.ug/api/v1/orders/special")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```