Printer
Create Printer
Create a new printer with its kitchen groups and users.
Authorization
API-TOKEN API-TOKEN<token>
Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
market_id*string
Must match an existing stored value.
branch_id?|
Must match an existing stored value.
printer_type_id*integer
Must match an existing stored value.
service_type*string
Value in
"ALL_SERVICE_TYPES" | "TAKE_AWAY" | "RECEIPT" | "DINING"target*string
Value in
"ALL_FEATURES" | "FLAVOURS_PAY" | "KITCHEN" | "ORDER"name*string
Must not be greater than 191 characters.
paper_width?|
Must not be greater than 191 characters.
font_size?|
Must not be greater than 191 characters.
ip*string
Must not be greater than 191 characters.
copy?|
Must be at least 1.
settings?|
Must have at least 0 items.
users_ids*array<>
Must match an existing stored value.
kitchens_ids*array<>
Must match an existing stored value.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/printers" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "market_id": "laudantium", "printer_type_id": 10, "service_type": "TAKE_AWAY", "target": "ORDER", "name": "efaxcvvse", "ip": "jamiwqtkxzowycv", "users_ids": [ "voluptate" ], "kitchens_ids": [ 20 ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Printer created successfully."
},
"data": {
"id": 6,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"printer_type_id": 1,
"target": "ORDER",
"name": "Front Desk Printer",
"ip": "192.168.1.50",
"copy": 1,
"is_active": true,
"created_at": 1792593343236,
"updated_at": 1792593343236,
"service_type": "RECEIPT",
"paper_width": null,
"font_size": null,
"settings": {
"MULTILINGUAL": false,
"PRODUCT_SHOW": false,
"DRAWER_OPEN": true,
"PRINT_POSTPAID": false,
"PRINT_IMAGE": false,
"PRINT_AUTO": true,
"APP_TO_APP": false,
"HAS_SPACE": false,
"RASTER": true,
"PDF": true
},
"add_space": false,
"market": {
"id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"sector_id": 15,
"name_en": "Franecki Ltd",
"name_ar": "Wintheiser-Barrows",
"description_en": "Eaque distinctio fuga nihil vitae velit.",
"description_ar": null,
"logo_img": "https://via.placeholder.com/200x200.png/009955?text=business+logo+facilis",
"cover_img": "https://via.placeholder.com/200x200.png/009999?text=business+cover+amet",
"email": "[email protected]",
"phone_prefix": "967",
"phone_number": "7856586642",
"crn": "033-466-2828",
"tax_number": "66596607090",
"created_by": null,
"email_verified_at": 1792593329562,
"phone_verified_at": 1792593329562,
"created_at": 1792593329465,
"updated_at": 1792593340021,
"deleted_at": null,
"is_active": true,
"slug": "wisoky-feest",
"code": "ENT-0000000001",
"links": {
"website": null,
"instagram": null,
"youtube": null,
"x": null,
"call_center": null
},
"phone": "7856586642"
},
"branch": {
"id": "2438ea30-370a-4ca0-9423-f635f83f1bec",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"name_en": "Ritchie Group",
"name_ar": "Ritchie Group",
"address": "97804 Tyra Road Suite 960\nMacejkovicmouth, MA 80054",
"latitude": -71.349526,
"longitude": -85.755632,
"is_active": true,
"created_at": 1792593329466,
"updated_at": 1792593329466,
"deleted_at": null,
"expired_at": null,
"is_online": false,
"code": "BR-704037"
},
"printer_type": {
"id": 1,
"brand": "WISEASY",
"type": "voluptas",
"code_page": null,
"character_set": null,
"created_at": 1792593343152,
"updated_at": 1792593343152
},
"users": [],
"kitchen_groups": [],
"kitchens": []
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 422,
"status": "error",
"message": "The selected market id is invalid. (and 5 more errors)"
},
"data": [
{
"code": 0,
"message": "The selected market is invalid.",
"field": "market"
},
{
"code": 0,
"message": "The selected printer type is invalid.",
"field": "printer_type"
},
{
"code": 0,
"message": "The service type field is required.",
"field": "service_type"
},
{
"code": 0,
"message": "The selected target is invalid.",
"field": "target"
},
{
"code": 0,
"message": "The Name field is required.",
"field": "name"
},
{
"code": 0,
"message": "The ip field is required.",
"field": "ip"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}