www.sunsoft.gr

External Connection Web API

HTTP method POST

Try calls using method HTTP POST

URL Endpoint

/api/Customers

GetCustomer

Call example: http://localhost:5600/api/Customers/GetCustomer?SerialFormat=json&ClientVersion=5.01.002&DeviceTicket=18249903&CachedVersion&CustomerId=1&CustomerVatNumber

Summary

Gets a single customer record from database using either database Id or customer's Tax Registration Number. Service response containing the customer record. Empty customer record if not found. CustomerId or CustomerVatNumber should be given!

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 5.01.002 AmvrosiaWebService compatibility
DeviceTicket long yes 18249903 Ticket for user. Returned from login
CachedVersion string no - Hash data used in previous call
CustomerId int no* 1 Search customer id *(optional. 0 if not used)
CustomerVatNumber string no* - Search customer Tax Registration Number. *CustomerId or CustomerVatNumber should be given


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

GetCustomers

Call example: http://localhost:5600/api/Customers/GetCustomers?SerialFormat=json&ClientVersion=5.01.002&DeviceTicket=18249903&CachedVersion&StationId=2&TableId=1&MinimumId=1&SearchString

Summary

Gets a customer dataset from database using either StationId and TableId or SearchString. Use StationId and TableId to get all customers that exist on table's open orders. Use SearchString to get customers from customer table. Search Order: MemberCode, Telephone, Customer name, Email. Service response containing the customer dataset. Empty list if no customer found. If both TableId and SearchString provided, then SearchString is ignored.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 5.01.002 AmvrosiaWebService compatibility
DeviceTicket long yes 18249903 Ticket for user. Returned from login
CachedVersion string no - Hash data used in previous call
StationId int yes 2 Station id
TableId int no* 1 Table id *(optional. 0 if not used)
MinimumId int no* 1 Minimum customer id *(optional. 0 if not used)
SearchString string yes 2 Search string, first looking at CustMemberCode if no result then looking at Phone numbers if no result then looking at CustName or CustTitle if no result then looking at Email.


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

UpdateCustomer

Call example: http://localhost:5600/api/Customers/UpdateCustomer?SerialFormat=json&ClientVersion=4.01.000&DeviceTicket=18249903
CustomerData: Body raw parameter with json data in string

'{"LastName":"ΚΕΧΑΓΙΑΣ","FirstName":"ΗΛΙΑΣ","Name":"Sunsoft LTD","VatNumber":"123123123","Address":"ΜΑΧΗΣ ΑΝΑΛΑΤΟΥ", "AddressNo":"103","Floor":"3","Doorbell":"Η.ΚΕΧΑΓΙΑΣ","ZipCode":"11744","POBox":"11744-1234","Area":"ΝΕΟΣ ΚΟΣΜΟΣ","City":"ΑΘΗΝΑ", "Country":"ΕΛΛΑΔΑ","Phone":"2107777777","Mobile":"6977777777","Email":"ikechagias@sunsoft.gr", "Birthday":"20/11/90","Notes":"Κάποιες σημειώσεις για τον πελάτη","Profession":"ΕΛ. ΕΠΑΓΓΕΛΜΑΤΙΑΣ", "ShopId":3, "TaxOffice":{"Code":4541,"Name":"NEOY KOSMOU"}}'

Summary

