NAV Navbar
PHP

Introduction

You can create any applications on the Poster platform, for example:

Platform Functionality

Getting started

If you write an application for yourself only or explore the platform, use a Personal Integration token in your account in the Access → Integrations section.

If you write an application for Poster customers, you need to create a Poster app. Poster app is a Poster application profile. You will use it to work in the system through and will be able to publish and sell your application in our directory.

Creating an Application

To create an application, write to the customer support sending the following information:

  1. Short description and purpose of the application
  2. The functionality of the platform you will use Working with API, an application on the POS register or in the management console
  3. The name of the account you will test under If there is no account, create it.

After the moderation, we will add your application to the system and issue confidential data:

Creating an Application

  1. Sign up for a new developer account or login to existing one
  2. Go to Account → Create Application page, fill out new application name, category and description and press Создать
  3. On Development page you will see accounts who has access to your application
  4. You will find your application_id and application_secret on Settings page

Sending requests

Example of request:

<?php
function sendRequest($url, $type = 'get', $params = [], $json = false)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

    if ($type == 'post' || $type == 'put') {
        curl_setopt($ch, CURLOPT_POST, true);

        if ($json) {
            $params = json_encode($params);

            curl_setopt($ch, CURLOPT_HTTPHEADER, [
                'Content-Type: application/json',
                'Content-Length: ' . strlen($params)
            ]);

            curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
        } else {
            curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
        }
    }

    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Poster (http://joinposter.com)');

    $data = curl_exec($ch);
    curl_close($ch);

    return $data;
}

$url = 'https://joinposter.com/api/clients.getGroup' 
    . '?format=json'
    . '&token=687409:4164553abf6a031302898da7800b59fb'
    . '&group_id=1';

$group = sendRequest($url);

Example of response:

{
   "response":{
      "client_groups_id":"1",
      "client_groups_name":"Favourite customer",
      "loyalty_type":"1",
      "client_groups_discount":"10",
      "birthday_bonus":"5000",
      "count_groups_clients":"125"
   }
}

Example of error:

{
   "error":{
      "code":11,
      "message":"Bad access token"
   }
}

Data is exchanged with Poster using GET or POST https requests

General address format for all https requests

https://joinposter.com/api/{method}?format={format}&token={token}&param1=val1&param2=val2

Address parameters for all https requests

Parameter Description
method The name of the API method, for example, clients.getGroups
token Authorization token. To receive this token you will have to implement authorization process.
format An optional parameter indicating the response format. It can be xml or json. The default format is json.
param, val Extra parameter names and values, this parameters are individual for

The response comes in the specified format and contains a top-level error or response object. The error object is specified with code and message parameters. You can find a list of error descriptions in a table.

Authorization in API

To authorize applications, an OAuth2 protocol is used. As a result of authorization, the application gets an access_token to make API requests with.

Step 1

Go from the app to the Poster website at URL:

https://joinposter.com/api/auth?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code

If you know the account login, use:

https://{account}.joinposter.com/api/auth?application_id={application_id}&redirect_uri={redirect_uri}&response_type=code

Parameter Value
application_id Application Id in the Poster system. You can find it your developer account.
redirect_uri The application address to go back to from the Poster system after the first authorization step. This address must match exactly the one specified in the application settings in the Poster system.
response_type A line with a code value

Step 2

After switching to one of the above addresses, the user logs in. He then confirms that he agrees to the transmission of certain data to the application.

After confirming the application access to account data, the user will be redirected back to the application at: redirect_uri?code=code&account=account

Parameter Value
code 32-character code used to authenticate the application at the last authorization step
account Location login in the Poster system to use to send all the subsequent requests to the Poster API.

Step 3

Request example for authorization:

<?php
$url = 'https://joinposter.com/api/v2/auth/access_token'; 

$auth = [
    'application_id'        => 76,
    'application_secret'    => '9642176a5cdfe3f65e6e00c27b668795',
    'grant_type'            => 'authorization_code',
    'redirect_uri'          => 'http://localhost:8080/',
    'code'                  => '3e4f2ac6df7fa92660fa251528460575'
];

$data = sendRequest($url, 'post', $auth);

Example of a response on successful authorization

{
   "access_token":"861052:02391570ff9af128e93c5a771055ba88",
   "account_number":"861052",
   "user":{
      "id":4,
      "name":"Poster",
      "email":"dev@joinposter.com",
      "role_id":3
   },
   "ownerInfo":{
      "email":"dev@joinposter.com",
      "phone":"+380684152664",
      "city":"",
      "country":"RU",
      "name":"Poster",
      "company_name":"dev-example"
   },
   "tariff":{
      "key":"pricing-plan-1",
      "next_pay_date":"2018-05-31 11:52:41",
      "price":2
   }
}

The last authorization step is getting an access_token. To get it, the application must send a POST request to the following address:https://{account}.joinposter.com/api/v2/auth/access_token

In which an account is the location login in the Poster system, received from Poster during the reverse redirect.

POST parameters of the /api/v2/auth/access_token request

Parameter Value
application_id Application Id in the Poster system. You can find it in developer account → application settings.
application_secret Application secret code issued at registration. You can find it in developer account → application settings.
code 32-character code you received at Step 2 of the authorization
grant_type A line with an authorization_code value
redirect_uri The address the user will be redirected to after the authorization. This address must match exactly the one specified in the application settings in the Poster system.

Successful response parameters:

Parameter Value
access_token The one and only token that opens access to API
account_number Unique account identifier in Poster system
user An object with info about the user who installed app
ownerInfo Object with information about account owner of the Poster account
tariff The object with information about the connected tariff. Dispatched if the application is tied to Poster billing.

An user object contains the following parameters:

Parameter Description
id The employee ID in Poster. This employee has authorized application installation.
name The employee name in Poster
email The employee’s email address
role_id The employee’s position in a venue. Account owner has role_id=3.

An ownerInfo object contains the following parameters

Parameter Value
email The owners’s email address
phone The owners’s phone
city City
country Two letter country code in the ISO 3166 format.
name The owners’s name
company_name Location name

A tariff object contains the following parameters

Parameter Value
key Unique tariff key
date_trial Total amount of trial days
next_pay_date Date to which the application is paid in Y-m-d H:i:s format
price Tariff price in USD
name Tariff name

Failed response parameters:

Параметр Значение
code Error code, description of all error codes are listed in the table
error_type Type of error
error_message Human readable error message

Authorization in the management console

Verify example:

<?php
$url = "https://joinposter.com/api/v2/auth/manage";

$auth = [
    'application_id'        => 41, 
    'application_secret'    => '123123', 
    'code'                  => '74367937cf906c097931a3888adf7a84',
];
$auth['verify'] = md5(implode(':', $auth));

$data = sendRequest($url, 'post', $auth);

Response to a successful request processing:

{
   "access_token":"861052:02391570ff9af128e93c5a771055ba88",
   "account_number":"861052",
   "user":{
      "id":4,
      "name":"Poster",
      "email":"dev@joinposter.com",
      "role_id":3
   },
   "ownerInfo":{
      "email":"dev@joinposter.com",
      "phone":"+380684152664",
      "city":"",
      "country":"RU",
      "name":"Poster",
      "company_name":"dev-example"
   },
   "tariff":{
      "key":"pricing-plan-1",
      "next_pay_date":"2018-05-31 11:52:41",
      "price":2
   }
}

Errors examples:

{
  "error":34,
  "message":"Fieild client_id is required", 
  "field": "application_id"
}
{
  "error":143,
  "message":"Requested code's application doesn't exist", 
  "field":"application_id"
}
{
  "error":142,
  "message":"Verify code is not correct", 
  "field": "verify"
}

To add the application to the management console, you should have it registered in the Poster system. In addition to the customary parameters that any application has, specify the address of the web application page that will be opened in the iframe window, for example, http://example.com/

window.addEventListener('load', function () { top.postMessage({hideSpinner: true}, '*') }, false);

After the iframe loads, an authorization code is generated and added to the page address, for example:

http://example.com/?code={code}

To receive account information, you must send an HTTP request:

POST https://joinposter.com/api/v2/auth/manage

POST parameters of the request: /api/v2/auth/manage

Parameter Description
application_id Application Id in the Poster system. You can find it in developer account → application settings.
application_secret Application secret code issued at registration. You can find it in developer account → application settings.
code 32-character code you received at previous step of the authorization
verify md5 from the concatenated client_id, client_secret, and code, with a colon delimiter

Successful response parameters:

Parameter Value
access_token The one and only token that opens access to API
account_number Unique account identifier in Poster system
user An object with info about the user who installed app
ownerInfo Object with information about account owner of the Poster account
tariff The object with information about the connected tariff. Dispatched if the application is tied to Poster billing.

An user object contains the following parameters:

Parameter Description
id The employee ID in Poster. This employee has authorized application installation.
name The employee name in Poster
email The employee’s email address
role_id The employee’s position in a venue. Account owner has role_id=3.

An ownerInfo object contains the following parameters

Parameter Value
email The owners’s email address
phone The owners’s phone
city City
country Two letter country code in the ISO 3166 format.
name The owners’s name
company_name Location name

A tariff object contains the following parameters

Parameter Value
key Unique tariff key
date_trial Total amount of trial days
next_pay_date Date to which the application is paid in Y-m-d H:i:s format
price Tariff price in USD
name Tariff name

Failed response parameters:

Параметр Значение
code Error code, description of all error codes are listed in the table
error_type Type of error
error_message Human readable error message

Application directory

We collect the best applications in our directory in the management console and on the website. Any developer can write an integration and publish it for all Poster customers.

How to get to the management console directory

Send:

  1. Application name
  2. Short description up to six words
  3. A logo sized 512 x 512 px , with an opaque background (iOS style)
  4. Application description. It can contain such tags as h, p, div, b, ul, i.
  5. The application screenshots, with no drop shadows. If the application is inside the Poster interface, the screenshot should include the entire page.
  6. Instructions for using the application
  7. The developer contacts, such as phone number and email

How to get to the directory on the website

Unlike the application page in the management console, the website has a header with a slogan and description. For the publication send:

  1. The slogan of your service.
  2. Short description. Tell us how useful your service is to the owner of a restaurant or cafe.
  3. Gradient or image for the header background.

Testing

Before publishing, we test the application for functionality. If you need to log in to an external service for testing, send us your login and password.

Webhooks

Webhooks allow you to get instant information about an object update in Poster. For example, when a new product was added to the Products or a check was rung up.

Setup

  1. Go to yours developer account → Application Settings pages
  2. In Webhooks section select entities for which you want receive webhooks and URL
  3. Connect your application in Marketplace for those accounts from which you want to receive webhooks
  4. Create, delete or modify an entity for which you want to receive webhook

Parameters inside a webhook

Example of incoming webhook:

{
  "account":"api-demo",
  "account_number":"203941",
  "object":"transaction",
  "object_id":1,
  "action":"added",
  "time":"1518794257",
  "verify":"a23sk3d9123ka31sd3k5asd9123sad93"
}

Example of webhook processing:

<?php
// Your application_secret
$client_secret = 'fe2bc8e865d8fc2236968ee53c3b2bd5';

// Transform all incoming data to JSON
$postJSON = file_get_contents('php://input');
$postData = json_decode($postJSON, true);

$verify_original = $postData['verify'];
unset($postData['verify']);

$verify = [
    $postData['account'],
    $postData['object'],
    $postData['object_id'],
    $postData['action'],
];

// Check for additional data
if (isset($postData['data'])) {
    $verify[] = $postData['data'];
}
$verify[] = $postData['time'];
$verify[] = $client_secret;

// Check for data verification
$verify = md5(implode(';', $verify));
if ($verify != $verify_original) {
    exit;
}

// Sending response back to Poster. Otherwise Poster will attempt send webhook for 15 times
echo json_encode(['status' => 'accept']);

All notifications are coming as a POST request with a body containing the following parameters:

Parameter Description
account The account of a customer who has created an event
account The account of a customer who has created an event
object Entity type
object_id Object primary key
action The action performed on the entity: added — added, changed — updated, removed — removed, transformed — transformation (of a dish, for instance, to a product and vice versa)
time The sending time of a webhook to Unix timestamp
verify A request signature that consists of md5 of account, object, object_id, action, data (if transmitted), and secret connected through ;
data An additional parameter for some entities

Orders

Entity Description
transaction Orders
incoming_order Online orders and reservations

incoming_order

The changed event activates when the order status updates from new to applied or rejected.

Entity Description
product Product
dish Dish
category Product and dish categories
prepack Preparations
ingredient Ingredient
workshop Station
ingredients_category Ingredient category

Marketing

Entity Description
client Customer
client_payed_sum Order closed with a client
clients_group Customer group
promotion Promotion
promotion_prize Accumulation of promo points

Inventory

Entity Description
storage Storages
stock The condition of a product or ingredient in storage

stock: The condition of a product or ingredient in storage

The hook body brings an additional data parameter which contains the following parameters:

Parameter Description
type The type which takes the value: 1—a valid ingredient, 2—a product, 3—a modifier, 4—a manufactured dish, 5—a manufactured semi-finished product
element_id Object primary key
storage_id Storage object primary key
value_relative Updating the number of items in storage
value_absolute The final value of the number of items in storage

Finance

Entity Description
book_transaction Financial transaction
cash_shift_transaction Cash shift transactions

Application and settings

Entity Description
configs Settings
application Application

application: Application state

The hook body brings an additional data parameter which contains the following parameters:

Parameter Description
user_id ID of an employee who has installed the application
access_token Access token to work with API. Returned if actionadded.

dash: Reports

Methods for working with the Reports section. All methods of this section begin with “dash.”

dash.getAnalytics: Sales Reports

Request example:

<?php

$url = 'https://joinposter.com/api/dash.getAnalytics' 
    . '?format=json'
    . '&token=687409:4164553abf6a031302898da7800b59fb'
    . '&dateFrom=20171009'
    . '&dateTo=20171012'
    . '&interpolate=week'
    . '&type=waiters';

$data = sendRequest($url);

Response example:

{
  "response":{
    "data":[
      "169255.7100",
      "160327.7300",
      "48259.0100",
      "1470.0000"
    ],
    "data_hourly":[
      "36520.2400",
      "17785.4500",
      "19163.5600",
      "12688.5200",
      0,
      0,
      0,
      0,
      "13747.4500",
      "19465.3900",
      "8701.5900",
      "12727.5300",
      "12029.0000",
      "18482.3600",
      "18391.7200",
      "25149.2900",
      "23136.1600",
      "15255.1100",
      "14300.2800",
      "17448.0000",
      "28419.3000",
      "23969.5500",
      "19392.5800",
      "22539.3700"
    ],
    "data_weekday":[
      0,
      "169255.7100",
      "160327.7300",
      "48259.0100",
      "1470.0000",
      0,
      0
    ],
    "counters":{
      "revenue":"379312.4500",
      "profit":"315131.6900",
      "transactions":"248",
      "visitors":"744",
      "average_receipt":1535.6779352227,
      "average_time":"125.76268347"
    }
  }
}
<?php

$url = 'https://joinposter.com/api/dash.getAnalytics'
    . '?format=json'
    . '&token=687409:4164553abf6a031302898da7800b59fb'
    . '&dateFrom=20171009'
    . '&dateTo=20171012'
    . '&interpolate=week'
    . '&type=waiters';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "user_id":"2",
      "name":"Максим",
      "sum":"5248550",
      "profit":"4505024",
      "revenue":"5522290",
      "clients":"42",
      "middle_time":"1871214.0370"
    },
    {
      "user_id":"6",
      "name":"Антон",
      "sum":"5873540",
      "profit":"5187174",
      "revenue":"6234086",
      "clients":"42",
      "middle_time":"3.2910"
    }
  ]
}

The method returns the sales reports

HTTP request

GET https://joinposter.com/api/dash.getAnalytics

GET parameters of the dash.getAnalytics request

Parameter Description
dateFrom An optional parameter, the period start date in the Ymd format. If it is not specified, all sales for the last thirty days from dateTo will be displayed.
dateTo An optional parameter, the period end date in the Ymd format. The default date is current.
interpolate An optional parameter, an output by days—day, weeks—week, months—month. By default, it’s day.
select An optional parameter, sampling types: revenue—revenue, profit—profit, an average check—average_receipt, orders count—transactions, customer count—visitors, average time—average_time. By default, it’s revenue.
type An optional parameter, type of reports: by waiter—waiters, station—workshops, category—category, product—products, location—spots, customer—clients. The default value is All.
id An optional parameter, an ID of the entity by which the sampling will return, for example, an ID of a waiter, a station, a category, a product, a location, a customer. The default value is All.
business_day If it is true, the sales reports will be returned by the business day the dateFrom time fits into. The default value is false.

The response format depends on the value of the type parameter.

Parameters of the dash.getAnalytics response if the type is waiters

Inside the response parameter, there is an array with objects. Each object contains such parameters as:

Parameter Description
user_id Employee ID
name Employee name
sum The amount of all products for orders for the current waiter in hryvnias
profit Total revenue by bills
revenue The amount of bills paid
clients Сlosed orders count
middle_time Average order service time

Dash.getAnalytics response parameters if the type is clients

Inside the response parameter, there is an array with objects. Each object contains such parameters as:

Parameter Description
client_id Customer ID
firstname Customer first name
lastname Customer last name
sum The amount of all products in each order in kopecks
profit Total revenue by bills
revenue The actual amount of bills paid in kopecks
payed_cash The amount paid by cash
payed_card The amount paid by credit cards
payed_third_party The total amount of payments via external services
clients Сlosed orders count
phone Customer phone number
email Email

Dash.getAnalytics response parameters if type is workshops, category, products, spots

Inside the response parameter, there is an object with the following parameters:

Parameter Description
data The sales amounts array grouped according to the interpolate and type parameters
data_hourly The values array structured by hours. The amount in hryvnias.
data_weekday The sales amounts array structured by days of the week. The amount in hryvnias.
counters Counters of key indicators for a given period. The amount in hryvnias.
transaction_id Transaction ID.

Inside the counters parameter, there is an object with the following parameters:

Parameter Description
revenue Revenues in hryvnias
profit Profit in hryvnias
transactions Check count
visitors Seat count
average_receipt An average check in hryvnias
average_time Average check closure time in minutes

dash.getTransaction: Transaction Receiving

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&transaction_id=330660'
 . '&include_history=true'
 . '&include_products=true';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "transaction_id":"330660",
         "date_start":"1518873040083",
         "date_start_new":"1518873041556",
         "date_close":"1518873046314",
         "status":"2",
         "guests_count":"2",
         "discount":"0",
         "bonus":"0",
         "pay_type":"3",
         "payed_bonus":"0",
         "payed_card":"0",
         "payed_cash":"2750",
         "payed_sum":"2750",
         "payed_cert":"0",
         "payed_third_party":"0",
         "round_sum":"0",
         "tip_sum":"0",
         "sum":"2750",
         "spot_id":"1",
         "table_id":"94",
         "name":"Анна",
         "user_id":"1",
         "client_id":"0",
         "card_number":"0",
         "transaction_comment":null,
         "reason":"",
         "print_fiscal":"0",
         "total_profit":"-8786",
         "table_name":"5",
         "client_firstname":null,
         "client_lastname":null,
         "date_close_date":"2018-02-17 16:10:46",
         "products":[
            {
               "product_id":"162",
               "modification_id":"0",
               "num":"1",
               "product_price":"1050",
               "payed_sum":"1050",
               "product_cost":"4536",
               "product_profit":"-3486"
            },
            {
               "product_id":"161",
               "modification_id":"0",
               "num":"1",
               "product_price":"1700",
               "payed_sum":"1700",
               "product_cost":"7000",
               "product_profit":"-5300"
            }
         ],
         "history":[
            {
               "history_id":"2485357",
               "type_history":"open",
               "spot_tablet_id":"1",
               "time":"1518873040083",
               "user_id":"1",
               "value":"1",
               "value2":"94",
               "value3":"2",
               "value4":"0",
               "value5":"0",
               "value_text":null
            },
            {
               "history_id":"2485358",
               "type_history":"additem",
               "spot_tablet_id":"1",
               "time":"1518873041556",
               "user_id":"1",
               "value":"162",
               "value2":"0",
               "value3":"0",
               "value4":"0",
               "value5":"0",
               "value_text":{
                  "price":10.5
               }
            },
            {
               "history_id":"2485359",
               "type_history":"additem",
               "spot_tablet_id":"1",
               "time":"1518873042008",
               "user_id":"1",
               "value":"161",
               "value2":"0",
               "value3":"0",
               "value4":"0",
               "value5":"0",
               "value_text":{
                  "price":17
               }
            },
            {
               "history_id":"2485360",
               "type_history":"close",
               "spot_tablet_id":"1",
               "time":"1518873046314",
               "user_id":"1",
               "value":"3",
               "value2":"2750",
               "value3":"0",
               "value4":"0",
               "value5":"0",
               "value_text":{
                  "payments":{
                     "cash":27.5
                  }
               }
            }
         ]
      }
   ]
}

The method returns a list with one transaction

HTTP request

GET https://joinposter.com/api/dash.getTransaction

GET parameters of the dash.getTransaction request

Parameter Description
transaction_id A mandatory parameter, an order number to return information to
include_products The status of including products in transactions in response: true—to include, false—not to
include_history The status of including a transaction history in response, true—to include, false—not to
timezone An optional parameter; if it equals client, the date is returned in the account time zone.
type Reports type: waiters—by waiter, spots—by location, clients—by customer. When using, be sure to specify id.
id The ID of the entity to receive reports to; if not specified, transactions for all reports types will be displayed. When using, be sure to specify the type.
status Transaction status: 0—all transactions, 1—only the open ones, 2—only the closed ones, 3—the removed ones

Dash.getTransaction response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
date_start The order opening date in the unixtimestamp format
date_close The order closing date in the unixtimestamp format, 0—if the order is still open
status Order status: 1—open, 2—closed, 3—removed
guests_count Seat count
name Waiter’s name
discount Percentage minus
bonus An accrued point as a percentage of payed_sum
pay_type Payment type: 0—closed without payment (the cause is in reason), 1—cash payment, 2—card payment, 3—mixed payment
payed_bonus The amount paid by points in cents
payed_card The amount paid by credit card in cents
payed_cash The amount paid in cash in cents
payed_sum The amount paid by hard cash which is equal to the payed_cash amount plus payed_card
payed_third_party The amount paid by third-party in cents
round_sum Receipt rounding amount in cents
sum Total order amount, without discounts, in cents
spot_id Location ID
table_id Table ID
user_id Waiter ID
client_id Customer ID
transaction_comment Order comment
reason Reason for closing the bill without payment: 1—the customer has left, 2—on the house, 3—a waiter’s error
print_fiscal The status of printing a fiscal receipt: 0 — have not printed, 1 — have printed, 2 — fiscal return
total_profit Profit amount
table_name Table name
client_firstname Customer first name
client_lastname Customer last name
products Product array in an order
history History of order operations. Contains an array of objects; see the dash.getTransactionHistory method for a description of the object parameters

Inside the products parameter, there is an array of objects, each with the following parameters inside:

Parameter Description
product_id Product ID
modification_id Modification ID
product_price Product cost
num Product count in an order
payed_sum The amount paid
product_cost Product food cost in cents
product_profit Product profit in cents

dash.getTransactions: Transaction List

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&dateFrom=20170905'
 . '&dateTo=20170908';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "transaction_id":"384960",
      "date_start":"1504641602936",
      "date_start_new":"1504641602941",
      "date_close":"1504641603008",
      "status":"2",
      "guests_count":"4",
      "discount":"0",
      "bonus":"0",
      "pay_type":"3",
      "payed_bonus":"0",
      "payed_card":"0",
      "payed_cash":"199140",
      "payed_sum":"199140",
      "payed_cert":"0",
      "tip_sum":"0",
      "sum":"180600",
      "spot_id":"1",
      "table_id":"90",
      "name":"Demo",
      "user_id":"1",
      "client_id":"0",
      "card_number":"0",
      "transaction_comment":null,
      "reason":"",
      "print_fiscal":"0",
      "total_profit":"172828",
      "table_name":"1",
      "client_firstname":null,
      "client_lastname":null,
      "date_close_date":"2017-09-05 23:00:03"
    },
    {
      "transaction_id":"384956",
      "date_start":"1504641601797",
      "date_start_new":"1504641601809",
      "date_close":"1504641601850",
      "status":"2",
      "guests_count":"5",
      "discount":"0",
      "bonus":"0",
      "pay_type":"3",
      "payed_bonus":"0",
      "payed_card":"0",
      "payed_cash":"117000",
      "payed_sum":"117000",
      "payed_cert":"0",
      "tip_sum":"0",
      "sum":"117000",
      "spot_id":"1",
      "table_id":"91",
      "name":"Максим",
      "user_id":"2",
      "client_id":"0",
      "card_number":"0",
      "transaction_comment":null,
      "reason":"",
      "print_fiscal":"0",
      "total_profit":"113487",
      "table_name":"2",
      "client_firstname":null,
      "client_lastname":null,
      "date_close_date":"2017-09-05 23:00:02"
    }
  ]
}

The method returns a list of transactions

HTTP request

GET https://joinposter.com/api/dash.getTransactions

GET parameters of the dash.getTransactions request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
type Reports type: waiters—by waiter, spots—by location, clients—by customer. When using, be sure to specify id.
id The ID of the entity to receive reports to; if not specified, transactions for all reports types will be displayed. When using, be sure to specify the type.
status Transaction status: 0—all transactions, 1—only the open ones, 2—only the closed ones, 3—the removed ones
include_products The status of including products in transactions in response: true—to include, false—not to
include_history The status of including a transaction history in response, true—to include, false—not to
next_tr The ID of the transaction to be followed by getting a transaction list
after_date_close Transactions after the closing date in the unixtimestamp format
before_date_close Transactions before the closing date in the unixtimestamp format
timezone An optional parameter; if it equals client, the date is returned in the account time zone.

dash.getTransactions response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
date_start The order opening date in the unixtimestamp format
date_close The order closing date in the unixtimestamp format, 0—if the order is still open
status Order status: 1—open, 2—closed, 3—removed
guests_count Seat count
name Waiter’s name
discount Percentage minus
bonus An accrued point as a percentage of payed_sum
pay_type Payment type: 0—closed without payment (the cause is in reason), 1—cash payment, 2—card payment, 3—mixed payment
payed_bonus The amount paid by points in kopecks
payed_card The amount paid by credit card in kopecks
payed_cash The amount paid in cash in kopecks
payed_sum The amount paid by hard cash which is equal to the payed_cash amount plus payed_card
sum Total order amount, without discounts, in kopecks
spot_id Location ID
table_id Table ID
user_id Waiter ID
client_id Customer ID
transaction_comment Order comment
reason Reason for closing the bill without payment: 1—the customer has left, 2—on the house, 3—a waiter’s error
print_fiscal The status of printing a fiscal receipt: 0 — have not printed, 1 — have printed, 2 — fiscal return
total_profit Profit amount
table_name Table name
client_firstname Customer first name
client_lastname Customer last name
products Product array in an order
history History of order operations. Contains an array of objects; see the dash.getTransactionHistory method for a description of the object parameters

Inside the products parameter, there is an array of objects, each with the following parameters inside:

Parameter Description
product_id Product ID
modification_id Modification ID
product_price Product cost
num Product count in an order
payed_sum The amount paid
product_cost Product food cost in kopecks
product_profit Product profit in kopecks

dash.getTransactionProducts: List of Transaction Products

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getTransactionProducts'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&transaction_id=388678';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "product_id":"908",
      "product_name":"Пицца сборная",
      "modification_id":"68",
      "modificator_name":"Сыр, Грибы, Ох. колбаски, Оливки, Средняя Ø35см",
      "modificator_barcode":"",
      "modificator_product_code":"",
      "weight_flag":"0",
      "num":"1",
      "time":"1507703516999",
      "workshop":"2",
      "barcode":"",
      "product_code":"",
      "tax_id":"4",
      "nodiscount":"1",
      "payed_sum":"45000",
      "product_sum":"45000",
      "discount":"0",
      "bonus_sum":"0",
      "round_sum":0,
      "client_id":"0",
      "promotion_id":"0",
      "cert_sum":"0",
      "product_cost":"43",
      "product_profit":"42707",
      "bonus_accrual":"0",
      "tax_value":"5",
      "tax_type":"2",
      "tax_fiscal":"1",
      "category_id":"33"
    },
    {
      "product_id":"169",
      "product_name":"Речная форель в фольге",
      "modification_id":"0",
      "modificator_name":null,
      "modificator_barcode":null,
      "modificator_product_code":null,
      "weight_flag":"0",
      "num":"1",
      "time":"1507703509384",
      "workshop":"2",
      "barcode":"",
      "product_code":"",
      "tax_id":"4",
      "nodiscount":"1",
      "payed_sum":"55000",
      "product_sum":"55000",
      "discount":"0",
      "bonus_sum":"0",
      "round_sum":0,
      "client_id":"0",
      "promotion_id":"0",
      "cert_sum":"0",
      "product_cost":"4340",
      "product_profit":"47910",
      "bonus_accrual":"0",
      "tax_value":"5",
      "tax_type":"2",
      "tax_fiscal":"1",
      "category_id":"33"
    },
    {
      "product_id":"168",
      "product_name":"Стейк из сёмги",
      "modification_id":"0",
      "modificator_name":null,
      "modificator_barcode":null,
      "modificator_product_code":null,
      "weight_flag":"0",
      "num":"1",
      "time":"1507703508927",
      "workshop":"2",
      "barcode":"",
      "product_code":"",
      "tax_id":"4",
      "nodiscount":"1",
      "payed_sum":"45000",
      "product_sum":"45000",
      "discount":"0",
      "bonus_sum":"0",
      "round_sum":0,
      "client_id":"0",
      "promotion_id":"0",
      "cert_sum":"0",
      "product_cost":"2213",
      "product_profit":"40537",
      "bonus_accrual":"0",
      "tax_value":"5",
      "tax_type":"2",
      "tax_fiscal":"1",
      "category_id":"33"
    }
  ]
}

The method returns a product list by a transaction

HTTP request

GET https://joinposter.com/api/dash.getTransactionProducts

GET parameters of the dash.getTransactionProducts request

Parameter Description
transaction_id A mandatory parameter, the transaction ID (order number)

The dash.getTransactionProducts response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
product_id Product ID
product_name Product name
modification_id Modifier ID. In case of no modifier, it’s 0.
modificator_name Modifier name
modificator_barcode Modifier barcode
modificator_product_code Modifier SKU
num Product count in an order
time The time of the last update of the product count in an order; is measured in milliseconds
workshop Station ID
barcode Product barcode
product_code Product SKU
tax_id Tax ID
fiscal A fiscal receipt status: 1—fiscal, 0—non-fiscal
nodiscount The status of discounts and points applying to products: 0—yes, 1—no
payed_sum Amount paid in kopecks
product_sum Product cost in kopecks
discount The discount applied to the order
bonus_sum The point amount in dollars
round_sum Rounding amount in kopecks
client_id Customer ID
promotion_id Promotion ID
cert_sum The amount paid by a gift card
product_cost Product food cost
product_profit Profit
bonus_accrual Points accrued
tax_value Tax percentage of an order amount
tax_type Tax type: 1—VAT, 2—turnover tax
tax_fiscal Tax on a fiscal printer
category_id Product category ID

dash.getTransactionHistory: Transaction History

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getTransactionHistory'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&transaction_id=388678';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "transaction_id":"388678",
      "type_history":"print",
      "time":"1507703522429",
      "value":"1",
      "value2":"2147483647",
      "value3":"0",
      "value_text":null,
      "spot_tablet_id":"1"
    },
    {
      "transaction_id":"388678",
      "type_history":"close",
      "time":"1507703520358",
      "value":"3",
      "value2":"145000",
      "value3":"0",
      "value_text":"{\"payments\":{\"cash\":1450}}",
      "spot_tablet_id":"1"
    },
    {
      "transaction_id":"388678",
      "type_history":"additem",
      "time":"1507703508927",
      "value":"168",
      "value2":"0",
      "value3":"0",
      "value_text":"{\"price\":450}",
      "spot_tablet_id":"1"
    },
    {
      "transaction_id":"388678",
      "type_history":"open",
      "time":"1507703507594",
      "value":"1",
      "value2":"95",
      "value3":"3",
      "value_text":null,
      "spot_tablet_id":"1"
    }
  ]
}

The method returns a transaction history

HTTP request

GET https://joinposter.com/api/dash.getTransactionHistory

GET parameters of the dash.getTransactionHistory request

Parameter Description
transaction_id A mandatory parameter, the transaction ID (order number)

Dash.getTransactionHistory response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
transaction_id Order number
type_history An operation on an order; the possible values are described below
time Operation time in the unixtimestamp format
spot_tablet_id Register ID
value_text A text value that corresponds to a specific operation. May contain json as well.
value, value2, value3 Depending on type_history, it means the following:

Values of the value, value2, value3 parameters depending on type_history:

open—The bill is open

comment—Comment added

close—The receipt is printed and the bill closed

delete—The order is removed

sendtokitchen—A ticket is sent to the kitchen

additem—Product added

settable—Set another table for the order

changeitemcount—Product count updated; if value2 is 0, the product has been removed

deleteitem—Product removed

setclient—Customer added

