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

GET /venues

Return a list of 'Venue' objects

200 OK

Success

400 Bad Request

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/{venueId}

Get venue details.

venueId

venue id

type
integer
in
path
200 OK

Success

400 Bad Request

Error

404 Not Found

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/{venueId}/resources

Get venue resources in a given venue.

venueId

venue id

type
integer
in
path
200 OK

Success

400 Bad Request

Bad input

404 Not Found

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 /bookings/get-availability

Get available booking times of a resource between specified times on a given day.

resourceId

resource id

type
string
in
query
date

date in yyyy-MM-dd

type
string
in
query
from

FROM time in HH:mm:ss

type
string
in
query
to

TO time in HH:mm:ss

type
string
in
query
interval

interval in minutes

type
integer
in
query
200 OK

Success

400 Bad Request

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

POST /bookings/webbookings

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"
}
200 OK

Success

400 Bad Request

Bad input

default

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

GET /bookings/cancel-webbooking

Cancel a web booking.

webBookingId

WebBooking id

type
string
in
query
enforceCancellationPolicy

Whether to enforce cancellation policy or not.

type
boolean
in
query
204 No Content

Success. No content in response.

400 Bad Request

Error

Response Example (400 Bad Request)
{
  "code": "integer (int32)",
  "message": "string"
}

Update a web booking

GET /bookings/update-webbooking

Update an existing web booking.

webBookingId

WebBooking id

type
string
in
query
resourceId

resource id

type
string
in
query
date

date in yyyy-MM-dd

type
string
in
query
timeFrom

FROM time in HH:mm:ss

type
string
in
query
timeTo

TO time in HH:mm:ss

type
string
in
query
204 No Content

Success. No content in response.

400 Bad Request

Error

Response Example (400 Bad Request)
{
  "code": "integer (int32)",
  "message": "string"
}

Member Registrations

Member Registration related operations

New member registration

POST /member-registrations

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"
  }
}
200 OK

Success

400 Bad Request

Bad input

default

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

GET /memberships

Return a list of membership records.

membershipNumber

(optional) membership number - get specific member by membershp number

type
string
in
path
where

(optional) filter options

type
string
in
path
200 OK

Success

default

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

POST /memberships

Update a member record.

Not all fields are required. Only specified fields will be updated.

data to be updated

memberId

(optional) member id - this will be used if specified

type
string
in
path
membershipNumber

(optional) membership number - this will be used if member id is not specified

type
string
in
path
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"
}
200 OK

Success

400 Bad Request

Bad input

default

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

GET /memberships/{memberId}

Return a membership record.

200 OK

Success

default

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

IdLong: object

id: long
Example
{
  "id": 1
}

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"
}

ErrorModel: object

code: integer (int32)
message: string
Example
{
  "code": "integer (int32)",
  "message": "string"
}