Data Extractor Specification

Cypad Data Extractor (CDE) is an Application Programming Interface (API) that provides customers with a method to extract select data stored in Cypad databases through their own custom built software.

 This document defines the API and is intended to be used as a manual when implementing the bespoke software to extract data from Cypad.

CDE can be connected to via a secure connection at following URL:

[Your Desktop URL]/webservices/CypadExtractData.asmx

 

Objects

Login

A login object is required to be supplied with each call to the CDE. This authenticates that the request is sent by an approved party.

class Login

{

          string username,

          string password,

          Guid userID

}

 

username

Use valid admin account user name.

password

Use valid admin account password.

UserID

Cypad provided unique identifier assign to each system.

Functions

GetReportNames

This function returns a DataTable with available report names. These names can be passed into GetData function to retrieve relevant data.

DataTable GetReportNames

(

                   login Login

)

 

login

A login object correctly populated with valid admin username and password.

 

GetData

This function returns a DataTable of which the columns are dependent on the requested report type. If no relevant data exists, the function returns null.

DataTable GetData

(

          login Login,

          report String,

          startDate DateTime,

          endDate DateTime

)

 

login

A login object correctly populated with valid admin username and password.

report

String type report name can be retrieved using GetReportNames method defined above.

startDate

Starting date the data should be extracted for. Please note that this field is optional.

endDate

End date the data should be extracted for. Please note that this field is optional.

Reports

  • Sites

Site ID, 2nd ID, Cost centre ID, Area, Name, Postcode, Type, Status, Group, Kitchen type, Prod kitchen, KS1PupPrem, KS2 PupPrem, Total PupPrem, UIFSM, KS2 Paid, All FSM, TotalKS1, Total KS2, School Roll, Adult Free, Adult Paid, Adult Total, Target Daily Meals, Pre Order Lead Time, Auto Credit Top Up Emails, ShowInWebPayments, CashCollectedOnPDA, MenuOption, PreSelectionEnabled

  • TradingDays

Site ID, 2nd ID, Cost centre ID, Date, D1100 Trading Days

  • PreOrders

Site ID, 2nd ID, Cost centre ID, Site name, Date, Meal type, Menu item, Pupil name, Year, Class, Account name

  • ParentAccounts

Site ID, 2nd ID, Cost centre ID, Area, School, Account ID, Account registration date, Full name, Status, Child name, Child year, Child class, Child balance, Current balance

  • BankedCash

Site ID, Site ID2, Cost centre ID, Date, Coins, Notes, Cheques, Total, Receipt No, Left In Safe, Status, Note

  • FoodOrders

Category, Code, Stock item, Price per pack (£), Units per pack, Portions per pack, Quantity per pack, Supplier, Price by, Qty in order, Total Value (£)

  • MealCosts

Site ID, 2nd ID, Cost centre ID, Area, Site, Type, Main, Dessert, Drink, Light lunch

  • MealNumbersDataCollection

Site ID, 2nd ID, Cost centre ID, Description, Date, Question, Value

  • MealSelection

Site ID, 2nd ID, Cost centre ID, Date, Site, Meal Type, Menu Item, Requested, Served

  • PaymentAnalysis

Site ID, 2nd ID, Cost Centre ID, Site, Class, Year, Account Holder’s Name, Ref Number, Date, Entered by, Pupil Full Name, Credit/Debit card Breakdown, Cash Breakdown, Cheque Breakdown, Paypoint Breakdown, Adjustment Breakdown, Refund Breakdown, Internet Other Breakdown

  • Roll

Site ID, 2nd ID, Cost Centre ID, Site, Date, Year, Class, Value

  • SiteOrderSummary

Site ID, Site ID2. Cost centre ID, Order ID, Site, Status, Supplier, Created, At supplier, Confirmed, Delivery, Del. Note. Ref., Order (£), Confirmation (£), Delivery (£), Sent on, Delivery note received on

  • StaffHours

Site ID, 2nd ID, Cost centre ID, Site, Name, Payroll number, Date, Staff rate, Contract hours, Worked hours, Start, End, Additional hours, Absence hours, Absence reason

  • Stocktake

Code, Stock item, Price per pack (£), Units per pack, Portions per pack, Quantity per pack, Supplier, Price by, Quantity, Total Value (£)

Sample Code

Following sample code written in C# can be utilised to retrieve data. Please note that [CypadDataExtractorService] tag should be replaced with web reference name you have chosen when establishing a connection.

 

[CypadDataExtractorService].Service srv = new [CypadDataExtractorService].Service();[CypadDataExtractorService].Login login = new [CypadDataExtractorService].Login();

login.UserName = "[UserName]";
login.Password = "[Password]";
login.UserID = new Guid([Guid]” );

DataTable returnedData = srv.GetData(login, [ReportName], [StartDate], [EndDate]);