dash.getProductsSales: Product Sales

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getProductsSales'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "product_name":"Стейк из сёмги",
      "modificator_name":null,
      "product_id":"168",
      "modification_id":"0",
      "delete":"0",
      "left":"43",
      "right":"44",
      "category_id":"33",
      "count":"171.0000",
      "weight_flag":"0",
      "payed_sum":"7650000",
      "product_sum":"7695000",
      "bonus_sum":"0",
      "cert_sum":"45000",
      "product_profit":"7199716",
      "tax_sum":"72000",
      "vat_sum":"0",
      "unit":"p",
      "discount":45000
    },
    {
      "product_name":"Речная форель в фольге",
      "modificator_name":null,
      "product_id":"169",
      "modification_id":"0",
      "delete":"0",
      "left":"43",
      "right":"44",
      "category_id":"33",
      "count":"168.0000",
      "weight_flag":"0",
      "payed_sum":"9185000",
      "product_sum":"9240000",
      "bonus_sum":"0",
      "cert_sum":"55000",
      "product_profit":"8367880",
      "tax_sum":"88000",
      "vat_sum":"0",
      "unit":"p",
      "discount":55000
    }
  ]
}

The method returns product sales

HTTP request

GET https://joinposter.com/api/dash.getProductsSales

GET parameters of the dash.getProductsSales request

Parameter Description
spot_id An optional parameter, the ID of a location to return reports to
date_from An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
date_to An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.

Parameters of the dash.getProductsSales response

Parameter Description
response Response object

Inside the response parameter, there is an array of objects. Each object contains the following parameters:

Parameter Description
product_name Product name
product_id Product ID
modification_id Modifier ID; if the product is without a modifier, it’s 0
modification_name The modifier name; null if the product is without a modifier
category_id Product category ID
left Left category ID
right Right category ID
price Product cost
count Sold products count
weight_flag The status of a product sold by weight, 0—not sold by weight, 1—sold by weight
payed_sum The amount paid by hard cash including discount; equals payed_cash + payed_card
product_sum Price in kopecks
product_profit Profit in kopecks
discount Discount amount in kopecks
delete The status of a product removed: 0—not removed, 1—removed

dash.getCategoriesSales: Category Sales

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getCategoriesSales'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&dateFrom=20170920'
 . '&dateTo=20170922';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "revenue":"38568300",
      "profit":"36307114",
      "count":"1173",
      "category_name":"Вторые блюда",
      "category_id":"33"
    },
    {
      "revenue":"36970440",
      "profit":"21885184",
      "count":"863",
      "category_name":"Главный экран",
      "category_id":0
    },
    {
      "revenue":"34474000",
      "profit":"31377831",
      "count":"830",
      "category_name":"Салаты",
      "category_id":"31"
    },
    {
      "revenue":"33876200",
      "profit":"31379225",
      "count":"905",
      "category_name":"Торты",
      "category_id":"37"
    },
    {
      "revenue":"22781920",
      "profit":"18568329",
      "count":"1173",
      "category_name":"Кофе",
      "category_id":"10"
    }
  ]
}

The method returns category sales

HTTP request

GET https://joinposter.com/api/dash.getCategoriesSales

GET parameters of the dash.getCategoriesSales request

Parameter Description
dateFrom The sampling start date in the Ymd format. If it is not specified, the start date is one month later.
dateTo The sampling end date in the Ymd format. If it is not specified, the end date is the current one.
spot_id The location ID; if it is not specified, all locations will be displayed

Parameters of the dash.getCategoriesSales response

Parameter Description
response Response object

Inside the response parameter, there is an array of objects. Each object contains the following parameters:

Parameter Description
revenue Revenue amount in kopecks
profit Profit amount in kopecks
count Sales count
category_name Category name
category_id Category ID

dash.getClientsSales: Customer Sales

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getClientsSales'
  . '?token=687409:4164553abf6a031302898da7800b59fb'
  . '&dateFrom=20170920'
  . '&dateTo=20170922';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "client_id":"4",
      "firstname":"",
      "lastname":"Vladimir",
      "sum":"1030000",
      "profit":"825364",
      "revenue":"907000",
      "clients":"3",
      "middle_invoice":3433.3333333333
    }
  ]
}

The method returns customer sales

HTTP request

GET https://joinposter.com/api/dash.getClientsSales

GET parameters of the dash.getClientsSales request

Parameter Description
dateFrom The sampling start date in the Ymd format. If it is not specified, the start date is one month later.
dateTo The sampling end date in the Ymd format. If it is not specified, the end date is the current one.
interpolate The output by hours, days, weeks, months. If not specified, the output is by day

Parameters of the dash.getClientsSales response

Parameter Description
response Response object

Inside the response parameter, there is an array of objects. Each object contains the following parameters:

Parameter Description
client_id Customer ID
firstname Customer first name
lastname Customer last name
sum Total amount of orders in kopecks
profit Profit in kopecks
revenue Revenue amount in kopecks
clients Order count
middle_invoice The average check amount in rubles/hryvnias

dash.getWaitersSales: Waiter Sales

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getWaitersSales'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&dateFrom=20170901';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "user_id":"1",
      "name":"Demo",
      "profit":"153707331",
      "revenue":"186224294",
      "clients":"1414",
      "middle_time":49364.020916667,
      "middle_invoice":1317.0034936351
    },
    {
      "user_id":"2",
      "name":"Максим",
      "profit":"147406757",
      "revenue":"179108697",
      "clients":"1314",
      "middle_time":58078.986483333,
      "middle_invoice":1363.0798858447
    },
    {
      "user_id":"6",
      "name":"Антон",
      "profit":"155127873",
      "revenue":"188413623",
      "clients":"1424",
      "middle_time":1.8170166666667,
      "middle_invoice":1323.129375
    }
  ]
}

The method returns waiter sales

HTTP request

GET https://joinposter.com/api/dash.getWaitersSales

GET parameters of the dash.getWaitersSales request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, includes the specified day. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, includes the specified day. The default date is the current date.

Parameters of the dash.getWaitersSales response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
user_id Waiter ID
name Waiter’s name
revenue Revenue amount in kopecks
profit Profit in kopecks
clients Closed orders count
middle_invoice An average check in hryvnias/rubles
middle_time Total time spent on service in minutes

dash.getSpotsSales: Location Sales

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getSpotsSales'
  . '?token=687409:4164553abf6a031302898da7800b59fb'
  . '&dateFrom=20170905'
  . '&dateTo=20170908';

$data = sendRequest($url);

Response example:

{
  "response":{
    "revenue":536723.37,
    "profit":448025.64,
    "clients":423,
    "middle_invoice":1268.8495744681
  }
}

The method returns location sales

HTTP request

GET https://joinposter.com/api/dash.getSpotsSales

GET parameters of the dash.getSpotsSales request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
spot_id An optional parameter, the location ID to return reports to If it is not specified, all locations will be displayed.

Parameters of the dash.getSpotsSales response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
profit Profit in kopecks
revenue Revenue amount in kopecks
clients Order count
middle_invoice The average check amount in rubles/hryvnias

dash.getTransactionWriteOffs: Order Wastes

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getTransactionWriteoffs'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&transaction_id=388678';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "write_off_id":"1518199",
      "tr_product_id":"2125168",
      "storage_id":"1",
      "ingredient_id":"833",
      "product_id":"168",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":"1.00000",
      "unit":"p",
      "cost":22.13,
      "time":"1507703520358"
    },
    {
      "write_off_id":"1518200",
      "tr_product_id":"2125169",
      "storage_id":"1",
      "ingredient_id":"85",
      "product_id":"169",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":0.04,
      "unit":"l",
      "cost":1.24,
      "time":"1507703520358"
    },
    {
      "write_off_id":"1518201",
      "tr_product_id":"2125169",
      "storage_id":"1",
      "ingredient_id":"78",
      "product_id":"169",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":0.059,
      "unit":"kg",
      "cost":2.12,
      "time":"1507703520358"
    },
    {
      "write_off_id":"1518202",
      "tr_product_id":"2125169",
      "storage_id":"1",
      "ingredient_id":"84",
      "product_id":"169",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":0.128,
      "unit":"kg",
      "cost":2.68,
      "time":"1507703520358"
    },
    {
      "write_off_id":"1518203",
      "tr_product_id":"2125169",
      "storage_id":"1",
      "ingredient_id":"86",
      "product_id":"169",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":0.608,
      "unit":"kg",
      "cost":37.35,
      "time":"1507703520358"
    },
    {
      "write_off_id":"1518204",
      "tr_product_id":"2125170",
      "storage_id":"1",
      "ingredient_id":"97",
      "product_id":"908",
      "modificator_id":"68",
      "prepack_id":"918",
      "weight":0.15,
      "unit":"kg",
      "cost":0.43,
      "time":"1507703520358"
    }
  ]
}

The method receives all order wastes

HTTP request

GET https://joinposter.com/api/dash.getTransactionWriteoffs

GET parameters of the dash.getTransactionWriteOffs request

Parameter Description
transaction_id A mandatory parameter, the transaction ID (order number)

Parameters of the dash.getTransactionWriteOffs response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
write_off_id Waste ID
transaction_id Transaction (order) ID
storage_id Waste storage ID
to_storage The ID of the storage the product has been transferred to; transmitted if there has been a transference
ingredient_id Ingredient ID
product_id Product ID
modificator_id Modifier ID; if there is no modifier, it is 0
prepack_id Semi-finished product ID
weight Count
unit Ingredient unit: kg—kilograms, p—pieces, l—liters
cost The ingredient cost multiplied by the count in hryvnias/rubles
user_id Waiter ID
type Operation type: 4—transfer, 1—waste, 2—manual waste
time Waste date in the unixtimestamp format
reason Waste reason

dash.getPaymentsReport: Billing Reports by Days/Months

Request example:

<?php
$url = 'https://joinposter.com/api/dash.getPaymentsReport'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&date_from=20170501'
 . '&date_to=20170531';

$data = sendRequest($url);

Response example:

{
    "response": {
        "days": [
            {
                "date": "2017-05-23",
                "payed_cash_sum": "1607996",
                "payed_card_sum": "365552",
                "payed_cert_in_sum": "0",
                "payed_cert_out_sum": "0",
                "payed_bonus_sum": "0",
                "payed_incust_sum": "0",
                "payed_sum_sum": "1973548"
            },
            {
                "date": "2017-06-03",
                "payed_cash_sum": "1108969",
                "payed_card_sum": "1090915",
                "payed_cert_in_sum": "0",
                "payed_cert_out_sum": "0",
                "payed_bonus_sum": "0",
                "payed_incust_sum": "0",
                "payed_sum_sum": "2199884"
            }
        ],
        "total": {
            "payed_cash_sum": 2716965,
            "payed_card_sum": 1456467,
            "payed_third_party_sum": 0,
            "payed_cert_in_sum": 0,
            "payed_cert_out_sum": 0,
            "payed_bonus_sum": 0,
            "payed_incust_sum": 0,
            "payed_sum_sum": 4173432
        }
    }
}

Response example по месяцам:

{
    "response": {
        "days": [
            {
                "date": "2017-06",
                "payed_cash_sum": "27286420",
                "payed_card_sum": "1951853",
                "payed_cert_in_sum": "0",
                "payed_cert_out_sum": "0",
                "payed_bonus_sum": "0",
                "payed_incust_sum": "0",
                "payed_sum_sum": "29234560"
            },
            {
                "date": "2017-05",
                "payed_cash_sum": "60273456",
                "payed_card_sum": "6290658",
                "payed_cert_in_sum": "0",
                "payed_cert_out_sum": "0",
                "payed_bonus_sum": "0",
                "payed_incust_sum": "0",
                "payed_sum_sum": "66564114"
            },
            {
                "date": "2017-04",
                "payed_cash_sum": "49090724",
                "payed_card_sum": "4782295",
                "payed_cert_in_sum": "0",
                "payed_cert_out_sum": "0",
                "payed_bonus_sum": "0",
                "payed_incust_sum": "0",
                "payed_sum_sum": "53873019"
            }
        ],
        "total": {
            "payed_cash_sum": 136650600,
            "payed_card_sum": 13024806,
            "payed_third_party_sum": 0,
            "payed_cert_in_sum": 0,
            "payed_cert_out_sum": 0,
            "payed_bonus_sum": 0,
            "payed_incust_sum": 0,
            "payed_sum_sum": 149671693
        }
    }
}

The method returns the billing reports by days. If a time interval is more than 65 days, the billing reports are by months

HTTP request

GET https://joinposter.com/api/dash.getPaymentsReport

GET parameters of the dash.getPaymentsReport request

Parameter Description
spot_id An optional parameter, the ID of a location to return reports to
date_from An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
date_to An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.

The dash.getPaymentsReport response parameters

Parameter Description
days List of payment days/months
total Total amounts by all days

Inside the days element, there is an array, each element of which contains the following properties:

Parameter Description
date The date in the Y-m-d or Y-m format in the output by months
payed_cash_sum Payment by cash in kopecks
payed_card_sum Payment by credit card in kopecks
payed_cert_in_sum Payment by a gift card in kopecks. It comes if the Include Payment by a Gift Card option is enabled in the management settings.
payed_cert_out_sum Payment by a gift card in kopecks. It comes if the Include Payment by a Gift Card option is disabled in the management settings and is equivalent to a discount.
payed_bonus_sum Payment by points
payed_incust_sum incust payment
payed_sum_sum The total amount of payments for the day in kopecks

Inside the total element, there are the following properties:

Parameter Description
payed_cash_sum The total amount of payments by cash in kopecks
payed_card_sum The total amount of payments by credit card in kopecks
payed_third_party_sum The total amount of payments by a third party
payed_cert_in_sum The total amount of payments by a gift card in kopecks. It comes if the Include Payment by a Gift Card option is enabled in the management settings.
payed_cert_out_sum The total amount of payments by a gift card in kopecks. It comes if the Include Payment by a Gift Card option is disabled in the management settings and is equivalent to a discount.
payed_bonus_sum Total amount of payments by points
payed_incust_sum Total amount of incust payments
payed_sum_sum Total amount of all payments in kopecks

menu: Products

Methods for working with the Products section. All methods of this section begin with “menu.”

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getCategories'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&fiscal=0';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "category_id":"2",
      "category_name":"Sushi rolls",
      "category_photo":"/upload/pos_cdb_888/menu/category_1420674791_2.jpg",
      "parent_category":"0",
      "category_color":"white",
      "category_hidden":"0",
      "sort_order":"999",
      "fiscal":"0",
      "nodiscount":"0",
      "tax_id":"0",
      "left":"3",
      "right":"4",
      "category_tag": "sushi",
      "level":"1"
    }
  ]
}

The method returns a list of product categories

HTTP request

GET https://joinposter.com/api/menu.getCategories

GET parameters of the menu.getCategories request

Parameter Description
fiscal Fiscal category status: 0—non-fiscal, 1—fiscal. The default value is all categories.
id_1c It allows returning in the response the product category ID in the 1C system. You must transmit true as a value. By default, it is not transmitted.

The menu.getCategories response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
category_id Category ID
category_name Category name
category_photo Category photo
parent_category Parent category ID
category_color Category color
category_hidden The status of a hidden category: 0—not hidden, 1—hidden
sort_order Sort order
fiscal The status of a category being fiscal: 0—non-fiscal, 1—fiscal
nodiscount Tha status of discounts applying: 0—do not apply, 1—apply
tax_id Tax ID
left The ID of the left category (by the Nested Set)
right The ID of the right category (by the Nested Set)
level Level of nesting of the category tree branch (by the Nested Set)
category_tag The alleged product type in the category that was defined by machine learning algorithm. For example, coffee, alcohol, can be null.
id_1c Product category ID in the 1C system

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&category_id=30'
 . '&1c=true';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "category_id":30,
    "category_name":"Бар",
    "category_photo":null,
    "category_photo_origin":null,
    "parent_category":0,
    "category_color":"yellow",
    "category_hidden":0,
    "sort_order":3,
    "fiscal":0,
    "nodiscount":0,
    "tax_id":2,
    "left":7,
    "right":42,
    "level":1,
    "category_tag":"alco",
    "id_1c":"9c68dbc9-b255-11e6-9a8f-ace01035e460"
  }
}

The method returns the product category properties

HTTP request

GET https://joinposter.com/api/menu.getCategory

GET parameters of the menu.getCategory request

Parameter Description
category_id Category ID
1c It allows returning in the response the product category ID in the 1C system. You must transmit true as a value. By default, it is not transmitted.
Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
category_id Category ID
category_name Category name
category_photo Category photo
category_photo_origin Uploaded photo original
parent_category Parent category ID
category_color Category color
category_hidden The status of a hidden category: 0—not hidden, 1—hidden
sort_order Sort order
fiscal The status of a category being fiscal: 0—non-fiscal, 1—fiscal
nodiscount Tha status of discounts applying: 0—do not apply, 1—apply
tax_id Tax ID
left The ID of the left category (by the Nested Set)
right The ID of the right category (by the Nested Set)
level Level of nesting of the category tree branch (by the Nested Set)
category_tag The alleged product type in the category that was defined by machine learning algorithm. For example, coffee, alcohol, can be null.
id_1c Product category ID in the 1C system

Request example:

<?php
$url = 'https://joinposter.com/api/menu.createCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category = [
    'category_name'   => 'Пицца',
    'parent_category' => 0,
    'category_color'  => 'yellow',
    'category_hidden' => 0,
    'tax_id'          => 0,
];

$data = sendRequest($url, 'post', $category);

Response example:

{  
  "response":52
}

The method creates a product category

HTTP request

GET https://joinposter.com/api/menu.createCategory

POST parameters of the menu.createCategory request

Parameter Description
category_name Product category name
parent_category Parent category ID
category_color Category color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink. The default color is white.
category_hidden The status of a category being hidden: 0—not hidden, 1—hidden The default value is 0.
tax_id Tax ID The default value is 0.

The menu.createCategory response parameters

Parameter Description
response Created product category ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.updateCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category = [
    'category_id'     => 34,
    'category_name'   => 'Пицца',
    'parent_category' => 0,
    'category_color'  => 'red',
];

$data = sendRequest($url, 'post', $category);

Response example:

{  
  "response": 34
}

The method updates the product category properties

HTTP request

GET https://joinposter.com/api/menu.updateCategory

POST parameters of the menu.updateCategory request

Parameter Description
category_id Product category ID
category_name Product category name
parent_category Parent category ID
category_color Category color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink. By default, it is not transmitted.
category_hidden The status of a category being hidden: 0—not hidden, 1—hidden By default, it is not transmitted.
tax_id Tax ID By default, it is not transmitted.

The menu.updateCategory response parameters

Parameter Description
response The updated product category ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category = [
    'category_id' => 52,
];

$data = sendRequest($url, 'post', $category);

Response example:

{  
  "response":true
}

The method removes a product category

HTTP request

GET https://joinposter.com/api/menu.removeCategory

POST parameters of the menu.removeCategory request

Parameter Description
category_id Product category ID

The menu.removeCategory response parameters

Parameter Description
response true if the product category has been successfully removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getProducts'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&category_id=15'
 . '&type=products';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "barcode":"4820098749621",
         "category_name":"Вода",
         "unit":"",
         "cost":"100",
         "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",
               "order":"0",
               "modificator_barcode":"",
               "modificator_product_code":"",
               "spots":[
                  {
                     "spot_id":"1",
                     "price":"68100",
                     "profit":"68100",
                     "visible":"1"
                  },
                  {
                     "spot_id":"2",
                     "price":"68100",
                     "profit":"68100",
                     "visible":"1"
                  },
                  {
                     "spot_id":"1",
                     "price":"68100",
                     "profit":"68100",
                     "visible":"1"
                  },
                  {
                     "spot_id":"2",
                     "price":"68100",
                     "profit":"68100",
                     "visible":"1"
                  }
               ],
               "ingredient_id":"0"
            }
         ],
         "out":0
      },
      {
         "barcode":"",
         "category_name":"Вода",
         "unit":"",
         "cost":"654",
         "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",
         "price":{
            "1":"19000",
            "2":"19000"
         },
         "product_code":"",
         "product_id":"138",
         "product_name":"Evian",
         "profit":{
            "1":"18346",
            "2":"18346"
         },
         "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",
               "visible":"1"
            },
            {
               "spot_id":"2",
               "price":"19000",
               "profit":"18346",
               "visible":"1"
            }
         ],
         "ingredient_id":"8",
         "cooking_time": "0",
         "out":0
      }
   ]
}

The method returns a list of products and dishes

HTTP request

GET https://joinposter.com/api/menu.getProducts

GET parameters of the menu.getProducts request

Parameter Description
category_id Product category ID By default, it is not transmitted.
type Type: products—products, batchtickets—dishes. By default, it is not transmitted.

The menu.getProducts response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
barcode Product barcode
category_name The product category name ID
unit Product unit
cost Product food cost in kopecks
fiscal Product fiscal status: 0—non-fiscal, 1—fiscal
menu_category_id Product category ID
workshop Product station ID
nodiscount The status of discounts applied to this product: 0—cannot be applied, 1—can be applied
photo Product photo
photo_origin Product photo original
price Product cost
product_code Storage accounting unit, for example, SKU
product_id Product ID
product_name Product name
profit Product net profit in kopecks
sort_order Product sort order
tax_id Product tax ID
product_tax_id The status of the product tax having been derived from the category tax: 0—not derived, 1—derived
type Product type: 1—semi-finished, 2—dish, 3—product
weight_flag The status of a product being sold by weight: 0—not sold by weight, 1—sold by weight
color The product card color on the register
spots Locations the product is available at
ingredient_id Ingredient ID (returned if it’s the product)
cooking_time Dish cooking time in seconds
product_production_description Cooking process description
ingredients List of ingredients (returned if it’s a dish)

Inside the price parameter, there is an array with a location ID as the key:

Parameter Description
Location ID The location’s product cost in kopecks

Inside the profit parameter, there is an array with a location ID as the key:

Parameter Description
Location ID Product net profit at the location

Inside the spots parameter, there is an array, each element of which contains the following parameters:

Parameter Description
spot_id Location ID
price The location’s product cost in kopecks
profit The location’s product net profit in kopecks
visible The status of the product being visible at the location: 0 — not visible, 1 — visible

Inside the ingredients parameter, there is an array, each element of which contains the following parameters:

Parameter Description
structure_id Dish element ID
ingredient_id Ingredient ID
pr_in_clear The status of the cleaning method being used: 0—not used, 1—used
pr_in_cook The status of the baking method being used: 0—not used, 1—used
pr_in_fry The status of the frying method being used: 0—not used, 1—used
pr_in_stew The status of the stewing method being used: 0—not used, 1—used
pr_in_bake The status of the cooking method being used: 0—not used, 1—used
structure_unit Dish element unit
structure_type Dish element type: 1—ingredient, 2—semi-finished product
structure_brutto Dish element gross
structure_netto Dish element net
structure_lock Dependence of net from gross: 0—manual, 1—automatic
structure_selfprice Dish element cost
ingredient_name Ingredient name
ingredient_unit Ingredient unit: l—liters, kg—kilograms, p—pieces
ingredient_weight Ingredient waste count
ingredients_losses_clear Loss rate at the ingredient cleaning
ingredients_losses_cook Loss rate at the ingredient baking
ingredients_losses_fry Loss rate at the ingredient frying
ingredients_losses_stew Loss rate at the ingredient stewing
ingredients_losses_bake Loss rate at the ingredient cooking

Request example which receives product properties:

<?php
$url = 'https://joinposter.com/api/menu.getProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&product_id=142';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "barcode":"",
    "category_name":"Свежевыжатые соки",
    "unit":"",
    "cost":"1880",
    "fiscal":"0",
    "menu_category_id":"16",
    "workshop":"4",
    "nodiscount":"0",
    "photo":"/upload/4/menu/product_1403094607_140.jpg",
    "price":{  
      "1":"40000",
      "2":"40000"
    },
    "product_code":"",
    "product_id":"140",
    "product_name":"Апельсиновый",
    "profit":{  
      "1":"38120",
      "2":"38120"
    },
    "sort_order":"1",
    "tax_id":"0",
    "product_tax_id":"0",
    "type":"3",
    "weight_flag":"0",
    "color":"white",
    "spots":[  
      {  
        "spot_id":"1",
        "price":"40000",
        "profit":"38120",
        "visible":"1"
      },
      {  
        "spot_id":"2",
        "price":"40000",
        "profit":"38120",
        "visible":"1"
      }
    ],
    "ingredient_id":"10",
    "cooking_time": "0",
    "out":"0"
  }
}

Request example receives dish properties:

<?php
$url = 'https://joinposter.com/api/menu.getProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&product_id=175';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "barcode":"123456",
    "category_name":"Коктейли",
    "unit":"kg",
    "cost":"444",
    "fiscal":"0",
    "menu_category_id":"39",
    "workshop":"1",
    "nodiscount":"0",
    "photo":"/upload/pos_cdb_4/menu/product_1439375876_175.jpg",
    "price":{  
      "1":"60000",
      "2":"60000"
    },
    "product_code":"",
    "product_id":"175",
    "product_name":"Manhattan Jack",
    "profit":{  
      "1":"59556",
      "2":"59556"
    },
    "sort_order":"999",
    "tax_id":"0",
    "product_tax_id":"0",
    "type":"2",
    "weight_flag":"0",
    "color":"white",
    "spots":[  
      {  
        "spot_id":"1",
        "price":"60000",
        "profit":"59556",
        "visible":"1"
      },
      {  
        "spot_id":"2",
        "price":"60000",
        "profit":"59556",
        "visible":"1"
      }
    ],
    "ingredient_id":"0",
    "out":97,
    "product_production_description":"",
    "ingredients":[  
      {  
        "structure_id":"52",
        "ingredient_id":"92",
        "pr_in_clear":"0",
        "pr_in_cook":"0",
        "pr_in_fry":"0",
        "pr_in_stew":"0",
        "pr_in_bake":"0",
        "structure_unit":"l",
        "structure_type":"1",
        "structure_brutto":30,
        "structure_netto":30,
        "structure_lock":"1",
        "structure_selfprice":"102",
        "ingredient_name":"Красный вермут",
        "ingredient_unit":"l",
        "ingredient_weight":"0",
        "ingredients_losses_clear":"0",
        "ingredients_losses_cook":"0",
        "ingredients_losses_fry":"0",
        "ingredients_losses_stew":"0",
        "ingredients_losses_bake":"0"
      },
      {  
        "structure_id":"53",
        "ingredient_id":"91",
        "pr_in_clear":"0",
        "pr_in_cook":"0",
        "pr_in_fry":"0",
        "pr_in_stew":"0",
        "pr_in_bake":"0",
        "structure_unit":"l",
        "structure_type":"1",
        "structure_brutto":60,
        "structure_netto":60,
        "structure_lock":"1",
        "structure_selfprice":"313",
        "ingredient_name":"Jack Daniels",
        "ingredient_unit":"l",
        "ingredient_weight":"0",
        "ingredients_losses_clear":"0",
        "ingredients_losses_cook":"0",
        "ingredients_losses_fry":"0",
        "ingredients_losses_stew":"0",
        "ingredients_losses_bake":"0"
      }
    ]
  }
}

The method returns the product or dish properties

HTTP request

GET https://joinposter.com/api/menu.getProduct

GET parameters of the menu.getProduct request

Parameter Description
product_id Product or dish ID

The menu.getProduct response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
barcode Product barcode
category_name The product category name ID
unit Product unit
cost Product food cost in kopecks
fiscal Product fiscal status: 0—non-fiscal, 1—fiscal
menu_category_id Product category ID
workshop Product station ID
nodiscount The status of discounts applied to this product: 0—cannot be applied, 1—can be applied
photo Product photo
price Product cost
product_code Storage accounting unit
product_id Product ID
product_name Product name
profit Product net profit
sort_order Product sort order
tax_id Product tax ID
product_tax_id The status of the product tax having been derived from the category tax: 0—not derived, 1—derived
type Product type: 1—semi-finished, 2—dish, 3—product
weight_flag The status of a product being sold by weight: 0—not sold by weight, 1—sold by weight
color The product card color on the register
spots Locations the product is available at
ingredient_id Ingredient ID (returned if it’s the product)
cooking_time Dish cooking time in seconds
product_production_description Cooking process description
ingredients List of ingredients (returned if it’s a dish)

Inside the price parameter, there is an array with a location ID as the key:

Key Value
Location ID The location’s product cost in kopecks

Inside the profit parameter, there is an array with a location ID as the key:

Key Value
Location ID The location’s product net profit in kopecks

Inside the spots parameter, there is an array, each element of which contains the following parameters:

Parameter Description
spot_id Location ID
price The location’s product cost in kopecks
profit The location’s product net profit in kopecks
visible The status of the product being visible at the location: 0 — not visible, 1 — visible

Inside the ingredients parameter, there is an array, each element of which contains the following parameters:

Parameter Description
structure_id Dish element ID
ingredient_id Ingredient ID
pr_in_clear The status of the cleaning method being used: 0—not used, 1—used
pr_in_cook The status of the baking method being used: 0—not used, 1—used
pr_in_fry The status of the frying method being used: 0—not used, 1—used
pr_in_stew The status of the stewing method being used: 0—not used, 1—used
pr_in_bake The status of the cooking method being used: 0—not used, 1—used
structure_unit Dish element unit
structure_type Dish element type: 1—ingredient, 2—semi-finished product
structure_brutto Dish element gross
structure_netto Dish element net
structure_lock Dependence of net from gross: 0—manual, 1—automatic
structure_selfprice Dish element cost
ingredient_name Ingredient name
ingredient_unit Ingredient unit
ingredient_weight Ingredient waste count
ingredients_losses_clear Loss rate at the ingredient cleaning
ingredients_losses_cook Loss rate at the ingredient baking
ingredients_losses_fry Loss rate at the ingredient frying
ingredients_losses_stew Loss rate at the ingredient stewing
ingredients_losses_bake Loss rate at the ingredient cooking

Request example which creates product without modifications:

<?php
$url = 'https://joinposter.com/api/menu.createProduct'
  . '?token=687409:4164553abf6a031302898da7800b59fb';

$product = [
    'product_name'           => 'Пончик',
    '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);

Response example:

{  
  "response":60
}

Request example which creates product with modifications:

<?php
$url = 'https://joinposter.com/api/menu.createProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$product = [
    'product_name'           => '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);

Response example:

{  
  "response":61,
  "modifications_id":[  
    1,
    2
  ]
}

The method creates a product

HTTP request

POST https://joinposter.com/api/menu.createProduct

POST parameters of the menu.createProduct request

Parameter Description
product_name Product name
menu_category_id Products category ID If you transmit 0, the product will go to the Home Screen.
workshop Station ID. A mandatory property for cafe-type accounts.
weight_flag The status of the product being sold by the piece or by weight: 0—sold by the piece, 1—sold by weight
color Product card color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink. The default color is white.
different_spots_prices The status of the product having different costs at different locations: 0—the same costs, 1—different costs
modifications The status of the product having modifiers: 0—without modifiers, 1—with modifiers
modificator_name Modifier name. It is mandatory if 1 is transmitted in the modifications parameter. All names are transmitted with the modifier index in square brackets: modificator_name [0], modificator_name [1], and so on.
barcode Product barcode. It allows using a barcode scanner during the product sale. For products sold by the piece, it is recommended to use a 13-digit code; for sold-by-weight products, it is recommended to use a 7-digit code. If a product is without modifiers, the parameter is transmitted as a barcode; if it is with modifiers, the modifier index is specified in square brackets: barcode [0], barcode [1], and so on.
product_code Product SKU. It is specified only for store-type accounts. If a product is without modifiers, the parameter is transmitted as product_code; if it is with modifiers, the modifier index is specified in square brackets: product_code [0], product_code [1], and so on.
cost The primary product food cost in kopecks, which will be used before the first product supply. If a product is without modifiers, the parameter is transmitted as cost; if it is with modifiers, the modifier index is specified in square brackets: cost [0], cost [1], and so on.
price Product cost in kopecks If a product is without modifiers, the parameter is transmitted as price; if it is with modifiers, the modifier index is specified in square brackets: price [0], price [1], and so on. In addition, if the Different Costs at Different Locations property is enabled, one more array level is added, where the locations IDs will be specified. That is, price [1], price [2], and so on are without modifiers, while price [0] [1], price [1] [2] are with modifiers (as an index, the modification index comes first, followed by the location ID).
visible The status of the product being visible on the register at the location: 0—not visible, 1—visible It is used only when the Different Costs at Different Locations property is enabled. The data transmission structure is identical to the price parameter. That is, visible [1], visible [2], and so on are without modifiers (with a location ID as an index), while visible [0] [1], visible [1] [2] are with modifications (as an index, the modification index comes first, followed by the location ID).

The menu.createProduct response parameters without modifications

Parameter Description
response Created product ID

The menu.createProduct response parameters with modifications

Parameter Description
product_id Created product ID
modifications_id An array of the created product ID modifications

Request example to change the product data without modifications and with different prices in different spots:

<?php
$url = 'https://joinposter.com/api/menu.updateProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$product = [
    'id'                     => 142,
    'product_name'           => 'Батон',
    'menu_category_id'       => 0,
    'workshop'               => 1,
    'weight_flag'            => 0,
    'color'                  => 'blue',
    'different_spots_prices' => 1,
    'modifications'          => 0,
    'barcode'                => '4820098749621',
    'price[1]'               => 3100,
    'price[2]'               => 3200,
    'visible'                => 1,
];

$data = sendRequest($url, 'post', $product);

Response example:

{  
  "response": 142
}

Request example to change product without modifications:

<?php
$url = 'https://joinposter.com/api/menu.updateProduct'
    . '?token=687409:4164553abf6a031302898da7800b59fb';

