Create an order
curl --request POST \
--url https://fbox.ngrok.io/order/create \
--header 'Content-Type: application/json' \
--data '
{
"number": 1,
"receipt_type": "order",
"products": [
{
"name": "Bread",
"barcode": "4780000000007",
"amount": 1000,
"unit_name": "dona",
"price": 50000,
"product_price": 50000,
"vat": 6000,
"vat_percent": 12,
"discount": 0,
"discount_percent": 0,
"other": 0,
"labels": [
"05367567230048c?eN1(o0029"
],
"class_code": "02710001005000000",
"package_code": 1282556,
"owner_type": 1,
"comission_info": {
"inn": "123456789",
"pinfl": "12345678912345"
}
}
],
"uuid": "123",
"time": "2021-04-07 12:52:02",
"cashier": "Admin",
"received_cash": 50000,
"change": 0,
"received_card": 0,
"card_type": 2,
"ppt_id": "123456789012",
"scan2pay_paid": true,
"extra_info": {
"phone_number": "998911234569",
"qr_payment_id": "123456789id12",
"qr_payment_provider": "0141",
"scan2pay_id": "59bcc56b-1fcf-4752-9f5b-a3fffdf525ae",
"card_number": "1234********1234"
},
"open_cashbox": true,
"send_email": true,
"email": "abdullo21113@gmail.com",
"sms_phone_number": "+998909999999",
"banners": [
{
"type": "text",
"data": "Discount code for next purchase",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": true
}
},
{
"type": "barcode",
"data": "23423423",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": true
}
}
],
"prices": [
{
"name": "PayMe",
"price": 100000,
"vat_type": "QQS",
"vat_price": 200000
}
]
}
'import requests
url = "https://fbox.ngrok.io/order/create"
payload = {
"number": 1,
"receipt_type": "order",
"products": [
{
"name": "Bread",
"barcode": "4780000000007",
"amount": 1000,
"unit_name": "dona",
"price": 50000,
"product_price": 50000,
"vat": 6000,
"vat_percent": 12,
"discount": 0,
"discount_percent": 0,
"other": 0,
"labels": ["05367567230048c?eN1(o0029"],
"class_code": "02710001005000000",
"package_code": 1282556,
"owner_type": 1,
"comission_info": {
"inn": "123456789",
"pinfl": "12345678912345"
}
}
],
"uuid": "123",
"time": "2021-04-07 12:52:02",
"cashier": "Admin",
"received_cash": 50000,
"change": 0,
"received_card": 0,
"card_type": 2,
"ppt_id": "123456789012",
"scan2pay_paid": True,
"extra_info": {
"phone_number": "998911234569",
"qr_payment_id": "123456789id12",
"qr_payment_provider": "0141",
"scan2pay_id": "59bcc56b-1fcf-4752-9f5b-a3fffdf525ae",
"card_number": "1234********1234"
},
"open_cashbox": True,
"send_email": True,
"email": "abdullo21113@gmail.com",
"sms_phone_number": "+998909999999",
"banners": [
{
"type": "text",
"data": "Discount code for next purchase",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": True
}
},
{
"type": "barcode",
"data": "23423423",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": True
}
}
],
"prices": [
{
"name": "PayMe",
"price": 100000,
"vat_type": "QQS",
"vat_price": 200000
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
number: 1,
receipt_type: 'order',
products: [
{
name: 'Bread',
barcode: '4780000000007',
amount: 1000,
unit_name: 'dona',
price: 50000,
product_price: 50000,
vat: 6000,
vat_percent: 12,
discount: 0,
discount_percent: 0,
other: 0,
labels: ['05367567230048c?eN1(o0029'],
class_code: '02710001005000000',
package_code: 1282556,
owner_type: 1,
comission_info: {inn: '123456789', pinfl: '12345678912345'}
}
],
uuid: '123',
time: '2021-04-07 12:52:02',
cashier: 'Admin',
received_cash: 50000,
change: 0,
received_card: 0,
card_type: 2,
ppt_id: '123456789012',
scan2pay_paid: true,
extra_info: {
phone_number: '998911234569',
qr_payment_id: '123456789id12',
qr_payment_provider: '0141',
scan2pay_id: '59bcc56b-1fcf-4752-9f5b-a3fffdf525ae',
card_number: '1234********1234'
},
open_cashbox: true,
send_email: true,
email: 'abdullo21113@gmail.com',
sms_phone_number: '+998909999999',
banners: [
{
type: 'text',
data: 'Discount code for next purchase',
style: {font_width: 2, font_height: 100, is_bold: true}
},
{
type: 'barcode',
data: '23423423',
style: {font_width: 2, font_height: 100, is_bold: true}
}
],
prices: [{name: 'PayMe', price: 100000, vat_type: 'QQS', vat_price: 200000}]
})
};
fetch('https://fbox.ngrok.io/order/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fbox.ngrok.io/order/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => 1,
'receipt_type' => 'order',
'products' => [
[
'name' => 'Bread',
'barcode' => '4780000000007',
'amount' => 1000,
'unit_name' => 'dona',
'price' => 50000,
'product_price' => 50000,
'vat' => 6000,
'vat_percent' => 12,
'discount' => 0,
'discount_percent' => 0,
'other' => 0,
'labels' => [
'05367567230048c?eN1(o0029'
],
'class_code' => '02710001005000000',
'package_code' => 1282556,
'owner_type' => 1,
'comission_info' => [
'inn' => '123456789',
'pinfl' => '12345678912345'
]
]
],
'uuid' => '123',
'time' => '2021-04-07 12:52:02',
'cashier' => 'Admin',
'received_cash' => 50000,
'change' => 0,
'received_card' => 0,
'card_type' => 2,
'ppt_id' => '123456789012',
'scan2pay_paid' => true,
'extra_info' => [
'phone_number' => '998911234569',
'qr_payment_id' => '123456789id12',
'qr_payment_provider' => '0141',
'scan2pay_id' => '59bcc56b-1fcf-4752-9f5b-a3fffdf525ae',
'card_number' => '1234********1234'
],
'open_cashbox' => true,
'send_email' => true,
'email' => 'abdullo21113@gmail.com',
'sms_phone_number' => '+998909999999',
'banners' => [
[
'type' => 'text',
'data' => 'Discount code for next purchase',
'style' => [
'font_width' => 2,
'font_height' => 100,
'is_bold' => true
]
],
[
'type' => 'barcode',
'data' => '23423423',
'style' => [
'font_width' => 2,
'font_height' => 100,
'is_bold' => true
]
]
],
'prices' => [
[
'name' => 'PayMe',
'price' => 100000,
'vat_type' => 'QQS',
'vat_price' => 200000
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fbox.ngrok.io/order/create"
payload := strings.NewReader("{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fbox.ngrok.io/order/create")
.header("Content-Type", "application/json")
.body("{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fbox.ngrok.io/order/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"terminal_id": "UZ170703100189",
"receipt_count": 643,
"date_time": "20200518221403",
"fiscal_sign": "248429044289",
"applet_version": "0300",
"qr_url": "https://ofd.soliq.uz/check?t=UZ170703100189&r=643&c=20200518221403&s=248429044289",
"cash_box_number": "01"
},
"error": null,
"is_success": true
}{
"data": null,
"error": {
"code": 101,
"message": "Printer not working",
"data": null
},
"is_success": false
}Заказы
Создание заказа
Создание заказа (продажа, аванс, кредит)
POST
/
order
/
create
Create an order
curl --request POST \
--url https://fbox.ngrok.io/order/create \
--header 'Content-Type: application/json' \
--data '
{
"number": 1,
"receipt_type": "order",
"products": [
{
"name": "Bread",
"barcode": "4780000000007",
"amount": 1000,
"unit_name": "dona",
"price": 50000,
"product_price": 50000,
"vat": 6000,
"vat_percent": 12,
"discount": 0,
"discount_percent": 0,
"other": 0,
"labels": [
"05367567230048c?eN1(o0029"
],
"class_code": "02710001005000000",
"package_code": 1282556,
"owner_type": 1,
"comission_info": {
"inn": "123456789",
"pinfl": "12345678912345"
}
}
],
"uuid": "123",
"time": "2021-04-07 12:52:02",
"cashier": "Admin",
"received_cash": 50000,
"change": 0,
"received_card": 0,
"card_type": 2,
"ppt_id": "123456789012",
"scan2pay_paid": true,
"extra_info": {
"phone_number": "998911234569",
"qr_payment_id": "123456789id12",
"qr_payment_provider": "0141",
"scan2pay_id": "59bcc56b-1fcf-4752-9f5b-a3fffdf525ae",
"card_number": "1234********1234"
},
"open_cashbox": true,
"send_email": true,
"email": "abdullo21113@gmail.com",
"sms_phone_number": "+998909999999",
"banners": [
{
"type": "text",
"data": "Discount code for next purchase",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": true
}
},
{
"type": "barcode",
"data": "23423423",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": true
}
}
],
"prices": [
{
"name": "PayMe",
"price": 100000,
"vat_type": "QQS",
"vat_price": 200000
}
]
}
'import requests
url = "https://fbox.ngrok.io/order/create"
payload = {
"number": 1,
"receipt_type": "order",
"products": [
{
"name": "Bread",
"barcode": "4780000000007",
"amount": 1000,
"unit_name": "dona",
"price": 50000,
"product_price": 50000,
"vat": 6000,
"vat_percent": 12,
"discount": 0,
"discount_percent": 0,
"other": 0,
"labels": ["05367567230048c?eN1(o0029"],
"class_code": "02710001005000000",
"package_code": 1282556,
"owner_type": 1,
"comission_info": {
"inn": "123456789",
"pinfl": "12345678912345"
}
}
],
"uuid": "123",
"time": "2021-04-07 12:52:02",
"cashier": "Admin",
"received_cash": 50000,
"change": 0,
"received_card": 0,
"card_type": 2,
"ppt_id": "123456789012",
"scan2pay_paid": True,
"extra_info": {
"phone_number": "998911234569",
"qr_payment_id": "123456789id12",
"qr_payment_provider": "0141",
"scan2pay_id": "59bcc56b-1fcf-4752-9f5b-a3fffdf525ae",
"card_number": "1234********1234"
},
"open_cashbox": True,
"send_email": True,
"email": "abdullo21113@gmail.com",
"sms_phone_number": "+998909999999",
"banners": [
{
"type": "text",
"data": "Discount code for next purchase",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": True
}
},
{
"type": "barcode",
"data": "23423423",
"style": {
"font_width": 2,
"font_height": 100,
"is_bold": True
}
}
],
"prices": [
{
"name": "PayMe",
"price": 100000,
"vat_type": "QQS",
"vat_price": 200000
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
number: 1,
receipt_type: 'order',
products: [
{
name: 'Bread',
barcode: '4780000000007',
amount: 1000,
unit_name: 'dona',
price: 50000,
product_price: 50000,
vat: 6000,
vat_percent: 12,
discount: 0,
discount_percent: 0,
other: 0,
labels: ['05367567230048c?eN1(o0029'],
class_code: '02710001005000000',
package_code: 1282556,
owner_type: 1,
comission_info: {inn: '123456789', pinfl: '12345678912345'}
}
],
uuid: '123',
time: '2021-04-07 12:52:02',
cashier: 'Admin',
received_cash: 50000,
change: 0,
received_card: 0,
card_type: 2,
ppt_id: '123456789012',
scan2pay_paid: true,
extra_info: {
phone_number: '998911234569',
qr_payment_id: '123456789id12',
qr_payment_provider: '0141',
scan2pay_id: '59bcc56b-1fcf-4752-9f5b-a3fffdf525ae',
card_number: '1234********1234'
},
open_cashbox: true,
send_email: true,
email: 'abdullo21113@gmail.com',
sms_phone_number: '+998909999999',
banners: [
{
type: 'text',
data: 'Discount code for next purchase',
style: {font_width: 2, font_height: 100, is_bold: true}
},
{
type: 'barcode',
data: '23423423',
style: {font_width: 2, font_height: 100, is_bold: true}
}
],
prices: [{name: 'PayMe', price: 100000, vat_type: 'QQS', vat_price: 200000}]
})
};
fetch('https://fbox.ngrok.io/order/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fbox.ngrok.io/order/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => 1,
'receipt_type' => 'order',
'products' => [
[
'name' => 'Bread',
'barcode' => '4780000000007',
'amount' => 1000,
'unit_name' => 'dona',
'price' => 50000,
'product_price' => 50000,
'vat' => 6000,
'vat_percent' => 12,
'discount' => 0,
'discount_percent' => 0,
'other' => 0,
'labels' => [
'05367567230048c?eN1(o0029'
],
'class_code' => '02710001005000000',
'package_code' => 1282556,
'owner_type' => 1,
'comission_info' => [
'inn' => '123456789',
'pinfl' => '12345678912345'
]
]
],
'uuid' => '123',
'time' => '2021-04-07 12:52:02',
'cashier' => 'Admin',
'received_cash' => 50000,
'change' => 0,
'received_card' => 0,
'card_type' => 2,
'ppt_id' => '123456789012',
'scan2pay_paid' => true,
'extra_info' => [
'phone_number' => '998911234569',
'qr_payment_id' => '123456789id12',
'qr_payment_provider' => '0141',
'scan2pay_id' => '59bcc56b-1fcf-4752-9f5b-a3fffdf525ae',
'card_number' => '1234********1234'
],
'open_cashbox' => true,
'send_email' => true,
'email' => 'abdullo21113@gmail.com',
'sms_phone_number' => '+998909999999',
'banners' => [
[
'type' => 'text',
'data' => 'Discount code for next purchase',
'style' => [
'font_width' => 2,
'font_height' => 100,
'is_bold' => true
]
],
[
'type' => 'barcode',
'data' => '23423423',
'style' => [
'font_width' => 2,
'font_height' => 100,
'is_bold' => true
]
]
],
'prices' => [
[
'name' => 'PayMe',
'price' => 100000,
'vat_type' => 'QQS',
'vat_price' => 200000
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fbox.ngrok.io/order/create"
payload := strings.NewReader("{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fbox.ngrok.io/order/create")
.header("Content-Type", "application/json")
.body("{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fbox.ngrok.io/order/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 1,\n \"receipt_type\": \"order\",\n \"products\": [\n {\n \"name\": \"Bread\",\n \"barcode\": \"4780000000007\",\n \"amount\": 1000,\n \"unit_name\": \"dona\",\n \"price\": 50000,\n \"product_price\": 50000,\n \"vat\": 6000,\n \"vat_percent\": 12,\n \"discount\": 0,\n \"discount_percent\": 0,\n \"other\": 0,\n \"labels\": [\n \"05367567230048c?eN1(o0029\"\n ],\n \"class_code\": \"02710001005000000\",\n \"package_code\": 1282556,\n \"owner_type\": 1,\n \"comission_info\": {\n \"inn\": \"123456789\",\n \"pinfl\": \"12345678912345\"\n }\n }\n ],\n \"uuid\": \"123\",\n \"time\": \"2021-04-07 12:52:02\",\n \"cashier\": \"Admin\",\n \"received_cash\": 50000,\n \"change\": 0,\n \"received_card\": 0,\n \"card_type\": 2,\n \"ppt_id\": \"123456789012\",\n \"scan2pay_paid\": true,\n \"extra_info\": {\n \"phone_number\": \"998911234569\",\n \"qr_payment_id\": \"123456789id12\",\n \"qr_payment_provider\": \"0141\",\n \"scan2pay_id\": \"59bcc56b-1fcf-4752-9f5b-a3fffdf525ae\",\n \"card_number\": \"1234********1234\"\n },\n \"open_cashbox\": true,\n \"send_email\": true,\n \"email\": \"abdullo21113@gmail.com\",\n \"sms_phone_number\": \"+998909999999\",\n \"banners\": [\n {\n \"type\": \"text\",\n \"data\": \"Discount code for next purchase\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n },\n {\n \"type\": \"barcode\",\n \"data\": \"23423423\",\n \"style\": {\n \"font_width\": 2,\n \"font_height\": 100,\n \"is_bold\": true\n }\n }\n ],\n \"prices\": [\n {\n \"name\": \"PayMe\",\n \"price\": 100000,\n \"vat_type\": \"QQS\",\n \"vat_price\": 200000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"terminal_id": "UZ170703100189",
"receipt_count": 643,
"date_time": "20200518221403",
"fiscal_sign": "248429044289",
"applet_version": "0300",
"qr_url": "https://ofd.soliq.uz/check?t=UZ170703100189&r=643&c=20200518221403&s=248429044289",
"cash_box_number": "01"
},
"error": null,
"is_success": true
}{
"data": null,
"error": {
"code": 101,
"message": "Printer not working",
"data": null
},
"is_success": false
}Обзор
Order Create API позволяет создать новый заказ: продажа, аванс или кредитный заказ. Эндпоинт поддерживает подробные данные о товарах, ценах, скидках, НДС и дополнительные данные оплаты (Payme, Click, Uzum, Anor).Примечание: Необязательные поля отмечены*. Для интеграции с внешними платежными провайдерами некоторые поляextra_infoстановятся обязательными.
Авторизация
🔓 Авторизация для этого эндпоинта НЕ требуется.Поля запроса
| Поле | Тип | Обяз. | Описание |
|---|---|---|---|
number | integer | ✅ | Order number / Номер чека |
receipt_type | string | ✅ | Type of receipt (order, prepaid, credit) |
products | array | ✅ | List of products in the order |
products.name | string | ✅ | Product name |
products.barcode | string | ✅ | Product barcode (GTIN) |
products.amount | integer | ✅ | Product amount multiplied by 1000 |
products.unit_name | string | ✅ | Unit name (displayed on receipt) |
products.price | integer | ✅ | Price for amount (price * amount * 100) |
products.product_price | integer | ✅ | Unit price multiplied by 100 |
products.vat | integer | ✅ | VAT amount multiplied by 100 |
products.vat_percent | integer | ✅ | VAT percentage |
products.discount | integer | ✅ | Discount multiplied by 100 |
products.discount_percent | integer | ✅ | Discount percentage |
products.other | integer | ✅ | Other payments (gift card, loyalty card) |
products.labels | array | ✅ | Marking codes list (DataMatrix) |
products.class_code | string | ✅ | Product class code (IKPU) |
products.package_code | string | ✅ | Package code |
products.owner_type | integer | ✅ | Owner type (0,1,2) |
products.comission_info | object | ✅ | Commission info (inn, pinfl) |
uuid | string | * | Your UUID |
time | string | ✅ | Time in format yyyy-MM-dd HH:mm:ss |
cashier | string | ✅ | Cashier name |
received_cash | integer | ✅ | Received cash price multiplied by 100 |
change | integer | ✅ | Change price multiplied by 100 |
received_card | integer | ✅ | Received card payment multiplied by 100 |
card_type | integer | ✅ | Card type (1-corporate,2-personal,3-social) |
ppt_id | string | ✅ | RRN / PPT ID from bank pinpad slip |
scan2pay_paid | boolean | * | Payment via Scan2Pay |
extra_info | object | * | Payment extra info (QR ID, phone number, card number, etc.) |
send_email | boolean | * | Send order data via email |
email | string | * | Email address |
sms_phone_number | string | * | Phone number for SMS |
open_cashbox | boolean | * | Open cash drawer |
banners | array | * | Banner info (text or barcode) |
prices | array | * | Payment prices and VAT details |
Поля ответа
✅ Успешный ответ 200
| Поле | Тип | Описание |
|---|---|---|
data | object | Данные ответа |
data.terminal_id | string | Fiscal module number |
data.receipt_count | integer | Receipt number |
data.date_time | string | Date/time in YYYYMMDDHHMMSS format |
data.fiscal_sign | string | Fiscal sign number |
data.applet_version | string | Applet version |
data.qr_url | string | QR code URL for fiscal receipt |
data.cash_box_number | string | Cash drawer number |
error | null | Error object (always null on success) |
is_success | boolean | Always true |
{
"data": {
"terminal_id": "UZ170703100189",
"receipt_count": 643,
"date_time": "20200518221403",
"fiscal_sign": "248429044289",
"applet_version": "0300",
"qr_url": "https://ofd.soliq.uz/check?t=UZ170703100189&r=643&c=20200518221403&s=248429044289",
"cash_box_number": "01"
},
"error": null,
"is_success": true
}
{
"data": null,
"error": {
"code": 101,
"message": "Printer not working",
"data": null
},
"is_success": false
}
Тело
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