Creates or updates (if exists) a customer record in the database. Service response containing the new or updated customer record. Force Update is used.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version
DeviceTicket long yes 18249903 Ticket for user. Returned from login
CustomerData json yes Body raw parameter
'{"LastName":"ΚΕΧΑΓΙΑΣ","FirstName":"ΗΛΙΑΣ","Name":"Sunsoft LTD","VatNumber":"123123123","Address":"ΜΑΧΗΣ ΑΝΑΛΑΤΟΥ", "AddressNo":"103", "Floor":"3","Doorbell":"Η.ΚΕΧΑΓΙΑΣ", "ZipCode":"11744", "POBox":"11744-1234", "Area":"ΝΕΟΣ ΚΟΣΜΟΣ" ,"City":"ΑΘΗΝΑ", "Country":"ΕΛΛΑΔΑ", "Phone":"2107777777", "Mobile":"6977777777", "Email":"ikechagias@sunsoft.gr", "Birthday":"20/11/90" ,"Notes":"Κάποιες σημειώσεις για τον πελάτη", "Profession":"ΕΛ. ΕΠΑΓΓΕΛΜΑΤΙΑΣ", "ShopId":3, "TaxOffice":{"Code":4541,"Name":"NEOY KOSMOU"}}'
Serialized customer data

Customer Data Attributes

NAME TYPE REQUIRED EXAMPLE NOTES
LastName string yes KECHAGIAS Customer last name nvarchar 120 shared with first name
FirstName string yes ILIAS Customer first name nvarchar 120 shared with last name
Name string no Sunsoft LTD Company name nvarchar 120
VatNumber string no 123456789 Company Vat Number nvarchar 20
Address string no* MACHIS ANALATOY *Required for delivery orders nvarchar 60
AddressNo string no* 103 *Required for delivery orders varchar 10
Floor string no 4 Coustomer address floor
Doorbell string no Η.ΚΕΧΑΓΙΑΣ Coustomer address doorbell
ZipCode string no* 11744 *Required for delivery orders varchar 6
POBox string no 11744-1234 Pobox info. Applicable to us and european countries varchar 10
Area string no NEOS KOSMOS Area name varchar 20
City string no ATHENS City name varchar 40
Country string yes GREECE Country name varchar 40
Phone string no 2101111111 Customer phone number nvarchar 300
Mobile string yes 6976976976 Customer mobile phone nvarchar 300
Email string yes ikechagias@sunsoft.gr Customer email varchar 50
Birthday string no 20/11 Customer birthday varchar 5
Notes string no Κάποιες σημειώσεις για τον πελάτη Customer notes nvarchar 1000
Profession string no Freelancer Customer profession nvarchar 300
ShopId int no 1 Shop's distinct ID where customer is registered
TaxOffice TaxOffice no {"Code":4541,"Name":"NEOY KOSMOU"} Attributes of tax office

Tax Office Attributes

NAME TYPE REQUIRED EXAMPLE NOTES
->Code int no 4541 Tax Office Code
->Name string no NEOU KOSMOU Tax Office Name varchar 100
                        
'{
	"LastName":"ΚΕΧΑΓΙΑΣ",
	"FirstName":"ΗΛΙΑΣ",
	"Name":"Sunsoft LTD",
	"VatNumber":"123123123",
	"Address":"ΜΑΧΗΣ ΑΝΑΛΑΤΟΥ",
	"AddressNo":"103",
	"Floor":"3",
        "Doorbell":"Η.ΚΕΧΑΓΙΑΣ",
	"ZipCode":"11744",
	"POBox":"11744-1234",
	"Area":"ΝΕΟΣ ΚΟΣΜΟΣ",
	"City":"ΑΘΗΝΑ",
	"Country":"ΕΛΛΑΔΑ",
	"Phone":"2107777777",
	"Mobile":"6977777777",
	"Email":"ikechagias@sunsoft.gr",
	"Birthday":"20/11/90",
	"Notes":"Κάποιες σημειώσεις για τον πελάτη",
	"Profession":"ΕΛ. ΕΠΑΓΓΕΛΜΑΤΙΑΣ",
	"ShopId":3,
	"TaxOffice":{
		"Code":4541,
		"Name":"NEOY KOSMOU"
	}
}' 

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version
DeviceTicket long yes 18249903 Ticket for user. Returned from login
CustomerData string yes Body raw parameter
'{"LastName":"ΚΕΧΑΓΙΑΣ","FirstName":"ΗΛΙΑΣ","Name":"","VatNumber":"","Address":"ΜΑΧΗΣ ΑΝΑΛΑΤΟΥ", "AddressNo":"103","Floor":"3","Doorbell":"Η.ΚΕΧΑΓΙΑΣ","ZipCode":"11744","POBox":"","Area":"ΝΕΟΣ ΚΟΣΜΟΣ","City":"ΑΘΗΝΑ", "Country":"ΕΛΛΑΔΑ","Phone":"2107777777","Mobile":"6977777777","Email":"ikechagias@sunsoft.gr", "Birthday":"20/11/90","Notes":"Κάποιες σημειώσεις για τον πελάτη","Profession":"ΕΛ. ΕΠΑΓΓΕΛΜΑΤΙΑΣ","ShopId":3, "TaxOffice":null}'
Serialized customer data


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