$product = [
    'id'                     => 57,
    'product_name'           => 'Имбирный чай',
    'menu_category_id'       => 0,
    'workshop'               => 1,
    'weight_flag'            => 0,
    'color'                  => 'green',
    'different_spots_prices' => 1,
    'modifications'          => 1,
    'modificator_id[0]'      => 1,
    'modificator_id[1]'      => 0,
    'modificator_id[2]'      => 2,
    'modificator_name[0]'    => '1л',
    'modificator_name[1]'    => '1.5л',
    'modificator_name[2]'    => '2л',
    'barcode[0]'             => '4820098749621',
    'barcode[1]'             => '4820098749623',
    'barcode[2]'             => '4820098749622',
    'price[0][1]'            => 1500,
    'price[0][2]'            => 1600,
    'price[1][1]'            => 1700,
    'price[1][2]'            => 1800,
    'price[2][1]'            => 2000,
    'price[2][2]'            => 2100,
    'visible[0][1]'          => 1,
    'visible[0][2]'          => 1,
    'visible[1][1]'          => 1,
    'visible[1][2]'          => 1,
    'visible[2][1]'          => 0,
    'visible[2][2]'          => 0,
];

$data = sendRequest($url, 'post', $product);

Response example:

{  
  "response":{  
    "product_id":61,
    "modifications_id":[  
      1,
      7,
      2
    ]
  }
}

The method updates the product properties

HTTP request

POST https://joinposter.com/api/menu.updateProduct

POST parameters of the menu.updateProduct request

Parameter Description
id Product ID
product_name Product name
menu_category_id Products category ID If you transmit 0, the product will go to the Home Screen.
workshop Station ID. A mandatory property for cafe-type accounts.
weight_flag The status of the product being sold by the piece or by weight: 0—sold by the piece, 1—sold by weight
color Product card color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink. The default color is white.
different_spots_prices The status of the product having different costs at different locations: 0—the same costs, 1—different costs
modifications The status of the product having modifiers: 0—without modifiers, 1—with modifiers
modificator_id Modifier ID. It is mandatory if 1 is transmitted in the modifications parameter. For existing modifiers, you need to transmit their existing modificator_id. For new modifiers, you must transmit 0.
modificator_name Modifier name. It is mandatory if 1 is transmitted in the modifications parameter. All names are transmitted with the modifier index in square brackets: modificator_name [0], modificator_name [1], and so on.
barcode Product barcode. It allows using a barcode scanner during the product sale. For products sold by the piece, it is recommended to use a 13-digit code; for sold-by-weight products, it is recommended to use a 7-digit code. If a product is without modifiers, the parameter is transmitted as a barcode; if it is with modifiers, the modifier index is specified in square brackets: barcode [0], barcode [1], and so on.
product_code Product SKU. It is specified only for store-type accounts. If a product is without modifiers, the parameter is transmitted as product_code; if it is with modifiers, the modifier index is specified in square brackets: product_code [0], product_code [1], and so on.
price Product cost in kopecks If a product is without modifiers, the parameter is transmitted as price; if it is with modifiers, the modifier index is specified in square brackets: price [0], price [1], and so on. In addition, if the Different Costs at Different Locations property is enabled, one more array level is added, where the locations IDs will be specified. That is, price [1], price [2], and so on are without modifiers, while price [0] [1], price [1] [2] are with modifiers (as an index, the modification index comes first, followed by the location ID).
visible The status of the product being visible on the register at the location: 0—not visible, 1—visible It is used only when the Different Costs at Different Locations property is enabled. The data transmission structure is identical to the price parameter. That is, visible [1], visible [2], and so on are without modifiers (with a location ID as an index), while visible [0] [1], visible [1] [2] are with modifications (as an index, the modification index comes first, followed by the location ID).

The menu.updateProduct response parameters without modifications

Parameter Description
response Updated product ID

The menu.updateProduct response parameters with modifications

Parameter Description
product_id Updated product ID
modifications_id An array of the updated product ID modifications

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$product = [
    'product_id' => 48,
];

$data = sendRequest($url, 'post', $product);

Response example:

{  
  "response":true
}

The method removes a product

HTTP request

GET https://joinposter.com/api/menu.removeProduct

POST parameters of the menu.removeProduct request

Parameter Description
product_id Product ID

The menu.removeProduct response parameters

Parameter Description
response true if the product has been successfully removed

Request example which creates dish:

<?php
$url = 'https://joinposter.com/api/menu.createDish'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$dish = [
    'product_name' => 'Кальян с сюрпризом',
    'menu_category_id' => 151,
    'different_spots_prices' => 1,
    'workshop' => 4,
    'weight_flag' => 0,
    'product_color' => 'red',
    'nodiscount' => 1,
    'price' => [
        1 => 55,
        2 => 57,
    ],
    'visible' => [
        1 => 1,
        2 => 0,
    ],
    "ingredient" => [[
        "id" => 813,
        "type" => 1,
        "unit" => "kg",
        "weight" => 0,
        "stew" => 0,
        "bake" => 0,
        "brutto" => 10,
        "lock" => 1,
        "netto" => 10,
    ]],
    'modificationgroup' => [
        [
            'type'          => 1,
            'minNum'        => 1,
            'maxNum'        => 1,
            'name'          => 'Чаша',
            "modifications" => [
                [
                    "ingredientId" => 820,
                    "type" => 1,
                    "name" => "Классическая чаша",
                    "brutto" => 1,
                    "price" => 500,
                ],
                [
                    "ingredientId" => 816,
                    "name" => "Апельсиновая чаша",
                    "type" => 1,
                    "brutto" => 1,
                    "price" => 400,
                ],
            ]
        ]
    ]
];

$data = sendRequest($url, 'post', $dish);

Response example:

{
  "response":61
}

The method creates a dish

HTTP request

POST https://joinposter.com/api/menu.createDish

POST parameters of the menu.createDish request

Parameter Description
product_name Dish name
barcode Dish barcode. By default, it is not transmitted.
menu_category_id The ID of the dish category. The default value is 0.
workshop_id Station ID. The default value is 1.
product_color Dish card color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink. The default color is white.
weight_flag The status of a dish being sold by weight: 0—not sold by weight, 1—sold by weight. The default value is 0. If a dish has an ingredient sold by the piece, it can not be sold by weight. If a dish is with modifications, it cannot be sold by weight.
nodiscount The status of the dish participating in discounts: 0—does not participate, 1—participates. The default value is 1.
price An array of prices for different locations. The array key is the location ID; the value is the price in kopecks. You can specify price not as an array; the price then is distributed among all locations.
visible The viewability array of a dish for different locations. The array key is a location ID. You can specify visible not as an array, the viewability then is distributed among all locations.
ingredient An array of ingredients and semi-finished products included in a dish recipe
modificationgroup An array of modifier groups

Inside the ingredient parameter, there is an object containing the following parameters:

Parameter Description
id The ID of a semi-finished product or ingredient
type Ingredient type: 1—ingredient, 2—semi-finished product
brutto Gross
netto Net
bake The status of the cooking method being used: 0—not used, 1—used. By default, 0 is transmitted.
cook The status of the baking method being used: 0—not used, 1—used. By default, 0 is transmitted.
clear The status of the cleaning method being used: 0—not used, 1—used. By default, 0 is transmitted.
fry The status of the frying method being used: 0—not used, 1—used. By default, 0 is transmitted.
stew The status of the stewing method being used: 0—not used, 1—used. By default, 0 is transmitted.
lock The dependence type of net from gross: 0—manual, 1—automatic

Inside the modificationgroup parameter, there is an object containing the following parameters:

Parameter Description
type Type: 1—of several, 2—some of several
minNum The minimum modifiers number to select
maxNum The maximum modifiers number to select
name Modifier group name
modifications An array of modifiers

Inside the modificationgroup parameter, there is an object containing the following parameters:

Parameter Description
ingredientId The ID of the ingredient of a dish or semi-finished product
type Type: 1—ingredient, 2—dish or semi-finished product
name Modifier name
brutto Modifier weight, quantity, or liters
price Delta of the price added to the product when adding a modification. The price is in kopecks and can be zero.

The menu.createDish response parameters

Parameter Description
response The ID of the created dish

Request example which changes dish:

<?php
$url = 'https://joinposter.com/api/menu.updateDish'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$dish = [
    'dish_id'                => 171,
    'product_name'           => 'Гамбургер с телятиной',
    'barcode'                => 159687,
    'menu_category_id'       => 10,
    'different_spots_prices' => 1,
    'workshop'               => 2,
    'weight_flag'            => 0,
    'product_color'          => 'red',
    'nodiscount'             => 0,
    'ingredient'             => [
        [
            'id'     => 815,
            'type'   => 1,
            'brutto' => 3,
            'netto'  => 6,
            'lock'   => 1,
            'clear'  => 1,
        ]
    ],
    'price' => [
        1 => 55,
        2 => 57,
    ],
    'visible' => [
        1 => 1,
        2 => 0,
    ],
    'modificationgroup'      => [
        [
            'type'          => 1,
            'minNum'        => 1,
            'maxNum'        => 1,
            'name'          => 'Картофель',
            'modifications' => [
                [
                    'ingredientId' => 814,
                    'type'         => 1,
                    'name'         => 'Вареный картофель',
                    'brutto'       => 200,
                    'price'        => 230,
                ],
                [
                    'ingredientId' => 816,
                    'type'         => 1,
                    'name'         => 'Фри',
                    'brutto'       => 150,
                    'price'        => 280,
                ],
            ],
        ]
    ],
];

$data = sendRequest($url, 'post', $dish);

Response example:

{
  "response":61
}

The method updates dish properties

HTTP request

POST https://joinposter.com/api/menu.updateDish

POST parameters of the menu.updateDish request

Parameter Description
dish_id Dish ID
product_name Dish name
barcode Dish barcode
menu_category_id Dish category ID
workshop_id Station ID
product_color Dish card color: white, red, orange, yellow, green, blue, navy blue, purple, black, mint blue, lime green, pink
weight_flag The status of a dish being sold by weight: 0—not sold by weight, 1—sold by weight. If a dish has an ingredient sold by the piece, it can not be sold by weight.
nodiscount The status of a dish participating in discounts: 0—does not participate, 1—participates
price An array of prices for different locations. The array key is a location ID. You can specify price not as an array; the price then is distributed among all locations.
visible The viewability array of a dish for different locations. The array key is a location ID. You can specify visible not as an array, the viewability then is distributed among all locations.
ingredient An array of ingredients and semi-finished products included in a dish recipe
modificationgroup An array of modifier groups

Inside the ingredient parameter, there is an object containing the following parameters:

Parameter Description
id The ID of a semi-finished product or ingredient
type Ingredient type: 1—ingredient, 2—semi-finished product
brutto Gross
netto Net
bake The status of the cooking method being used: 0—not used, 1—used. By default, 0 is transmitted.
cook The status of the baking method being used: 0—not used, 1—used. By default, 0 is transmitted.
clear The status of the cleaning method being used: 0—not used, 1—used. By default, 0 is transmitted.
fry The status of the frying method being used: 0—not used, 1—used. By default, 0 is transmitted.
stew The status of the stewing method being used: 0—not used, 1—used. By default, 0 is transmitted.
lock The dependence type of net from gross: 0—manual, 1—automatic

Inside the modificationgroup parameter, there is an object containing the following parameters:

Parameter Description
dish_modification_group_id The ID of the group being edited. All product modification groups that do not come with the request will be removed.
type Type: 1—of several, 2—some of several
minNum The minimum modifiers number to select
maxNum The maximum modifiers number to select
name Modifier group name
modifications An array of modifiers

Inside the modificationgroup parameter, there is an object containing the following parameters:

Parameter Description
dish_modification_id The ID of the modification being edited. All product modifications that do not come with the request will be removed.
ingredientId The ID of the ingredient of a dish or semi-finished product
type Type: 1—ingredient, 2—dish or semi-finished product
name Modifier name
brutto Modifier weight, quantity, or liters
price Delta of the price added to the product when adding a modification. It can be zero.

The menu.updateDish response parameters

Parameter Description
response The ID of the dish updated

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeDish'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$dish = [
    'dish_id' => 925,
];

$data = sendRequest($url, 'post', $dish);

Response example:

{  
  "response":true
}

The method removes a dish

HTTP request

GET https://joinposter.com/api/menu.removeDish

POST parameters of the menu.removeDish request

Parameter Description
dish_id Dish ID

The menu.removeDish response parameters

Parameter Description
response true if a dish has been successfully removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getPrepacks'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "product_id":"167",
      "ingredient_id":"0",
      "product_name":"Куринный бульон",
      "cost":"1222",
      "out":171,
      "product_production_description":"",
      "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",
          "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",
          "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"
        }
      ]
    }
  ]
}

The method returns a list of semi-finished products

HTTP request

GET https://joinposter.com/api/menu.getPrepacks

GET parameters of the menu.getPrepacks request

Parameter Description
1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getPrepacks response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
product_id The semi-finished product ID in the products table
ingredient_id The semi-finished product ID in the ingredients table if the semi-finished product is manufacturable; otherwise, it takes 0
product_name Semi-finished product name
cost Semi-finished product food cost
out Semi-finished product weight
product_production_description Cooking process description
id_1c Semi-finished product ID in the 1C system
ingredients Ingredients included in the semi-finished product

Inside the ingredients parameter, there is an object with the following parameter:

Parameter Description
structure_id Semi-finished product element ID
ingredient_id Ingredient ID
pr_in_clear The status of the cleaning method being used: 0—not used, 1—used
pr_in_cook The status of the baking method being used: 0—not used, 1—used
pr_in_fry The status of the frying method being used: 0—not used, 1—used
pr_in_stew The status of the stewing method being used: 0—not used, 1—used
pr_in_bake The status of the cooking method being used: 0—not used, 1—used
structure_unit Unit of a semi-finished product element
structure_type The semi-finished product element type: 1—ingredient, 2—semi-finished product
structure_brutto Gross of a semi-finished product element
structure_netto Net of a semi-finished product element
structure_lock Dependence of net from gross: 0—manual, 1—automatic
structure_selfprice The price of a semi-finished product element
ingredient_name Ingredient name
ingredient_unit Ingredient unit: kg—kilograms, p—pieces, l—liters
ingredient_weight Ingredient waste count
ingredients_losses_clear Loss rate at the ingredient cleaning
ingredients_losses_cook Loss rate at the ingredient baking
ingredients_losses_fry Loss rate at the ingredient frying
ingredients_losses_stew Loss rate at the ingredient stewing
ingredients_losses_bake Loss rate at the ingredient cooking

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getPrepack'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&product_id=167'
 . '&1c=true';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "product_id":"167",
    "ingredient_id":"0",
    "product_name":"Куринный бульон",
    "cost":"1222",
    "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",
        "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",
        "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"
      }
    ]
  }
}

The method returns the semi-finished product properties

HTTP request

GET https://joinposter.com/api/menu.getPrepack

Run in the browser

GET parameters of the menu.getPrepack request

Parameter Description
product_id Semi-finished product ID
1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getPrepack response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
product_id The semi-finished product ID in the products table
ingredient_id The semi-finished product ID in the ingredients table if the semi-finished product is manufacturable; otherwise, it takes 0
product_name Semi-finished product name
cost Semi-finished product food cost
out Semi-finished product weight
product_production_description Cooking process description
id_1c Semi-finished product ID in the 1C system
ingredients Ingredients included in the semi-finished product

Inside the ingredients parameter, there is an object with the following parameter:

Parameter Description
structure_id Semi-finished product element ID
ingredient_id Ingredient ID
pr_in_clear The status of the cleaning method being used: 0—not used, 1—used
pr_in_cook The status of the baking method being used: 0—not used, 1—used
pr_in_fry The status of the frying method being used: 0—not used, 1—used
pr_in_stew The status of the stewing method being used: 0—not used, 1—used
pr_in_bake The status of the cooking method being used: 0—not used, 1—used
structure_unit Unit of a semi-finished product element
structure_type The semi-finished product element type: 1—ingredient, 2—semi-finished product
structure_brutto Gross of a semi-finished product element
structure_netto Net of a semi-finished product element
structure_lock Dependence of net from gross: 0—manual, 1—automatic
structure_selfprice The price of a semi-finished product element in kopecks
ingredient_name Ingredient name
ingredient_unit Ingredient unit: kg—kilograms, p—pieces, l—liters
ingredient_weight Ingredient waste count
ingredients_losses_clear Loss rate at the ingredient cleaning
ingredients_losses_cook Loss rate at the ingredient baking
ingredients_losses_fry Loss rate at the ingredient frying
ingredients_losses_stew Loss rate at the ingredient stewing
ingredients_losses_bake Loss rate at the ingredient cooking

Request example:

<?php
$url = 'https://joinposter.com/api/menu.createPrepack'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$prepack = [
    'product_name' => 'Маринованные грибы',
    '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);

Response example:

{  
  "response":177
}

The method creates a semi-finished product

HTTP request

GET https://joinposter.com/api/menu.createPrepack

POST parameters of the menu.createDish request

Parameter Description
product_name Semi-finished product name. It has to be unique.
ingredient Ingredients included in the semi-finished product
product_production_description An optional parameter, the description of the cooking process.

Inside the ingredients parameter, there is an array, each element of which contains the following parameters:

Parameter Description
id The ID of an ingredient or semi-finished product
type The semi-finished product element type: 1—ingredient, 2—semi-finished product
brutto Gross of a semi-finished product element
netto Net of a semi-finished product element
lock Dependence of net from gross: 0—manual, 1—automatic
clear The status of the cleaning method being used: 0—not used, 1—used The default value is 0.
cook The status of the baking method being used: 0—not used, 1—used. The default value is 0.
fry The status of the frying method being used: 0—not used, 1—used. The default value is 0.
stew The status of the stewing method being used: 0—not used, 1—used. The default value is 0.
bake The status of the cooking method being used: 0—not used, 1—used. The default value is 0.

The menu.createPrepac response parameters

Parameter Description
response The created semi-finished product ID in the products table

Request example:

<?php
$url = 'https://joinposter.com/api/menu.updatePrepack'
    . '?token=687409:4164553abf6a031302898da7800b59fb';

$prepack = [
    'prepack_id' => 919,
    'product_name' => 'Блины',
    '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);

Response example:

{  
  "response": 919
}

The method updates the semi-finished product properties

HTTP request

GET https://joinposter.com/api/menu.updatePrepack

POST parameters of the menu.updatePrepack request

Parameter Description
prepack_id Semi-finished product ID
product_name Semi-finished product name
product_production_description Cooking process description
ingredient Ingredients included in the semi-finished product

Inside the ingredients parameter, there is an array, each element of which contains the following parameters:

Parameter Description
id The ID of an ingredient or semi-finished product
type The semi-finished product element type: 1—ingredient, 2—semi-finished product
brutto Gross of a semi-finished product element
netto Net of a semi-finished product element
lock Dependence of net from gross: 0—manual, 1—automatic
clear The status of the cleaning method being used: 0—not used, 1—used The default value is 0.
cook The status of the baking method being used: 0—not used, 1—used. The default value is 0.
fry The status of the frying method being used: 0—not used, 1—used. The default value is 0.
stew The status of the stewing method being used: 0—not used, 1—used. The default value is 0.
bake The status of the cooking method being used: 0—not used, 1—used. The default value is 0.

The menu.updatePrepack response parameters

Parameter Description
response The updated semi-finished product ID in the products table

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removePrepack'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$prepack = [
    'prepack_id' => 177,
];

$data = sendRequest($url, 'post', $prepack);

Response example:

{  
  "response":true
}

The method removes a semi-finished product

HTTP request

GET https://joinposter.com/api/menu.removePrepack

POST parameters of the menu.removePrepack request

Parameter Description
prepack_id Semi-finished product ID

The menu.removePrepack response parameters

Parameter Description
response true if the semi-finished product has been successfully removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "ingredient_id":"91",
      "ingredient_name":"Jack Daniels",
      "category_id":"3",
      "ingredient_left":"443.45000",
      "limit_value":"0",
      "time_notif":"0",
      "ingredient_unit":"l",
      "ingredient_weight":0,
      "ingredients_losses_clear":"0",
      "ingredients_losses_cook":"0",
      "ingredients_losses_fry":"0",
      "ingredients_losses_stew":"0",
      "ingredients_losses_bake":"0",
      "ingredients_type":"1",
      "partial_write_off":"0"
    },
    {  
      "ingredient_id":"73",
      "ingredient_name":"Авокадо",
      "category_id":"0",
      "ingredient_left":"22.00000",
      "limit_value":"0",
      "time_notif":"0",
      "ingredient_unit":"kg",
      "ingredient_weight":0,
      "ingredients_losses_clear":"11",
      "ingredients_losses_cook":"0",
      "ingredients_losses_fry":"0",
      "ingredients_losses_stew":"0",
      "ingredients_losses_bake":"0",
      "ingredients_type":"1",
      "partial_write_off":"0"
    },
    {  
      "ingredient_id":"74",
      "ingredient_name":"Айсберг с-т",
      "category_id":"0",
      "ingredient_left":"379.09000",
      "limit_value":"0",
      "time_notif":"0",
      "ingredient_unit":"kg",
      "ingredient_weight":0,
      "ingredients_losses_clear":"10",
      "ingredients_losses_cook":"0",
      "ingredients_losses_fry":"0",
      "ingredients_losses_stew":"0",
      "ingredients_losses_bake":"0",
      "ingredients_type":"1",
      "partial_write_off":"0"
    }
  ]
}

The method returns a list of ingredients

HTTP request

GET https://joinposter.com/api/menu.getIngredients

GET parameters of the menu.getIngredients request

Parameter Description
id_1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getIngredients response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
ingredient_id Ingredient ID
ingredient_name Ingredient name
category_id The ID of a category the ingredient is in
ingredient_left Ingredient inventory
limit_value Ingredient low stock alert threshold in storage
time_notif The time of the latest notification of the ingredient low stock alert threshold in storage
ingredient_unit Ingredient unit: kg—kilograms, p—pieces, l—liters
ingredient_weight Ingredient weight if the ingredient is sold by the piece
ingredients_losses_clear Loss rate at the ingredient cleaning if the ingredient is not sold by the piece
ingredients_losses_cook Loss rate at the ingredient baking if the ingredient is not sold by the piece
ingredients_losses_fry Loss rate at the ingredient frying if the ingredient is not sold by the piece
ingredients_losses_stew Loss rate at the ingredient stewing if the ingredient is not sold by the piece
ingredients_losses_bake Loss rate at the ingredient cooking if the ingredient is not sold by the piece
ingredients_type Type of ingredient: 1—ingredient, 2—systemic ingredient
partial_write_off The status of an ingredient sold by the piece being allowed to be wasted as the one sold by fractions: 0—not allowed, 1—allowed
id_1c Ingredient ID in the 1C system
delete The status of an ingredient having been removed: 0—not removed, 1—removed
hidden The status of an ingredient being hidden: 0—not hidden, 1—hidden

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getIngredient'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&ingredient_id=91'
 . '&1c=true';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "ingredient_id":"91",
    "ingredient_name":"Jack Daniels",
    "category_id":"3",
    "ingredient_left":"442.85000",
    "limit_value":"0",
    "time_notif":"0",
    "ingredient_unit":"l",
    "ingredient_weight":0,
    "ingredients_losses_clear":"0",
    "ingredients_losses_cook":"0",
    "ingredients_losses_fry":"0",
    "ingredients_losses_stew":"0",
    "ingredients_losses_bake":"0",
    "ingredients_type":"1",
    "partial_write_off":"0",
    "id_1c":"d70b49a7-0097-11e6-9c83-028037ec0200",
    "delete":"0",
    "hidden":"0"
  }
}

The method returns the ingredient properties

HTTP request

GET https://joinposter.com/api/menu.getIngredient

GET parameters of the menu.getIngredient request

Parameter Description
ingredient_id Ingredient ID
1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getIngredient response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
ingredient_id Ingredient ID
ingredient_name Ingredient name
category_id The ID of a category the ingredient is in
ingredient_left Ingredient inventory
limit_value Ingredient low stock alert threshold in storage
time_notif The time of the latest notification of the ingredient low stock alert threshold in storage
ingredient_unit Ingredient unit: kg—kilograms, p—pieces, l—liters
ingredient_weight Ingredient weight if the ingredient is sold by the piece
ingredients_losses_clear Loss rate at the ingredient cleaning if the ingredient is not sold by the piece
ingredients_losses_cook Loss rate at the ingredient baking if the ingredient is not sold by the piece
ingredients_losses_fry Loss rate at the ingredient frying if the ingredient is not sold by the piece
ingredients_losses_stew Loss rate at the ingredient stewing if the ingredient is not sold by the piece
ingredients_losses_bake Loss rate at the ingredient cooking if the ingredient is not sold by the piece
ingredients_type Type of ingredient: 1—ingredient, 2—systemic ingredient
partial_write_off The status of an ingredient sold by the piece being allowed to be wasted as the one sold by fractions: 0—not allowed, 1—allowed
id_1c Ingredient ID in the 1C system
delete The status of an ingredient having been removed: 0—not removed, 1—removed
hidden The status of an ingredient being hidden: 0—not hidden, 1—hidden

Request example:

<?php
$url = 'https://joinposter.com/api/menu.createIngredient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$ingredient = [
    'ingredient_name'   => 'Клубника',
    'category_id'       => 4,
    'type'              => 'p',
    'weight_ingredient' => 200,
];

$data = sendRequest($url, 'post', $ingredient);

Response example:

{  
  "response":811
}

The method creates an ingredient

HTTP request

GET https://joinposter.com/api/menu.createIngredient

POST parameters of the menu.createIngredient request

Parameter Description
ingredient_name Ingredient name
category_id Ingredient category ID
type Ingredient unit: kg—kilograms, p—pieces, l—liters
weight_ingredient Ingredient weight if the ingredient is sold by the piece
loss_clear Loss rate at the ingredient cleaning if the ingredient is not sold by the piece
loss_cook Loss rate at the ingredient baking if the ingredient is not sold by the piece
loss_fry Loss rate at the ingredient frying if the ingredient is not sold by the piece
loss_stew Loss rate at the ingredient stewing if the ingredient is not sold by the piece
loss_bake Loss rate at the ingredient cooking if the ingredient is not sold by the piece
partial_write_off The status of an ingredient sold by the piece being allowed to be wasted as the one sold by fractions: 0—not allowed, 1—allowed

The menu.createIngredient response parameters

Parameter Description
response The created ingredient ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.updateIngredient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$ingredient = [
    'id'                => 811,
    'ingredient_name'   => 'Лимон',
    'category_id'       => 4,
    'type'              => 'p',
    'weight_ingredient' => 150,
];

$data = sendRequest($url, 'post', $ingredient);

Response example:

{  
  "response": 811
}

The method updates the ingredient properties

HTTP request

GET https://joinposter.com/api/menu.updateIngredient

POST parameters of the menu.updateIngredient request

Parameter Description
id Ingredient ID
ingredient_name Ingredient name
category_id Ingredient category ID
type Ingredient unit: kg—kilograms, p—pieces, l—liters You can not change the ingredient unit if it has already been supplied in storage.
weight_ingredient Ingredient weight if the ingredient is sold by the piece
loss_clear Loss rate at the ingredient cleaning if the ingredient is not sold by the piece
loss_cook Loss rate at the ingredient baking if the ingredient is not sold by the piece
loss_fry Loss rate at the ingredient frying if the ingredient is not sold by the piece
loss_stew Loss rate at the ingredient stewing if the ingredient is not sold by the piece
loss_bake Loss rate at the ingredient cooking if the ingredient is not sold by the piece
partial_write_off The status of an ingredient sold by the piece being allowed to be wasted as the one sold by fractions: 0—not allowed, 1—allowed

The menu.updateIngredient response parameters

Parameter Description
response The updated ingredient ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeIngredient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$ingredient = [
    'ingredient_id' => 811,
];

$data = sendRequest($url, 'post', $ingredient);

Response example:

{  
  "response":true
}

The method removes an ingredient

HTTP request

GET https://joinposter.com/api/menu.removeIngredient

POST parameters of the menu.removeIngredient request

Parameter Description
ingredient_id Ingredient ID

The menu.removeIngredient response parameters

Parameter Description
response true if the ingredient has been successfully removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getCategoriesIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&1c=true';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "category_id":"3",
      "name":"Алкоголь",
      "id_1c":"b80ffc81-0fc9-11e7-9ab4-ace01035e460"
    },
    {  
      "category_id":"2",
      "name":"Мясо",
      "id_1c":null
    },
    {  
      "category_id":"1",
      "name":"Овощи",
      "id_1c":null
    },
    {  
      "category_id":"4",
      "name":"Фрукты",
      "id_1c":null
    }
  ]
}

The method returns a list of ingredient categories

HTTP request

GET https://joinposter.com/api/menu.getCategoriesIngredients

GET parameters of the menu.getCategoriesIngredients request

Parameter Description
1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getCategoriesIngredients response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
category_id Ingredient category ID
category_name Ingredient category name
id_1c Ingredient category ID in the 1C system

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getCategoryIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&category_id=3'
 . '&1c=true';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "category_id":"3",
    "name":"Алкоголь",
    "id_1c":"b80ffc81-0fc9-11e7-9ab4-ace01035e460"
  }
}

The method returns the ingredient category properties

HTTP request

GET https://joinposter.com/api/menu.getCategoryIngredients

GET parameters of the menu.getCategoryIngredients request

Parameter Description
category_id Ingredient category ID
1c An optional parameter; if the value is true, it returns the product category ID in the 1C system in the response. By default, it is not transmitted.

The menu.getCategoryIngredients response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
category_id Ingredient category ID
category_name Ingredient category name
id_1c Ingredient category ID in the 1C system

Request example:

<?php
$url = 'https://joinposter.com/api/menu.createCategoryIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category_ingredients = [
    'category_name' => 'Овощи',
];

$data = sendRequest($url, 'post', $category_ingredients);

Response example:

{  
  "response":27
}

The method creates an ingredient category

HTTP request

GET https://joinposter.com/api/menu.createCategoryIngredients

POST parameters of the menu.createCategoryIngredients request

Parameter Description
category_name Ingredient category name

The menu.createCategoryIngredients response parameters

Parameter Description
response The created ingredient category ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.updateCategoryIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category_ingredients = [
    'category_id'   => 2,
    'category_name' => 'Фрукты',
];

$data = sendRequest($url, 'post', $category_ingredients);

Response example:

{  
  "response": 2
}

The method updates the ingredient category properties

HTTP request

GET https://joinposter.com/api/menu.updateCategoryIngredients

POST parameters of the menu.updateCategoryIngredients request

Parameter Description
category_id Ingredient category ID
category_name Ingredient category new name

The menu.updateCategoryIngredients response parameters

Parameter Description
response The updated ingredient category ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeCategoryIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category_ingredients = [
    'category_id'      => 2,
    'with_ingredients' => 1,
];

$data = sendRequest($url, 'post', $category_ingredients);

Response example:

{  
  "success":"successful delete category"
}

The method removes the ingredient category

HTTP request

GET https://joinposter.com/api/menu.removeCategoryIngredients

POST parameters of the menu.removeCategoryIngredients request

Parameter Description
category_id Ingredient category ID
with_ingredients The status of removing ingredients in the category: 0—not to remove, 1—remove. The default value is 0.

The menu.removeCategoryIngredients response parameters

Parameter Description
success A successful removal notification

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getWorkshops'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "workshop_id":"1",
      "workshop_name":"Бар",
      "delete":"0"
    },
    {  
      "workshop_id":"2",
      "workshop_name":"Кухня",
      "delete":"0"
    },
    {  
      "workshop_id":"3",
      "workshop_name":"Кондитерская",
      "delete":"0"
    },
    {  
      "workshop_id":"4",
      "workshop_name":"Кальян",
      "delete":"0"
    }
  ]
}

The method returns a list of stations

HTTP request

GET https://joinposter.com/api/menu.getWorkshops

The menu.getWorkshops response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
workshop_id Station ID
workshop_name Station name
delete The status of a station having been removed: 0—have not been removed, 1—have been removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.getWorkshop'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&workshop_id=1';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "workshop_id":"1",
    "workshop_name":"Бар",
    "delete":"0"
  }
}

The method returns the station properties

HTTP request

GET https://joinposter.com/api/menu.getWorkshop

GET parameters of the menu.getWorkshop request

Parameter Description
workshop_id Station ID

The menu.getWorkshop response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
workshop_id Station ID
workshop_name Station name
delete The status of a station having been removed: 0—have not been removed, 1—have been removed

Request example:

<?php
$url = 'https://joinposter.com/api/menu.createWorkshop'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$workshop = [
    'workshop_name' => 'Мангал',
];

$data = sendRequest($url, 'post', $workshop);

Response example:

{  
  "response":5
}

The method creates a station

HTTP request

GET https://joinposter.com/api/menu.createWorkshop

POST parameters of the menu.createWorkshop request

Parameter Description
workshop_name A mandatory parameter, a station name

The menu.createWorkshop response parameters

Parameter Description
response The created station ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.updateWorkshop'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$workshop = [
    'workshop_id'  => 5,
    'product_name' => 'Суши',
];

$data = sendRequest($url, 'post', $workshop);

Response example:

{  
  "response":5
}

The method updates the station properties

HTTP request

GET https://joinposter.com/api/menu.updateWorkshop

POST parameters of the menu.updateWorkshop request

Parameter Description
workshop_id Station ID
workshop_name Station name

The menu.updateWorkshop response parameters

Parameter Description
response The updated station ID

Request example:

<?php
$url = 'https://joinposter.com/api/menu.removeWorkshop'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$workshop = [
    'workshop_id' => 2,
];

$data = sendRequest($url, 'post', $workshop);

Response example:

{  
  "response":true
}

The method removes a station

HTTP request

GET https://joinposter.com/api/menu.removeWorkshop

POST parameters of the menu.removeWorkshop request

Parameter Description
workshop_id Station ID

The menu.removeWorkshop response parameters

Parameter Description
response true if the station has been successfully removed

storage: Storage

