> 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.

# Get Device

GET https://ops.hugin.co/api/v1/devices/{deviceId}

Get Device - Yazarkasa / POS Bilgisi Sorgulama

Mali ID ile POS/ÖKC cihaz bilgilerini ve bağlı terminalleri getirir.

Notlar:
- Bir cihazın birden fazla terminali olabilir.


Reference: https://ops-apidoc.hugin.co/hugin-ops-api/devices/get-device

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: HuginOps API
  version: 1.0.0
paths:
  /api/v1/devices/{deviceId}:
    get:
      operationId: get-device
      summary: Get Device
      description: |
        Get Device - Yazarkasa / POS Bilgisi Sorgulama

        Mali ID ile POS/ÖKC cihaz bilgilerini ve bağlı terminalleri getirir.

        Notlar:
        - Bir cihazın birden fazla terminali olabilir.
      tags:
        - subpackage_devices
      parameters:
        - name: deviceId
          in: path
          description: Cihaz mali numarası / Hugin ECR identifier.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Devices_Get Device_Response_200'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetApiV1DevicesDeviceidRequestUnauthorizedError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetApiV1DevicesDeviceidRequestNotFoundError
servers:
  - url: https://ops.hugin.co
    description: https://ops.hugin.co
components:
  schemas:
    ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        deviceId:
          type: string
        fiscalId:
          type: string
        serialNo:
          type: string
        brand:
          type: string
        model:
          type: string
        status:
          type: string
        merchantId:
          type: string
        terminalIds:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - deviceId
        - fiscalId
        - serialNo
        - brand
        - model
        - status
        - merchantId
        - terminalIds
        - createdAt
        - updatedAt
      title: ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaData
    Devices_Get Device_Response_200:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: >-
            #/components/schemas/ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaData
      required:
        - success
        - data
      title: Devices_Get Device_Response_200
    ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      title: ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaError
    GetApiV1DevicesDeviceidRequestUnauthorizedError:
      type: object
      properties:
        success:
          type: boolean
        error:
          $ref: >-
            #/components/schemas/ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaError
      required:
        - success
        - error
      title: GetApiV1DevicesDeviceidRequestUnauthorizedError
    GetApiV1DevicesDeviceidRequestNotFoundError:
      type: object
      properties:
        success:
          type: boolean
        error:
          $ref: >-
            #/components/schemas/ApiV1DevicesDeviceIdGetResponsesContentApplicationJsonSchemaError
      required:
        - success
        - error
      title: GetApiV1DevicesDeviceidRequestNotFoundError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples

### Device details retrieved successfully



**Request**

```json
{}
```

**Response**

```json
{
  "success": true,
  "data": {
    "deviceId": "FU00000009",
    "fiscalId": "FU1234567890",
    "serialNo": "SN987654321",
    "brand": "Verifone",
    "model": "VX520",
    "status": "active",
    "merchantId": "MRC1234567",
    "terminalIds": [
      "TERM0012345",
      "TERM0012346"
    ],
    "createdAt": "2022-11-15T09:30:00.000Z",
    "updatedAt": "2024-04-20T16:45:00.000Z"
  }
}
```

**SDK Code**

```python Device details retrieved successfully
import requests

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

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

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

print(response.json())
```

```javascript Device details retrieved successfully
const url = 'https://ops.hugin.co/api/v1/devices/FU00000009';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go Device details retrieved successfully
package main

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

func main() {

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

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", 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 Device details retrieved successfully
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

```java Device details retrieved successfully
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://ops.hugin.co/api/v1/devices/FU00000009")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Device details retrieved successfully
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Device details retrieved successfully
using RestSharp;

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

```swift Device details retrieved successfully
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://ops.hugin.co/api/v1/devices/FU00000009")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```

### Generic error response.



**Request**

```json
{}
```

**Response**

```json
{
  "success": true,
  "data": {
    "deviceId": "FU00000009",
    "fiscalId": "FU1234567890",
    "serialNo": "SN987654321",
    "brand": "Verifone",
    "model": "VX520",
    "status": "active",
    "merchantId": "MRC1234567",
    "terminalIds": [
      "TERM0012345",
      "TERM0012346"
    ],
    "createdAt": "2022-11-15T09:30:00.000Z",
    "updatedAt": "2024-04-20T16:45:00.000Z"
  }
}
```

**SDK Code**

```python Generic error response.
import requests

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

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

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

print(response.json())
```

```javascript Generic error response.
const url = 'https://ops.hugin.co/api/v1/devices/FU00000009';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go Generic error response.
package main

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

func main() {

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

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", 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 Generic error response.
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

```java Generic error response.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://ops.hugin.co/api/v1/devices/FU00000009")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Generic error response.
using RestSharp;

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

```swift Generic error response.
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://ops.hugin.co/api/v1/devices/FU00000009")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```