> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ops-apidoc.hugin.co/llms.txt.
> For full documentation content, see https://ops-apidoc.hugin.co/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ops-apidoc.hugin.co/_mcp/server.

# Create Reservation

POST https://ops.hugin.co/api/v1/devices/reservations
Content-Type: application/json

# Create Reservation - Stoktan Cihaz Rezerve Et

Belirtilen model ve adet kadar cihazı mağaza stoğundan rezerve eder.

## Request Body

| Parametre | Tip | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `model_type` | string | Evet | `tiger` veya `s1` |
| `qty` | integer | Evet | Rezerve edilecek cihaz adedi (0'dan büyük) |

## Endpoint

- `POST /api/v1/devices/reservations`
    

## Örnek Request

``` json
{
  "model_type": "tiger",
  "qty": 2
}

 ```

## Örnek Success Response

``` json
{
  "status": "SUCCESS",
  "data": {
    "names": ["FT00001234", "FT00001235"]
  }
}

 ```

## Notlar

- Sadece `ykb` ve `teb` kullanıcıları kullanabilir
    
- Başarılı response'da rezerve edilen cihaz adları döner (`data.names`)

Reference: https://ops-apidoc.hugin.co/hugin-ops-api/devices/create-reservation

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: HuginOps API
  version: 1.0.0
paths:
  /api/v1/devices/reservations:
    post:
      operationId: create-reservation
      summary: Create Reservation
      description: |-
        # Create Reservation - Stoktan Cihaz Rezerve Et

        Belirtilen model ve adet kadar cihazı mağaza stoğundan rezerve eder.

        ## Request Body

        | Parametre | Tip | Zorunlu | Açıklama |
        | --- | --- | --- | --- |
        | `model_type` | string | Evet | `tiger` veya `s1` |
        | `qty` | integer | Evet | Rezerve edilecek cihaz adedi (0'dan büyük) |

        ## Endpoint

        - `POST /api/v1/devices/reservations`
            

        ## Örnek Request

        ``` json
        {
          "model_type": "tiger",
          "qty": 2
        }

         ```

        ## Örnek Success Response

        ``` json
        {
          "status": "SUCCESS",
          "data": {
            "names": ["FT00001234", "FT00001235"]
          }
        }

         ```

        ## Notlar

        - Sadece `ykb` ve `teb` kullanıcıları kullanabilir
            
        - Başarılı response'da rezerve edilen cihaz adları döner (`data.names`)
      tags:
        - subpackage_devices
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Devices_Create Reservation_Response_200'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiV1DevicesReservationsRequestBadRequestError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model_type:
                  type: string
                qty:
                  type: integer
              required:
                - model_type
                - qty
servers:
  - url: https://ops.hugin.co
    description: https://ops.hugin.co
components:
  schemas:
    ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        names:
          type: array
          items:
            type: string
      required:
        - names
      title: ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaData
    ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaMetadata:
      type: object
      properties:
        instance:
          type: string
        timestamp:
          type: string
          format: date-time
      required:
        - instance
        - timestamp
      title: >-
        ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaMetadata
    Devices_Create Reservation_Response_200:
      type: object
      properties:
        status:
          type: string
        data:
          $ref: >-
            #/components/schemas/ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaData
        metadata:
          $ref: >-
            #/components/schemas/ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaMetadata
      required:
        - status
        - data
        - metadata
      title: Devices_Create Reservation_Response_200
    ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        description:
          type: string
      required:
        - code
        - title
        - description
      title: ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaError
    PostApiV1DevicesReservationsRequestBadRequestError:
      type: object
      properties:
        status:
          type: string
        error:
          $ref: >-
            #/components/schemas/ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaError
        metadata:
          $ref: >-
            #/components/schemas/ApiV1DevicesReservationsPostResponsesContentApplicationJsonSchemaMetadata
      required:
        - status
        - error
        - metadata
      title: PostApiV1DevicesReservationsRequestBadRequestError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{
  "model_type": "tiger",
  "qty": 2
}
```

**Response**

```json
{
  "status": "SUCCESS",
  "data": {
    "names": [
      "FT00001234",
      "FT00001235"
    ]
  },
  "metadata": {
    "instance": "/api/v1/devices/reservations",
    "timestamp": "2026-04-29T13:00:00Z"
  }
}
```

**SDK Code**

```python Devices_Create Reservation_example
import requests

url = "https://ops.hugin.co/api/v1/devices/reservations"

payload = {
    "model_type": "tiger",
    "qty": 2
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Devices_Create Reservation_example
const url = 'https://ops.hugin.co/api/v1/devices/reservations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model_type":"tiger","qty":2}'
};

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

```go Devices_Create Reservation_example
package main

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

func main() {

	url := "https://ops.hugin.co/api/v1/devices/reservations"

	payload := strings.NewReader("{\n  \"model_type\": \"tiger\",\n  \"qty\": 2\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 Devices_Create Reservation_example
require 'uri'
require 'net/http'

url = URI("https://ops.hugin.co/api/v1/devices/reservations")

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  \"model_type\": \"tiger\",\n  \"qty\": 2\n}"

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

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

HttpResponse<String> response = Unirest.post("https://ops.hugin.co/api/v1/devices/reservations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model_type\": \"tiger\",\n  \"qty\": 2\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://ops.hugin.co/api/v1/devices/reservations', [
  'body' => '{
  "model_type": "tiger",
  "qty": 2
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Devices_Create Reservation_example
using RestSharp;

var client = new RestClient("https://ops.hugin.co/api/v1/devices/reservations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model_type\": \"tiger\",\n  \"qty\": 2\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Devices_Create Reservation_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model_type": "tiger",
  "qty": 2
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://ops.hugin.co/api/v1/devices/reservations")! 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()
```