SportLogic API API Reference
SportLogic API specification
API Endpoint
https://api.sportlogic.net.au/api/v1
Contact: support@sportlogic.com.au
Schemes: https
Version: 1.0.0
Venue
Venue related operations
Get venues
Return a list of 'Venue' objects
Success
Error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": 1,
"name": "Demo Tennis Centre",
"active": true,
"email": "info@demotenniscentre.com",
"phone": "8888 7777"
}
]
Response Example (400 Bad Request)
{
"code": "integer (int32)",
"message": "string"
}
Get venue details
Get venue details.
venue id
Success
Error
Record not found
Response Content-Types: application/json
Response Example (200 OK)
{
"id": 1,
"name": "Demo Tennis Centre",
"active": true,
"email": "info@demotenniscentre.com",
"phone": "8888 7777"
}
Response Example (400 Bad Request)
{
"code": "integer (int32)",
"message": "string"
}
Get venue resources
Get venue resources in a given venue.
venue id
Success
Bad input
Error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "5f9b93c1539ca8a201557a3bf53000ed",
"venueId": 1,
"name": "Court 1"
}
]
Response Example (404 Not Found)
{
"code": "integer (int32)",
"message": "string"
}
Booking
Booking related operations
Get available booking times
Get available booking times of a resource between specified times on a given day.
resource id
date in yyyy-MM-dd
FROM time in HH:mm:ss
TO time in HH:mm:ss
interval in minutes
Success
Error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"resourceId": "C1",
"date": "2017-04-28",
"time": "13:00:00"
}
]
Response Example (400 Bad Request)
{
"code": "integer (int32)",
"message": "string"
}
Create a web booking
Create a web booking.
new booking details
Request Content-Types: application/json
Request Example
{
"resourceId": "C1",
"date": "2017-11-01",
"timeFrom": "08:00:00",
"timeTo": "09:00:00",
"bookingName": "John Smith",
"bookingContactPhone": "0411 222 333",
"bookingEmail": "john@exampl.com",
"membershipOrCardNumber": "string"
}
Success
Bad input
unexpected error
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "2017110108002742",
"resourceId": "C1",
"date": "2017-11-01",
"timeFrom": "08:00:00",
"timeTo": "09:00:00",
"bookingActivityId": "3dd295e4-5eab-452b-9107-971c2b0bcc60",
"bookingName": "John Smith",
"bookingContactPhone": "0411 222 333",
"bookingEmail": "john@exampl.com"
}
Response Example (default )
{
"code": "integer (int32)",
"message": "string"
}
Cancel a web booking
Cancel a web booking.
WebBooking id
Whether to enforce cancellation policy or not.
Success. No content in response.
Error
Response Example (400 Bad Request)
{
"code": "integer (int32)",
"message": "string"
}
Update a web booking
Update an existing web booking.
WebBooking id
resource id
date in yyyy-MM-dd
FROM time in HH:mm:ss
TO time in HH:mm:ss
Success. No content in response.
Error
Response Example (400 Bad Request)
{
"code": "integer (int32)",
"message": "string"
}
Member Registrations
Member Registration related operations
New member registration
Add a new member registration. The supplied details will be used to create a new Contact. An optional 'parentAccount' can be specified to indicate that another Contact (the Parent-Account) should be created.
new member registration
Request Content-Types: application/json
Request Example
{
"membershipTypeId": "1",
"firstName": "Roger",
"lastName": "Federer",
"gender": "M",
"dob": "01/12/2000",
"email": "blah@example.com",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"mobile": "0411 222 333",
"primaryContact": "Father",
"fatherName": "Father's Name",
"fatherEmail": "email@domain.com",
"motherName": "Mother's Name",
"motherEmail": "email@domain.com",
"addressLine1": "1 Some St",
"addressLine2": "",
"addressSuburb": "Sydney",
"addressState": "NSW",
"addressPostcode": "2000",
"occupation": "Professional Tennis Player",
"referralSource": "Friend",
"createParentAccount": "boolean",
"parentAccount": {
"firstName": "John",
"lastName": "Smith",
"email": "john@email.com",
"mobile": "0411 222 333",
"homePhone": "5555 4444"
}
}
Success
Bad input
unexpected error
Response Content-Types: application/json
Response Example (200 OK)
{
"id": 1
}
Response Example (default )
{
"code": "integer (int32)",
"message": "string"
}
Memberships
Membership related operations
List all memberships
Return a list of membership records.
(optional) membership number - get specific member by membershp number
(optional) filter options
Success
unexpected error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"memberId": "123",
"membershipNumber": "060050",
"membershipTypeId": 3,
"membershipTypeName": "Senior Membership",
"status": "A",
"statusText": "Active",
"expired": false,
"periodStart": "2016-10-01",
"periodEnd": "2017-09-30",
"cardNumber": "1287",
"contactId": "00000000518e18090151a8312e260001",
"firstName": "Roger",
"lastName": "Federer",
"email": "blah@example.com",
"mobile": "0411 222 333",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"phone": "(02) 8888 7777",
"gender": "M",
"itn": "2"
}
]
Response Example (default )
{
"code": "integer (int32)",
"message": "string"
}
Update member details
Update a member record.
Not all fields are required. Only specified fields will be updated.
data to be updated
(optional) member id - this will be used if specified
(optional) membership number - this will be used if member id is not specified
Request Content-Types: application/json
Request Example
{
"cardNumber": "1287",
"mobile": "0411222333",
"email": "blah@example.com",
"homePhone": "8888 7777",
"workPhone": "8888 7777",
"addressLine1": "string",
"addressLine2": "string",
"suburb": "string",
"state": "string",
"postcode": "string"
}
Success
Bad input
unexpected error
Response Content-Types: application/json
Response Example (200 OK)
{
"memberId": "123",
"membershipNumber": "060050",
"membershipTypeId": 3,
"membershipTypeName": "Senior Membership",
"status": "A",
"statusText": "Active",
"expired": false,
"periodStart": "2016-10-01",
"periodEnd": "2017-09-30",
"cardNumber": "1287",
"contactId": "00000000518e18090151a8312e260001",
"firstName": "Roger",
"lastName": "Federer",
"email": "blah@example.com",
"mobile": "0411 222 333",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"phone": "(02) 8888 7777",
"gender": "M",
"itn": "2"
}
Response Example (default )
{
"code": "integer (int32)",
"message": "string"
}
Get memberships details
Return a membership record.
Success
unexpected error
Response Content-Types: application/json
Response Example (200 OK)
{
"memberId": "123",
"membershipNumber": "060050",
"membershipTypeId": 3,
"membershipTypeName": "Senior Membership",
"status": "A",
"statusText": "Active",
"expired": false,
"periodStart": "2016-10-01",
"periodEnd": "2017-09-30",
"cardNumber": "1287",
"contactId": "00000000518e18090151a8312e260001",
"firstName": "Roger",
"lastName": "Federer",
"email": "blah@example.com",
"mobile": "0411 222 333",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"phone": "(02) 8888 7777",
"gender": "M",
"itn": "2"
}
Response Example (default )
{
"code": "integer (int32)",
"message": "string"
}
Schema Definitions
Venue: object
- id: integer
- name: string
- active: boolean
- email: string
- phone: string
Example
{
"id": 1,
"name": "Demo Tennis Centre",
"active": true,
"email": "info@demotenniscentre.com",
"phone": "8888 7777"
}
VenueResource: object
Represent a resource such as a tennis court, a room, a football field...etc
- id: string
- venueId: integer
- name: string
Example
{
"id": "5f9b93c1539ca8a201557a3bf53000ed",
"venueId": 1,
"name": "Court 1"
}
MemberRegistration: object
- membershipTypeId: long
- firstName: string
- lastName: string
- gender: string
-
Gender. M or F
- dob: string
- email: string
- homePhone: string
- workPhone: string
- mobile: string
- primaryContact: string
- fatherName: string
- fatherEmail: string
- motherName: string
- motherEmail: string
- addressLine1: string
- addressLine2: string
- addressSuburb: string
- addressState: string
- addressPostcode: string
- occupation: string
- referralSource: string
- createParentAccount: boolean
-
Flag to create a ParentAccount.
- parentAccount: object
-
Parent-Account information (optional). This field is mandatory if 'createParentAccount' is true.
Example
{
"membershipTypeId": "1",
"firstName": "Roger",
"lastName": "Federer",
"gender": "M",
"dob": "01/12/2000",
"email": "blah@example.com",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"mobile": "0411 222 333",
"primaryContact": "Father",
"fatherName": "Father's Name",
"fatherEmail": "email@domain.com",
"motherName": "Mother's Name",
"motherEmail": "email@domain.com",
"addressLine1": "1 Some St",
"addressLine2": "",
"addressSuburb": "Sydney",
"addressState": "NSW",
"addressPostcode": "2000",
"occupation": "Professional Tennis Player",
"referralSource": "Friend",
"createParentAccount": "boolean",
"parentAccount": {
"firstName": "John",
"lastName": "Smith",
"email": "john@email.com",
"mobile": "0411 222 333",
"homePhone": "5555 4444"
}
}
Contact: object
- firstName: string
- lastName: string
Example
{
"firstName": "John",
"lastName": "Smith"
}
Membership: object
- memberId: string
-
Internal record id.
- membershipNumber: string
-
An unique number assigned to the member by the system.
- membershipTypeId: integer
- membershipTypeName: string
- status: string
-
Membership status. Known values are 'A' for active, 'C' for cancelled, 'S' for suspended and 'L' for lapsed.
- statusText: string
-
Membership status text. Known values are 'Active', 'Cancelled', 'Suspended' and 'Lapsed'.
- expired: boolean
-
Membership expired flag (true or false).
- periodStart: string
-
Start date of current membership period (if applicable).
- periodEnd: string
-
Start date of current membership period (if applicable).
- cardNumber: string
- contactId: string
-
Contact record id.
- firstName: string
- lastName: string
- email: string
- mobile: string
- homePhone: string
-
Home phone
- workPhone: string
-
Work phone
- phone: string
-
Home and Work phone combined (comma separated)
- gender: string
-
Gender
- itn: string
-
International Tennis Number
Example
{
"memberId": "123",
"membershipNumber": "060050",
"membershipTypeId": 3,
"membershipTypeName": "Senior Membership",
"status": "A",
"statusText": "Active",
"expired": false,
"periodStart": "2016-10-01",
"periodEnd": "2017-09-30",
"cardNumber": "1287",
"contactId": "00000000518e18090151a8312e260001",
"firstName": "Roger",
"lastName": "Federer",
"email": "blah@example.com",
"mobile": "0411 222 333",
"homePhone": "(02) 8888 7777",
"workPhone": "(02) 8888 7777",
"phone": "(02) 8888 7777",
"gender": "M",
"itn": "2"
}
MembershipUpdate: object
- cardNumber: string
- mobile: string
- email: string
- homePhone: string
- workPhone: string
- addressLine1: string
- addressLine2: string
- suburb: string
- state: string
- postcode: string
Example
{
"cardNumber": "1287",
"mobile": "0411222333",
"email": "blah@example.com",
"homePhone": "8888 7777",
"workPhone": "8888 7777",
"addressLine1": "string",
"addressLine2": "string",
"suburb": "string",
"state": "string",
"postcode": "string"
}
AvailableTime: object
- resourceId: string
- date: string
- time: string
Example
{
"resourceId": "C1",
"date": "2017-04-28",
"time": "13:00:00"
}
WebBooking: object
- id: string
- resourceId: string
- date: string
- timeFrom: string
- timeTo: string
- bookingActivityId: string
- bookingName: string
- bookingContactPhone: string
- bookingEmail: string
Example
{
"id": "2017110108002742",
"resourceId": "C1",
"date": "2017-11-01",
"timeFrom": "08:00:00",
"timeTo": "09:00:00",
"bookingActivityId": "3dd295e4-5eab-452b-9107-971c2b0bcc60",
"bookingName": "John Smith",
"bookingContactPhone": "0411 222 333",
"bookingEmail": "john@exampl.com"
}
WebBookingRequest: object
- resourceId: string
- date: string
- timeFrom: string
- timeTo: string
- bookingName: string
- bookingContactPhone: string
- bookingEmail: string
- membershipOrCardNumber: string
-
membership number or member card number
Example
{
"resourceId": "C1",
"date": "2017-11-01",
"timeFrom": "08:00:00",
"timeTo": "09:00:00",
"bookingName": "John Smith",
"bookingContactPhone": "0411 222 333",
"bookingEmail": "john@exampl.com",
"membershipOrCardNumber": "string"
}