All methods for working with the Storage section begin with storage.

storage.getManufactures: List of Manufactures

Request example:

<?
$url = 'https://apidemo.joinposter.com/api/storage.getManufactures'
  . '?format=json'
  . '&token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "manufacture_id":"4",
      "storage_name":"Склад 1",
      "storage_id":"1",
      "user_id":"4",
      "date":"2016-12-26 14:45:00",
      "sum":70.35,
      "products":[
        {
          "ingredient_id":"205",
          "product_id":"134",
          "product_name":"Чай цветочный 360мл",
          "product_num":"3.0000",
          "type":"2"
        },
        {
          "ingredient_id":"204",
          "product_id":"137",
          "product_name":"Чай черный с чабрецом 360мл",
          "product_num":"2.0000",
          "type":"2"
        }
      ]
    },
    {
      "manufacture_id":"2",
      "storage_name":"Склад 1",
      "storage_id":"1",
      "user_id":"4",
      "date":"2016-12-26 14:44:00",
      "sum":"32.44",
      "products":[
        {
          "ingredient_id":"200",
          "product_id":"109",
          "product_name":"Американо 360мл",
          "product_num":"1.0000",
          "type":"2"
        }
      ]
    }
  ]
}

The request for a list of all manufactures.

HTTP request

GET https://joinposter.com/api/storage.getManufactures

GET parameters of the storage.getManufactures request

Parameter Description
num The number of manufactures to be obtained
offset The number of entries to be skipped from the top of the list

The storage.getManufactures response parameters

Parameter Description
manufacture_id Manufacture ID
storage_name Storage name
storage_id Storage ID
user_id The ID of the user who has manufactured
date Manufacture date
sum The total amount of manufacture (in hryvnias/rubles)
products List of dishes / semi-finished products included in the manufacture

The products parameter entry

The word “entity” means a dish or a semi-finished product. When the entity is manufactured for the first time, it gets a unique ingredient_id to get its inventory in storage by.

Parameter Description
ingredient_id A unique ingredient_id of the entity
product_id Entity ID
product_name Entity name
product_num Count in pieces, kg, or liters
type Type of entity: 1—semi-finished product, 2—dish

storage.getManufacture: Manufacture Data

Request example:

<?
$url = 'https://joinposter.com/api/storage.getManufacture' 
  . '?format=json'
  . '&token=687409:4164553abf6a031302898da7800b59fb'
  . '&manufacture_id=4';

$data = sendRequest($url);

Response example:

{
  "response":{
    "manufacture_id":"4",
    "storage_name":"Storage 1",
    "storage_id":"1",
    "user_id":"4",
    "date":"2016-12-26 14:45:00",
    "sum":70.35,
    "products":[
      {
        "ingredient_id":"205",
        "product_id":"134",
        "product_name":"Flower tea 360ml",
        "product_num":"3.0000",
        "type":"2"
      },
      {
        "ingredient_id":"204",
        "product_id":"137",
        "product_name":"Black tea",
        "product_num":"2.0000",
        "type":"2"
      }
    ]
  }
}

The request returns the data of a particular manufacture.

HTTP request

GET https://joinposter.com/api/storage.getManufacture

GET parameters of the storage.getManufacture request

Parameter Description
manufacture_id The ID of a manufacture to return detailed data to

The storage.getManufacture response parameters

Parameter Description
manufacture_id Manufacture ID
storage_name Storage name
storage_id Storage ID
user_id The ID of the user who has manufactured
date Manufacture date
sum The total amount of manufacture in hryvnias/rubles
products List of dishes / semi-finished products included in the manufacture

The products parameter entry

The word “entity” means a dish or a semi-finished product. When the entity is manufactured for the first time, it gets a unique ingredient_id to get its inventory in storage by.

Parameter Description
ingredient_id A unique ingredient_id of the entity
product_id Entity ID
product_name Entity name
product_num Count in pieces, kg, or liters
type Type of entity: 1—semi-finished product, 2—dish

storage.getManufacturesWriteOffs: Manufacture Wastes

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getManufacturesWriteOffs'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&date_from=2017-11-30'
 . '&date_to=2017-11-30'
 . '&per_page=10'
 . '&page=5';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "count":11,
    "page":{  
      "per_page":10,
      "page":2,
      "count":1
    },
    "data":[  
      {  
        "manufacture_id":15,
        "storage_id":2,
        "date":"2017-11-30 15:00:00",
        "products":[  
          {  
            "product_id":105,
            "type":2,
            "num":10,
            "sum":123.45,
            "is_fiscal":0,
            "write_offs":[  
              {  
                "ingredient_id":165,
                "type":1,
                "weight":123.45
              }
            ]
          }
        ]
      }
    ]
  }
}

The method returns the manufacture wastes in the date range and pagination

HTTP GET request

https://joinposter.com/api/storage.getManufacturesWriteOffs

GET parameters of the storage.getManufacturesWriteOffs request

Parameter Description
date_from Sampling start date in the “Y-m-d” format
date_to Sampling end date in the “Y-m-d” format
per_page Orders count on one page. By default, it takes 100; the maximum value is 1000.
page Page number, the default number is 1

The storage.getManufacturesWriteOffs response parameters

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
count Total order count in the selected date range
page Page info
data Order information

Inside the page parameter, there is an object containing the following parameters:

Parameter Description
per_page Orders count on one page
page Current page number
count Orders count on the current page

Inside the data parameter, there is an array, each element of which contains the following parameters:

Parameter Description
manufacture_id Manufacture ID
storage_id Storage ID
date Manufacture date
products Manufactured semi-finished products and dishes

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
product_id The ID of a semi-finished product or dish
type Type: 1—semi-finished product, 2—dish
num Count
sum The total amount for all quantity
is_fiscal Tha status of fiscality: 0—non-fiscal, 1—fiscal
write_offs Wastes list

Inside the write_offs parameter, there is an array, each element of which contains the following parameters:

Parameter Description
ingredient_id Ingredient ID
type Type: 1—ingredient, 2—semi-finished product
weight Total amount

storage.createManufacture: Create a Manufacture

Request example:

<?
$url = 'https://joinposter.com/api/storage.createManufacture' 
  . '?format=json'
  . '&token=687409:4164553abf6a031302898da7800b59fb';

$manufacture = [
    "date"          => "2016-12-21 11:12:54",
    "storage_id"    => 1,
    "products"      => [
        [
            "id"    => 64,
            "type"  => 1,
            "num"   => 3
        ],
        [
            "id"    => 65,
            "type"  => 1,
            "num"   => 25
        ],
    ]
];

$data = sendRequest($url, 'post', $manufacture, true);

Response example:

{
  "response":6
}

The request creates a manufacture of dishes and semi-finished products

HTTP request

POST https://joinposter.com/api/storage.createManufacture

POST parameters of the storage.createManufacture request

Parameter Description
date Manufacture date
storage_id Storage ID
products List of dishes or semi-finished products included in the manufacture

The products parameter entry

The word “entity” means a dish or a semi-finished product. When the entity is manufactured for the first time, it gets a unique ingredient_id to get its inventory in storage by.

Parameter Description
id Entity ID
num Count in pcs or kg
type Type of entity: 1—semi-finished product, 2—dish

The storage.createManufacture response parameters

Parameter Description
response The created manufacture ID

storage.updateManufacture: Update Manufacture Data

Request example:

<?
$url = 'https://joinposter.com/api/storage.updateManufacture?' .
  'format=json&token=687409:4164553abf6a031302898da7800b59fb';

$manufacture = [
    "manufacture_id"  => 7,
    "date"            => "2016-12-21 12:12:54",
    "storage_id"      => 1,
    "products" => [
        [
            "id"    => 64,
            "type"  => 1,
            "num"   => 3
        ],
        [
            "id"    => 65,
            "type"  => 1,
            "num"   => 25
        ],
  ]
];

$manufacture_id = sendRequest($url, 'post', $manufacture, true);

Response example:

{
  "response":6
}

The request allows updating the existing manufacture data.

HTTP request

POST https://joinposter.com/api/storage.updateManufacture

POST parameters of the storage.updateManufacture request

Parameter Description
manufacture_id The ID of the manufacture being updated
date Manufacture date
storage_id Storage ID
products List of dishes / semi-finished products included in the manufacture

The products parameter entry

The word “entity” means a dish or a semi-finished product. When the entity is manufactured for the first time, it gets a unique ingredient_id to get its inventory in storage by.

Parameter Description
id Entity ID
num Count (in pcs/kg)
type Type of entity: 1—semi-finished product, 2—dish

The storage.updateManufacture response parameters

Parameter Description
response The edited manufacture ID

storage.getMoves: Get All Transfers

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getMoves'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "moving_id":4,
      "date":"2017-11-16 21:34:00",
      "from_storage":1,
      "from_storage_name":"Склад Кухня",
      "to_storage":2,
      "to_storage_name":"Склад Бар",
      "user_id":7,
      "user_name":"Vladimir",
      "sum":150.65
    }
  ]
}

The method returns all transfers

HTTP request

GET https://joinposter.com/api/storage.getMoves

GET parameters of the storage.getMoves request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.

The storage.getMoves response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
moving_id Transfer ID
date Transfer date
from_stoarge The ID of a storage the transfer has been made from
from_storage_name The name of a storage the transfer has been made from
to_storge The ID of a storage the transfer has been made to
to_storage_name The name of a storage the transfer has been made to
user_id The ID of a user who has made the transfer
user_name The name of a user who has made the transfer
sum The amount of transfer in hryvnias/rubles

storage.getMove: Get the Transfer Content

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getMove'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&move_id=2';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "moving_id":2,
      "date":"2016-10-30 12:40:00",
      "from_storage":1,
      "from_storage_name":"Склад Кухня",
      "to_storage":2,
      "to_storage_name":"Склад Бар",
      "user_id":7,
      "user_name":"Poster Root",
      "sum":59.31,
      "ingredients":[
        {
          "link_id":2,
          "ingredient_id":12,
          "product_id":142,
          "ingredient_num":10,
          "ingredient_sum":7.08,
          "type":1,
          "write_off_id":1216696,
          "packing_id":1
        },
        {
          "link_id":3,
          "ingredient_id":91,
          "ingredient_num":1,
          "ingredient_sum":52.23,
          "type":10,
          "write_off_id":1216697,
          "packing_id":2
        }
      ]
    }
  ]
}

The method returns the transfer content, including ingredients and products

HTTP request

GET https://joinposter.com/api/storage.getMove

GET parameters of the storage.getMove request

Parameter Description
move_id A mandatory parameter, the transfer ID
timezone An optional parameter; if it equals client, the date is returned in the account time zone.

The storage.getMove response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
moving_id Transfer ID
date Transfer date
from_stoarge The ID of a storage the transfer has been made from
from_storage_name The name of a storage the transfer has been made from
to_storge The ID of a storage the transfer has been made to
to_storage_name The name of a storage the transfer has been made to
user_id The ID of a user who has made the transfer
user_name The name of a user who has made the transfer
sum The amount of transfer in hryvnias/rubles
ingredients List of ingredients being transferred

Inside the ingredients parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
ingredient_id Ingredient ID
product_id Product ID if it is a product, a modifier, a dish, or a semi-finished product
modificator_id Modifier ID if it is a modifier
ingredient_num Ingredient count
ingredient_sum The transferred ingredient cost in hryvnias/rubles
type Ingredient type: 1—product, 10—ingredient, 8—product modifier, 2—manufactured dish, 3—manufactured semi-finished product
packing_id Pack ID

storage.createMoving: Create a Transfer

Request example:

<?php
$url = 'https://joinposter.com/api/storage.createMoving'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$moving = [
    "moving" => [
        "date"          => "2015-11-18 22:35:54",
        "from_storage"  => "1",
        "to_storage"    => "2",
        "comment"       => "Comment for moving"
    ],
    "ingredient" => [
        [
            "id"        => "138",
            "type"      => "1",
            "num"       => "3",
            "sum"       => "6",
        ]
    ]
];

$data = sendRequest($url, 'post', $moving);

Response example:

{
  "success":1,
  "response":5
}

The method creates a transfer

HTTP request

POST https://joinposter.com/api/storage.createMoving

POST parameters of the storage.createMoving request

Parameter Description
date Waste date and time in the Ymd format
from_storage_id The ID of a storage a transfer is made from
to_storage_id The ID of a storage a transfer is made to
comment An optional parameter, comment for transfer
ingredient Object array for transfer

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product—1, ingredient—4, product modifier—5
num The wasted ingredient count
reason An optional parameter, a reason for waste
packing An optional parameter, the pack ID
sum The cost per unit in hryvnias/rubles

The storage.createMoving response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response Created transfer ID

storage.updateMoving: Update a Transfer

Request example:

<?php
$url = 'https://joinposter.com/api/storage.updateMoving'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$moving = [
    "moving" => [
        "moving_id"     => "16",
        "date"          => "2015-11-18 22:35:54",
        "from_storage"  => "1",
        "to_storage"    => "2"
    ],
    "ingredient" => [
        [
            "id"        => "138",
            "type"      => "1",
            "num"       => "3",
            "sum"       => "6",
        ]
    ]
];

$data = sendRequest($url, 'post', $moving);

Response example:

{
  "success":1,
  "response":16
}

The method updates a transfer

HTTP request

POST https://joinposter.com/api/storage.updateMoving

POST parameters of the storage.updateMoving request

Parameter Description
moving_id The transfer ID that is edited
date Waste date and time in the Ymd format
from_storage_id The ID of a storage a transfer is made from
to_storage_id The ID of a storage a transfer is made to
ingredient Object array for transfer

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product—1, ingredient—4, product modifier—5
num The wasted ingredient count
reason An optional parameter, a reason for waste
packing An optional parameter, the pack ID
sum The cost per unit in hryvnias/rubles

storage.updateMoving response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response Updated transfer ID

storage.deleteMoving: Remove a Transfer

Request example:

<?php
$url = 'https://joinposter.com/api/storage.deleteMoving'
    . '?token=687409:4164553abf6a031302898da7800b59fb';

$delete = [
    'moving_id' => 7
];

$data = sendRequest($url, 'post', $delete);

Response example:

{
  "success":1
}

The method removes a transfer

HTTP request

POST https://joinposter.com/api/storage.deleteMoving

POST parameters of the storage.deleteMoving request

Parameter Description
moving_id The ID of the transfer for removal

The storage.deleteMoving response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful

storage.getSupplies: Get All Supplies

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getSupplies'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "supply_id":"48",
      "storage_id":"1",
      "supplier_id":"1",
      "date":"2017-11-17 08:09:33",
      "supply_sum":"1800",
      "supply_comment":"",
      "storage_name":"Склад Кухня",
      "supplier_name":"Закупщик",
      "delete":"1",
      "account_id":null
    },
    {
      "supply_id":"47",
      "storage_id":"1",
      "supplier_id":"1",
      "date":"2017-05-18 09:11:00",
      "supply_sum":"300000",
      "supply_comment":"",
      "storage_name":"Склад Кухня",
      "supplier_name":"Закупщик",
      "delete":"0",
      "account_id":null
    },
    {
      "supply_id":"46",
      "storage_id":"1",
      "supplier_id":"1",
      "date":"2017-05-18 09:07:00",
      "supply_sum":"669882890",
      "supply_comment":"",
      "storage_name":"Склад Кухня",
      "supplier_name":"Закупщик",
      "delete":"0",
      "account_id":null
    }
  ]
}

The method returns all supplies

HTTP request

GET https://joinposter.com/api/storage.getSupplies

GET parameters of the storage.getSupplies request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
limit An optional parameter, the number of supplies to be got. If dateFrom and dateTo are used, this parameter is ignored.
offset An optional parameter, the number of entries to be skipped from the top of the list. By default, all supplies will be displayed. If dateFrom and dateTo are used, this parameter is ignored.

The storage.getSupplies response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
supply_id Supply ID
storage_id Storage ID the supply has been made to
supplier_id Supplier ID
date Supply date
account_id Financial account ID the supply has been wasted from
supply_sum Supply amount in kopecks
supply_comment Comment
storage_name Storage name
supplier_name Supplier name
delete The status of the supply having been removed: 1—removed, 0—not removed

storage.getSupplyIngredients: Get the Supply Ingredients

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getSupplyIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&supply_id=46';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "ingredient_id":"66",
      "supply_ingredient_num":"3.00000",
      "supply_ingredient_sum":"15000",
      "ingredient_name":"Шен Да Бай Ча-Дзень Гу",
      "ingredient_unit":"kg",
      "tax_id": 0
    },
    {
      "ingredient_id":"68",
      "supply_ingredient_num":"2.50000",
      "supply_ingredient_sum":"17500",
      "ingredient_name":"Шен Мен Ку",
      "ingredient_unit":"kg",
      "tax_id": 0
    },
    {
      "ingredient_id":"67",
      "supply_ingredient_num":"130000.00000",
      "supply_ingredient_sum":"650000000",
      "ingredient_name":"Шен с горы У Лянь Шань-Дзень Гу",
      "ingredient_unit":"kg",
      "tax_id": 0
    },
    {
      "ingredient_id":"69",
      "supply_ingredient_num":"1400.00000",
      "supply_ingredient_sum":"16100000",
      "ingredient_name":"Шу Пуэр 20 лет",
      "ingredient_unit":"p",
      "tax_id": 0
    },
    {
      "ingredient_id":"76",
      "supply_ingredient_num":"30.00000",
      "supply_ingredient_sum":"390",
      "ingredient_name":"Яйца куринные",
      "ingredient_unit":"p",
      "tax_id": 0
    }
  ]
}

The method returns the supply ingredients

HTTP request

GET https://joinposter.com/api/storage.getSupplyIngredients

GET parameters of the storage.getSupplyIngredients request

Parameter Description
supply_id A mandatory parameter, the supply ID

The storage.getSupplyIngredients response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
ingredient_id Ingredient ID
supply_ingredient_num Ingredient count
supply_ingredient_sum Total amount of supply per ingredient in kopecks
ingredient_name Ingredient name
ingredient_unit Unit: kg—kg, p—pcs, l—l
tax_id Tax ID

storage.createSupply: Create Supply

Request example:

<?php
$url = 'https://joinposter.com/api/storage.createSupply'
    . '?token=687409:4164553abf6a031302898da7800b59fb';

$supply = [
    "supply" => [
        "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);

Response example:

{
  "success":1,
  "response":7
}

The method creates a supply

HTTP request

POST https://joinposter.com/api/storage.createSupply

POST parameters of the storage.createSupply request

Object supply contains the following parameters

Parameter Description
date Supply date in the Y-m-d H:i:s format
supplier_id Supplier ID
storage_id The ID of the storage the supply is made to
account_id An optional parameter, the account ID in the accounting department the supply is attached to
ingredient Object array for supply

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product—1, ingredient—4, product modifier—5
num The wasted ingredient count
sum The cost per unit in hryvnias/rubles
packing An optional parameter, the pack ID

storage.createSupply response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response Created transfer ID

storage.updateSupply: Update Supply

Request example:

<?php
$url = 'https://joinposter.com/api/storage.updateSupply'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$supply = [
    "supply" => [
        "supply_id"     => "51",
        "supplier_id"   => "1",
        "storage_id"    => "1",
        "date"          => date("Y-m-d H:i:s"),
    ],
    "ingredient" => [
        [
            "id"        => "138",
            "type"      => "1",
            "num"       => "3",
            "sum"       => "6",
        ]
    ]
];

$data = sendRequest($url, 'post', $supply);

Response example:

{
  "success":1,
  "response":"51"
}

The method updates a supply

HTTP request

POST https://joinposter.com/api/storage.updateSupply

POST parameters of the storage.updateSupply request

Parameter Description
supply_id The edited supply ID
date Supply date in the Y-m-d H:i:s format
supplier_id Supplier ID
storage_id A mandatory parameter, the ID of the storage the supply is made to
account_id An optional parameter, the account ID in the accounting department the supply is attached to
ingredient Object array for supply

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product—1, ingredient—4, product modifier—5
num The wasted ingredient count
sum The cost per unit in hryvnias/rubles
packing An optional parameter, the pack ID

The storage.updateSupply response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response The updated supply ID

storage.deleteSupply: Remove Supply

Request example:

<?php
$url = 'https://joinposter.com/api/storage.deleteSupply'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$delete = [
    'supply_id' => 7
];

$data = sendRequest($url, 'post', $delete);

Response example:

{
  "success":1
}

The method removes a supply

HTTP request

POST https://joinposter.com/api/storage.deleteSupply

POST parameters of the storage.deleteSupply request

Parameter Description
supply_id The ID of the supply for removal

The storage.deleteSupply response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful

storage.getSuppliers: Get all Suppliers

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getSuppliers'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "supplier_id":"1",
      "supplier_name":"Закупщик",
      "supplier_phone":"+7 499 555 55 55",
      "supplier_adress":"",
      "supplier_comment":"",
      "supplier_code":"",
      "supplier_tin":"",
      "delete":"0"
    },
    {
      "supplier_id":"2",
      "supplier_name":"Напитков Иван",
      "supplier_phone":"0956734678",
      "supplier_adress":"ул. Лесная 3",
      "supplier_comment":"",
      "supplier_code":"",
      "supplier_tin":"",
      "delete":"0"
    },
    {
      "supplier_id":"3",
      "supplier_name":"Овощной Иван",
      "supplier_phone":"0987658943",
      "supplier_adress":"ул. Байкальская",
      "supplier_comment":"",
      "supplier_code":"",
      "supplier_tin":"",
      "delete":"0"
    }
  ]
}

The method returns all suppliers

HTTP request

GET https://joinposter.com/api/storage.getSuppliers

GET parameters of the storage.getSuppliers request

Parameter Description
id_1c An optional parameter; true if id_1 is returned

The storage.getSuppliers response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
supplier_id Supplier ID
supplier_name Supplier name
supplier_phone Supplier phone number
supplier_adress Supplier address
supplier_comment Comment
supplier_code Unique Identification Number of a legal entity
supplier_tin Supplier TIN
delete The status of a supplier removed: 1—removed, 0—not removed

storage.createSupplier: Create a Supplier

Request example:

<?php
$url = 'https://joinposter.com/api/storage.createSupplier'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$supplier = [
    'supplier_name'    => 'Валера',
    'supplier_adress'  => 'пр. Петровского',
    'supplier_phone'   => 380671234567,
    'supplier_code'    => 32855961,
    'supplier_tin'     => 6449013711,
    'supplier_comment' => 'Мясо',
];

$data = sendRequest($url, 'post', $supplier);

Response example:

{  
  "response":6
}

The method creates a supplier

HTTP POST request

https://joinposter.com/api/storage.createSupplier

POST parameters of the storage.createSupplier request

Parameter Description
supplier_name Supplier name
supplier_adress Address
supplier_phone Phone number
supplier_code EDRPOU
supplier_tin TIN
supplier_comment Comment

The storage.createSupplier response parameters

Parameter Description
response The created supplier ID

storage.getIngredientWriteOff: Get Non-Manual Wastes

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getIngredientWriteOff'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "write_off_id":"1518217",
      "transaction_id":"388684",
      "tr_product_id":"2125179",
      "storage_id":"1",
      "to_storage":"0",
      "ingredient_id":"936",
      "product_id":"934",
      "modificator_id":"0",
      "prepack_id":"0",
      "weight":"1.00000",
      "unit":"p",
      "cost":"0",
      "user_id":"1",
      "type":"1",
      "time":"1510668937861",
      "date":"2017-11-14 17:15:38",
      "reason":"",
      "product_name":"Fiscal Test",
      "name":"Demo"
    }
  ]
}

The method returns non-manual wastes

HTTP request

GET https://joinposter.com/api/storage.getIngredientWriteOff

GET parameters of the storage.getIngredientWriteOff request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
storage_id An optional parameter, the ID of the storage to return wastes. The default value is all storages.
ingredient_id An optional parameter, the ID of the ingredient to return wastes for. The default value is all ingredients.

The storage.getIngredientWriteOff response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
write_off_id Waste ID
transaction_id Transaction ID
storage_id Waste storage ID
to_storage Transfer storage ID
ingredient_id Ingredient ID
product_id Product ID
modificator_id Modifier ID; if there is no modifier, it is 0
prepack_id Semi-finished product ID
weight Ingredient count
unit Ingredient unit: kg—kilograms, p—pieces, l—liters
cost The total waste amount for the ingredient in kopecks. If you need to know the food cost, divide cost by weight.
user_id Waiter ID
type Operation type: 4—transfer, 1—waste, 2—manual waste
time Waste date in the unixtimestamp format
date Waste date
product_name Product name
name Waiter’s name

storage.createWriteOff: Create a Waste

Request example:

<?php
$url = 'https://joinposter.com/api/storage.createWriteOff'
    . '?token=687409:4164553abf6a031302898da7800b59fb';

$writeOff = [
    "write_off" => [
        "storage_id"    => "1",
        "date"          => date("Y-m-d H:i:s"),
    ],
    "ingredient" => [
        [
            "id"        => "138",
            "type"      => "1",
            "weight"    => "3",
            "sum"       => "6",
        ]
    ]
];

$data = sendRequest($url, 'post', $writeOff);

Response example:

{
  "success":1,
  "response":6
}

The method creates a waste

HTTP request

POST https://joinposter.com/api/storage.createWriteOff

POST parameters of the storage.createWriteOff request

Parameter Description
date Supply date in the Y-m-d H:i:s format
storage_id Waste storage ID
ingredient Waste object array
reason_id An optional parameter, id reason of waste

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product — 1, dish — 2, prepack — 3, ingredient — 4, product modifier — 5
weight The wasted ingredient count
sum The cost per unit in hryvnias/rubles
packing An optional parameter, the pack ID
reason An optional parameter, comment for ingredient write-off

The storage.createWriteOff response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response Created waste ID

storage.updateWriteOff: Update a Waste

Request example:

<?php
$url = 'https://joinposter.com/api/storage.updateWriteOff'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$writeOff = [
    "write_off" => [
        "id"  => "56",
        "storage_id"    => "1",
        "date"          => date("Y-m-d H:i:s"),
    ],
    "ingredient" => [
        [
            "id"        => "138",
            "type"      => "1",
            "weight"    => "3",
            "sum"       => "6",
        ]
    ]
];

$data = sendRequest($url, 'post', $writeOff);

Response example:

{
  "success":1,
  "response":56
}

The method updates a waste

HTTP request

POST https://joinposter.com/api/storage.updateWriteOff

POST parameters of the storage.updateWriteOff request

Parameter Description
id Edited waste ID
date Supply date in the Y-m-d H:i:s format. The date must be in the inventory check period in which the waste has been made.
storage_id Waste storage ID
ingredient Waste object array
reason_id An optional parameter, id reason of waste

Each object of the ingredient array contains the following parameters

Parameter Description
id The ID of an ingredient, product, or a product modifier
type Type of the wasted object: product—1, dish — 2, prepack — 3, ingredient—4, product modifier—5
weight The wasted ingredient count
sum The cost per unit in hryvnias/rubles
packing An optional parameter, the pack ID
reason An optional parameter, comment for ingredient write-off

The storage.updateWriteOff response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful
response Updated waste ID

storage.deleteWriteOff: Remove a Waste

Request example:

<?php
$url = 'https://joinposter.com/api/storage.deleteWriteOff'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$delete = [
    'write_off_id' => 60
];

$data = sendRequest($url, 'post', $delete);

Response example:

{
  "success":1
}

The method removes a waste

HTTP request

POST https://joinposter.com/api/storage.deleteWriteOff

POST parameters of the storage.deleteWriteOff request

Parameter Description
write_off_id The ID of the waste for removal

The storage.deleteWriteOff response parameters

Parameter Description
success The operation status: 1—successful, 0—unsuccessful

storage.getPacks: List of Packs

Request example:

<?
$url = 'https://joinposter.com/api/storage.getPacks' 
  . '?format=json'
  . '&token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "pack_id":"1",
      "name":"",
      "unit":"p",
      "count":"0.0000",
      "type":"0"
    },
    {
      "pack_id":"2",
      "name":"",
      "unit":"l",
      "count":"0.0000",
      "type":"0"
    },
    {
      "pack_id":"3",
      "name":"",
      "unit":"kg",
      "count":"0.0000",
      "type":"0"
    },
    {
      "pack_id":"5",
      "name":"Milk pack",
      "unit":"p",
      "count":"20.0000",
      "type":"1"
    },
    {
      "pack_id":"6",
      "name":"Water",
      "unit":"l",
      "count":"20.0000",
      "type":"1"
    }
  ]
}

The request for a list of all packs.

HTTP request

GET https://joinposter.com/api/storage.getPacks

The storage.getPacks response parameters

Parameter Description
pack_id Pack ID
name Pack name
unit Unit: kg—kg, p—pcs, l—l
count Count in pieces, kg, or liters
type Pack type: 0—basic, 1—custom

storage.getPack: Get a Pack

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getPack' 
  . '?format=json'
  . '&token=687409:4164553abf6a031302898da7800b59fb'
  . '&pack_id=4';

$data = sendRequest($url);

Response example:

{
  "response":{
    "pack_id":"5",
    "name":"Пак молока",
    "unit":"p",
    "count":"20.0000",
    "type":"1"
  }
}

The method returns the specific pack data.

HTTP request

GET https://joinposter.com/api/storage.getPack

GET parameters of the storage.getPack request

Parameter Description
pack_id The ID of a pack to return the detailed data for

The storage.getPack response parameters

Parameter Description
pack_id Pack ID
name Pack name
unit Unit: kg—kg, p—pcs, l—l
count Count in pieces, kg, or liters
type Pack type: 0—basic, 1—custom

storage.getWastes: List of Manual Wastes

Request example:

<?
$url = 'https://joinposter.com/api/storage.getWastes'
  . '?token=687409:4164553abf6a031302898da7800b59fb'
  . '&dateFrom=20170101'
  . '&dateTo=20180101'
  . '&1c=true';

$data = sendRequest($url);

Response example:

{
  "response": [
    {
      "waste_id": 1,
      "total_sum": 2800,
      "user_id": 1,
      "storage_id": 1,
      "date": "2017-04-26 14:30:02",
      "reason_id": 0,
      "reason_name": null,
      "delete": 0
    },
    {
      "waste_id": 2,
      "total_sum": 791,
      "user_id": 1,
      "storage_id": 1,
      "date": "2017-04-26 15:21:12",
      "reason_id": 1,
      "reason_name": "Spoiled",
      "delete": 1
    }
  ]
}

The request for a list of all manual wastes.

HTTP request

GET https://joinposter.com/api/storage.getWastes

GET parameters of the storage.getWastes request

Parameter Description
dateFrom An optional parameter. The sampling start date (Ymd). The default date is a month ago.
dateTo An optional parameter. The sampling end date (Ymd). The default date is the current date.
1c_id An optional parameter. It allows returning manual wastes taking into account the removed ones (returns the delete flag). The value must be specified as true.

The storage.getWastes response parameters

Parameter Description
waste_id Manual waste ID
total_sum Total waste amount
user_id The ID of the user who has made the waste
storage_id The ID of the storage the waste has been made from
date Waste date
reason_id Waste reason ID
reason_name Waste reason
delete The status of the waste having been removed: 1—removed, 0—not removed

storage.getWaste: Manual Waste Data

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getWaste'
  . '?token=687409:4164553abf6a031302898da7800b59fb'
  . '&waste_id=1';

$data = sendRequest($url);

Response example:

{
  "response": {
    "waste_id": 1,
    "total_sum": 2800,
    "user_id": 1,
    "storage_id": 1,
    "date": "2017-04-26 14:30:02",
    "reason_id": 1,
    "reason_name": "Истек срок годности",
    "elements": [
      {
        "type": 8,
        "product_id": 8,
        "modificator_id": 2,
        "count": 1,
        "ingredients": [
          {
            "write_off_id": 118,
            "ingredient_id": 21,
            "product_id": 8,
            "modificator_id": 2,
            "prepack_id": 0,
            "weight": 1,
            "unit": "p",
            "cost": 800
          }
        ]
      },
      {
        "type": 3,
        "product_id": 4,
        "count": 1,
        "ingredients": [
          {
            "write_off_id": 121,
            "ingredient_id": 16,
            "product_id": 4,
            "modificator_id": 0,
            "prepack_id": 0,
            "weight": 1,
            "unit": "kg",
            "cost": 500
          },
          {
            "write_off_id": 122,
            "ingredient_id": 15,
            "product_id": 4,
            "modificator_id": 0,
            "prepack_id": 0,
            "weight": 1,
            "unit": "kg",
            "cost": 1500
          }
        ]
      }
    ]
  }
}

The method returns the specific manual waste detailed data

HTTP request

GET https://joinposter.com/api/storage.getWaste

GET parameters of the storage.getWaste request

Parameter Description
waste_id Manual waste ID to return the detailed data to

The storage.getWaste response parameters

Parameter Description
waste_id Manual waste ID
total_sum Total waste amount
user_id The ID of the user who has made the waste
storage_id The ID of the storage the waste has been made from
date Waste date
reason_id Waste reason ID
reason_name Waste reason
elements List of wasted entities.

Each element inside elements has the following parameters:

Parameter Description
type Wasted entity type: 1—product, 2—dish, 3—semi-finished product, 8—modifier, 10—ingredient
product_id Product ID
modificator_id Modifier ID
count Wasted specific entities count
ingredients Wasted ingredient array

Each element inside ingredients has the following parameters:

Parameter Description
ingredient_id Ingredient ID
write_off_id Specific waste ID
prepack_id Pack ID
product_id Product ID
weight The waste amount in kilograms, liters, or units
unit unit
cost The total waste amount for the ingredient in kopecks. If you need to know the food cost, divide cost by weight.

storage.getWasteReasons: List of Waste Reasons

