-
Notifications
You must be signed in to change notification settings - Fork 2
Object Definitions
hhuso edited this page Dec 29, 2015
·
13 revisions
###SalesInfo
Each sale (receipt, invoice..) is represented by SalesInfo object
field name | description | type |
---|---|---|
OkcId | ECR-POS Fiscal ID | String (10) |
DocumentType | DocumentType | Int (1..7) |
DocumentNo | Receipt Number | Int (1.9999) |
InvoiceNo | Invoice Number | String |
InvoiceDate | Invoice Date | Date |
Zno | Z Number | Int (1..4000) |
CreateDate | Receipt Date | DateTime |
CashierNum | Cashier (Clerck) Id | Int (1..9) |
SalesPerson | Sales Person Id | Int max (999.999) |
CashInOutSerial | Cash In/Out RerefenceNumber | String max(32) |
SaleItems[] | SaleItems | ItemInfo (0..128) |
PayItems[] | PaymentItems | PaymentInfo (0..10) |
SalesTotal | SalesTotal | Int max (999.999) |
DiscountCode | DiscountCode Content | String max(32) |
DiscountInfo | Discount Information | DiscountInfo |
FooterNotes[] | Footer Notes | String[] (0..10) max(25) |
CustomerInfo | Customer Informatıon | CustomerInfo |
CustomTags[] | Custom Tags | CustomTag(0..10) |
TokenId | Id for GetOrder | String (10) |
###DocumentTypes
field name | value | type |
---|---|---|
Receipt | 1 | int |
Invoice | 2 | int |
EInvoice | 3 | int |
EArchive | 4 | int |
Food | 5 | int |
Parking | 6 | int |
Prepayment | 7 | int |
###ItemInfo Each line item in the sales document is represented by ItemInfo object
field name | description | type |
---|---|---|
Quantity | Quantity | Decimal max (999.999,99) |
Amount | Amount | Decimal max (999.999,99) |
PLUNo* | Product id in ECRPOS db | Int (0..100.000) |
DepartmentId | Department (category) Id | Int (1..8) |
VatRate | VAT rate | Int (0..99) |
Definition | Definition | String max (20) |
Barcode | Barcode Number | String max (20) |
ReferenceCode | Reference Code | String max (32) |
SalesPerson | SaleItem Sales Person Id | Int max (999.999) |
ProductSerialNum | Product Serial Number | String max(32) |
ItemNotes[] | Sale Item Notes | string |
DiscountInfo | Discount Information | DiscountInfo |
Weighable | Weighable Code | String max (1) |
Price | Price | Decimal max (999.999,99) |
OwnerCode | OwnerCode | Int max (999.999) |
Note: Department sales (if enabled on ECRPOS) are identified as PLUNo=0 ###PaymentInfo
Each payment line item on the sales document is represented by PaymentInfo object
field name | description | type |
---|---|---|
Amount | Amount | Decimal max (999.999,99) |
PaymentType | Payment Type | PaymentTypes |
InstallmentNo | Installment count | Int (1..99) |
CreditId | ECRPOS credit button Number(0 for EFT transaction, 1-4 for buttons on device) | Int (1..4) |
Definition | Definition | String max (30) |
ReferenceCode | Reference Code | String max (30) |
IssuerId | Issuer Id | String |
CardNumber | Card Number | String (16) |
AcquirerId | AcquirerId | String |
###DiscountInfo
field name | description | type |
---|---|---|
DiscountTotal | Discount total value | Decimal max (999.999,99) |
DiscountRate | Discount rate value | Int (1..99) |
DiscountNotes[] | Discount notes | String |
###PaymentTypes
field name | value | type |
---|---|---|
Cash | 1 | Int |
Check | 2 | Int |
Credit | 3 | Int |
Currency | 4 | Int |
###CustomerInfo
field name | description | type |
---|---|---|
Name | Customer Name | String max (30) |
ID | Customer key(Customer phone Number) | String max (15) |
###CustomTag Used to add extra attributes to sales document
field name | description | type |
---|---|---|
Type | Custom value type (see below table) | Int |
Value | More information value | String max (30) |
Types of CustomTag info
Type | Description |
---|---|
1 | Order code |
4 | Vendor code |
###GetProducts result
Length | Description |
---|---|
1 | Flag (1 if used, 0 if not used) – all active products should start with 1 |
6 | Plu number (leftpad with 0) |
20 | Barcode(right pad with spaces) |
20 | Product name (right pad with spaces) |
9 | Unit price in cents (left pad with 0) |
2 | Department code (01-08) |
4 | Unit (complete with spaces on the right) |
1 | “E”: weighted “H” Not weighted “P”: Default price can be overriden by cashier “S”: Used for selling products with serial number tracking requirement |
6 | Category ID(left pad with 0’s) note: future use purpose only |
10 | Second unit price (left pad with 0’s) future use purpose only |
2 | Carrige return + line feed |
Example SalesInfo and related objects
{
"OkcId": "FA13000024",
"OkcPassword": "88888888-4444-4444-4444-400000000002",
"TokenId": "",
"DocumentType": 1,
"InvoiceNo": "",
"InvoiceDate": "2015-09-14T15:28:55",
"CreateDate": "2015-09-14T15:28:55",
"CashierNum": "6",
"SaleItems": [
{
"Quantity": 1.0,
"Amount": 10.0,
"DepartmentId": 3,
"VatRate": 8.0,
"Definition": "YAGLI BOYA",
"Barcode": "123451",
"ReferenceCode": "",
"DiscountInfo": {
"DiscountTotal": 2.0,
"DiscountRate": 0,
"DiscountNotes": [
]
},
"Weighable": "",
"Price": 0.0,
"SalesPerson": 0,
"ProductSerialNum": "ER45937",
"ItemNotes": [
],
"PLUNo": 5033
},
{
"Quantity": 1.0,
"Amount": 3.0,
"DepartmentId": 3,
"VatRate": 8.0,
"Definition": "SULU BOYA",
"Barcode": "123452",
"ReferenceCode": "",
"DiscountInfo": {
"DiscountTotal": 1.0,
"DiscountRate": 0,
"DiscountNotes": [
]
},
"Weighable": "",
"Price": 0.0,
"SalesPerson": 0,
"ProductSerialNum": "",
"ItemNotes": [
],
"PLUNo": 5034
}
],
"PayItems": [
{
"Amount": 10.0,
"PaymentType": 1,
"InstallmentNo": 0,
"CreditId": 0,
"Definition": "",
"ReferenceCode": "",
"IssuerId": "",
"CardNumber": "",
"AcquireId": ""
}
],
"SalesTotal": 10.0,
"FooterNotes": [
"00024"
],
"CustomerInfo": {
"Name": "",
"ID": ""
},
"CustomTags": [
],
"DiscountCode": "3 AL 2 ODE",
"DiscountInfo": {
"DiscountTotal": 0.0,
"DiscountRate": 0,
"DiscountNotes": [
]
},
"SalesPerson": 0,
"CashInOutSerial": "",
"DocumentNo": 9,
"ZNo": 14
}
###Introduction
###OKC Services
Register Sale
Get Discount
Get Products
Get Order
Put Order
###GMP Services
Get GMPToken