### Get Table List Request Example Source: https://dev.joinposter.com/en/docs/v3/web/spots/getTableHallTables Example of how to construct a GET request to the spots.getTableHallTables endpoint with specified parameters. ```php 1, "products" => [ [ "product_id" => 139, "count" => 1 ] ], "promotion" => [ [ "id" => 1, "involved_products" => [ ["id" => 139, "count" => 1], ['id' => 10, 'count' => 1, 'modification' => '[{"m":34,"a":1}, {"m":35,"a":1}, {"m":36,"a":1}]'] ], "result_products" => [ ["id" => 161] ] ] ] ]; $data = sendRequest($url, 'post', $incoming_order); ``` -------------------------------- ### Start Development Server Source: https://dev.joinposter.com/en/docs/v3/pos/start Run this command to start the development server for your application. ```bash npm run dev ``` -------------------------------- ### Get Ingredient Inventory Check Request Example Source: https://dev.joinposter.com/en/docs/v3/web/storage/getInventoryIngredients Example of an HTTP GET request to the storage.getInventoryIngredients endpoint. Requires a token and either storage_id or inventory_id. ```php 1, 'phone' => '+380680000000', 'products' => [ [ 'product_id' => 169, 'count' => 1 ], ], ]; $data = sendRequest($url, 'post', $incoming_order); ``` -------------------------------- ### Create a Product Without Modifications Source: https://dev.joinposter.com/en/docs/v3/web/menu/createProduct Use this example to create a basic product. Ensure the 'modifications' parameter is set to 0. ```php 'Пончик', 'menu_category_id' => 0, 'workshop' => 1, 'weight_flag' => 0, 'color' => 'red', 'different_spots_prices' => 0, 'modifications' => 0, 'barcode' => '4820098749621', 'cost' => 2000, 'price' => 3000, 'visible' => 1, ]; $data = sendRequest($url, 'post', $product); ``` ```json { "response":60 } ``` -------------------------------- ### Incoming Order with Promotions Response Example Source: https://dev.joinposter.com/en/docs/v3/web/incomingOrders/createIncomingOrder?id=incomingorderscreateincomingorder-response-parameters This is a sample response when an incoming order is created with promotions applied. ```json { "response":{ "incoming_order_id":"106", "type":"1", "spot_id":"1", "status":0, "client_id":0, "first_name":null, "last_name":null, "phone":null, "email":null, "sex":null, "birthday":null, "client_address_id": 5, "address":null, "comment":null, "created_at":"2017-12-06 18:45:06", "updated_at":"2017-12-06 18:45:06", "transaction_id":null, "fiscal_spreading":"0", "fiscal_method":"", "promotion":"[{"id":1,"involved_products":[{"id":139,"count":1}],"result_products":[{"id":161}]}]", "delivery_time": "0000-00-00 00:00:00", "products":[ { "io_product_id":"194", "product_id":"139", "modificator_id":null, "incoming_order_id":"106", "count":"1.00000", "created_at":"2017-12-06 18:45:06" } ] } } ``` -------------------------------- ### Get Ingredient Categories Request Example Source: https://dev.joinposter.com/en/docs/v3/web/menu/getCategoriesIngredients Example of how to make an HTTP GET request to the menu.getCategoriesIngredients endpoint. The `1c=true` parameter can be added to include the 1C system ID. ```php 'Sprite', 'menu_category_id' => 0, 'workshop' => 1, 'weight_flag' => 0, 'color' => 'red', 'different_spots_prices' => 0, 'modifications' => 1, 'modificator_name[0]' => '1 л.', 'modificator_name[1]' => '2 л.', 'barcode[0]' => '4820098749621', 'barcode[1]' => '4820098749622', 'product_code[0]' => '3412356', 'product_code[1]' => '3412357', 'cost[0]' => 700, 'cost[1]' => 1000, 'price[0]' => 1500, 'price[1]' => 2000, 'visible[0]' => 1, 'visible[1]' => 1, ]; $data = sendRequest($url, 'post', $product); ``` ```json { "response":61, "modifications_id":[ 1, 2 ] } ``` -------------------------------- ### Create a Customer with clients.createClient Source: https://dev.joinposter.com/en/docs/v3/web/clients/createClient Use this PHP example to send a POST request to create a new customer. Ensure you replace the placeholder token with your actual API token. The client array contains all the necessary customer details. ```php 'Fowler Amy Farrah', 'client_sex' => 2, 'client_groups_id_client' => 7, 'card_number' => '0000000000222', 'discount_per' => 0, 'phone' => '+380519911122', 'email' => 'contact@joinposter.com', 'birthday' => '1986-11-23', 'bonus' => 10, 'total_payed_sum' => 417000, ]; $data = sendRequest($url, 'post', $client); ``` -------------------------------- ### Get Transaction Products Request Example Source: https://dev.joinposter.com/en/docs/v3/web/dash/getTransactionsProducts Use this PHP example to construct a GET request to the dash.getTransactionsProducts endpoint, specifying the API token and a comma-separated list of transaction IDs. ```php 1, "products" => [ [ "product_id" => 139, "count" => 1 ] ], "promotion" => [ [ "id" => 1, "involved_products" => [ ["id" => 139, "count" => 1] ], "result_products" => [ ["id" => 161] ] ] ] ]; $data = sendRequest($url, 'post', $incoming_order); ``` -------------------------------- ### Get Employee List Request Example Source: https://dev.joinposter.com/en/docs/v3/web/access/getEmployees Example of how to make an HTTP GET request to the access.getEmployees endpoint to retrieve a list of employees. Ensure you replace 'YOUR_TOKEN' with your actual API token. ```php 'Fowler Amy Farrah', 'client_sex' => 2, 'client_groups_id_client' => 7, 'card_number' => '0000000000222', 'discount_per' => 0, 'phone' => '+380519911122', 'email' => 'contact@joinposter.com', 'birthday' => '1986-11-23', 'bonus' => 10, 'total_payed_sum' => 417000, ], [ 'client_name' => 'Cooper Sheldon Lee', 'client_sex' => 1, 'client_groups_id_client' => 7, 'card_number' => '0000000000223', 'discount_per' => 0, 'phone' => '+380519998877', 'email' => 'dev@joinposter.com', 'birthday' => '1990-06-15', 'bonus' => 10, 'total_payed_sum' => 570000, ] ]; $data = sendRequest($url, 'post', $client); ``` -------------------------------- ### PHP Request Example for Get Manufactures WriteOffs Source: https://dev.joinposter.com/en/docs/v3/web/storage/getManufacturesWriteOffs Example of how to construct and send a GET request to the storage.getManufacturesWriteOffs endpoint using PHP. Ensure the 'sendRequest' function is defined and handles API communication. ```php 'Маринованные грибы', 'ingredient' => [ [ 'id' => 88, 'type' => 1, 'brutto' => 3, 'netto' => 6, 'lock' => 0, 'clear' => 0, 'cook' => 0, 'fry' => 0, 'stew' => 1, 'bake' => 0, ], ], ]; $data = sendRequest($url, 'post', $prepack); ``` -------------------------------- ### Settings and Applications Source: https://dev.joinposter.com/en/docs/v3/web/webhooks?id=application Manage application installations and retrieve configuration settings. ```APIDOC ## Settings and Applications ### Description Manages application installations and retrieves configuration settings. ### Entities - **configs** (Settings) - **application** (App installation or removal) ``` -------------------------------- ### Get Incoming Orders Request Example Source: https://dev.joinposter.com/en/docs/v3/web/incomingOrders/getIncomingOrders Example of an HTTP GET request to fetch incoming orders. Ensure you replace 'YOUR_TOKEN' with your actual API token. The 'status', 'date_from', and 'date_to' parameters can be used for filtering. ```php [ "supplier_id" => "1", "storage_id" => "1", "date" => date("Y-m-d H:i:s"), "from_storage" => "1", "to_storage" => "2" ], "ingredient" => [ [ "id" => "138", "type" => "1", "num" => "3", "sum" => "6", ] ] ]; $data = sendRequest($url, 'post', $supply);Copy to clipboardErrorCopied ``` -------------------------------- ### Get Pack Response Example Source: https://dev.joinposter.com/en/docs/v3/web/storage/getPack Example JSON response structure for the storage.getPack method, showing the details of a retrieved pack. ```json { "response":{ "pack_id":"5", "name":"Milk bottle", "unit":"p", "count":"20.0000", "type":"1" } } ``` -------------------------------- ### Settings and Applications Source: https://dev.joinposter.com/en/docs/v3/web/webhooks?id=incoming_order-online-order-status Manage application installations and access general settings. ```APIDOC ## Settings and Applications ### Description Manage application installations and access general settings. ### Entities - **configs**: Settings - **application**: App installation or removal ``` -------------------------------- ### Get Cash Shift Transaction Request Example Source: https://dev.joinposter.com/en/docs/v3/web/finance/getCashShiftTransaction Use this example to make an HTTP GET request to retrieve cash shift transaction details. Ensure you replace 'YOUR_TOKEN' with your actual API token and 'SHIFT_ID' with the relevant shift ID. ```php $url = 'https://joinposter.com/api/finance.getCashShiftTransaction' . '?token=687409:4164553abf6a031302898da7800b59fb' . '&shift_id=333'; $data = sendRequest($url); ``` -------------------------------- ### Webhook Handling Example (PHP) Source: https://dev.joinposter.com/en/docs/v3/web/webhooks?id=webhook-parameters Example code demonstrating how to handle and verify incoming webhooks in PHP. ```APIDOC ### Webhook Handling Example (PHP) > Example of webhook handling: ```php 'accept']); ``` ``` -------------------------------- ### Response Example for menu.getProducts Source: https://dev.joinposter.com/en/docs/v3/web/menu/getProducts?id=http-request This JSON structure represents the data returned by the menu.getProducts endpoint, detailing product properties, pricing, and modifications. ```json { "response":[ { "barcode":"4820098749621", "category_name":"Вода", "unit":"", "cost":"100", "cost_netto":"83", "fiscal":"0", "menu_category_id":"15", "workshop":"1", "nodiscount":"0", "photo":"/upload/4/menu/product_1403094564_139.jpg", "photo_origin":"/upload/4/menu/product_1403094564_139_original.jpg", "product_code":"", "product_id":"139", "product_name":"Borjomi", "sort_order":"999", "tax_id":"0", "product_tax_id":"2", "type":"3", "weight_flag":"0", "color":"white", "ingredient_id":"9", "modifications":[ { "modificator_id":"147", "modificator_name":"Сок яблочный для кальяна ", "modificator_selfprice":"0", "modificator_selfprice_netto":"0", "order":"0", "modificator_barcode":"", "modificator_product_code":"", "spots":[ { "spot_id":"1", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"2", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"1", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"2", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" } ], "sources":[ { "id":"1", "name":"Easy Eats", "price":"18500", "visible":"1" }, { "id":"2", "name":"Sonic Eats", "price":"20500", "visible":"1" } ], "ingredient_id":"0" } ], "out":0 }, { "barcode":"", "category_name":"Вода", "unit":"", "cost":"654", "cost_netto":"545", "fiscal":"0", "menu_category_id":"15", "workshop":"3", "nodiscount":"0", "photo":"/upload/4/menu/product_1403094497_138.jpg", "photo_origin":"/upload/4/menu/product_1403094497_138_original.jpg", "product_code":"", "product_id":"138", "product_name":"Evian", "sort_order":"999", "tax_id":"0", "product_tax_id":"0", "type":"3", "weight_flag":"0", "color":"white", "spots":[ { "spot_id":"1", "price":"19000", "profit":"18346", "profit_netto":"15288", "visible":"1" }, { "spot_id":"2", "price":"19000", "profit":"18346", "profit_netto":"15288", "visible":"1" } ], "sources":[ { "id":"1", "name":"Easy Eats", "price":"18500", "visible":"1" }, { "id":"2", "name":"Sonic Eats", "price":"20500", "visible":"1" } ], "ingredient_id":"8", "cooking_time": "0", "out":0 }, { "barcode":"", "category_name":"Top screen", "unit":"kg", "cost":"0", "cost_netto":"0", "fiscal":"0", "hidden":"0", "menu_category_id":"0", "workshop":"1", "nodiscount":"0", "photo":"", "photo_origin":null, "price":{ "1":"30000", "2":"30000" }, "product_code":"", "product_id":"30", "product_name":"Set menu", "profit":{ "1":"30000", "2":"30000" }, "sort_order":"999", "tax_id":"0", ``` -------------------------------- ### Get Table List Response Example Source: https://dev.joinposter.com/en/docs/v3/web/spots/getTableHallTables Example JSON response structure for the spots.getTableHallTables API call, showing details of tables. ```json { "response":[ { "table_id":"3", "table_num":"1", "table_title":"Table 1", "spot_id":"1", "table_shape":"square", "hall_id":"1", "table_x":"9", "table_y":"12", "table_height":"4", "table_width":"8", "is_deleted":"0" }, { "table_id":"4", "table_num":"2", "table_title":"Table 2", "spot_id":"1", "table_shape":"circle", "hall_id":"1", "table_x":"15", "table_y":"11", "table_height":"10", "table_width":"13", "is_deleted":"0" } ] } ``` -------------------------------- ### JSON Response Example for menu.getPrepack Source: https://dev.joinposter.com/en/docs/v3/web/menu/getPrepack Example JSON response from the menu.getPrepack API, showing the structure of semi-finished product properties, including ingredients and their details. ```json { "response":{ "product_id":"167", "ingredient_id":"0", "product_name":"Куринный бульон", "cost":"1222", "cost_netto":"1018", "out":171, "product_production_description":"", "id_1c":"0", "ingredients":[ { "structure_id":"45", "ingredient_id":"88", "pr_in_clear":"0", "pr_in_cook":"1", "pr_in_fry":"0", "pr_in_stew":"0", "pr_in_bake":"0", "structure_unit":"kg", "structure_type":"1", "structure_brutto":200, "structure_netto":170, "structure_lock":"1", "structure_selfprice":"1221", "structure_selfprice_netto":"1018", "ingredient_name":"Куриные крылья", "ingredient_unit":"kg", "ingredient_weight":"0", "ingredients_losses_clear":"0", "ingredients_losses_cook":"15", "ingredients_losses_fry":"16", "ingredients_losses_stew":"16", "ingredients_losses_bake":"16" }, { "structure_id":"46", "ingredient_id":"89", "pr_in_clear":"0", "pr_in_cook":"0", "pr_in_fry":"0", "pr_in_stew":"0", "pr_in_bake":"0", "structure_unit":"kg", "structure_type":"1", "structure_brutto":1, "structure_netto":1, "structure_lock":"1", "structure_selfprice":"1", "structure_selfprice_netto":"1", "ingredient_name":"Соль", "ingredient_unit":"kg", "ingredient_weight":"0", "ingredients_losses_clear":"0", "ingredients_losses_cook":"0", "ingredients_losses_fry":"0", "ingredients_losses_stew":"0", "ingredients_losses_bake":"0" } ] } } ``` -------------------------------- ### Get Tax Properties Response Example Source: https://dev.joinposter.com/en/docs/v3/web/finance/getTax Example JSON response from the finance.getTax API method, detailing the properties of a specific tax. ```json { "response":{ "tax_id":3, "country":"UA", "tax_name":"Налог с оборота", "tax_value":5, "type":2, "fiscal":1, "fiscal_program":0, "fixed":0, "delete":0 } } ``` -------------------------------- ### Response Example for menu.getProducts Source: https://dev.joinposter.com/en/docs/v3/web/menu/getProducts?id=menugetproducts-list-of-products-and-dishes This is a sample JSON response for the menu.getProducts endpoint, illustrating the structure of product data, including details like barcode, name, cost, and modifications. ```json { "response":[ { "barcode":"4820098749621", "category_name":"Вода", "unit":"", "cost":"100", "cost_netto":"83", "fiscal":"0", "menu_category_id":"15", "workshop":"1", "nodiscount":"0", "photo":"/upload/4/menu/product_1403094564_139.jpg", "photo_origin":"/upload/4/menu/product_1403094564_139_original.jpg", "product_code":"", "product_id":"139", "product_name":"Borjomi", "sort_order":"999", "tax_id":"0", "product_tax_id":"2", "type":"3", "weight_flag":"0", "color":"white", "ingredient_id":"9", "modifications":[ { "modificator_id":"147", "modificator_name":"Сок яблочный для кальяна ", "modificator_selfprice":"0", "modificator_selfprice_netto":"0", "order":"0", "modificator_barcode":"", "modificator_product_code":"", "spots":[ { "spot_id":"1", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"2", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"1", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" }, { "spot_id":"2", "price":"68100", "profit":"68100", "profit_netto":"56750", "visible":"1" } ], "sources":[ { "id":"1", "name":"Easy Eats", "price":"18500", "visible":"1" }, { "id":"2", "name":"Sonic Eats", "price":"20500", "visible":"1" } ], "ingredient_id":"0" } ], "out":0 }, { "barcode":"", "category_name":"Вода", "unit":"", "cost":"654", "cost_netto":"545", "fiscal":"0", "menu_category_id":"15", "workshop":"3", "nodiscount":"0", "photo":"/upload/4/menu/product_1403094497_138.jpg", "photo_origin":"/upload/4/menu/product_1403094497_138_original.jpg", "product_code":"", "product_id":"138", "product_name":"Evian", "sort_order":"999", "tax_id":"0", "product_tax_id":"0", "type":"3", "weight_flag":"0", "color":"white", "spots":[ { "spot_id":"1", "price":"19000", "profit":"18346", "profit_netto":"15288", "visible":"1" }, { "spot_id":"2", "price":"19000", "profit":"18346", "profit_netto":"15288", "visible":"1" } ], "sources":[ { "id":"1", "name":"Easy Eats", "price":"18500", "visible":"1" }, { "id":"2", "name":"Sonic Eats", "price":"20500", "visible":"1" } ], "ingredient_id":"8", "cooking_time": "0", "out":0 }, { "barcode":"", "category_name":"Top screen", "unit":"kg", "cost":"0", "cost_netto":"0", "fiscal":"0", "hidden":"0", "menu_category_id":"0", "workshop":"1", "nodiscount":"0", "photo":"", "photo_origin":null, "price":{ "1":"30000", "2":"30000" }, "product_code":"", "product_id":"30", "product_name":"Set menu", "profit":{ "1":"30000", "2":"30000" }, "sort_order":"999", "tax_id":"0", } ```