Request example:

<?
$url = 'https://joinposter.com/api/storage.getWasteReasons'
  . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "reason_id":1,
         "name":"Истек срок годности"
      }
   ]
}

The method returns a list of all the waste reasons

HTTP GET request

GET https://joinposter.com/api/storage.getWasteReasons

The storage.getWasteReasons response parameters

Parameter Description
reason_id Waste reason ID
name Waste reason

storage.getInventoryIngredients: Get an Ingredient Inventory Check

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getInventoryIngredients'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&storage_id=1';

$data = sendRequest($url);

Response example:

{
  "response":{
    "ingredients":{
      "115":{
        "item_id":"11",
        "item":"Яблочный",
        "startrest":655,
        "startrestcurrency":8508.45,
        "income":0,
        "charges":1563,
        "writeoff":0,
        "writeoffcurrency":0,
        "estimatedrest":-908,
        "primecost":12.99,
        "factrest":"''",
        "fact_rest_in_prepack":"''",
        "fact_rest_sum":"''",
        "difference":"''",
        "diffcurrency":"''",
        "partial_write_off":"0",
        "unit":"pcs",
        "db_unit":"p"
      },
      "116":{
        "item_id":"76",
        "item":"Яйца куринные (ing)",
        "startrest":21,
        "startrestcurrency":36.54,
        "income":0,
        "charges":1699,
        "writeoff":0,
        "writeoffcurrency":0,
        "estimatedrest":-1678,
        "primecost":1.74,
        "factrest":"''",
        "fact_rest_in_prepack":"''",
        "fact_rest_sum":"''",
        "difference":"''",
        "diffcurrency":"''",
        "partial_write_off":"0",
        "unit":"pcs",
        "db_unit":"p"
      }
    },
    "manufactures":[

    ],
    "prepacks":{      
      "930":{
        "product_id":"930",
        "product_name":"Кальян с сюрпризом",
        "type":"2",
        "weight_flag":"0",
        "delete":"0",
        "factrest":0,
        "count":0,
        "cost":0,
        "saved":0
      },
      "931":{
        "product_id":"931",
        "product_name":"Маринованные грибы",
        "type":"1",
        "weight_flag":"0",
        "delete":"0",
        "factrest":0,
        "count":0,
        "cost":0,
        "saved":0
      }
    }
  }
}

The method returns an ingredient inventory check

HTTP request

GET https://joinposter.com/api/storage.getInventoryIngredients

GET parameters of the storage.getInventoryIngredients request

Parameter Description
storage_id Storage ID; if inventory_id is not specified, it’s a mandatory parameter
inventory_id Inventory check ID; if storage_id is not specified, it’s a mandatory parameter

The storage.getInventoryIngredients response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
ingredients Ingredient array
manufactures Manufacture array
prepacks An array of dishes and semi-finished products

The ingredients array contains objects with the following parameters:

Parameter Description
item_id Ingredient ID
item Ingredient name
startrest Initial inventory
startrestcurrency Initial inventory in hryvnias/rubles
income The amount of storage incomes for the ingredient, considering the supplies and transfers
charset The amount of expenditure for the ingredient, considering the wastes, manufacture, sales, and transfers
writeoff Wasted amount
writeoffcurrency Wastes in hryvnias/rubles
estimatedrest Estimated inventory
primecost Food cost in hryvnias/rubles
factrest Actual inventory
fact_rest_in_prepack The actual inventory of dishes and semi-finished products
fact_rest_in_sum Actual inventory amount
difference The difference in number between the estimated and actual inventory
diffcurrency The difference in hryvnias/rubles. difference * primecost
partial_write_off The status of an ingredient sold by the piece being allowed to be wasted as the one sold by fractions: 1—allowed, 0—not allowed
unit Unit (pcs/kg/l)
db_unit Ingredient unit: kg—kilograms, p—pieces, l—liters

The manufactures array contains objects with the following parameters:

Parameter Description
item_id Manufacture ID
item Manufacture name
startrest Initial inventory in the amount
startrestcurrency Initial inventory in hryvnias/rubles
income The amount of storage incomes for the ingredient, considering the supplies and transfers
charset The amount of expenditure for the ingredient, considering the wastes, manufacture, sales, and transfers
writeoff Wasted amount
writeoffcurrency The waste amount in hryvnias/rubles
estimatedrest Estimated inventory
primecost Food cost in hryvnias/rubles
factrest Actual inventory
fact_rest_in_prepack The actual inventory of dishes and semi-finished products
fact_rest_in_sum The actual inventory amount in hryvnias/rubles. The difference between the actual and estimated inventory multiplied by the food cost.
difference The difference in number between the estimated and actual inventory
diffcurrency The difference in hryvnias/rubles. difference * primecost
unit Unit (pcs/kg/l)
db_unit Ingredient unit: kg—kilograms, p—pieces, l—liters

The prepacks array contains objects with the following parameters:

Parameter Description
product_id The ID of a dish or a semi-finished product
product_name The name of a dish or a semi-finished product
count Wasted amount in pcs or kg
type Product type: 1—semi-finished product, 2—dish
cost The waste amount in hryvnias/rubles
weight_flag The status of a dish sold by weight: 1—sold by weight, 0—not sold by weight
factrest Actual inventory

storage.getStorageInventories: Get the Storage Inventory History

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getStorageInventories'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&storage_id=1';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "inventory_id":"3",
      "storage_id":"1",
      "date_start":"2015-08-12 19:07:08",
      "date_end":"2017-05-18 09:10:31",
      "date_set":"0000-00-00 00:00:00",
      "date_inventory":"2017-05-18 09:10:31",
      "sum":"871875648398",
      "inventory_status":"1"
    },
    {
      "inventory_id":"2",
      "storage_id":"1",
      "date_start":"2015-02-05 13:10:26",
      "date_end":"2015-08-12 19:07:08",
      "date_set":"0000-00-00 00:00:00",
      "date_inventory":"0000-00-00 00:00:00",
      "sum":"104384",
      "inventory_status":"1"
    },
    {
      "inventory_id":"1",
      "storage_id":"1",
      "date_start":"2013-08-09 16:30:13",
      "date_end":"2015-02-05 13:10:26",
      "date_set":"0000-00-00 00:00:00",
      "date_inventory":"0000-00-00 00:00:00",
      "sum":"-21236",
      "inventory_status":"1"
    }
  ]
}

The method returns a storage inventory history

HTTP request

GET https://joinposter.com/api/storage.getStorageInventories

GET parameters of the storage.getStorageInventories request

Parameter Description
storage_id A mandatory parameter, the storage ID to return the inventory checks to

The storage.getStorageInventories response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
inventory_id Inventory check ID
storage_id Storage ID
data_start Inventory check start date
data_end Inventory check end date
date_set Backdating date. If the inventory check was backdated, it corresponds to date_end.
data_inventory The inventory check actual date
sum Total amount of the inventory check product food cost in kopecks
inventory_status Inventory check status: 1—conducted, 0—not conducted

storage.getStorageLeftovers: Get all the Storage Inventories

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getStorageLeftovers'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "ingredient_id":"39",
      "ingredient_name":"Apples",
      "ingredient_left":"3143.00000",
      "limit_value":"0",
      "ingredient_unit":"p",
      "ingredients_type":"2",
      "storage_ingredient_sum":"4591923",
      "prime_cost":1461,
      "hidden":"0"
    },
    {
      "ingredient_id":"11",
      "ingredient_name":"Apple",
      "ingredient_left":"-908.00000",
      "limit_value":"0",
      "ingredient_unit":"p",
      "ingredients_type":"2",
      "storage_ingredient_sum":"0",
      "prime_cost":1299,
      "hidden":"0"
    },
    {
      "ingredient_id":"76",
      "ingredient_name":"Eggs",
      "ingredient_left":"-1678.00000",
      "limit_value":"0",
      "ingredient_unit":"p",
      "ingredients_type":"1",
      "storage_ingredient_sum":"0",
      "prime_cost":174,
      "hidden":"0"
    }
  ]
}

The method returns the storage inventories

HTTP request

GET https://joinposter.com/api/storage.getStorageLeftovers

GET parameters of the storage.getStorageLeftovers request

Parameter Description
storage_id An optional parameter, the ID of the storage to return inventories to. If not specified, they will be displayed for all the storages.
type An optional parameter, the type of entity to return the inventories by: 1—product, 2—manufactured dish, 3—produced semi-finished product, 4—ingredient, 5—product modifier. If not specified, they will be displayed for all entities.
category_id An optional parameter, the category ID to receive ingredients by. The default value is all categories.
zero_leftovers An optional parameter; if true, the method returns zero inventories. By default, they are not returned.

The storage.getStorageLeftovers response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
ingredient_id Ingredient ID
ingredient_name Ingredient name
ingredient_left Total inventory for all storages
limit_value Low stock alert threshold the exceeding of which is notified of
ingredient_unit Unit: kg—kg, p—pcs, l—l
ingredients_type Object type: 1—ingredient, 2—product, product modifier
storage_ingredient_sum Total product amount in storage in kopecks
prime_cost Ingredient food cost in kopecks
hidden The status of the ingredient being hidden: 1—hidden, 0—not hidden

storage.getStorages: Get All Storages

Request example:

<?php
$url = 'https://joinposter.com/api/storage.getStorages'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "storage_id":"1",
      "storage_name":"Склад Кухня",
      "storage_adress":"",
      "delete":"0"
    },
    {
      "storage_id":"2",
      "storage_name":"Склад Бар",
      "storage_adress":"",
      "delete":"0"
    }
  ]
}

The method returns all storages

HTTP request

GET https://joinposter.com/api/storage.getStorages

The storage.getStorages response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
storage_id Storage ID
storage_name Storage name
storage_adress Storage address
delete The status of a storage removed: 1—removed, 0—not removed

storage.getReportMovement: Ingredients movements

Request example:

<?
$url = 'https://joinposter.com/api/storage.getReportMovement'
  . '?token=687409:4164553abf6a031302898da7800b59fb'
  . '&dateFrom=20170101'
  . '&dateTo=20180101'
  . '&storage_id=1'
  . '&type=2';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "ingredient_id":"332",
         "ingredient_name":"Borjome",
         "cost_start":13.63,
         "cost_end":13.63,
         "start":14,
         "income":0,
         "write_offs":0,
         "end":14
      },
      {
         "ingredient_id":"260",
         "ingredient_name":"Sprite",
         "cost_start":8.39,
         "cost_end":8.39,
         "start":2,
         "income":0,
         "write_offs":0,
         "end":2
      }
   ]
}

Request for the ingredients movements report

HTTP request

GET https://joinposter.com/api/storage.getReportMovement

GET-parameters of the storage.getReportMovement

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
storage_id An optional parameter, the storage ID to return the inventory checks to.
type An optional parameter. Ingredients types: 1 — ingredient, 2 — product, 3 — product modifications, 4 — dish, 5 — preparation.

The storage.getReportMovement response parameters

Parameter Description
ingredient_id A unique ingredient_id of the entity
ingredient_name The name of an ingredient
cost_start Average food cost of the ingredient at the date of the beginning of the sample in dollars
cost_end Average food cost of the ingredient at the end of the sample in dollars
start Beginning balance of the ingredient
income Supplies of the ingredient
write_offs Expense of the ingredient
end End balance of the ingredient

egais: EGAIS

Methods for working with EGAIS entities. All methods in this section begin with “egais”.

egais.getPositionsWithSupplyStatus: List of EGAIS positions with supply status

Request example:

<?php

$url = 'https://joinposter.com/api/egais.getPositionsWithSupplyStatus' 
    . '?format=json'
    . '&token=687409:4164553abf6a031302898da7800b59fb'
    . '&after=1544010221'
    . '&per_page=2'
    . '&page=2';

$data = sendRequest($url);

Response example:

{
    "response": [
        {
            "egais_supply_position_id": 1196,
            "egais_supply_entity_id":1,
            "egais_supply_id":2,
            "pdf": "19N00000000000GBE5104A130909005224414101110402021501932518310351244",
            "status": 1,
            "last_modified_time": 1544010222
        },
        {
            "egais_supply_position_id": 1195,
            "egais_supply_entity_id":2,
            "egais_supply_id":2,
            "pdf": "19N00000000000GBE5104A130909005224414101110402021501932518310351243",
            "status": 1,
            "last_modified_time": 1544010222
        }
    ],
    "total_count": 47
}

The method returns a list of EGAIS positions with the supply status in which this position came. Also returns the total number of filtered positions.

HTTP request

GET https://joinposter.com/api/egais.getPositionsWithSupplyStatus

GET parameters of the egais.getPositionsWithSupplyStatus request

Parameter Description
after An optional parameter, position last modification time, unix-timestamp in seconds
per_page An optional parameter, number of items in response
page An optional parameter, pagination page number

Parameters of the egais.getPositionsWithSupplyStatus response

Inside the response parameter, there is an array with objects. Each object contains such parameters as:

Parameter Description
egais_supply_position_id Position id
egais_supply_entity_id Supply entity id
egais_supply_id Supply id
pdf Position pdf417 code
status Supply status: 0 - supply not processed, 1 - supply accepted, 2 - sent for scanning, 3 - scanned, 4 - rejected, 5 - in the process of acceptance
last_modified_time Position last modification time, unix-timestamp in seconds

Inside the total_count is the number of bottles that satisfy the search parameters

clients: Marketing

Methods for working with the Marketing section. All methods of this section begin with “clients.”

clients.getClients: List of Customers

Request example:

<?php
$url = 'https://joinposter.com/api/clients.getClients'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&num=100'
 . '&offset=0';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "client_id":"55",
      "firstname":"",
      "lastname":"Антон",
      "patronymic":"",
      "discount_per":"0",
      "bonus":"10000",
      "total_payed_sum":"0",
      "date_activale":"2017-10-09 15:28:14",
      "phone":"+7 963 031-38-44",
      "phone_number":"79630313844",
      "email":"bezmuki@gmail.com",
      "birthday":"0000-00-00",
      "card_number":"0",
      "client_sex":"0",
      "country":"0",
      "city":"0",
      "comment":"0",
      "address":"0",
      "client_groups_id":"3",
      "client_groups_name":"Накопительная скидка",
      "client_groups_discount":"0",
      "loyalty_type":"1",
      "birthday_bonus":"0",
      "delete":"0",
      "ewallet": "0"
    },
    {  
      "client_id":"54",
      "firstname":"",
      "lastname":"Вася",
      "patronymic":"",
      "discount_per":"0",
      "bonus":"10000",
      "total_payed_sum":"0",
      "date_activale":"2017-10-09 11:39:59",
      "phone":"+7 977 345-34-45",
      "phone_number":"79773453445",
      "email":"sdfs@ffy.hu",
      "birthday":"0000-00-00",
      "card_number":"0",
      "client_sex":"0",
      "country":"0",
      "city":"0",
      "comment":"0",
      "address":"0",
      "client_groups_id":"2",
      "client_groups_name":"Скидка Выходной",
      "client_groups_discount":"15",
      "loyalty_type":"1",
      "birthday_bonus":"0",
      "delete":"0",
      "ewallet": "0"
    }
  ]
}

The method returns a list of customers

HTTP request

GET https://joinposter.com/api/clients.getClients

GET parameters of the clients.getClients request

Parameter Description
num Customer count to receive. By default, it is not transmitted.
offset Customer count to skip from the beginning. By default, it is not transmitted.
group_id Customer group ID. By default, it is not transmitted.
phone Customer phone number in an international format. By default, it is not transmitted.
birthday Customers date of birth in an “md” format. By default, it is not transmitted.
client_id_only An optional parameter; it allows returning customers’ client_id only. The value must be specified as true.
1c It allows returning the customer ID in the 1C system in the response. You must transmit true as a value. By default, it is not transmitted.
order_by A property to sort by. By default, it takes client_id.
sort Sorting order: asc—ascending, desc—descending. The default value is desc.

The clients.getClients response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
client_id Customer ID
firstname Customer first name
lastname Customer last name
patronymic Customer patronymic
discount_per Personal discount or point. It will be applied if it is higher than a customer group percentage.
bonus The current amount of accumulated customer points in kopecks
total_payed_sum Total purchase sum in kopecks
date_activale Date of customer creation
phone Customer phone number
phone_number Customer phone number in a digital format
email Customer email address
birthday Customer date of birth
card_number Card number
client_sex Customer gender: 0—not specified, 1—male, 2—female
country Customer country
city Customer city
address Customer address
comment Customer account comment
id_1c Customer ID in the 1C system
client_groups_id Customer group ID
client_groups_name Customer group name
loyalty_type Customer group type: 1—points-based, 2—discount-based
client_groups_discount Group percentage. If it is a points-based group—1, points will be accrued to the paid order amount. If it is a discount-based group—1, discount percentage will be accrued to the order amount.
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.
delete Delete: 0 — No, 1 — Yes
ewallet Electronic wallet balance in cents

clients.getClient: Customer Properties

Request example:

<?php
$url = 'https://joinposter.com/api/clients.getClient'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&client_id=6';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "client_id":"38",
      "firstname":"Попова",
      "lastname":"000022",
      "patronymic":"Елена",
      "discount_per":"0",
      "bonus":"0",
      "total_payed_sum":"417000",
      "date_activale":"2016-04-23 05:14:26",
      "phone":"+380 50 11-11-111",
      "phone_number":"380501111111",
      "email":"contact@joinposter.com",
      "birthday":"1986-11-23",
      "card_number":"0000000000222",
      "client_sex":"0",
      "country":"",
      "city":"",
      "comment":"",
      "address":"",
      "client_groups_id":"7",
      "client_groups_name":"Постоянный клиент",
      "client_groups_discount":"0",
      "loyalty_type":"2",
      "birthday_bonus":"0",
      "accumulation_products":{
        "4":{
          "promotion_id":"4",
          "products":[
            {
              "count":"3",
              "sum":540,
              "product_id":"24",
              "modification_id":"0"
            }
          ]
        }
      },
      "prize_products":[
        {
          "prize_product_id":"301",
          "promotion_id":"4",
          "conditions":{
            "bonus_products":[
              {
                "type":"1",
                "id":"1"
              }
            ],
            "bonus_products_pcs":1,
            "bonus_products_g":0,
            "bonus_products_condition_type":"1",
            "bonus_products_condition_value":"100"
          },
          "date_accrual":"2016-05-11 11:40:10"
        }
      ],
      "ewallet": "1000"
    }
  ]
}

The method returns the customer properties

HTTP request

GET https://joinposter.com/api/clients.getClient

GET parameters of the clients.getClient request

Parameter Description
client_id Customer ID
1c It allows returning the customer ID in the 1C system in the response. You must transmit true as a value. By default, it is not transmitted.

The clients.getClient response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array with an object, each element of which contains the following parameters:

Parameter Description
client_id Customer ID
firstname Customer first name
lastname Customer last name
patronymic Customer patronymic
discount_per Personal discount or point. It will be applied if it is higher than a customer group percentage.
bonus The current amount of accumulated customer points in kopecks
total_payed_sum Total purchase sum in kopecks
date_activale Date of customer creation
phone Customer phone number
phone_number Customer phone number in a digital format
email Customer email address
birthday Customer date of birth
card_number Card number
client_sex Customer gender: 0—not specified, 1—male, 2—female
country Customer country
city Customer city
address Customer address
comment Customer account comment
id_1c Customer ID in the 1C system
client_groups_id Customer group ID
client_groups_name Customer group name
loyalty_type Customer group type: 1—points-based, 2—discount-based
client_groups_discount Group percentage. If it is a points-based group—1, points will be accrued to the paid order amount. If it is a discount-based group—2, discount percentage will be accrued to the order amount.
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.
accumulation_products List of sales relating to accumulation-based promotions. For example, a “5+1” promotion, which takes into account purchases in different orders.
prize_products List of deferred points, which are related to prize promotions. For example, a “Buy a Pizza and Get a 10% Cheaper One Tomorrow” promotion meaning prizes that are not granted immediately but are postponed to the next purchase.
ewallet Electronic wallet balance in cents

The accumulation_products parameter contains the object:

Parameter Description
promotion_id The accumulation-based promotion ID the sale is attached to
products List of products of a sale transaction completed relating to the accumulation-based promotion. The content of this array of products is described below.
product_id Product ID
modification_id Modification ID if a product has modifications
count Product count
sum Product cost

The prize_products parameter contains the object:

Parameter Description
prize_product_id The deferred prize unique ID
promotion_id Prize promotion ID
conditions List of conditions for determining the prize that has to be granted, type designates: 0—of all products, 1—of the category indicated in the ID, 2—specific product with the specified ID, 3—product modification with the specified ID (for convenience, the product_id of the product the modification is related to will be transferred)
bonus_products_pcs The number of points-based product pieces to grant if it is sold by the piece
bonus_products_g The points-based product grams to grant if it is sold by weight
bonus_products_condition_type The conditions for granting points: 1—discount percentage (for example, a 50 or 100% discount), 2—a fixed discount amount (for example, 5-hryvnia/ruble discount on the product), 3—fixed product value (for example, sell at 1 hryvnia/ruble)
bonus_products_condition_value The count for the bonus_products_condition_type parameter. If the value is monetary, the return is in hryvnias/rubles.

clients.createClient: Create a Customer

Request example:

<?php
$url = 'https://joinposter.com/api/clients.createClient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$client = [
    'client_name'             => 'Попова Елена Андреевна',
    '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);

Response example:

{
  "response":4082
}

The method creates a customer

HTTP request

POST https://joinposter.com/api/clients.createClient

POST parameters of the clients.createClient request

Parameter Description
client_name Customer full name
client_sex Customer gender: 0—not specified, 1—male, 2—female
client_groups_id_client Customer group ID
card_number Customer card number
discount_per Personal percentage of a discount or points. It will be applied if it is higher than a customer group percentage.
phone Customer unique phone number, since there cannot be two customers with the same number in the system
email Customer email address
birthday Customer birthday in the “Y-m-d” format
city Customer city
country Customer country
address Customer address
comment Customer account comment
bonus The current amount of the accumulated customer points
total_payed_sum Total purchase sum in kopecks

The clients.createClient response parameters

Parameter Description
response Created customer ID

clients.updateClient: Update Customer Properties

Request example:

<?php
$url = 'https://joinposter.com/api/clients.updateClient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$client = [
  'client_id'               => 50,
  'client_name'             => 'Попова Елена Андреевна',
  'client_sex'              => 2,
  'client_groups_id_client' => 7,
  'card_number'             => '0000000000222',
  'discount_per'            => 0,
  'phone'                   => '+380 50 22-11-111',
  'email'                   => 'contact@joinposter.com',
  'birthday'                => '1986-11-23',
  'bonus'                   => 10,
  'total_payed_sum'         => 417000,
];

$data = sendRequest($url, 'post', $client);

Response example:

{
  "response":4082
}

The method updates the customer properties

HTTP request

POST https://joinposter.com/api/clients.updateClient

POST parameters of the clients.updateClient request

Parameter Description
client_id Customer ID
client_name Customer full name
client_sex Customer gender: 0—not specified, 1—male, 2—female
client_groups_id_client Customer group ID
card_number Customer card number
discount_per Personal percentage of a discount or points. It will be applied if it is higher than a customer group percentage.
phone Customer unique phone number, since there cannot be two customers with the same number in the system
email Customer email address
birthday Customer birthday in the “Y-m-d” format
city Customer city
country Customer country
address Customer address
comment Customer account comment
bonus The current amount of the accumulated customer points
total_payed_sum Total purchase sum in kopecks

The clients.updateClient response parameters

Parameter Description
response Updated customer ID

clients.changeClientBonus: Update the Customer Points Count

Request example:

<?php
$url = 'https://joinposter.com/api/clients.changeClientBonus'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$bonus = [
  'client_id' => 7,
  'count'     => 10,
];

$data = sendRequest($url, 'post', $bonus);

Response example:

{
  "response":30
}

The method updates the customer points count. It is used only for customers with a points-based loyalty program.

HTTP request

POST https://joinposter.com/api/clients.changeClientBonus

POST parameters of the clients.changeClientBonus request

Parameter Description
client_id Customer ID
count The points count to be accrued to the customer. If the count is positive—to accrue; if the count is negative—to write off.
block_webhook An optional parameter; if it is true, the response won’t contain a webhook on updating the customer’s data

The clients.changeClientBonus response parameters

Parameter Description
response The points count that a customer has got after the updates have been made

clients.changeClientPayedSum: Update the Customer Total Purchase Sum

Request example:

<?php
$url = 'https://joinposter.com/api/clients.changeClientPayedSum'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$sum = [
  'client_id' => 50,
  'count'     => 20,
];

$data = sendRequest($url, 'post', $sum);

Response example:

{
  "response":110
}

The method updates the customer total purchase sum

HTTP request

POST https://joinposter.com/api/clients.changeClientPayedSum

POST parameters of the clients.changeClientPayedSum request

Parameter Description
client_id Customer ID
count The purchase sum to be accrued to the customer. If the count is positive—to accrue; if the count is negative—to write off.
block_webhook An optional parameter; if it is true, the response won’t contain a webhook on updating the customer’s data

The clients.changeClientPayedSum response parameters

Parameter Description
response The total purchase sum that the customer has got after the updates have been made

clients.removeClient: Remove a Customer

Request example:

<?php
$url = 'https://joinposter.com/api/clients.removeClient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$client = [
    'client_id' => 2,
];

$data = sendRequest($url, 'post', $client);

Response example:

{  
  "response":true
}

The method removes a customer

HTTP request

GET https://joinposter.com/api/clients.removeClient

POST parameters of the clients.removeClient request

Parameter Description
client_id Customer ID

The clients.removeClient response parameters

Parameter Description
response true if the customer has been successfully removed

clients.getGroups: List of Customer Groups

Request example:

<?php
$url = 'https://joinposter.com/api/clients.getGroups'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "client_groups_id":"2",
      "client_groups_name":"Скидка Выходной",
      "client_groups_discount":"15",
      "loyalty_type":"1",
      "birthday_bonus":"0",
      "count_groups_clients":"21",
      "delete":"0"
    },
    {  
      "client_groups_id":"3",
      "client_groups_name":"Накопительная скидка",
      "client_groups_discount":"0",
      "loyalty_type":"1",
      "birthday_bonus":"0",
      "count_groups_clients":"8",
      "delete":"0"
    }
  ]
}

The method returns a list of customer groups

HTTP request

GET https://joinposter.com/api/clients.getGroups

The clients.getGroups response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
client_groups_id Customer group ID
client_groups_name Customer group name
client_groups_discount Group percentage. If it is a points-based group, points will be accrued to the paid order amount. If it is a discount-based group, discount percentage will be accrued to the order amount.
loyalty_type Customer group type: 1—a points-based one, 2—discount-based
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.
count_groups_clients Number of customers who are in this group
delete Determines whether the group has been removed: 1—removed, 0—not

clients.getGroup: Customer Group Properties

Request example:

<?php
$url = 'https://joinposter.com/api/clients.getGroup'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&group_id=2';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "client_groups_id":"2",
    "client_groups_name":"Скидка Выходной",
    "client_groups_discount":"15",
    "loyalty_type":"1",
    "birthday_bonus":"0",
    "count_groups_clients":"21",
    "delete":"0"
  }
}

The method returns the customer group properties

HTTP request

GET https://joinposter.com/api/clients.getGroup

GET parameters of the clients.getGroup request

Parameter Description
group_id Customer group ID

The clients.getGroup response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
client_groups_id Customer group ID
client_groups_name Customer group name
client_groups_discount Group percentage. If it is a points-based group—1, points will be accrued to the paid order amount. If it is a discount-based group—2, discount percentage will be accrued to the order amount.
loyalty_type Customer group type: 1—a points-based one, 2—discount-based
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.
count_groups_clients Number of customers who are in this group
delete Determines whether the group has been removed: 1—removed, 0—not

clients.createGroup: Create a Customer Group

Request example:

<?php
$url = 'https://joinposter.com/api/clients.createGroup'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$group = [
    'client_groups_name'     => 'Постоянный посетитель',
    'loyalty_type'           => 1,
    'client_groups_discount' => 10,
    'birthday_bonus'         => 50.00,
];

$data = sendRequest($url, 'post', $group);

Response example:

{
  "response":6
}

The method creates a customer group

HTTP request

POST https://joinposter.com/api/clients.createGroup

POST parameters of the clients.createGroup request

Parameter Description
client_groups_name Customer group name
loyalty_type Customer group type: 1—a points-based one, 2—discount-based
client_groups_discount Group percentage. If it is a points-based group—1, points will be accrued to the paid order amount. If it is a discount-based group—2, discount percentage will be accrued to the order amount.
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.

The clients.createGroup response parameters

Parameter Description
response Created customer group ID

clients.updateGroup: Update the Customer Group Properties

Request example:

<?php
$url = 'https://joinposter.com/api/clients.updateGroup'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$group = [
  'client_groups_id'       => 5,
  'client_groups_name'     => 'Everyday guest',
  'loyalty_type'           => 1,
  'client_groups_discount' => 10,
  'birthday_bonus'         => 50.00,
];

$data = sendRequest($url, 'post', $group);

Response example:

{
  "response":6
}

The method updates the customer group properties

HTTP request

POST https://joinposter.com/api/clients.updateGroup

POST parameters of the clients.updateGroup request

Parameter Description
client_groups_id Customer group ID
client_groups_name Customer group name
loyalty_type Customer group type: 1—a points-based one, 2—discount-based
client_groups_discount Group percentage. If it is a points-based group—1, points will be accrued to the paid order amount. If it is a discount-based group—2, discount percentage will be accrued to the order amount.
birthday_bonus The points count in kopecks accrued on the customer’s birthday. It is used only by points-based groups.

The clients.updateGroup response parameters

Parameter Description
response Changed customer group ID

clients.removeGroup: Remove a Customer Group

Request example:

<?php
$url = 'https://joinposter.com/api/clients.removeGroup?'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$group = [
  'group_id' => 6,
];

$data = sendRequest($url, 'post', $group);

Response example:

{
  "response":true
}

The method removes a customer group

HTTP request

POST https://joinposter.com/api/clients.removeGroup

POST parameters of the clients.removeGroup request

Parameter Description
group_id Customer group ID

The clients.removeGroup response parameters

Parameter Description
response true, if the customer group has been successfully deleted

clients.sendSms: Send an SMS from the Account

Request example:

<?php
$url = 'https://joinposter.com/api/clients.sendSms'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$sms = [
    'phone' => 380684113524,
    'message' => 'У вас осталось 10 бонусов на счету'
];

$data = sendRequest($url, 'post', $sms);

Response example:

{
  "response":true
}

The method sends an SMS from the Poster account.

HTTP request

POST https://joinposter.com/api/clients.sendSms

POST parameters of the clients.sendSms request

Parameter Description
phone The telephone number to which an SMS is sent. The number must be in an international format, without the initial +.
message SMS message text

The clients.sendSms response parameters

Parameter Description
response Result of sending an SMS: “ true—if sent, otherwise the error object will return

transactions: Orders

Methods for working with the order section. All methods of this section begin with “transactions.”

transactions.getTransactions: Order List

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.getTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&date_from=2017-11-30'
 . '&date_to=2017-11-30'
 . '&per_page=10'
 . '&page=5';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "count":41,
    "page":{  
      "per_page":10,
      "page":5,
      "count":1
    },
    "data":[  
      {  
        "transaction_id":25221,
        "table_id":1,
        "spot_id":1,
        "client_id":68,
        "sum":360,
        "payed_sum":0,
        "payed_cash":0,
        "payed_card":0,
        "payed_cert":0,
        "payed_bonus":0,
        "payed_third_party":0,
        "round_sum":0,
        "pay_type":3,
        "reason":0,
        "tip_sum": 0,
        "bonus":0,
        "discount":100,
        "print_fiscal":0,
        "date_close":"2017-11-30 13:48:09",
        "products":[  
          {  
            "product_id":469,
            "modification_id":0,
            "type":2,
            "workshop_id":2,
            "num":2,
            "product_sum":360,
            "payed_sum":0,
            "cert_sum":0,
            "bonus_sum":0,
            "bonus_accrual":0,
            "round_sum":0,
            "discount":100,
            "tax_fiscal":1
          }
        ]
      }
    ]
  }
}

The method returns an order list of with products in the date range and pagination

HTTP GET request

https://joinposter.com/api/transactions.getTransactions

GET parameters of the transactions.getTransactions request

Parameter Description
date_from Sampling start date in the “Y-m-d” format
date_to Sampling end date in the “Y-m-d” format
per_page Orders count on one page. By default, it takes 100; the maximum value is 1000.
page Page number, the default number is 1

The transactions.getTransactions response parameters

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
count Total order count in the selected date range
page Page info
data Order information

Inside the page parameter, there is an object containing the following parameters:

Parameter Description
per_page Orders count on one page
page Current page number
count Orders count on the current page

Inside the data parameter, there is an array, each element of which contains the following parameters:

Parameter Description
transaction_id Order ID
table_id Table ID
spot_id Location ID
client_id Customer ID
sum Total order amount
payed_sum The total amount paid, from payed_cash and payed_card
payed_cash The amount paid by cash
payed_card The amount paid by bank transfer
payed_cert The amount paid by a gift card
payed_bonus The amount paid by points
payed_third_party The аmount paid by third-party
round_sum Receipt rounding amount
pay_type Type of payment: 0—closed without payment, 1—payment by cash, 2—payment by bank transfer, 3—mixed payment
reason Reason for closing the bill without payment: 1—the customer has left, 2—on the house, 3—a waiter’s error
tip_sum Service fee amount
bonus An accrued point as a percentage of payed_sum
discount Order discount in percentage
print_fiscal The status of printing a fiscal receipt: 0 — have not printed, 1 — have printed, 2 — fiscal return
date_close Order closing date in the “Y-m-d H:i:s” format
products Order products

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
product_id Product ID
modification_id Modification ID
type Product type: 2—dish, 3—product
workshop_id Station ID
num Product count in an order
product_sum Product cost
payed_sum Amount paid
cert_sum The amount paid by a gift card
bonus_sum The amount paid by points
bonus_accrual Points accrued
round_sum Rounding amount
discount Discount on a product in percents
tax_fiscal Tax on a fiscal printer

