Flavours API
Printer

Update Printer

POST
/api/v2/printers/{printerId}

Update an existing printer.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Path Parameters

printerId*string

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

branch_id?|

Must match an existing stored value.

printer_type_id?|

Must match an existing stored value.

service_type?|
Value in"ALL_SERVICE_TYPES" | "TAKE_AWAY" | "RECEIPT" | "DINING"
target?|
Value in"ALL_FEATURES" | "FLAVOURS_PAY" | "KITCHEN" | "ORDER"
name?|

Must not be greater than 191 characters.

ip?|

Must not be greater than 191 characters.

font_size?|

Must not be greater than 191 characters.

paper_width?|

Must not be greater than 191 characters.

copy?|

Must be at least 1.

is_active?|
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/non" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "users_ids": [      "aut"    ],    "kitchens_ids": [      4    ]  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Printer updated successfully."
  },
  "data": {
    "id": 7,
    "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
    "branch_id": null,
    "printer_type_id": 1,
    "target": "ORDER",
    "name": "Updated Printer Name",
    "ip": "112.52.5.104",
    "copy": 1,
    "is_active": true,
    "created_at": 1787446698876,
    "updated_at": 1787446698898,
    "service_type": "DINING",
    "paper_width": "80",
    "font_size": null,
    "settings": {
      "MULTILINGUAL": false,
      "PRODUCT_SHOW": false,
      "DRAWER_OPEN": true,
      "PRINT_POSTPAID": false,
      "PRINT_IMAGE": false,
      "PRINT_AUTO": false,
      "APP_TO_APP": false,
      "HAS_SPACE": false,
      "RASTER": true,
      "PDF": false
    },
    "add_space": false,
    "market": {
      "id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
      "sector_id": 10,
      "name_en": "Howell, Baumbach and Hagenes",
      "name_ar": "Ankunding, Marks and Stracke",
      "description_en": "Culpa et inventore quo error sed.",
      "description_ar": null,
      "logo_img": "https://via.placeholder.com/200x200.png/006655?text=business+logo+quidem",
      "cover_img": "https://via.placeholder.com/200x200.png/00cc77?text=business+cover+dolorem",
      "email": "[email protected]",
      "phone_prefix": "973",
      "phone_number": "7148591204",
      "crn": "030-077-7963",
      "tax_number": "90476326386",
      "created_by": null,
      "email_verified_at": 1787446674909,
      "phone_verified_at": 1787446674909,
      "created_at": 1787446674760,
      "updated_at": 1787446695752,
      "deleted_at": null,
      "is_active": true,
      "slug": "kunde-ltd",
      "code": "ENT-0000000001",
      "links": {
        "website": null,
        "instagram": null,
        "youtube": null,
        "x": null,
        "call_center": null
      },
      "phone": "7148591204"
    },
    "branch": null,
    "printer_type": {
      "id": 1,
      "brand": "WISEASY",
      "type": "aut",
      "code_page": null,
      "character_set": null,
      "created_at": 1787446698628,
      "updated_at": 1787446698628
    },
    "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 printer type id is invalid. (and 2 more errors)"
  },
  "data": [
    {
      "code": 0,
      "message": "The selected printer type is invalid.",
      "field": "printer_type"
    },
    {
      "code": 0,
      "message": "The selected target is invalid.",
      "field": "target"
    },
    {
      "code": 0,
      "message": "The copy must be an integer.",
      "field": "copy"
    }
  ]
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}