GetPaybookInfo

Call example: http://localhost:5600/api/Customers/GetPaybookInfo?SerialFormat=json&ClientVersion=4.01.000&DeviceTicket=18249903&CachedVersion&MemberCode=888020000008

Summary

Returns paybook information for specific member code.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version
DeviceTicket long yes 18249903 Ticket for user. Returned from login.
CachedVersion string no - Hash data used in previous call.
MemberCode string yes 888020000008 Member Code.


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

UpdatePaybookInfo

Call example: http://localhost:5600/api/Customers/UpdatePaybookInfo?SerialFormat=json&ClientVersion=4.01.000&DeviceTicket=18249903&StationId=2&UserId=27&CustomerId=24&Amount=100&MemberCode=888020000008

Summary

Creates a new paybook entry for selected customer.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version
DeviceTicket long yes 18249903 Ticket for user. Returned from login.
StationId int yes 2 Sales Station.
UserId int yes 11 User Id.
CustomerId int yes 24 Customer Id.
Amount decimal yes 100 Amount to debit to card.
MemberCode string yes 888020000008 Member Code.


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

GetSubsidyInfo

Call example: http://localhost:5600/api/Customers/GetSubsidyInfo?SerialFormat=json&ClientVersion=4.01.000&DeviceTicket=18249903&CachedVersion=&MemberCode=888020000008&StationId=2&RestDate=2019/05/13

Summary

Returns subsidy information for specific member code.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version.
DeviceTicket long yes 18249903 Ticket for user. Returned from login.
CachedVersion string no - Hash data used in previous call.
MemberCode string yes 888020000008 Is the member code where subsidy refers to.
StationId int yes 2 Sales Station.
RestDate DateTime yes 2019/05/13 Date with format "yyyy/mm/dd". Restaurant Date to check if subsidy not in range.


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...

GetCustomerTransactions

Call example: http://localhost:5600/api/Customers/GetCustomerTransactions?SerialFormat=json&clientVersion=6.02&deviceTicket=18691569&fromDate=2021-02-21&toDate=2021-02-21&dateType=0&customerId=&stationIds=&memberCode=888010000001&noOrders=1

Summary

Returns Detailed records for specific/s customer/s.

Method Parameters

NAME TYPE REQUIRED EXAMPLE NOTES
SerialFormat string yes json Form of the serialized data. (json/xml)
ClientVersion string yes 4.01.000 Service Version.
DeviceTicket long yes 18249903 Ticket for user. Returned from login.
CachedVersion string no - Hash data used in previous call.
MemberCode string no 888020000008 Is Customer's member code.
FromDate DateTime yes 2021-12-01 From Date.
ToDate DateTime yes 2021-12-01 To Date.
DateType int yes 0 or 1 0 for Restaurant Date, 1 for Real Date .
CustomerId string no 1 or 1,2 Customer Ids.
StationIds string no 1 or 1,2 Sales Station Ids.
NoOrders int yes 0 or 1 0 for include Orders, 1 for exclude Orders.


Success Response

HTTP 200 OK

Error Response

HTTP 500 Internal Server Error
Error Message
Go to top...