transactions.getTransactionsWriteOffs: Order Wastes

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.getTransactionsWriteOffs'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&date_from=2017-11-30'
 . '&date_to=2017-11-30'
 . '&per_page=10'
 . '&page=5';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "count":41,
    "page":{  
      "per_page":10,
      "page":5,
      "count":1
    },
    "data":[  
      {  
        "transaction_id":25221,
        "write_offs":[  
          {  
            "write_off_id":143731,
            "storage_id":3,
            "product_id":469,
            "modificator_id":0,
            "ingredient_id":30,
            "prepack_id":0,
            "cost":26.68,
            "weight":0.16,
            "unit":"kg",
            "reason":""
          }
        ]
      }
    ]
  }
}

The method returns the order wastes in the date range and pagination

HTTP GET request

https://joinposter.com/api/transactions.getTransactionsWriteOffs

GET parameters of the transactions.getTransactionsWriteOffs request

Parameter Description
date_from Sampling start date in the “Y-m-d” format
date_to Sampling end date in the “Y-m-d” format
per_page Orders count on one page. By default, it takes 100; the maximum value is 1000.
page Page number, the default number is 1

The transactions.getTransactionsWriteOffs response parameters

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
count Total order count in the selected date range
page Page info
data Order information

Inside the page parameter, there is an object containing the following parameters:

Parameter Description
per_page Orders count on one page
page Current page number
count Orders count on the current page

Inside the data parameter, there is an array, each element of which contains the following parameters:

Parameter Description
transaction_id Order ID
write_offs Order wastes

Inside the write_offs parameter, there is an array, each element of which contains the following parameters:

Parameter Description
write_off_id Waste ID
storage_id ID of the storage where the waste occurred
product_id Product ID
modificator_id Modifier ID
ingredient_id Ingredient ID For manufactured dishes and semi-finished components, there will be returned the entity’s ingredient system ID
prepack_id Semi-finished product ID
cost Cost
weight Count
unit Unit: kg—kilograms, p—pieces, l—liters
reason Waste reason

transactions.getTransactionDishComposition: The Sold Dish Recipe

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.getTransactionDishComposition'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&transaction_id=76'
 . '&product_id=82'
 . '&modificator_id=22';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "transaction_id":76,
    "product_id":82,
    "modificator_id":22,
    "num":1,
    "ingredients":[  
      {  
        "ingredient_id":135,
        "type":1,
        "weight":0.6
      },
      {  
        "ingredient_id":24,
        "type":2,
        "weight":0.05
      },
      {  
        "ingredient_id":136,
        "type":1,
        "weight":2
      }
    ]
  }
}

The method returns the recipe of the dish sold

HTTP GET request

https://joinposter.com/api/transactions.getTransactionDishComposition

GET parameters of the transactions.getTransactionDishComposition request

Parameter Description
transaction_id Order ID
product_id Dish ID
modificator_id Modifier ID; by default, it is 0

Parameters of the transactions.getTransactionDishComposition request

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
transaction_id Order ID
product_id Dish ID
modificator_id Modifier ID
num Dish count in the order
ingredients Dish receipt at the time of sale

Inside the ingredients parameter, there is an object with the following parameter:

Parameter Description
ingredient_id Ingredient ID
type Type: 1—ingredient, 2—semi-finished product
weight Count

transactions.createTransaction: Create an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.createTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'table_id'       => 1,
    'user_id'        => 3,
    'guests_count'   => 2,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "transaction_id":1950,
    "transaction_tablet_id":1508850241000
  }
}

The method creates an order

HTTP request

POST https://joinposter.com/api/transactions.createTransaction

POST parameters of the transactions.createTransaction request

Parameter Description
spot_id Location ID to create an order for
spot_tablet_id Register ID to create an order in
table_id Table ID
user_id Employee ID
guests_count Table seat count
time Operation time in the microtime format; the default time is current

Parameters of the transaction.createTransaction response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
transaction_id Created order ID, corresponds to the order number
transaction_tablet_id The ID of the order created on the register, corresponds to the order opening time

During the running, common errors can occur; see the Error Codes section for their description.

transactions.addTransactionProduct: Add a Product to an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.addTransactionProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'product_id'     => 112,
    'modification'   => '[{"m":19,"a":1}]',
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "transaction_product":10990
  }
}

The method adds a product to an order

HTTP request

POST https://joinposter.com/api/transactions.addTransactionProduct

POST parameters of the transactions.addTransactionProduct request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
product_id Product or dish ID
modificator_id Product modifier ID; is not transmitted by default
modification Dish modifications; are not transmitted by default
price A product of dish cost; if it should be different from the base cost, it will not be transmitted by default
time Operation time in the microtime format; the default time is current

The modification parameter should contain a JSON line. JSON should consist of an array of objects, each of which should contain the following parameters:

Parameter Description
m Dish modification ID
a Dish modifications count

Parameters of the transactions.addTransactionProduct response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
transaction_product Product ID added to the current order

During the running, common errors can occur; see the Error Codes section for their description.

transactions.changeTransactionProductCount: Update the Order Product Count

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.changeTransactionProductCount'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'product_id'     => 112,
    'modification'   => '[{"m":19,"a":1}]',
    'count'          => 2,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method updates the product count in the order

HTTP request

POST https://joinposter.com/api/transactions.changeTransactionProductCount

POST parameters of the transactions.changeTransactionProductCount request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
product_id Product or dish ID
modificator_id Product modifier ID; is not transmitted by default
modification Dish modifications; are not transmitted by default
count Product or dish count
time Operation time in the microtime format; the default time is current

The modification parameter should contain a JSON line. JSON should consist of an array of objects, each of which should contain the following parameters:

Parameter Description
m Dish modification ID
a Dish modifications count

Parameters of the transactions.changeTransactionProductCount response

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if the product or dish count has been successfully updated

During the running, common errors can occur; see the Error Codes section for their description.

transactions.removeTransactionProduct: Remove a Product from an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.removeTransactionProduct'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'product_id'     => 113,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method removes a product from the order

HTTP request

POST https://joinposter.com/api/transactions.removeTransactionProduct

POST parameters of the transactions.removeTransactionProduct request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
product_id Product or dish ID
modificator_id Product modifier ID; is not transmitted by default
time Operation time in the microtime format; the default time is current

transaction.removeTransactionProduct response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if a product or dish has been successfully removed from the order

During the running, common errors can occur; see the Error Codes section for their description.

transactions.changeClient: Add a Customer to an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.changeClient'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'client_id'      => 3,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method adds a customer to an order

HTTP request

POST https://joinposter.com/api/transactions.changeClient

POST parameters of the transactions.changeClient request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
client_id Customer ID
time Operation time in the microtime format; the default time is current

The transaction.changeClient response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if a customer has been successfully added to an order

During the running, common errors can occur; see the Error Codes section for their description.

transactions.changeComment: Add an Order Comment

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.changeComment'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'comment'        => 'День рождения',
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method adds a comment to an order

HTTP request

POST https://joinposter.com/api/transactions.changeComment

POST parameters of the transactions.changeComment request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
comment Order comment
time Operation time in the microtime format; the default time is current

transaction.changeComment response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if a comment has been successfully added

During the running, common errors can occur; see the Error Codes section for their description.

transactions.changeRecipientFor54FZ: Specify the Recipient

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.changeRecipientFor54FZ'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'type'           => 'email',
    'contact'        => 'admin@sample.com',
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method specifies the recipient of a 54-FZ fiscal receipt copy

HTTP request

POST https://joinposter.com/api/transactions.changeRecipientFor54FZ

POST parameters of the transactions.changeRecipientFor54FZ request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
type Method of sending a fiscal receipt copy: email—via email, phone—via an SMS (do not transmit the property if you need to detach the recipient)
contact Recipient contact details: email or phone number
time Operation time in the microtime format; the default time is current

transactions.changeRecipientFor54FZ response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if the method has successfully worked

During the running, common errors can occur; see the Error Codes section for their description.

transactions.closeTransaction: Close an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.closeTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_id'        => 1,
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'payed_cash'     => 1000,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method closes the order

HTTP request

POST https://joinposter.com/api/transactions.closeTransaction

POST parameters of the transactions.closeTransaction request

Parameter Description
spot_id Location ID
spot_tablet_id Register ID
transaction_id Order ID
payed_cash The amount paid by cash
payed_card The amount paid by bank transfer
payed_cert The amount paid by a gift card
reason Reason for closing the bill without payment: 1—the customer has left, 2—on the house, 3—a waiter’s error A mandatory property for closing a bill without payment; the total amount of payments must be equal to zero. By default, it is not transmitted.
print_fiscal Print a fiscal receipt: 0 — not to print, 1 — print. The default value is 0.
time Operation time in the microtime format; the default time is current

transactions.closeTransaction response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if the order has been successfully closed

During the running, common errors can occur; see the Error Codes section for their description.

transactions.removeTransaction: Remove an Order

Request example:

<?php
$url = 'https://joinposter.com/api/transactions.removeTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'spot_tablet_id' => 1,
    'transaction_id' => 1950,
    'user_id'        => 3,
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{  
  "response":{  
    "err_code":0
  }
}

The method removes an order

HTTP request

POST https://joinposter.com/api/transactions.removeTransaction

POST parameters of the transactions.removeTransaction request

Parameter Description
spot_tablet_id Register ID
transaction_id Order ID
user_id Employee ID
time Operation time in the microtime format; the default time is current

transactions.removeTransaction response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
err_code 0 if the order has been successfully removed

During the running, common errors can occur; see the Error Codes section for their description.

incomingOrders: Online Orders and Reservation

Methods for working with online orders and reservation.

Online orders are orders sent by external applications to the register. Watch a video about online stores integrating with Poster.

The reservation allows you to reserve a table for a customer for the selected time and duration. Watch a video to see how Poster reservation works.

incomingOrders.createIncomingOrder: Create an Online Order

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.createIncomingOrder'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$incoming_order = [
    'spot_id'   => 1,
    'phone'     => '+380680000000',
    'products'  => [
        [
            'product_id' => 169,
        ],
    ],
];

$data = sendRequest($url, 'post', $incoming_order);

Response example:

{  
  "response":{  
    "incoming_order_id":2,
    "spot_id":1,
    "status":0,
    "client_id":0,
    "first_name":null,
    "last_name":null,
    "phone":null,
    "email":null,
    "sex":null,
    "birthday":null,
    "address":null,
    "comment":null,
    "created_at":"2017-10-27 11:47:19",
    "updated_at":"2017-10-27 11:47:19",
    "transaction_id":null,
    "fiscal_spreading":0,
    "fiscal_method":"",
    "products":[  
      {  
        "io_product_id":2,
        "product_id":169,
        "modificator_id":null,
        "incoming_order_id":2,
        "count":1,
        "created_at":"2017-10-27 11:47:19"
      }
    ]
  }
}

Request example с автоприменением акций:

<?php
$url = 'https://joinposter.com/api/incomingOrders.createIncomingOrder'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$incoming_order = [
    "spot_id"   => 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);

Response example:

{
  "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,
    "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}]}]",
    "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"
      }
    ]
  }
}

The method creates an online order

HTTP POST request

POST https://joinposter.com/api/incomingOrders.createIncomingOrder

POST parameters of the incomingOrders.createIncomingOrder request

Parameter Description
spot_id Location ID the online order will come to
client_id Customer ID in Poster; if ID is not specified, the phone parameter should be transmitted. Poster will try to find a customer with the same phone number and attach him to the order. If it is a new customer, the waiter will select a group for him, and Poster will create a new customer.
first_name The customer’s name; by default, it is not transmitted.
last_name The customer’s last name; by default, it is not transmitted.
phone Customer’s phone number; a mandatory parameter if client_id is not specified
email Email; is not transmitted by default
sex Customer gender: 0—not specified, 1—male, 2—female. By default, it is not transmitted.
birthday Customer’s birthday in a Y-m-d format. By default, it is not transmitted.
address Customer’s address; by default, it is not transmitted
comment Online order comment; by default, it is not transmitted
products Product list
payment Payment information; by default, it is not transmitted
promotion List of promotions to be applied to the order

The products parameter should contain an array, each element of which should contain the following parameters:

Parameter Description
product_id Product ID
modificator_id Product modifier ID
count Product count; the default value is 1
price The price of goods in kopecks, by default the price of the goods in the indicated institution is taken

The payment parameter should contain an object containing the following parameters:

Parameter Description
type The status confirming a prepayment: 0—it has not been done, 1—it has been done. The default value is 0.
sum The amount paid in kopecks
currency The ISO currency code of the payment; it must match the account currency, for example, UAH—hryvnia, RUB—ruble, USD—dollar

The promotion parameter contains an array of objects, each of which contains the following parameters:

Parameter Description
id Promotion ID to be applied
involved_products An array of products that participate in a promotion.
result_products An array of products that are the result of a promotion. It should be transmitted in points-based promotions only.

The involved_products array contains objects with the following properties:

Parameter Description
id A mandatory parameter; the ID of a product that participates in a promotion
count A mandatory parameter; the product count participating in a promotion
modification An optional parameter; the modification ID that participates in the promotion

The result_products array contains objects with the following properties:

Parameter Description
id A mandatory parameter; the ID of a product to be added to the order as a result of the promotion
count A mandatory parameter; the product count to be added to the order
modification An optional parameter; the modification ID to be added as the result of the promotion

incomingOrders.createIncomingOrder response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Online order ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Order status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
transaction_id Associated order ID
fiscal_spreading An optional parameter. A status of sending products to a fiscal printer: 1—send only fiscal products, 2—send all products, 3—not to send products.
fiscal_method An optional parameter, a payment method on the fiscal printer: cash—by cash, card—by credit card. The default value is cash.
products Product list

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
io_product_id Online order product ID
product_id Product ID
modificator_id Product modifier ID
incoming_order_id Online order ID
count Online order product count
created_at Date of adding the product to the online order

incomingOrders.getIncomingOrders: Online Order List

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getIncomingOrders'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&status=1'
 . '&date_from=2017-10-26+14:00:00'
 . '&date_to=2017-10-26+15:00:00';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "incoming_order_id":1,
      "spot_id":1,
      "status":1,
      "client_id":0,
      "first_name":"Антон",
      "last_name":"Талышкин",
      "phone":"79630313844",
      "email":"contact@joinposter.com",
      "sex":1,
      "birthday":"1986-11-23",
      "address":"ул. Малышева, 3",
      "comment":"",
      "created_at":"2017-10-26 14:58:02",
      "updated_at":"2017-10-26 15:25:17",
      "transaction_id":1949,
      "products":[  
        {  
          "io_product_id":1,
          "product_id":113,
          "modificator_id":null,
          "incoming_order_id":1,
          "count":1,
          "created_at":"2017-10-26 14:58:02"
        }
      ]
    }
  ]
}

The method returns a list of online orders

HTTP GET request

https://joinposter.com/api/incomingOrders.getIncomingOrders

GET parameters of the incomingOrders.getIncomingOrders request

Parameter Description
status Filter on order status: 0—new, 1—accepted, 7—canceled. By default, it is not transmitted.
date_from The sampling start date and time in the “Y-m-d H:i:s” format. By default, it is not transmitted.
date_to The sampling end date and time in the “Y-m-d H:i:s” format. By default, it is not transmitted.

incomingOrders.getIncomingOrders response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
incoming_order_id Online order ID
spot_id Location ID
status Order status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
transaction_id Associated order ID
products Product list

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
io_product_id Online order product ID
product_id Product ID
modificator_id Product modifier ID
incoming_order_id Online order ID
count Online order product count
created_at Date of adding the product to the online order

incomingOrders.getIncomingOrder: Online Order Properties

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getIncomingOrder'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&incoming_order_id=1';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "incoming_order_id":1,
    "spot_id":1,
    "status":1,
    "client_id":0,
    "first_name":"Антон",
    "last_name":"Талышкин",
    "phone":"79630313844",
    "email":"contact@joinposter.com",
    "sex":1,
    "birthday":"1986-11-23",
    "address":"ул. Малышева, 3",
    "comment":"",
    "created_at":"2017-10-26 14:58:02",
    "updated_at":"2017-10-26 15:25:17",
    "transaction_id":1949,
    "products":[  
      {  
        "io_product_id":1,
        "product_id":113,
        "modificator_id":null,
        "incoming_order_id":1,
        "count":1,
        "created_at":"2017-10-26 14:58:02"
      }
    ]
  }
}

The method returns the properties of the online order

HTTP GET request

https://joinposter.com/api/incomingOrders.getIncomingOrder

GET parameters of the incomingOrders.getIncomingOrder request

Parameter Description
incoming_order_id Online order ID

incomingOrders.getIncomingOrder response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Online order ID
spot_id Location ID
status Order status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
transaction_id Associated order ID
products Product list

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
io_product_id Online order product ID
product_id Product ID
modificator_id Product modifier ID
incoming_order_id Online order ID
count Online order product count
created_at Date of adding the product to the online order

incomingOrders.getOwnIncomingOrders: Online Order List from your Application

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getOwnIncomingOrders'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&status=1'
 . '&date_from=2017-10-26+14:00:00'
 . '&date_to=2017-10-26+15:00:00';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "incoming_order_id":1,
      "spot_id":1,
      "status":1,
      "client_id":0,
      "first_name":"Антон",
      "last_name":"Талышкин",
      "phone":"79630313844",
      "email":"contact@joinposter.com",
      "sex":1,
      "birthday":"1986-11-23",
      "address":"ул. Малышева, 3",
      "comment":"",
      "created_at":"2017-10-26 14:58:02",
      "updated_at":"2017-10-26 15:25:17",
      "transaction_id":1949,
      "products":[  
        {  
          "io_product_id":1,
          "product_id":113,
          "modificator_id":null,
          "incoming_order_id":1,
          "count":1,
          "created_at":"2017-10-26 14:58:02"
        }
      ]
    }
  ]
}

The method returns a list of online orders from own application

HTTP GET request

https://joinposter.com/api/incomingOrders.getOwnIncomingOrders

GET parameters of the incomingOrders.getOwnIncomingOrders request

Parameter Description
status Filter on order status: 0—new, 1—accepted, 7—canceled. By default, it is not transmitted.
date_from The sampling start date and time in the “Y-m-d H:i:s” format. By default, it is not transmitted.
date_to The sampling end date and time in the “Y-m-d H:i:s” format. By default, it is not transmitted.

incomingOrders.getOwnIncomingOrders response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
incoming_order_id Online order ID
spot_id Location ID
status Order status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
transaction_id Associated order ID
products Product list

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
io_product_id Online order product ID
product_id Product ID
modificator_id Product modifier ID
incoming_order_id Online order ID
count Online order product count
created_at Date of adding the product to the online order

incomingOrders.getOwnIncomingOrder: Online Order Properties from your Application

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getOwnIncomingOrder'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&incoming_order_id=1';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "incoming_order_id":1,
    "spot_id":1,
    "status":1,
    "client_id":0,
    "first_name":"Антон",
    "last_name":"Талышкин",
    "phone":"79630313844",
    "email":"contact@joinposter.com",
    "sex":1,
    "birthday":"1986-11-23",
    "address":"ул. Малышева, 3",
    "comment":"",
    "created_at":"2017-10-26 14:58:02",
    "updated_at":"2017-10-26 15:25:17",
    "transaction_id":1949,
    "products":[  
      {  
        "io_product_id":1,
        "product_id":113,
        "modificator_id":null,
        "incoming_order_id":1,
        "count":1,
        "created_at":"2017-10-26 14:58:02"
      }
    ]
  }
}

The method returns the online order properties from own application

HTTP GET request

https://joinposter.com/api/incomingOrders.getOwnIncomingOrder

GET parameters of the incomingOrders.getOwnIncomingOrder request

Parameter Description
incoming_order_id Online order ID

incomingOrders.getOwnIncomingOrder response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Online order ID
spot_id Location ID
status Order status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
transaction_id Associated order ID
products Product list

The products parameter has an array inside, each element of which contains the following parameters:

Parameter Description
io_product_id Online order product ID
product_id Product ID
modificator_id Product modifier ID
incoming_order_id Online order ID
count Online order product count
created_at Date of adding the product to the online order

incomingOrders.createReservation: Create Reservation

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.createReservation'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$reservation = [
    'spot_id'           => '1',
    'phone'             => '+380684112224',
    'table_id'          => '1',
    'guests_count'      => '1',
    'duration'          => '2000',
    'date_reservation'  => '2018-03-22 16:20:00'
];

$data = sendRequest($url, 'post', $reservation);

Response example:

{
   "response":{
      "incoming_order_id":"4",
      "type":"2",
      "spot_id":"1",
      "status":0,
      "client_id":4985,
      "first_name":"Владимир",
      "last_name":"Иванов",
      "phone":"380684112224",
      "email":"example@gmail.com",
      "sex":"2",
      "birthday":"1996-08-26",
      "address":"",
      "guests_count":"1",
      "comment":"",
      "created_at":"2018-03-22 17:02:41",
      "updated_at":"2018-03-22 17:02:41",
      "transaction_id":null,
      "fiscal_spreading":"0",
      "fiscal_method":"",
      "promotion":null,
      "date_reservation":"2018-03-22 18:20:00",
      "duration":"2000"
   }
}

The method creates a table reservation for the specified time and customer

HTTP POST request

POST https://joinposter.com/api/incomingOrders.createReservation

POST parameters of the incomingOrders.createReservation request

Parameter Description
spot_id A mandatory parameter, the location ID the online order will come to
type Order type: 1—online order, 2—reservation
table_id A mandatory parameter, the ID of the table reserved
date_reservation A mandatory parameter, the reservation start date in the Y-m-d H:i:s format
duration A mandatory parameter, the reservation duration in seconds. Must be at least 1800 seconds (half an hour).
client_id The customer ID in Poster; by default, it is not transmitted. In case the ID is not specified, Poster will try to find a customer with the same phone number and attach him to the order. If it is a new customer, the waiter will select a group for him, and Poster will create a new customer.
phone The customer’s phone number; by default, it is not transmitted
first_name The customer’s name; by default, it is not transmitted.
last_name The customer’s last name; by default, it is not transmitted.
email Email; is not transmitted by default
sex Customer gender: 0—not specified, 1—male, 2—female. By default, it is not transmitted.
birthday Customer’s birthday in a Y-m-d format. By default, it is not transmitted.
address Customer’s address; by default, it is not transmitted
comment Reservation comment; it is not transmitted by default

incomingOrders.createReservation response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Reservation ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Reservation status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Online order comment
created_at Online order creation date
updated_at Online order status update date
date_reservation The reservation start date in the Y-m-d H:i:s format
duration Reservation duration in seconds

incomingOrders.getReservations: Reservation List

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getReservations'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "incoming_order_id":"3",
         "spot_id":"1",
         "status":0,
         "client_id":4985,
         "first_name":"Степан",
         "last_name":"Созонов",
         "phone":"380912152764",
         "email":null,
         "sex":"2",
         "birthday":"1996-08-26",
         "address":null,
         "comment":null,
         "created_at":"2018-03-22 16:50:18",
         "updated_at":"2018-03-22 16:50:18",
         "transaction_id":null,
         "guests_count":"1",
         "duration":"2000",
         "date_reservation":"2018-03-22 18:20:00"
      },
      {
         "incoming_order_id":"4",
         "spot_id":"1",
         "status":1,
         "client_id":4985,
         "first_name":"Владимир",
         "last_name":"Иванченко",
         "phone":"380684111264",
         "email":"vlm.iva@gmail.com",
         "sex":"2",
         "birthday":"1996-08-26",
         "address":"московская 9",
         "comment":"Подготовить вазу для цветов",
         "created_at":"2018-03-22 17:02:41",
         "updated_at":"2018-03-22 17:02:52",
         "transaction_id":"428929",
         "guests_count":"1",
         "duration":"2000",
         "date_reservation":"2018-03-22 18:20:00"
      }
   ]
}

The method returns the reservation list

HTTP GET request

GET https://joinposter.com/api/incomingOrders.getReservations

GET parameters of the incomingOrders.getReservations request

Parameter Description
status Filter on reservation status: 0—new, 1—accepted, 7—canceled. By default, it is not transmitted.
date_from The sampling start date and time in the Y-m-d H:i:s format. By default, it is not transmitted.
date_to The sampling end date and time in the Y-m-d H:i:s format. By default, it is not transmitted.

incomingOrders.getReservations response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
incoming_order_id Reservation ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Reservation status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Reservation comment
created_at Reservation creation date
updated_at Reservation status update date
date_reservation The reservation start date in the Y-m-d H:i:s format
duration Reservation duration in seconds

incomingOrders.getReservation: Reservation Properties

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getReservation'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&incoming_order_id=3';

$data = sendRequest($url);

Response example:

{
   "response":{
      "incoming_order_id":"3",
      "spot_id":"1",
      "status":0,
      "client_id":4985,
      "first_name":"Степан",
      "last_name":"Созонов",
      "phone":"380912152764",
      "email":null,
      "sex":"2",
      "birthday":"1996-08-26",
      "address":"московская 9",
      "comment":"Подготовить вазу для цветов",
      "created_at":"2018-03-22 16:50:18",
      "updated_at":"2018-03-22 16:50:18",
      "transaction_id":null,
      "guests_count":"1",
      "duration":"2000",
      "date_reservation":"2018-03-22 18:20:00"
   }
}

The method returns the reservation properties

HTTP GET request

GET https://joinposter.com/api/incomingOrders.getReservation

GET parameters of the incomingOrders.getReservation request

Parameter Description
incoming_order_id Reservation ID

incomingOrders.getReservation response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Reservation ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Reservation status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Reservation comment
created_at Reservation creation date
updated_at Reservation update date
date_reservation The reservation start date in the Y-m-d H:i:s format
duration Reservation duration in seconds

incomingOrders.getOwnReservations: Reservation List from your Application

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getOwnReservations'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
   "response":[
      {
         "incoming_order_id":"3",
         "spot_id":"1",
         "status":0,
         "client_id":4985,
         "first_name":"Степан",
         "last_name":"Созонов",
         "phone":"380912152764",
         "email":null,
         "sex":"2",
         "birthday":"1996-08-26",
         "address":null,
         "comment":null,
         "created_at":"2018-03-22 16:50:18",
         "updated_at":"2018-03-22 16:50:18",
         "transaction_id":null,
         "guests_count":"1",
         "duration":"2000",
         "date_reservation":"2018-03-22 18:20:00"
      },
      {
         "incoming_order_id":"4",
         "spot_id":"1",
         "status":1,
         "client_id":4985,
         "first_name":"Владимир",
         "last_name":"Иванченко",
         "phone":"380684111264",
         "email":"vlm.iva@gmail.com",
         "sex":"2",
         "birthday":"1996-08-26",
         "address":"московская 9",
         "comment":"Подготовить вазу для цветов",
         "created_at":"2018-03-22 17:02:41",
         "updated_at":"2018-03-22 17:02:52",
         "transaction_id":"428929",
         "guests_count":"1",
         "duration":"2000",
         "date_reservation":"2018-03-22 18:20:00"
      }
   ]
}

The method returns the reservation list

HTTP GET request

GET https://joinposter.com/api/incomingOrders.getOwnReservations

GET parameters of the incomingOrders.getOwnReservations request

Parameter Description
status Filter on reservation status: 0—new, 1—accepted, 7—canceled. By default, it is not transmitted.
date_from The sampling start date and time in the Y-m-d H:i:s format. By default, it is not transmitted.
date_to The sampling end date and time in the Y-m-d H:i:s format. By default, it is not transmitted.

incomingOrders.getOwnReservations response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
incoming_order_id Reservation ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Reservation status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Reservation comment
created_at Reservation creation date
updated_at Reservation status update date
date_reservation The reservation start date in the Y-m-d H:i:s format
duration Reservation duration in seconds

incomingOrders.getOwnReservation: Reservation Properties from your Application

Request example:

<?php
$url = 'https://joinposter.com/api/incomingOrders.getOwnReservation'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&incoming_order_id=3';

$data = sendRequest($url);

Response example:

{
   "response":{
      "incoming_order_id":"3",
      "spot_id":"1",
      "status":0,
      "client_id":4985,
      "first_name":"Степан",
      "last_name":"Созонов",
      "phone":"380912152764",
      "email":null,
      "sex":"2",
      "birthday":"1996-08-26",
      "address":"московская 9",
      "comment":"Подготовить вазу для цветов",
      "created_at":"2018-03-22 16:50:18",
      "updated_at":"2018-03-22 16:50:18",
      "transaction_id":null,
      "guests_count":"1",
      "duration":"2000",
      "date_reservation":"2018-03-22 18:20:00"
   }
}

The method returns the reservation properties

HTTP GET request

GET https://joinposter.com/api/incomingOrders.getOwnReservation

GET parameters of the incomingOrders.getOwnReservation request

Parameter Description
incoming_order_id Reservation ID

incomingOrders.getOwnReservation response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
incoming_order_id Reservation ID
type Order type: 1—online order, 2—reservation. For this method, it always equals 2.
spot_id Location ID
status Reservation status: 0—new, 1—accepted, 7—canceled
client_id Customer ID
first_name Customer first name
last_name Customer last name
phone Customer phone number
email Customer’s email
sex Customer gender: 0—not specified, 1—male, 2—female
birthday Customer’s birthday in a Y-m-d format
address Customer address
comment Reservation comment
created_at Reservation creation date
updated_at Reservation update date
date_reservation The reservation start date in the Y-m-d H:i:s format
duration Reservation duration in seconds

spots: Locations

Methods for working with the locations section. All methods of this section begin with “spots.”

spots.getSpotTablesHalls: Floor Sections List

Request example:

<?php
$url = 'https://joinposter.com/api/spots.getSpotTablesHalls'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "hall_id":"3",
      "hall_name":"Зал в кафе на Полянке",
      "hall_order":"1",
      "spot_id":"1",
      "delete":"0",
      "last_modified_time":"2017-06-22 13:54:58"
    },
    {  
      "hall_id":"5",
      "hall_name":"Зал у львівській кав&#39;ярні",
      "hall_order":"2",
      "spot_id":"2",
      "delete":"0",
      "last_modified_time":"2017-06-22 13:54:58"
    }
  ]
}

The method returns the floor sections list

HTTP request

GET https://joinposter.com/api/spots.getSpotTablesHalls

spots.getSpotTablesHalls response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
hall_id Floor section ID
hall_name Floor section name
hall_order Floor section order
spot_id Location ID
delete The status of a floor section removed: 0—not removed, 1—removed
last_modified_time Last update time of the floor section properties

spots.getTableHallTables: Table List

Request example:

<?php
$url = 'https://joinposter.com/api/spots.getTableHallTables'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&spot_id=1'
 . '&hall_id=3'
 . '&without_deleted=1';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "table_id":"3",
      "table_num":"1",
      "table_title":"Возле барной стойки",
      "spot_id":"1",
      "table_shape":"square",
      "hall_id":"1",
      "table_x":"9",
      "table_y":"12",
      "table_height":"4",
      "table_width":"8",
      "is_deleted":"0",
      "status":"1"
    },
    {  
      "table_id":"4",
      "table_num":"2",
      "table_title":"Дальний",
      "spot_id":"1",
      "table_shape":"circle",
      "hall_id":"1",
      "table_x":"15",
      "table_y":"11",
      "table_height":"10",
      "table_width":"13",
      "is_deleted":"0",
      "status":"2"
    }
  ]
}

The method returns the list of tables

HTTP request

GET https://joinposter.com/api/spots.getTableHallTables

GET parameters of the spots.getTableHallTables request

Parameter Description
spot_id Location ID; by default, it is not transmitted.
hall_id Floor section ID; by default, it is not transmitted.
without_deleted The status of returning without removed tables: 0—with removed tables, 1—without removed tables. The default value is 0.

spots.getTableHallTables response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
table_id Table ID
table_num Table number
table_title Table name
spot_id Location ID
table_shape Table shape: square—square, circle—round-edged
hall_id Floor section ID
table_x The X-axis table coordinate
table_y The Y-axis table coordinate
table_height Table height
table_width Table width
is_deleted A status of the table removed: 0—not removed, 1—removed
status A status of open orders on the table: 1—no open orders, 2—there are open orders

finance: Finance

Methods for working with the finance section. All methods of this section begin with “finance.”

finance.getCashShifts: Register Shift List

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getCashShifts'
    . '?token=687409:4164553abf6a031302898da7800b59fb'
    . '&dateFrom=20170701'
    . '&dateTo=20170901';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "cash_shift_id":333,
      "spot_id":1,
      "timestart":1505977200000,
      "timeend":1505980800000,
      "amount_start":10000,
      "amount_end":10000,
      "amount_debit":0,
      "amount_sell_cash":0,
      "amount_sell_card":0,
      "amount_credit":0,
      "amount_collection":0,
      "user_id_start":3,
      "user_id_end":3,
      "comment":"бар",
      "spot_name":"Киоск",
      "spot_adress":"ул. Вокзальная, 12",
      "table_num":"0"
    }
  ]
}

The method returns a list of register shifts

HTTP request

GET https://joinposter.com/api/finance.getCashShifts

GET parameters of the finance.getCashShifts request

Parameter Description
spot_id An optional parameter, the ID of a location to return reports to
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.

The finance.getCashShifts response parameters

