> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/device/create-a-new-device.md).

# Create a new device

Create a new device for a tenant

Required permissions: DEVICE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Device","description":"Device"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"integrationToken":[]},{"authToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"responses":{"DeviceResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceResponseSchema"}}},"description":"Example response"}},"schemas":{"DeviceResponseSchema":{"title":"DeviceResponseSchema","type":"object","required":["createdAt","createdBy","deviceUid","identifier","lastModifiedAt","lastModifiedBy","lastActivityAt","lastTenantUserUid","name","systemInformation","status","store","deviceLinkCode","lastOrderUid","till","appCode","appVersion","settings","printers"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deviceUid":{"$ref":"#/components/schemas/UID"},"identifier":{"type":"string","description":"A unique client identifier. This will be set when the client is linked."},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"lastActivityAt":{"type":"string","description":"The timestamp indicating the most recent date and time when the device registered any activity. ","format":"date-time","nullable":true},"lastTenantUserUid":{"type":"string","description":"The tenantUserUid who interacted with this device most recently"},"name":{"type":"string"},"systemInformation":{"type":"string","description":"Contains device name, OS, release version of OS, OS build date, like a uname -a response on linux servers"},"status":{"$ref":"#/components/schemas/DeviceStatusENUM"},"store":{"$ref":"#/components/schemas/DeviceStoreResponseSchema"},"deviceLinkCode":{"type":"string","description":"The code that should be used to link the device to an app"},"lastOrderUid":{"$ref":"#/components/schemas/OptionalUID"},"till":{"$ref":"#/components/schemas/DeviceTillResponseSchema"},"appCode":{"$ref":"#/components/schemas/DeviceAppCodeENUM"},"appVersion":{"type":"string"},"settings":{"type":"array","items":{"$ref":"#/components/schemas/GeneralParameterResponseSchema"}},"printers":{"type":"array","items":{"$ref":"#/components/schemas/BasicPrinterResponseSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DeviceStatusENUM":{"enum":["ACTIVE","BLOCKED","READY_TO_LINK"],"title":"DeviceAuthorizationStatusENUM","type":"string","description":"| Enum | Description|\n|-----|-----|\n|READY_TO_LINK | The device is ready to a physical device through the link endpoint |\n|ACTIVE| The device is linked and active |\n|BLOCKED| The device is linked, but blocked for usage |"},"DeviceStoreResponseSchema":{"title":"DeviceStoreResponseSchema","type":"object","nullable":true,"required":["name","storeUid","organizationUid"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"organizationUid":{"$ref":"#/components/schemas/UID"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeviceTillResponseSchema":{"title":"DeviceTillResponseSchema","type":"object","nullable":true,"required":["tillUid","name","tillNumber"],"properties":{"tillUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"tillNumber":{"type":"integer"}}},"DeviceAppCodeENUM":{"title":"DeviceAppCodeENUM","type":"string","enum":["CLIENT","ASSISTANT","UNKNOWN"],"description":"| Enum | Description |\n|---|----|\n| CLIENT | Flow Retail Client |\n| ASSISTANT | Flow Retail Assistant |\n| UNKNOWN | No specific app |"},"GeneralParameterResponseSchema":{"title":"GeneralParameterResponseSchema","type":"object","required":["key","value","type","allowedValues","validationRegex","name","required"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"type":{"$ref":"#/components/schemas/GeneralParameterTypeENUM"},"allowedValues":{"type":"array","items":{"type":"string"}},"validationRegex":{"type":"string"},"name":{"type":"string"},"required":{"type":"boolean"}}},"GeneralParameterTypeENUM":{"title":"GeneralSettingTypeENUM","type":"string","enum":["STRING","PASSWORD","INTEGER","DECIMAL","BOOL","ENUM"],"description":"| Type | Description |\n|--|--|\n|BOOL | Booleans will be the string `true` or `false` |\n|DECIMAL | Descimal numbers can only have two decimals and is represented as an integer multiplied by 100. Example: 1.2 is will be 120 and 5 will be 500 |\n|ENUM| The enum value should be one of the values listed in `allowedValues` |\n|PASSWORD | Treated the same way as STRING, but indicates to clients that this field should be hidden or masked. Used for tokens and passwords |"},"BasicPrinterResponseSchema":{"title":"BasicPrinterResponseSchema","type":"object","required":["printerUid","name","type","availablePrintActions"],"properties":{"printerUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/PrinterTypeENUM"},"availablePrintActions":{"type":"array","description":"Which print job types this printer supports. See [`AvailablePrintActionENUM`](#/components/schemas/AvailablePrintActionENUM).","items":{"$ref":"#/components/schemas/AvailablePrintActionENUM"}}}},"PrinterTypeENUM":{"title":"PrinterTypeENUM","type":"string","enum":["LABEL","RECEIPT","GENERAL"]},"AvailablePrintActionENUM":{"description":"Supported print **capabilities** for a printer. Some values intentionally differ from the strings in\n[`PrinterTypeENUM`](#/components/schemas/PrinterTypeENUM) (hardware class: LABEL / RECEIPT) and\n[`OrderPrintTypeENUM`](#/components/schemas/OrderPrintTypeENUM) (order print request `type`), so clients\ndo not confuse `printer.type` with entries in `availablePrintActions`. Use the table below to map a\ncapability to the request `type` it enables.\n\n| ENUM | Meaning | Maps to |\n| ---- | ------- | ------- |\n| RECEIPT | Sales receipt print | `OrderPrintTypeENUM` RECEIPT |\n| EXCHANGENOTE | Exchange note print | `OrderPrintTypeENUM` EXCHANGENOTE |\n| GIFTCARD_BARCODE | Gift card barcode print | `OrderPrintTypeENUM` GIFTCARD |\n| PICKUP_LABEL | Pickup label / note print | `OrderPrintTypeENUM` PICKUP |\n| SHORTAGENOTE | Missing items note (restlapp) print | `OrderPrintTypeENUM` SHORTAGENOTE |\n| PICKNOTE | Pick note (plukkelapp) print | `OrderPrintTypeENUM` PICKNOTE |\n| PRODUCT | Product label print | Print-products API |\n| CUSTOMER_MEMBERSHIP_CARD | Customer membership card print | — |\n| SERVICE_INTAKE_SLIP | Service order intake slip print; every RECEIPT printer lists it | `ServiceOrderPrintTypeENUM` INTAKE_SLIP |\n","minLength":1,"title":"AvailablePrintActionENUM","type":"string","enum":["RECEIPT","EXCHANGENOTE","GIFTCARD_BARCODE","PICKUP_LABEL","SHORTAGENOTE","PICKNOTE","PRODUCT","CUSTOMER_MEMBERSHIP_CARD","SERVICE_INTAKE_SLIP"]},"DeviceCreateRequestSchema":{"title":"DeviceCreateRequestSchema","type":"object","required":["name","appCode"],"properties":{"deviceUid":{"$ref":"#/components/schemas/OptionalUID"},"name":{"type":"string"},"appCode":{"$ref":"#/components/schemas/DeviceAppCodeENUM"},"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"tillUid":{"$ref":"#/components/schemas/OptionalUID"},"settings":{"type":"array","items":{"$ref":"#/components/schemas/GeneralParameterRequestSchema"}},"printerUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"GeneralParameterRequestSchema":{"description":"GeneralParameterRequestSchema","title":"GeneralParameterRequestSchema","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}},"requestBodies":{"DeviceCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/devices":{"post":{"summary":"Create a new device","tags":["Device"],"responses":{"201":{"$ref":"#/components/responses/DeviceResponse"},"400":{"description":"Bad Request"}},"operationId":"post-tenants-devices","description":"Create a new device for a tenant\n\nRequired permissions: DEVICE","requestBody":{"$ref":"#/components/requestBodies/DeviceCreateRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/device/create-a-new-device.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