Parameter Description
response An array of register shifts

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
cash_shift_id Register shift ID
spot_id Location ID
timestart Date and time of register shift opening in a microtime format
timeend Date and time of register shift closing in a microtime format
amount_start Register amount at a register shift opening in kopecks
amount_end Register amount at a register shift closing in kopecks
amount_debit The amount of income in kopecks
amount_sell_cash The amount of cash revenue in kopecks
amount_sell_card The amount of non-cash revenue in kopecks
amount_credit Amount of expenses in kopecks
amount_collection Safe drop amount in kopecks
user_id_start The ID of an employee who has opened a register shift
user_id_end The ID of an employee who has closed a register shift
comment Comment
spot_name Location name
spot_adress Location address

finance.getCashShift: Register Shift Properties

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getCashShift'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&cash_shift_id=333';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "cash_shift_id":333,
    "spot_id":1,
    "timestart":1505977200000,
    "timeend":1505980800000,
    "amount_start":10000,
    "amount_end":10000,
    "amount_debit":0,
    "amount_sell_cash":0,
    "amount_sell_card":0,
    "amount_credit":0,
    "amount_collection":0,
    "user_id_start":3,
    "user_id_end":3,
    "comment":"бар"
  }
}

The method returns the register shift properties

HTTP request

GET https://joinposter.com/api/finance.getCashShift

GET parameters of the finance.getCashShift request

Parameter Description
cash_shift_id A mandatory parameter, the register shift ID

The finance.getCashShift response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
cash_shift_id Register shift ID
spot_id Location ID
timestart Date and time of register shift opening in a microtime format
timeend Date and time of register shift closing in a microtime format
amount_start Register amount at a register shift opening in kopecks
amount_end Register amount at a register shift closing in kopecks
amount_debit The amount of income in kopecks
amount_sell_cash The amount of cash revenue in kopecks
amount_sell_card The amount of non-cash revenue in kopecks
amount_credit Amount of expenses in kopecks
amount_collection Safe drop amount in kopecks
user_id_start The ID of an employee who has opened a register shift
user_id_end The ID of an employee who has closed a register shift
comment Comment

finance.openCashShift: Open a Register Shift

Request example:

<?php
$url = 'https://joinposter.com/api/finance.openCashShift'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$cash_shift = [
    'spot_id'   => 1,
    'user_id'   => 1,
    'amount'    => 123.45,
    'time'      => '2017-09-21 10:00',
    'is_fiscal' => 1,
];

$data = sendRequest($url, 'post', $cash_shift);

Response example:

{  
  "response":{  
    "cash_shift_id":333
  }
}

The method opens a register shift

HTTP request

GET https://joinposter.com/api/finance.openCashShift

POST parameters of the finance.openCashShift request

Parameter Description
spot_id Location ID
user_id Employee ID
amount Register amount at a register shift opening in hryvnias/rubles
time Date and time of register shift opening in minutes in a Y-m-d H:i format
is_fiscal The status of the register-shift opening transaction being fiscal: 0—non-fiscal, 1—fiscal. The default value is 0.

The finance.openCashShift response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
cash_shift_id The ID of an open register shift

finance.closeCashShift: Close a Register Shift

Request example:

<?php
$url = 'https://joinposter.com/api/finance.closeCashShift'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$cash_shift = [
    'cash_shift_id' => 335,
    'user_id'       => 3,
    'amount'        => 234.56,
    'time'          => '2017-09-21 20:00',
    'is_fiscal'     => 1,
    'comment'       => 'бар',
];

$data = sendRequest($url, 'post', $cash_shift);

Response example:

{  
  "response":true
}

The method closes a register shift

HTTP request

POST https://joinposter.com/api/finance.closeCashShift

POST parameters of the finance.closeCashShift request

Parameter Description
cash_shift_id Register shift ID
user_id Employee ID
amount Register amount at a register shift closing in hryvnias/rubles
time Date and time of register shift closing down to the minute in the Y-m-d H:i format
is_fiscal The status of the register-shift closing transaction being fiscal: 0—non-fiscal, 1—fiscal. The default value is 0.
comment Register shift comment. By default, it is not transmitted.

The finance.closeCashShift response parameters

Parameter Description
response true if the register shift has been successfully closed

finance.getCashShiftTransactions: A Register Shift Transaction List

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getCashShiftTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&shift_id=333';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "shift_tr_id":1648,
      "shift_id":333,
      "time":1505980800000,
      "type":5,
      "tr_amount":10000,
      "user_id":3,
      "comment":"бар",
      "shift_tr_id_edit":0,
      "user_id_edit":0,
      "edit_time":0,
      "edit":0,
      "delete":0,
      "is_fiscal":0
    },
    {  
      "shift_tr_id":1647,
      "shift_id":333,
      "time":1505977200000,
      "type":1,
      "tr_amount":10000,
      "user_id":3,
      "comment":"",
      "shift_tr_id_edit":0,
      "user_id_edit":0,
      "edit_time":0,
      "edit":0,
      "delete":0,
      "is_fiscal":1
    }
  ]
}

The method returns a list of register-shift transactions

HTTP request

GET https://joinposter.com/api/finance.getCashShiftTransactions

GET parameters of the finance.getCashShiftTransactions request

Parameter Description
shift_id A mandatory parameter, the ID of the register shift to return transactions to

The finance.getCashShiftTransactions response parameters

Parameter Description
response An array of the register shift transactions

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
shift_tr_id The register shift transaction ID
shift_id Register shift ID
time Date and time of the register shift transaction in a microtime format
type The register shift transaction type: 1—opening, 2—income, 3—expenditure, 4—safe drop, 5—closing.
tr_amount The register shift transaction amount
user_id Employee ID
comment Comment
shift_tr_id_edit The ID of the register shift transaction the editing has been from. If there has been no editing, it returns 0.
user_id_edit The ID of an employee who has edited a register shift transaction. If there has been no editing, it returns 0.
edit_time The time of editing a register shift transaction. If there has been no editing, it returns 0.
edit The status of a register shift transaction being edited: 0—not edited, 1—edited.
delete The status of a register shift transaction being removed: 0—not removed, 1—removed.
is_fiscal The status of the register-shift transaction being fiscal: 0—non-fiscal, 1—fiscal.

finance.createCashShiftTransaction: Create a Register Shift Transaction

Request example:

<?php
$url = 'https://joinposter.com/api/finance.createCashShiftTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$cash_shift_transaction = [
    'cash_shift_id' => 333,
    'type_id'       => 3,
    'category_id'   => 4,
    'user_id'       => 1,
    'amount'        => 499.99,
    'time'          => '2017-09-21 15:00',
    'is_fiscal'     => 1,
    'comment'       => 'Расход',
];

$data = sendRequest($url, 'post', $cash_shift_transaction);

Response example:

{  
  "response":{  
    "cash_shift_transaction_id":1649
  }
}

The method creates a register shift transaction

HTTP request

GET https://joinposter.com/api/finance.createCashShiftTransaction

POST parameters of the finance.createCashShiftTransaction request

Parameter Description
cash_shift_id Register shift ID
type_id The register shift transaction type: 2—income, 3—expenditure, 4—safe drop.
category_id The ID of the financial category. A mandatory property if the register shift transaction type is 2 or 3 and the account for cash is attached to the location.
user_id Employee ID
amount The register shift transaction amount
time The date and time of the register shift transaction in the Y-m-d H:i format
is_fiscal The status of the register-shift transaction being fiscal: 0—non-fiscal, 1—fiscal. The default value is 0.
comment Comment

The finance.createCashShiftTransaction response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
cash_shift_transaction_id The register shift transaction ID

finance.updateCashShiftTransaction: Update the Register Shift Transaction Properties

Request example:

<?php
$url = 'https://joinposter.com/api/finance.updateCashShiftTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$cash_shift_transaction = [
    'cash_shift_transaction_id' => 611,
    'type_id'                   => 3,
    'category_id'               => 4,
    'user_id'                   => 3,
    'amount'                    => 499.99,
    'time'                      => '2017-09-21 15:00',
    'is_fiscal'                 => 1,
    'comment'                   => 'Waste',
];

$data = sendRequest($url, 'post', $cash_shift_transaction);

Response example:

{  
  "response":{  
    "cash_shift_transaction_id":1650
  }
}

The method updates the register shift transaction properties

HTTP request

GET https://joinposter.com/api/finance.updateCashShiftTransaction

POST parameters of the finance.updateCashShiftTransaction request

Parameter Description
cash_shift_transaction_id The register shift transaction ID
type_id The register shift transaction type: 1—opening, 2—income, 3—expenditure, 4—safe drop, 5—closing. Types 1 and 5 cannot be updated. By default, it takes the previous value of the register-shift transaction being edited.
category_id The ID of the financial category. A mandatory property if the register shift transaction type is 2 or 3 and an account for cash is attached to the location. By default, it takes the previous value of the register-shift transaction being edited.
user_id Employee ID. By default, it takes the previous value of the register-shift transaction being edited.
amount The register shift transaction amount. By default, it takes the previous value of the register-shift transaction being edited.
time The date and time of the register shift transaction in the “Y-m-d H:i” format. By default, it takes the previous value of the register-shift transaction being edited.
is_fiscal The status of the register-shift transaction being fiscal: 0—non-fiscal, 1—fiscal. By default, it takes the previous value of the register-shift transaction being edited.
comment Comment. By default, it takes the previous value of the register-shift transaction being edited.

The finance.updateCashShiftTransaction response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
cash_shift_transaction_id The register shift transaction new ID

finance.removeCashShiftTransaction: Remove the Register Shift Transaction

Request example:

<?php
$url = 'https://joinposter.com/api/finance.removeCashShiftTransaction'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$cash_shift_transaction = [
    'cash_shift_transaction_id' => 611,
];

$data = sendRequest($url, 'post', $cash_shift_transaction);

Response example:

{  
  "response":true
}

The method removes a register shift transaction.

HTTP request

GET https://joinposter.com/api/finance.removeCashShiftTransaction

POST parameters of the finance.removeCashShiftTransaction request

Parameter Description
cash_shift_transaction_id The register shift transaction ID

The finance.removeCashShiftTransaction response parameters

Parameter Description
response true if the register-shift transaction has been successfully removed

finance.getTransactions: Get All Transactions

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&dateFrom=20170701'
 . '&dateTo=20170901';


$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "transaction_id":"538",
      "account_id":"1",
      "user_id":"1",
      "category_id":"7",
      "type":"0",
      "amount":"-8137663",
      "balance":"545516997964",
      "date":"2017-08-31 09:20:22",
      "recipient_type":"0",
      "recipient_id":"0",
      "binding_type":"15",
      "binding_id":"400",
      "comment":"Корректирующая транзакция",
      "delete":"0",
      "account_name":"Наличные в заведении",
      "currency_symbol":"<i class=\"icon-rouble\"><\/i>",
      "category_name":"Actualization"
    },
    {
      "transaction_id":"536",
      "account_id":"1",
      "user_id":"1",
      "category_id":"2",
      "type":"1",
      "amount":"8148663",
      "balance":"545525135627",
      "date":"2017-08-31 09:20:21",
      "recipient_type":"0",
      "recipient_id":"0",
      "binding_type":"11",
      "binding_id":"400",
      "comment":"Закрытие наличной кассы",
      "delete":"0",
      "account_name":"Наличные в заведении",
      "currency_symbol":"<i class=\"icon-rouble\"><\/i>",
      "category_name":"Cash register shifts"
    }
  ]
}

The method returns all transactions

HTTP request

GET https://joinposter.com/api/finance.getTransactions

GET parameters of the finance.getTransactions request

Parameter Description
account_id An optional parameter, the account ID; the default value is for all accounts
category_id An optional parameter, the category ID; the default value is for all categories
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
pretty An optional parameter, return data in a human-readable format. All system transactions will be reduced to incoming or expendable transactions.

The finance.getTransactions response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
transaction_id Transaction ID
account_id Order ID
user_id Waiter ID
category_id Category ID; the default value is all categories
type Transaction type: 0—expenditure, 1—income
amount Transaction amount in kopecks
balance Account balance in kopecks
date Date of transaction
recipient_type Type of the recipient entity: 1—transfer, 12—supplier
recipient_id Recipient entity ID
binding_type The type of the corresponding entity: 1—transfer, 12 —register-shift closing, 13—supply, 14—register-shift transactions
binding_id The corresponding entity ID
comment Comment
account_name Account name
category_nam Category name
currency_symbol Unicode currency symbol; for the ruble, dram, and manat, HTML comes displayed on the register as a currency icon

finance.createTransactions: Create a New Transaction

Request example:

<?php
$url = 'https://joinposter.com/api/finance.createTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'id'            => 1,
    'type'          => 2,
    'category'      => 7,
    'user_id'       => 4,
    'amount_from'   => 1000,
    'amount_to'     => 900,
    'account_from'  => 1,
    'account_to'    => 2,
    'date'          => '16112017',
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{
  "response":600
}

The method creates a new transaction

HTTP request

POST https://joinposter.com/api/finance.createTransactions

POST parameters of the finance.createTransactions request

Parameter Description
id Group ID
type Transaction type: 0—expenditure, 1—income, 2—transfer
category Category ID
user_id User ID
date Date of adding in the dmY format

Depending on the type parameter, additional parameters have to be transmitted

type — 0

Parameter Description
amount_from The amount of expenditure in hryvnias/rubles
account_from Order ID

type — 1

Parameter Description
amount_to The amount of income in hryvnias/rubles
account_to Order ID

type—2

Parameter Description
account_to The ID of an account the money is transferred to
account_from The ID of an account the money is transferred from
amount_to The amount of transfer to the account in hryvnias/rubles
amount_from The amount of transfer from the account in hryvnias/rubles

The finance.createTransactions response parameters

Parameter Description
response The created transaction ID

finance.updateTransactions: Update a Transaction

Request example:

<?php
$url = 'https://joinposter.com/api/finance.updateTransactions'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$transaction = [
    'transaction_id'    => 600,
    'type'              => 2,
    'category'          => 7,
    'user_id'           => 4,
    'amount_from'       => 1000,
    'amount_to'         => 900,
    'account_from'      => 1,
    'account_to'        => 2,
    'date'              => '16112017',
];

$data = sendRequest($url, 'post', $transaction);

Response example:

{
  "response":600
}

The method updates an existing transaction

HTTP request

POST https://joinposter.com/api/finance.updateTransactions

POST parameters of the finance.createTransactions request

Parameter Description
transaction_id Transaction ID to update
type Transaction type: 0—expenditure, 1—income, 2—transfer
category Category ID
user_id User ID
date Date of adding in the Ymd format

Depending on the type parameter, additional parameters have to be transmitted

type = 0

Parameter Description
amount_from Expenditure amount
account_from Order ID

type = 1

Parameter Description
amount_to Amount of income
account_to Order ID

type = 2

Parameter Description
account_to The ID of an account the money is transferred to
account_from The ID of an account the money is transferred from
amount_to Transfer amount to accounts
amount_from Transfer amount from the account

The finance.updateTransactions response parameters

Parameter Description
response The updated transaction ID

finance.getAccounts: Get Accounts

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getAccounts'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "account_id":"1",
      "name":"Наличные в заведении",
      "currency_id":"2",
      "type":"3",
      "balance":"545643467264",
      "balance_start":"200000000",
      "percent_acquiring":"0.00",
      "currency_symbol":"<i class=\"icon-rouble\"><\/i>",
      "currency_code_iso":"RUB",
      "currency_code":"руб."
    },
    {
      "account_id":"2",
      "name":"Счет ИП",
      "currency_id":"2",
      "type":"1",
      "balance":"83086475682",
      "balance_start":"790000",
      "percent_acquiring":"0.00",
      "currency_symbol":"<i class=\"icon-rouble\"><\/i>",
      "currency_code_iso":"RUB",
      "currency_code":"руб."
    },
    {
      "account_id":"3",
      "name":"Сейф",
      "currency_id":"2",
      "type":"3",
      "balance":"56720000",
      "balance_start":"65000000",
      "percent_acquiring":"0.00",
      "currency_symbol":"<i class=\"icon-rouble\"><\/i>",
      "currency_code_iso":"RUB",
      "currency_code":"руб."
    }
  ]
}

The method returns accounts in the Finance section

HTTP request

GET https://joinposter.com/api/finance.getAccounts

GET parameters of the finance.getAccounts response

Parameter Description
type Type of account: 1—non-cash, 2—bank card, 3—cash. The default value is all accounts.

The finance.getAccounts response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
account_id Order ID
name Account name
type Type of account: 1—non-cash, 2—bank card, 3—cash
balance Account balance in hryvnias/rubles
balance_start The opening balance in hryvnias/rubles, the balance of money at the time of creation
percent_acquiring Acquiring interest
currency_id Currency ID in Poster: 1—hryvnia, 2—ruble, 3—dollar, 4—euro, 5—tenge, 6—lari, 7—baht, 8—Armenian dram
currency_name Currency name
currency_code Currency code on the register
currency_symbol Unicode currency symbol; for the ruble, dram, and manat, HTML comes displayed on the register as a currency icon
currency_code_iso Digital currency code according to the ISO 4217 standard

finance.createAccount: Create a New Account

Request example:

<?php
$url = 'https://joinposter.com/api/finance.createAccount'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$account = [
    'account_name' => 'Сейф',
    'currency_id' => 3,
    'type' => 1,
    'balance_start' => 0,
];

$data = sendRequest($url, 'post', $account);

Response example:

{
  "response":4
}

The method creates a new account

HTTP request

POST https://joinposter.com/api/finance.createAccount

POST parameters of the finance.createAccount request

Parameter Description
account_name Account name
type Type of account: 1—non-cash, 2—bank card, 3—cash
balance_start The balance of money at the time of creation, in hryvnias/rubles
currency_id Currency ID in Poster: 1—hryvnia, 2—ruble, 3—dollar, 4—euro, 5—tenge, 6—lari, 7—baht, 8—Armenian dram

The finance.createAccount response parameters

Parameter Description
response The created account ID

finance.updateAccount: Update an Account

Request example:

<?php
$url = 'https://joinposter.com/api/finance.updateAccount'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$account = [
    'account_id' => 3,
    'account_name' => 'Сейф',
    'currency_id' => 3,
    'type' => 1,
    'balance_start' => 0,
];

$data = sendRequest($url, 'post', $account);

Response example:

{
  "response":4
}

The method updates the account properties

HTTP request

POST https://joinposter.com/api/finance.updateAccount

POST parameters of the finance.updateAccount request

Parameter Description
account_id Order ID
account_name Account name
type Type of account: 1—non-cash, 2—bank card, 3—cash
balance_start The balance of money at the time of creation, in hryvnias/rubles
currency_id Currency ID in Poster: 1—hryvnia, 2—ruble, 3—dollar, 4—euro, 5—tenge, 6—lari, 7—baht, 8—Armenian dram

The finance.updateAccount response parameters

Parameter Description
response The updated account ID

finance.getCategories: Get an Account Category List

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getCategories'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "category_id":"5",
      "name":"Зарплата",
      "parent_id":"0",
      "operations":"2",
      "action":"0",
      "delete":"0"
    },
    {
      "category_id":"2",
      "name":"Кассовые смены",
      "parent_id":"0",
      "operations":"3",
      "action":"11",
      "delete":"0"
    }
  ]
}

The method of getting a list of financial account categories

HTTP request

GET https://joinposter.com/api/finance.getCategories

The finance.getCategories response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array of objects with the following parameters inside each of them:

Parameter Description
category_id Category ID
name Category name
parent_id Subcategory ID
operation Valid transactions: 1—income, 2—expenditure, 3—income and expenditure, 0—not selected
action Type of categories by operations: 1—transfers, 11—register shifts, 12—supplies, 14—adjustment, 0—any type of operation

finance.createCategory: Create a New Financial Category

Request example:

<?php
$url = 'https://joinposter.com/api/finance.createCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category = [
    'category_name'     => 'Коммуналка',
    'category_parent'   => 0,
    'operations_in'     => 0, 
    'operations_out'    => 1

];

$data = sendRequest($url, 'post', $category);

Response example:

{
  "response":6
}

The method creates a new financial category

HTTP request

POST https://joinposter.com/api/finance.createCategory

POST parameters of the finance.createCategory request

Parameter Description
category_name Category name
category_parent The parent category ID; if it is 0, the current category will be displayed at the top level
operations_in The income-type transactions being valid: 1—valid, 0—not valid
operations_out The expenditure-type transactions being valid: 1— valid, 0—not valid

The finance.createCategory response parameters

Parameter Description
response The created category ID

finance.updateCategory: Update a Financial Category

Request example:

<?php
$url = 'https://joinposter.com/api/finance.updateCategory'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$category = [
    'category_id'       => 13,
    'category_name'     => 'Коммуналка',
    'category_parent'   => 0,
    'operations_in'     => 1, 
    'operations_out'    => 1,

];

$data = sendRequest($url, 'post', $category);

Response example:

{
  "response":13
}

The method updates a financial category

HTTP request

POST https://joinposter.com/api/finance.updateCategory

POST parameters of the finance.updateCategory request

Parameter Description
category_id The ID of the category being updated
category_name Category name
category_parent The parent category ID; if it is 0, the current category will be displayed at the top level
operations_in The income-type transactions being valid: 1—valid, 0—not valid
operations_out The expenditure-type transactions being valid: 1— valid, 0—not valid

The finance.updateCategory response parameters

Parameter Description
response The updated category ID

finance.getReport: Category Report

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getReport'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":{
    "periods":[
      {
        "title":"Oct 2017",
        "start":1508101200,
        "end":1509483599
      },
      {
        "title":"Nov 2017",
        "start":1509483600,
        "end":1510865999
      }
    ],
    "categories":{
      "7":{
        "category_id":"7",
        "name":"book_category_action_actualization",
        "parent_id":"0",
        "operations":"3",
        "action":"14",
        "level":"1",
        "left":"1",
        "right":"2",
        "delete":"0",
        "amounts": {
          "1":{
            "Nov 2017":200000
          }
        },
        "currency_symbol":"<i class=\"icon-rouble\"><\/i>"
      },
      "8":{
        "category_id":"8",
        "name":"book_category_action_banking_services",
        "parent_id":"0",
        "operations":"3",
        "action":"15",
        "level":"1",
        "left":"3",
        "right":"4",
        "delete":"0"
      }
    }
  }
}

The method returns a category report

HTTP request

GET https://joinposter.com/api/finance.getReport

GET parameters of the finance.getReport request

Parameter Description
dateFrom An optional parameter, the sampling start date in the Ymd format, inclusive. The default date is a month ago.
dateTo An optional parameter, the sampling end date in the Ymd format, inclusive. The default date is the current date.
account_id An optional parameter, the account ID to return a report to. The default value is to all.
period An optional parameter, the sampling period: 1—by years, 2—by quarters, 3—by months, 4—by weeks, 5—by days. The default value is 3—by months.

The finance.getReport response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
periods The array contains the periods the report is structured by
categories An object with a category ID as properties and a report object as a value

The periods array objects have the following properties

Parameter Description
title Period name: year, quarter, month, week, day
start Period start date in the unixtimestamp format
end Period end date in the unixtimestamp format

Each property of the categories object contains the following parameters

Parameter Description
category_id Category ID
name Category name
delete The status of the category having been removed: 1—removed, 0—not removed
parent_id Parent category ID
operations Transactions count performed in the category for the selected period
action Type of categories by operations: 1—transfers, 11—register shifts, 12—supplies, 14—adjustment, 0—any type of operation
left The ID of the left category (by the Nested Set)
right The ID of the right category (by the Nested Set)
level Level of nesting of the category tree branch (by the Nested Set)
currency_symbol Unicode currency symbol; for the ruble, dram, and manat, HTML comes displayed on the register as a currency icon
amounts Total costs and revenues in a category. Contains a set of objects. Each object has a periods.title period name as a property and the amount in kopecks for a given period as a value.

finance.getTaxes: Tax List

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getTaxes'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
  "response":[  
    {  
      "tax_id":3,
      "country":"UA",
      "tax_name":"Налог с оборота",
      "tax_value":5,
      "type":2,
      "fiscal":1,
      "fiscal_program":0,
      "fixed":0,
      "delete":0
    }
  ]
}

The method returns a tax list

HTTP GET request

https://joinposter.com/api/finance.getTaxes

The finance.getTaxes response parameters

Parameter Description
response Response object

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
tax_id Tax ID
country The two-letter country code in the ISO 3166 format
tax_name Tax name
tax_value Tax percentage
type Tax type: 1 — sales tax, 2 — turnover tax, 3 — VAT, 4 — no tax
fiscal Tax fiscality: 0 — non-fiscal, 1 — fiscal
fiscal_program Program number on a fiscal printer
fixed The status of the tax being flat: 0—non-flat, 1—flat
delete The status of the tax having been removed: 0—removed, 1—not removed

finance.getTax: Tax Properties

Request example:

<?php
$url = 'https://joinposter.com/api/finance.getTax'
 . '?token=687409:4164553abf6a031302898da7800b59fb'
 . '&tax_id=3';

$data = sendRequest($url);

Response example:

{  
  "response":{  
    "tax_id":3,
    "country":"UA",
    "tax_name":"Налог с оборота",
    "tax_value":5,
    "type":2,
    "fiscal":1,
    "fiscal_program":0,
    "fixed":0,
    "delete":0
  }
}

The method returns tax properties

HTTP GET request

https://joinposter.com/api/finance.getTax

GET parameters of the finance.getTax request

Parameter Description
tax_id Tax ID

The finance.getTax response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
tax_id Tax ID
country The two-letter country code in the ISO 3166 format
tax_name Tax name
tax_value Tax percentage
type Tax type: 1—sales tax, 2—turnover tax, 3—VAT, 4—no tax
fiscal Tax fiscality: 0—non-fiscal, 1—fiscal
fiscal_program Program number on a fiscal printer
fixed The status of the tax being flat: 0—non-flat, 1—flat
delete The status of the tax having been removed: 0—removed, 1—not removed

finance.createTax: Create a Tax

Request example:

<?php
$url = 'https://joinposter.com/api/finance.createTax'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tax = [
    'name'   => 'Налог с оборота',
    'value'  => 5,
    'type'   => 2,
    'fiscal' => 1,
];

$data = sendRequest($url, 'post', $tax);

Response example:

{  
  "response":{  
    "tax_id":3
  }
}

The method creates a tax

HTTP POST request

https://joinposter.com/api/finance.createTax

POST parameters of the finance.createTax request

Parameter Description
name Tax name
value Tax percentage
type Tax type: 1—sales tax, 2—turnover tax, 3—VAT, 4—no tax
fiscal Tax fiscality: 0—non-fiscal, 1—fiscal. The default value is 0.
fiscal_program Program number on a fiscal printer. The default value is 0.

The finance.createTax response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
tax_id The created tax ID

finance.updateTax: Update Tax Properties

Request example:

<?php
$url = 'https://joinposter.com/api/finance.updateTax'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tax = [
    'tax_id' => 3,
    'name'   => 'Налог с оборота',
    'value'  => 10,
    'type'   => 2,
    'fiscal' => 1,
];

$data = sendRequest($url, 'post', $tax);

Response example:

{  
  "response":{  
    "tax_id":3
  }
}

The method updates the tax properties

HTTP POST request

https://joinposter.com/api/finance.updateTax

POST parameters of the finance.updateTax request

Parameter Description
tax_id Tax ID
name Tax name
value Tax percentage
type Tax type: 1—sales tax, 2—turnover tax, 3—VAT, 4—no tax
fiscal Tax fiscality: 0—non-fiscal, 1—fiscal. The default value is 0.
fiscal_program Program number on a fiscal printer. The default value is 0.

The finance.updateTax response parameters

Parameter Description
response Response object

Inside the response parameter, there is an object containing the following parameters:

Parameter Description
tax_id The updated tax ID

finance.removeTax: Remove a Tax

Request example:

<?php
$url = 'https://joinposter.com/api/finance.removeTax'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tax = [
    'tax_id' => 3,
];

$data = sendRequest($url, 'post', $tax);

Response example:

{  
  "response":true
}

The method removes a tax

HTTP POST request

https://joinposter.com/api/finance.removeTax

POST parameters of the finance.removeTax request

Parameter Description
tax_id Tax ID

The finance.removeTax response parameters

Parameter Description
response true if the tax has been successfully removed

access: Access

Methods for working with the Access section. All methods of this section begin with “access.”

access.getEmployees: Employee List

Request example:

<?php
$url = 'https://joinposter.com/api/access.getEmployees'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "user_id":3,
      "name":"Semen Tick",
      "user_type":90,
      "role_id": 1,
      "role_name": "Marketer",
      "access_mask": 34,
      "last_in":"2017-03-07 13:03:47"
    },
    {
      "user_id":9,
      "name":"John Doe",
      "user_type":0,
      "role_id": 2,
      "role_name": "Waiter",
      "access_mask": 1,
      "last_in":"2017-03-07 14:03:03"
    }
  ]
}

The method returns a list of employees

HTTP GET request

https://joinposter.com/api/access.getEmployees

The access.getEmployees response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
user_id Employee ID
name Employee first and last name
role_id User position ID
role_name Position name
access_mask [Bit mask](https://en.wikipedia.org/wiki/Mask_(computing)) which contains information about employee access for each section in Poster. See bytes explanation in the table below.
user_type The employee role: 0 — waiter, 1 — administrator, 2 — marketer, 3 — storekeeper, 4 — floor section administrator, 50 — manager, 90 — owner
last_in Date of the last login to the management console
inn Employee ITIN which will be sent to the fiscal registrar. Shown to customers from Russia with enabled fiscalization only.
name_for_fiscal Employee full name which will be sent to the fiscal registrar. Shown to customers from Russia with enabled fiscalization only.

All employees have their own positions and access rights. By default Poster has such roles:

But the user can customize the default or create new roles. So to check if a user has access to the particular section, use bitwise “AND” (&) with access_mask field and following bytes:

Byte Poster Section
1 POS
2 Reports
4 Finance
8 Products
16 Inventory
32 Marketing
64 Access
128 Settings
256 Floor section administrator
512 Security

access.createEmployee: Create an Employee

Request example:

<?php
$url = 'https://joinposter.com/api/access.createEmployee'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$employee = [
    'name'      => 'John Doe',
    'user_type' => 2,
    'pos_pass'  => '',
    'login'     => 'john.doe@test.com',
    'pass'      => 'aZntaeVP9h',
];

$data = sendRequest($url, 'post', $employee);

Response example:

{
  "response":15
}

The method creates an employee

All employees have their own roles and access rights:

HTTP POST request

https://joinposter.com/api/access.createEmployee

POST parameters of the access.createEmployee request

Parameter Description
name Employee first and last name
user_type The employee role: 0—waiter, 2—marketer, 3—storekeeper, 4—floor section administrator
pos_pass Pin code of the location waiter or administrator for authorization in the register
login Employee login for access to the management system; it is needed for a marketer and storekeeper only
pass Employee password to access the management system; it is needed for a marketer and storekeeper only
inn Employee ITIN which will be sent to the fiscal registrar. Needed for customers from Russia with enabled fiscalization only.
name_for_fiscal Employee full name which will be sent to the fiscal registrar. Needed for customers from Russia with enabled fiscalization only.

The access.createEmployee response parameters

Parameter Description
response The created employee ID

access.updateEmployee: Update Employee Properties

Request example:

<?php
$url = 'https://joinposter.com/api/access.updateEmployee'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$employee = [
    'user_id'   => 15,
    'name'      => 'John Doe',
    'user_type' => 2,
    'pos_pass'  => '',
    'login'     => 'john.doe@test.com',
    'pass'      => 'aZntaeVP9h',
];

$data = sendRequest($url, 'post', $employee);

Response example:

{
  "response":4082
}

The method updates an employee properties

All employees have their own roles and access rights:

HTTP POST request

https://joinposter.com/api/access.updateEmployee

POST parameters of the access.updateEmployee request

Parameter Description
user_id Employee ID
name Employee first and last name
user_type The employee role: 0—waiter, 2—marketer, 3—storekeeper, 4—floor section administrator
pos_pass Pin code of the location waiter or administrator for authorization in the register
login Employee login for access to the management system; it is needed for a marketer and storekeeper only
pass Employee password to access the management system; it is needed for a marketer and storekeeper only
inn Employee ITIN which will be sent to the fiscal registrar. Needed for customers from Russia with enabled fiscalization only.
name_for_fiscal Employee full name which will be sent to the fiscal registrar. Needed for customers from Russia with enabled fiscalization only.

The access.updateEmployee response parameters

Parameter Description
response The updated employee ID

access.getTablets: Register List

Request example:

<?php
$url = 'https://joinposter.com/api/access.getTablets'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "tablet_id":"1",
      "tablet_name":"Main in Madrid",
      "spot_id":"1"
    }
  ]
}

The method returns the register list

HTTP GET request

https://joinposter.com/api/access.getTablets

The access.getTablets response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
tablet_id Register ID
tablet_name Register name
spot_id The ID of the location the register is attached to

access.createTablet: Create a Register

Request example:

<?php
$url = 'https://joinposter.com/api/access.createTablet'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tablet = [
    'spot_id'          => 1,
    'spot_tablet_name' => 'My new tablet',
    'spot_code'        => 'crsa5a54',
];

$data = sendRequest($url, 'post', $tablet);

Response example:

{  
  "response":2
}

The method creates a register

HTTP POST request

https://joinposter.com/api/access.createTablet

POST parameters of the access.createTablet request

Parameter Description
spot_id The ID of the location the register will be attached to
spot_tablet_name Register name
spot_code Register password

The access.createTablet response parameters

Parameter Description
response The created register ID

access.updateTablet: Update Register Properties

Request example:

<?php
$url = 'https://joinposter.com/api/access.updateTablet'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tablet = [
    'spot_tablet_id'   => 2,
    'spot_id'          => 1,
    'spot_tablet_name' => 'New tablet',
    'spot_code'        => 'b3ss7m1p',
];

$data = sendRequest($url, 'post', $tablet);

Response example:

{  
  "response":2
}

The method updates the register properties

HTTP POST request

https://joinposter.com/api/access.updateTablet

POST parameters of the access.updateTablet request

Parameter Description
spot_tablet_id Register ID
spot_id The ID of the location the register is attached to
spot_tablet_name Register name
spot_code Register password

The access.updateTablet response parameters

Parameter Description
response The updated register ID

access.removeTablet: Remove a Register

Request example:

<?php
$url = 'https://joinposter.com/api/access.removeTablet'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$tablet = [
    'spot_tablet_id' => 1,
];

$data = sendRequest($url, 'post', $tablet);

Response example:

{  
  "response":true
}

The method removes a register

HTTP POST request

https://joinposter.com/api/access.removeTablet

POST parameters of the access.removeTablet request

Parameter Description
spot_tablet_id Register ID

The access.removeTablet response parameters

Parameter Description
response true if the register has been successfully removed

access.getSpots: Locations List

Request example:

<?php
$url = 'https://joinposter.com/api/access.getSpots'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
  "response":[
    {
      "spot_id":"1",
      "spot_name":"Spot in Madrid",
      "spot_adress":"Rome, Madrid",
      "storages":[
        {
          "storage_id":1,
          "storage_name":"Storage in Madrid",
          "storage_adress":"Rome, Madrid"
        }
      ]
    },
    {
      "spot_id":"2",
      "spot_name":"Spot in Milan",
      "spot_adress":"Rome, Milan",
      "storages":[
        {
          "storage_id":2,
          "storage_name":"Storage in Milan",
          "storage_adress":"Rome, Milan"
        }
      ]
    }
  ]
}

The method returns a list of locations

HTTP GET request

https://joinposter.com/api/access.getSpots

GET parameters of the access.getSpots request

Parameter Description
1c It allows returning the location 1C system in the response You must transmit true as a value. By default, it is not transmitted.

The access.getSpots response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is an array, each element of which contains the following parameters:

Parameter Description
spot_id Location ID
spot_name Location name
spot_adress Location address
id_1c Location ID in the 1C system
storages Storages attached to the location

The storages parameter has an array inside, each element of which contains the following parameters:

Parameter Description
storage_id Storage ID
storage_name Storage name
storage_adress Storage address

access.createSpot: Create a Location

Request example:

<?php
$url = 'https://joinposter.com/api/access.createSpot'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$spot = [
    'spot_name' => 'My new spot',
];

$data = sendRequest($url, 'post', $spot);

Response example:

{  
  "response":2
}

The method creates a location

HTTP POST request

https://joinposter.com/api/access.createSpot

POST parameters of the access.createSpot request

Parameter Description
spot_name Location name

The access.createSpot response parameters

Parameter Description
response The created location ID

access.updateSpot: Update Location Properties

Request example:

<?php
$url = 'https://joinposter.com/api/access.updateSpot'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$spot = [
    'spot_id'   => 2,
    'spot_name' => 'New name',
];

$data = sendRequest($url, 'post', $spot);

Response example:

{  
  "response":2
}

The method updates the location properties

HTTP POST request

https://joinposter.com/api/access.updateSpot

POST parameters of the access.updateSpot request

Parameter Description
spot_id Location ID
spot_name Location name

The access.updateSpot response parameters

Parameter Description
response The updated location ID

access.removeSpot: Remove a Location

Request example:

<?php
$url = 'https://joinposter.com/api/access.removeSpot'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$spot = [
    'spot_id' => 1,
];

$data = sendRequest($url, 'post', $spot);

Response example:

{  
  "response":true
}

The method removes a location

HTTP POST request

https://joinposter.com/api/access.removeSpot

POST parameters of the access.removeSpot request

Parameter Description
spot_id Location ID

The access.removeSpot response parameters

Parameter Description
response true if the location has been successfully removed

payments: Order Billing

Methods for customer order billing via external payment services. All methods of this section begin with payments.

payments.addTransactionPayment: Customer Order Billing Notification

Request example:

<?
$url = 'https://joinposter.com/api/payments.addTransactionPayment?' .
  'format=json';

$application_secret = '123123123123';

$payment = [
  'type' => 'application-name',
  'merchant_id' => 3432343,
  'transaction_id' => '1474012061849',
  'payed_sum' => 369.00,
  'credited_sum' => 365.31,
];

$payment['sign'] = md5(implode(':', $payment) . ':' . $application_secret);

$answer = sendRequest($url, 'post', $payment);

Response example:

{
  "response":{
    "status":"accept"
  }
}

The Poster system notification of the successful customer order billing through an external payment service.

HTTP request

POST https://joinposter.com/api/payments.addTransactionPayment

POST parameters of the payments.addTransactionPayment request

Parameter Description
type The key name of the payment system that sends a request for payment that has come. Under the system, a separate application is created in the Poster system, where the given name is specified.
merchant_id Poster customer ID in the internal database of the payment system
transaction_id The ID of the order that has been paid through the payment system
payed_sum The order amount paid by the visitor (in hryvnias/rubles)
credited_sum The amount that has been credited to the Poster customer operating account (in hryvnias/rubles). This is the order amount minus the acquiring fee.
sign The request signature that is an md5 hash of a line connecting the values of the following variables through the colon: type, merchant_id, transaction_id, payed_sum, credited_sum, application_secret.

application_secret is an application secret line. Like the type variable, it is issued to the payment system while creating an application for it in Poster.

The payments.addTransactionPayment response parameters

Parameter Description
status If the request is successful, it will contain the accept value

payments.getOpenTransactionsOnTable: List of Open Orders on the Table

Request example:

<?
$url = 'https://joinposter.com/api/payments.getOpenTransactionsOnTable?' .
  'format=json';

$application_secret = '123123123123';

$request = [
  'type' => 'application-name',
  'merchant_id' => 3432343,
  'table_id' => 41,
];

$request['sign'] = md5(implode(':', $request) . ':' . $application_secret);

$url .= '&' . http_build_query($request);

$answer = sendRequest($url);

Response example:

{
  "response":[
    {
      "order_id":30139,
      "transaction_id":1484233370643,
      "date_open":1484233375235,
      "payed_sum":127.02,
      "products":[
        {
          "product_name":"Венский суп Гуляш"
        },
        {
          "product_name":"Медальоны из телятины с овощами гриль"
        },
        {
          "product_name":"Хлеб белый собственной выпечки"
        },
        {
          "product_name":"Кальян",
          "modificator_name":"на соке"
        },
        {
          "product_name":"Соус BBQ к блюду"
        },
        {
          "product_name":"Pepsi 300 ml"
        }
      ]
    },
    {
      "order_id":30946,
      "transaction_id":1485341938799,
      "date_open":1485341938872,
      "payed_sum":190,
      "products":[
        {
          "product_name":"Кролик по-охотничьи"
        }
      ]
    }
  ]
}

It returns orders to an external payment service that are currently open on a particular table.

HTTP request

GET https://joinposter.com/api/payments.getOpenTransactionsOnTable

GET parameters of the payments.getOpenTransactionsOnTable request

Parameter Description
type The key name of a payment system that sends the request. Under the system, a separate application is created in the Poster system, where the given name is specified.
merchant_id Poster customer ID in the internal database of the payment system
table_id Table ID to receive open orders for
sign The request signature that is an md5 hash of a line connecting the values of the following variables through the colon: type, merchant_id, table_id, application_secret.

application_secret is an application secret line. Like the type variable, it is issued to the payment system while creating an application for it in Poster.

The payments.getOpenTransactionsOnTable response parameters

Parameter Description
order_id The order ID displayed in reports and printed on receipts
transaction_id The order ID used for the subsequent payment effect
date_open Time of order creation in the timestamp format with milliseconds
payed_sum The amount for a visitor to pay for the order (in hryvnias/rubles)
products List of products ordered by a visitor. Each element of the array contains the product name in the form of the product_name property, and can also contain a modificator_name property if it is a product modification.

franchise: Franchises

Methods for working with franchises. All methods of this section begin with “franchise.”

franchise.getTransactionsByClientId: Customer Transaction List

Request example:

<?
$url = 'https://joinposter.com/api/franchise.getTransactionsByClientId'
    . '?format=json'
    . '&token=687409:4164553abf6a031302898da7800b59fb'
    . '&client_id=4'
    . '&date_from=20170400';

$transactions = sendRequest($url);

Response example:

{
  "response": {
    "date_from": "2017-04-01 00:00:00",
    "date_to": "2017-04-30 23:59:59",
    "transactions_count": 2,
    "transactions": [
      {
        "franchise_id": 7457,
        "transaction_id": 12870,
        "date_close": "2017-04-25 17:58:50",
        "sum": 246.4,
        "bonus": 0,
        "bonus_payed": 0,
        "products": [
          {
            "product_id": 832,
            "modificator_id": 0,
            "franchise_product_id": 322,
            "franchise_modification_id": 0,
            "sum": 246.4
          }
        ]
      },
      {
        "franchise_id": 888,
        "transaction_id": 44626,
        "date_close": "2017-04-12 16:25:42",
        "sum": 626,
        "bonus": 0,
        "bonus_payed": 0,
        "products": [
          {
            "product_id": 13,
            "modificator_id": 0,
            "franchise_product_id": 13,
            "franchise_modification_id": 0,
            "sum": 318
          },
          {
            "product_id": 10,
            "modificator_id": 0,
            "franchise_product_id": 10,
            "franchise_modification_id": 0,
            "sum": 308
          }
        ]
      }
    ]
  }
}

The method returns the customer transactions for all franchises for the specified period

HTTP request

GET https://joinposter.com/api/franchise.getTransactionsByClientId

GET parameters of the franchise.getTransactionsByClientId request

Parameter Description
client_id Customer ID in the master account.
date_from An optional parameter. The sampling start date (Ymd), inclusive. The default date is a month ago.
date_to An optional parameter. The sampling end date (Ymd), inclusive. The default date is the current date.

The franchise.getTransactionsByClientId response parameters

Parameter Description
date_from The sampling start date
date_to The sampling end date
transactions_count Transactions found count
transactions Transactions list

Inside the transactions , there is an array, each element of which contains the following properties:

Parameter Description
franchise_id The ID of the current transaction franchise
transaction_id The transaction ID in the current franchise
date_close Transaction closing date
sum The total transaction amount
bonus Transaction points accrued
bonus_payed Transaction points paid
products Products list

Inside the products, there is an array, each element of which contains the following properties:

Parameter Description
product_id Product ID in the master account
modificator_id Product modifier ID in the master account
franchise_product_id Product ID in the current franchise
franchise_modification_id Product modifier ID in the current franchise
sum Product cost

franchise.getSpots: List of Franchisee Locations throughout the Franchise

Request example:

<?php
$url = 'https://joinposter.com/api/franchise.getSpots'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{  
   "response":{  
      "demo-franchisee":[  
         {  
            "spot_id":1,
            "name":"Демо франчайзи",
            "address":""
         },
         {  
            "spot_id":2,
            "name":"Демо франчайзи2",
            "address":""
         }
      ]
   }
}

The method returns the list of franchisee locations throughout the franchise

HTTP GET request

GET https://joinposter.com/api/franchise.getSpots

The franchise.getSpots response parameters

Parameter Description
response An array of objects

Inside the response parameter, there is a list with a franchisee as the key and an array with a list of locations of this franchisee as the value. Each array object contains the following values:

Parameter Description
spot_id Location ID
spot_name Location name
spot_adress Location address

settings: Account Settings

Methods for working with the Account Settings section. All methods of this section begin with “settings.”

settings.getAllSettings: Account Settings

Request example:

<?php
$url = 'https://joinposter.com/api/settings.getAllSettings'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$data = sendRequest($url);

Response example:

{
    "response": {
        "COMPANY_ID": "demo",
        "FIZ_ADRESS_CITY": "joinposter.com",
        "FIZ_ADRESS_PHONE": "74993466863",
        "uses_tables": 1,
        "uses_cash_shifts": 1,
        "uses_taxes": 1,
        "uses_multiprice": 0,
        "tip_amount": 10,
        "uses_bookkeeping": 1,
        "uses_ipay": 0,
        "uses_manufacturing": 0,
        "uses_quick_waiter": 0,
        "company_name": "Демо-версия Poster",
        "company_type": 1,
        "timezones": "Europe/Kiev",
        "logo": "/upload/pos_cdb_4/icon.png",
        "lang": "ru",
        "pos_phone": "74993466863",
        "analytics_plus_time": 0,
        "uses_fiscality": 0,
        "print_fiscal_by_default": 0,
        "currency": {
            "currency_id": 1,
            "currency_name": "Гривна",
            "currency_code": "грн.",
            "currency_symbol": "₴",
            "currency_code_iso": "UAH"
        },
        "email": "root@joinposter.com",
        "name": "Demo"
    }
}

The method returns the account settings data

HTTP GET request

https://joinposter.com/api/settings.getAllSettings

The settings.getAllSettings response parameters

Parameter Description
COMPANY_ID Account name
FIZ_ADRESS_CITY Location address
FIZ_ADRESS_PHONE Location phone number
uses_tables The status of the table plan being used: 0—not used, 1—used
uses_cash_shifts The status of register shifts being used: 0—not used, 1—used
uses_taxes The status of taxes being used: 0—not used, 1—used
uses_multiprice The status of different prices being used at different locations: 0—not used, 1—used
tip_amount Service fee
uses_bookkeeping The status of accounting being used: 0—not used, 1—used
uses_ipay The status of the iPay payment method being accepted: 0—not accepted, 1—accepted
uses_manufacturing The status of manufacturing being used: 0—not used, 1—used
uses_quick_waiter The status of a quick waiter shift being used: 0—not used, 1—used
company_name Location name
company_type Location type: 1—cafe, 2—store
timezones Time zone
logo Link to the account logo
lang Language in the ISO 639 format. The Ukrainian language is designated as ua.
pos_phone Account owner phone number
analytics_plus_time Business time of the location working time end
uses_fiscality The status of fiscalization being used: 0—not used, 1—used
print_fiscal_by_default The status of receipts for tax purposes being printed by default: 0—not printed, 1—printed
email Account owner email
name Account owner name
currency Account сurrency

Inside the currency element, there is an array, each element of which contains the following properties:

Parameter Description
currency_id Currency ID in Poster
currency_name Currency name
currency_code Currency code on the register
currency_symbol Unicode currency symbol; for the ruble, dram, and manat, HTML comes displayed on the register as a currency icon
currency_code_iso Digital currency code according to the ISO 4217 standard

settings.changeSettings: Update Properties of Customer Account Settings

Request example:

<?php
$url = 'https://joinposter.com/api/settings.changeSettings'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$settings = [
    'uses_taxes'              => 1,
    'uses_cash_shifts'        => 0,
    'uses_fiscality'          => 0,
    'print_fiscal_by_default' => 0,
    'timezones'               => 'Europe/Moscow',
];

$data = sendRequest($url, 'post', $settings);

Response example:

{  
  "response":true
}

The method changes the properties of the customer account settings

HTTP POST request

https://joinposter.com/api/settings.changeSettings

POST parameters of the settings.changeSettings request

Parameter Description
uses_taxes The status of using taxes: 0—not to use, 1—to use. By default, it is not transmitted.
uses_cash_shifts The status of using register shifts: 0—not to use, 1—to use. By default, it is not transmitted.
uses_fiscality The status of using fiscalization: 0—not to use, 1—to use. By default, it is not transmitted.
print_fiscal_by_default The status of printing a fiscal receipt by default: 0—not to print, 1—to print. By default, it is not transmitted.
timezones Time zone. By default, it is not transmitted.

The settings.changeSettings response parameters

Parameter Description
response true if the customer account settings properties have been successfully updated

application: Application

Methods for working with the Poster Application section. All methods of this section begin with “application.”

application.setEntityExtras: Update Additional Entity Data

Request example:

// Saves side system product id 
<?php
$url = 'https://joinposter.com/api/application.setEntityExtras'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$extras = [
    "entity_type"   => "product",
    "entity_id"     => 4,
    "extras"        => [
        "sideId" => "1"
    ]
];

$data = sendRequest($url, 'post', $extras);

Response example:

{
  "response":true
}

Request example:

// Save auth token in global settings 
<?php
$url = 'https://joinposter.com/api/application.setEntityExtras'
 . '?token=687409:4164553abf6a031302898da7800b59fb';

$extras = [
    "entity_type"   => "settings",
    "extras"        => [
        "token" => "lva23gds1793skd0123apsod10230wqoe0oe01"
    ]
];

$data = sendRequest($url, 'post', $extras);

Response example:

{
  "response":true
}

Poster has a concept of an entity, for example, a register, the location tables, a customer, a waiter, etc. You can use this method to expand information about any entity. For example, you write an application on the POS platform; you have to authorize a user and save his token for further requests. When you restart your tablet, the token will be deleted from memory, but you can save it in the settings entity. Now when the register boots, you can get all the settings by the settings.getAllSettings method or in the Poster.settings.extras object.

HTTP request

POST https://joinposter.com/api/application.setEntityExtras

POST parameters of the application.setEntityExtras request

Parameter Description
entity_type A mandatory parameter, the type of an entity the parameters are written into. The entity variants available are described below.
entity_id A mandatory parameter, the ID of an entity the extras object will be written into. For example, for the access.getTablets method—tablet_id.
extras A mandatory parameter, the object the properties of which will be written into the entity

The application.setEntityExtras response parameters

Parameter Description
response The request result; true if the request was successful

List of entities extras can be added to

Entity Description
spot Location
tablet Register
staff Employee
clients_group Customer group
product Product or dish
ingredient Ingredient
menu_category Product or modifier category
ingredients_category Ingredient category
client Location customer
settings Account settings, a global entity. entity_id does not have to be transmitted in the request.

errors: Error Codes

Example of response:

{  
  "error":{  
    "code":11,
    "message":"Bad access token"
  }
}

Poster API can return the following errors in its responses:

Error code Description
0 Success
10 access_token is not specified
11 Invalid access_token
12 access_token expired
20 The application is not authorized to call this method
32 The ID doesn’t exist
34 Absence of required properties
36 The variable must be an array
38 The name already exists
42 The variable does not exist
44 Error saving data
45 Time is less than the order opening time
52 The date range must be no more than 3 days
54 Access denied
99 Entity repetition
142 Invalid verify
143 Invalid application_id
153 You are not allowed to make changes
154 The name of the modifier must be unique
155 The direct value of the parameter
701 The field must be an integer
400 Invalid request format, required data missing
404 Record not found
700 Rate restriction
4001 Invalid currency

POS Platform: Introduction

The Point-Of-Sale Platform (POS Platform) is a technology that allows external developers to expand the functionality of the Poster cash solution. Use the Point-Of-Sale Platform for applications a waiter or a cashier deals with. For example:

Technologies

Poster has a hybrid architecture; the bulk of the business logic of the application is written using web technologies. Applications on the register platform run Javascript. You can write an application in any language compiled in JS (CoffeeScript, TypeScript). An application is loaded into the system as a single JS file (bundle).

All resources that use the application (CSS, images, typefaces, sounds) must be included in the bundle. To do this, you have to use bundlers. In the examples that you can find in the documentation, the webpack bundler is used.

A JS file with an application is launched inside a special container at the register. The container is an Iframe with built-in methods enabling the application interaction with Poster. The application in the container is cached at the register and can be launched and run without the Internet connection.

To create an application interface, you can use any framework or library. For example, Backbone, VueJS, Angular, React. The Poster register interface is written on React, so if you are writing an app using React, you can use some ready-made components that are customary for Poster users. When working with other frameworks, you will have to implement all the components on your own or install external plug-ins.

Guidelines

Applications in Poster are used by floor-section employees on devices with touch displays. The operation speed is very important in the work of any restaurant. The faster the waiter interacts with the cash solution, the more time he can devote to communication and building relationships with customers. Several rules for developing applications for Poster follow from this:

  1. Large interface elements. The waiter works with the app quickly and does not have to spend time aiming for the button. We recommend that you do not create interface elements with a clickable area less than 44 × 44 pixels.
  2. User-friendly interworking scenarios. Simplify the logic of your app, reduce the number of operations that users have to make to get the result.
  3. Quick operation and feedback. The application should not freeze; users should at any time understand what is going on.
  4. A small size of the bundle. Involve utility when adding external libraries so as not to enlarge your bundle file. A large bundle will affect the app launching speed, especially at locations with a slow Internet connection.

Getting started

  1. Clone a repository from boilerplate and go to it in the command line.
  2. Edit manifest.json, write applicationId and applicationSecret. If you do not have keys, contact the customer support.
  3. Run npm install.
  4. Run npm install webpack-dev-server -g.
  5. Run webpack-dev-server.
  6. Go to the web version of the cash solution in your account: {account}.joinposter.com/pos (login and password you have specified during registration; the standard waiter pin is 0000)
  7. Open an order and try to pay it. The application will show a popup with “Hello, world” from Boilerplate before payment.
  8. Done! You can develop an application and experiment; the source is atsrc/js/app.js.

Application debugging

PC debugging

In a container with real users, your application will be loaded from a platform.joinposter.com subdomain. To update the application, you have to make a deploy and restart Poster on a register. However, it is not convenient to do in the process of development; you have to update the application much faster.

To do this:

  1. In your developer account on Users and roles page enter a subdomain of testing account
  2. On a register in top right corner press </>. You will see Platform settings window.
  3. In platform settings popup switch to Development mode

Example how to switch into development mode

In development mode bundle will load but your local computer at http://127.0.0.1:8080/bundle.js. You can use your web server, or webpack-dev-server if you use our boilerplate for development.

From webpack-dev-server at our boilerplate, your application will automatically reboot in the container when you change its source code. It will allow you to quickly make updates and get feedback.

You can use Chrome Developer Tools for debugging. All console.log in your application’s container are displayed on the Poster web version console.

Debugging on iOS, Android tablet

To debug on iOS and Android go to Platform settings window and enter your PC IP address with webpack-dev-server launched. Bundle will be loaded from that IP.

Application deploy

After you finish developing your application, you have to send the app bundle to Poster Marketplace. To do this, use the applicaton.uploadPOSPlatformBundle method, which expects to get a JS file with the bundle. If you use our boilerplate to develop an application on the POS platform, the deploy will be available to you upon one npm run deploy command.

To date, after downloading the bundle, the new application version becomes instantly available to customers. It will automatically update when you restart your register application.

If you want to install an app to real Poster customers, the application have to be moderation by Poster specialists In autumn 2018 Poster specialists will review each production deploy. Review procedure will take up to seven business days

POS Methods: Methods

In the container , a global Poster object is available to the application. The object contains a set of methods for signing up for events, working with data collections and interfaces in Poster.

on: Sign up for Event

Request example:

    Poster.on('beforeOrderClose', (data, next) => {
        alert('Я срабатываю перед закрытием заказа');
        next();
    });

The method creates signing up for an event.

Arguments

Argument Description
1st, event Event name
2nd, callback Handler function

makeRequest: Make a Cross Domain Request

Request example:

    Poster.makeRequest('http://mywebsite.com', {
        headers: [
                    'Content-Type: application/json'            
        ],
        method: 'post',
        data: {
            foo: 'bar'
        },
        timeout: 10000

    }, (answer) => {
        if (answer && Number(answer.status) === 200) {
            console.log(answer.result);
        }
    });

The method makes HTTP requests to any remote URL. Requests are proxied through the Poster backend

Arguments

Argument Description
1st, url Remote resource URL
2nd, options An object with request settings. All the jQuery.ajax method parameters are available
3rd, callback Response handler function

Response

In callback, the answer. answer === false variable will come if the request has collapsed because the time was out or the device is not connected to the Internet.

If the request has passed, answer.status contains the response HTTP status, and answer.result—the response body.

Signature

Function which checks signature:

var md5 = require('md5');

function checkSign(url, headers, body, secret) {
    var signStr = url + (body ? JSON.stringify(body) : "") + headers['x-poster-time'] + secret;
    var signature = md5(signStr);

    return signature === headers['x-poster-signature'];
}
<?php       

function checkSign($url, $headers, $body, $secret) {
    $signatureStr = $url . ($body ? json_encode($body) : "") . $headers['X-Poster-Time'] . $secret;
    $signature = md5($signatureStr);

    return $headers['X-Poster-Signature'] == $signature;
}

If you are working with vulnerable transactions such as payment, points writing-off or accrual, your application needs confirmation that the request has come from a reliable source. For this, a request signature is used. The Poster.makeRequest method proxies requests via the Poster server, where a request is signed and sent to your server.

The request is signed through the following algorithm. In turn, there concatenate:

  1. Full request link together with GET parameters.
  2. JSON line created from the request body; if GET is the request, the body is excluded from signing.
  3. The request sending time; it is transmitted in the X-Poster-Time header in the Unix Timestamp format.
  4. Application secret, which is a key that you received when you registered your application.

The resulting line is hashed by the md5 method and sent along with the request in the X-Poster-Signature header.

For your convenience, each request has the following headings attached:

makeApiRequest: Make an API Poster Request

Request example:

Poster.makeApiRequest('clients.getGroups', {
    method: 'get'

}, (groups) => {
    if (groups) {
        console.log(groups);
    }
});

The method makes an API Poster request. API requests can also be made through Poster.makeRequest, but Poster.makeApiRequest simplifies this procedure: it automatically inserts your application token and the current user account, makes JSON.parse of the response.

Arguments

Argument Description
1st, method Method name from the Poster API
2nd, options An object with request settings. All the jQuery.ajax method parameters are available
3rd, callback Response handler function

Response

In callback, an object with the API response comes as the first argument or false if the request failed.

clients.get: Get Customer Data

Request example:

Poster.clients.get(1).then((client) => {
    if ( ! client) {
        return;
    }

    console.log(client.phone);
});

The method gets the customer data by the ID; the data type is Client.

Arguments

Argument Description
1st, id Customer ID

Response

The function returns Promise, which returns false if there is no customer with such an ID or an object with the customer data if any.

Customer parameters

Parameter Description
client Client type object

clients.create: Create a Customer on the Register

Request example:

Poster.clients.create({
        client: {
            client_sex: 1,
            client_name: "Vladimir Ivanchenko", 
            client_groups_id_client: 1
        }
    })
    .then(function (client) {
        console.log('new client', client);
    });

Response example:

{
  "client":{
    "address":"0",
    "bonus":0,
    "discount":10,
    "firstname":"Vladimir",
    "groupId":1,
    "id":33,
    "lastname":"Ivanchenko",
    "loyaltyType":1,
    "phone":"",
    "totalPayedSum":0
  }
}

The method creates a new customer on the register and returns this customer’s Client model

Arguments

Argument Description
1st, request object An object with the client property with customer data

The client property contains an object with such properties

Property Description
client_name A mandatory parameter, a line with the customer’s full name
client_groups_id_client A mandatory parameter, the customer group ID
client_sex Customer gender: 1—male, 2—female
country_phone_code Number, customer country code, for example, 380 for Ukraine
phone A line, customer phone number
email A line, customer email
card_number A line, customer card number
city A line, customer city
address A line, customer address
country A line, customer country
comment A line, a comment on the customer
birthday A line, in the dd-MM-YYYY format

Response

The function returns Promise, which returns an object with the client property or an error.

Property Description
client Client-type object

clients.find: Find a Customer on the Register

Request example:

Poster.clients.find({
        searchVal: 'Vladimir'            
    })
    .then(function (result) {
        console.log('clients search', result);    
    })

Response example:

{
   "foundClients":[
      {
         "id":33,
         "firstname":"Vladimir",
         "lastname":"Ivanchenko",
         "loyaltyType":1,
         "discount":10,
         "hidden":0,
         "groupId":1,
         "cardNumber":"0",
         "bonus":0,
         "totalPayedSum":0,
         "city":"0",
         "address":"0",
         "comment":"0",
         "phone":""
      }
   ],
   "foundByCard":[

   ]
}

The method creates a new customer on the register. And returns the Client model of this customer

Arguments

Argument Description
1st, request object An object with the searchVal property with customer data
Property Description
searchVal A mandatory parameter, the line we search for a customer by; the search is by the customer phone, name, last name, and card.

Response

The function returns Promise, which returns an object with such properties.

Property Description
foundClients An array of the customers found; it contains Client-type objects
foundByCard An array of the customers found with matches on the customer’s card; it contains Client-type objects

users.get: Get user data

Request example:

Poster.users.get(1).then((user) => {
    if ( ! user) {
        return;
    }

    console.log(user.name);
});

The method gets user data by the ID; the data type is User.

Arguments

Argument Description
1st, id User ID

Response

The function returns Promise, which returns false if there is no user with such an ID or an object with the user data if any.

users.getActiveUser: Get Active User Data

Request example:

Poster.users.getActiveUser().then((user) => {
    if (!user) {
        return;
    }

    console.log(user.name);
});

The method gets active user data; the data type is User.

Response

The function returns Promise, which returns false if there is no user with such an ID or an object with the user data if any.

orders.create: Create new order

Example how to create new order:

let result = await Poster.orders.create();

console.log(result);

Response example:

{
   "success":true,
   "order":{
      "id":1508308514369,
      "dateStart":1508308514369,
      "dateClose":0,
      "datePrint":0,
      "status":1,
      "userId":4,
      "tableId":8,
      "orderName":14,
      "guestsCount":2,
      "products":{
         "0":{
            "id":7,
            "count":1,
            "price":0,
            "printedNum":0
         },
         "1":{
            "id":1,
            "count":1,
            "price":25,
            "printedNum":0
         }
      },
      "subtotal":25,
      "total":25,
      "discount":0,
      "clientId":0,
      "payType":"",
      "payedSum":0,
      "payedCard":0,
      "payedCash":0,
      "payedBonus":0,
      "loyaltyAppId":0,
      "parentId":0,
      "tipIncluded":0,
      "tipSum":0,
      "comment":""
   }
}

The method creates an order and navigates user to window with this order

Response

Property Description
success The operation result: true — if order created, false — in case of error
order An Order-type object of new order

orders.getActive: Get a Current Order

Request example:

Poster.orders.getActive()
    .then(function (order) {
        console.log('active order', order);
    })

Response example:

{
  "order":{
    "id":1508308514369,
    "dateStart":1508308514369,
    "dateClose":0,
    "datePrint":0,
    "status":1,
    "userId":4,
    "tableId":8,
    "orderName":14,
    "guestsCount":2,
    "products":{
      "0":{
        "id":7,
        "count":1,
        "price":0,
        "printedNum":0
      },
      "1":{
        "id":1,
        "count":1,
        "price":25,
        "printedNum":0
      }
    },
    "subtotal":25,
    "total":25,
    "discount":0,
    "clientId":0,
    "payType":"",
    "payedSum":0,
    "payedCard":0,
    "payedCash":0,
    "payedBonus":0,
    "loyaltyAppId":0,
    "parentId":0,
    "tipIncluded":0,
    "tipSum":0,
    "comment":""
  }
}

The method gets the current order model; the data type is Order

Response

Property Description
order An Order-type object if the user is on the order or payment screen. On any other screen, there will be no order property.

orders.setOrderBonus: Set the order amount paid via an external System

Request example:

Poster.orders.setOrderBonus(1503219480866, 100)

The method sets the order amount paid through your application. In addition to the point amount, the method will set the Order loyaltyAppId model property according to your application ID.

Arguments

Argument Description
1st, id Order ID (unix-timestamp in milliseconds)
2nd, sum Amount paid by points

orders.setOrderClient: Add a Customer to the Register Order

Request example:

Poster.orders.setOrderClient(1509032509980, 30)
    .then(function (result) {
        console.log('client added', result);    
    })

Response example:

{
  "success":true
}

The method adds an existing customer to an open order on the register

Arguments

Argument Description
1st, orderId The ID of an order you have to add a customer to
2nd, clientId The ID of a customer being added to the order

Response

The function returns Promise, which returns an object with such properties

Property Description
success The operation result: true — if the customer is added, false — if you failed to add a customer, for example, there is no customer or order with such an ID

orders.setOrderComment: Set an Order Comment

Request example:

Poster.orders.setOrderComment(1503219480866, 'Order to go')

The method sets an order comment that will be available for employees to see in the order processing window and on the table plan. In addition, the comment will be printed in the receipt when the Print an order comment setting is enabled.

Arguments

Argument Description
1st, id Order Id with unix-timestamp in milliseconds format
2nd, comment Comment

orders.printReceipt: Print a Receipt

Poster.orders.printReceipt(1503219480866, 'loremipsum', 'To scan QR code use special app')

The method prints a receipt, with an optional QR code.

Arguments

Argument Description
1st, id Order ID (unix-timestamp in milliseconds)
2nd, qrCode A line the QR code will be generated from, an optional parameter
3rd, qrCodeTitle The header that will be printed at the bottom of the QR code, an optional parameter

orders.addProduct: Add a Product or Dish to the Order

Example how to add product without modification:

Poster.orders.addProduct(1503219480866, {id: 1})

Example how to add product with modification:

Poster.orders.addProduct(1503219480866, {id: 1, modification: 1})

Example how to add dish with modification:

Poster.orders.addProduct(1503219480866, {
    id: 1, 
    modification: '[{"m":1,"a":1}]'
})

The method adds a product or dish to the order. The product is always added to the count of 1. To change the product count, use the orders.changeProductCount method.

Arguments

Argument Description
1st, id Order ID (unix-timestamp in milliseconds)
2nd, product An object with the properties of a product being added to the order

The product object must contain the following properties

Property Description
id A mandatory parameter, product ID