Westfield Trading Hour APIs (1)

Download OpenAPI specification:Download

Summary of Westfield Trading Hour API endpoints.

Trading Hours

Endpoints related to Trading Hour

List occurrences.

Request an array of schedules occurrences by participant.

Authorizations:
api_key
path Parameters
participant_kind
required
string
Enum: "Centre" "Store"

Participant kind. Used with participant_kind_id.

participant_kind_id
required
string

Participant kind identifier. Identifier for participant of type participant_kind.

query Parameters
starts_at
string <date-time>

Filters occurrences that start on or after given date-time. The given date-time precision is only honored down to the minute

ends_at
string <date-time>

Filters occurrences that start on or before given date-time. The given date-time precision is only honored down to the minute

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

Request to run task

Request to run task

Authorizations:
api_keytask
Request Body schema: application/json
task
required
string

Task name

Responses

Request samples

Content type
application/json
{
  • "task": "populate-centers"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

List participants

Request an array of participants filtered by allowed parameters.

Authorizations:
api_key
query Parameters
fields
Array of strings

Fields in response. Array that lists the fields requested. If empty or not supplied, all attributes will be returned.

page
integer
Default: 1

Results page number. Specific page of results to request when paginating.

per_page
integer <= 50
Default: 50

Results per page. Number of items per result set when paginating.

participant_ids
Array of integers

List of Participant identifiers. Request participants for each schedule_id.

kind
string
Enum: "Centre" "Store"

Type of participant.

kind_id
string

Key of participant.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

Create a participant.

Request creation of a participant from JSON data in the request body.

Authorizations:
api_key
header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Request Body schema: application/json
required

Data to create a participant.

kind
required
string
Enum: "Centre" "Store"

Participant type

kind_id
required
string non-empty

Identifier for participant.

Responses

Request samples

Content type
application/json
{
  • "kind": "Centre",
  • "kind_id": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

Individule participant

Request a single participant.

Authorizations:
api_key
path Parameters
kind
required
string
Enum: "Centre" "Store"

Participant kind. Request to the participant with kind.

kind_id
required
string

Participant key. Request to the participant with kind_id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

Individule participant

Request a single participant.

Authorizations:
api_key
path Parameters
participant_id
required
integer

Participant identifier. Request to the participant with participant_id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

Update a participant

Request update of a participant from JSON data in the request body.

Authorizations:
api_key
path Parameters
participant_id
required
integer

Participant identifier. Request to update the participant with participant_id.

header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Request Body schema: application/json
required

Data to update a participant.

kind
string or null
Enum: "Centre" "Store"

Participant type

kind_id
string or null

Identifier for participant.

link_participants
Array of strings or null
unlink_participants
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "kind": "Centre",
  • "kind_id": "string",
  • "link_participants": [
    ],
  • "unlink_participants": [
    ]
}

Response samples

Content type
application/json
{
  • "data": { },
  • "errors": {
    },
  • "meta": {
    }
}

Delete a participant.

Request deletion of a participant.

Authorizations:
api_key
path Parameters
participant_id
required
integer

Participant identifier. Request to delete the participant with participant_id.

header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Responses

Response samples

Content type
application/json
{
  • "data": { },
  • "errors": {
    },
  • "meta": {
    }
}

List schedules

Request an array of schedules filtered by allowed parameters.

Authorizations:
api_key
query Parameters
fields
Array of strings

Fields in response. Array that lists the requested fields. If empty or not supplied, all attributes will be returned.

include_followee
boolean

Followee flag. Request schedules that the given participant is following.

overlap_end_at
string <date-time>

Overlap end at. Request schedules which start before the overlap end_at Date-time. Must be used with overlap_start_at.

overlap_start_at
string <date-time>

Overlap start at. Request schedules which start on or after the overlap start_at Date-time. Must be used with overlap_end_at.

page
integer
Default: 1

Results page number. Specific page of results to request when paginating.

participant_id
integer

Participant identifier. Request schedules with participant_id.

participant_kind
string
Enum: "Centre" "Store"

Type of participant. Used with participant_kind_id.

participant_kind_id
string

Participant kind identifier. Identifier for participant of type participant_kind.

per_page
integer <= 50
Default: 50

Results per page. Number of items per result set when paginating.

schedule_ids
Array of integers

List of Schedule identifiers. Request schedules for each schedule_id.

store_id
integer

Store identifier. Request schedules with store_id.

type
string
Enum: "special_trading" "standard_trading" "custom_trading"

Type of schedule.

locale
string

Retrieve localized versions of all schedules in the response body.

strict
boolean

When retrieving localized schedules with the :locale parameter, return an empty string if no applicable translation exists.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

Create a schedule.

Request creation of a schedule from JSON data in the request body.

Authorizations:
api_key
header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Request Body schema: application/json
required

Data to create a schedule.

object (scheduleDaysOfWeek)

Standard events indexed by day of week.

ends_at
string or null <date-time>

Date-time the schedule starts.

Array of objects or null (scheduleEvent)
name
required
string non-empty

Schedule name.

participant_id
integer or null

Schedule participant identifier.

participant_kind
string or null
Enum: "Centre" "Store"

Type of participant. Used with participant_kind_id.

participant_kind_id
string or null

Participant kind identifier. Identifier for participant of type participant_kind.

pictogram
string or null <= 255 characters

Schedule image or css reference point

starts_at
string or null <date-time>

Date-time the schedule ends.

time_zone
required
string non-empty

Schedule's time zone.

type
required
string
Enum: "special_trading" "standard_trading" "custom_trading"

Type of schedule.

Responses

Request samples

Content type
application/json
{
  • "days_of_week": {
    },
  • "ends_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "name": "string",
  • "participant_id": 0,
  • "participant_kind": "Centre",
  • "participant_kind_id": "string",
  • "pictogram": "string",
  • "starts_at": "2019-08-24T14:15:22Z",
  • "time_zone": "Australia/Sydney",
  • "type": "special_trading"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

Individule schedule

Request a single schedule.

Authorizations:
api_key
path Parameters
schedule_id
required
integer

Schedule identifier. Request to the schedule with schedule_id.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "errors": { },
  • "meta": {
    }
}

Update a schedule

Request update of a schedule from JSON data in the request body.

Authorizations:
api_key
path Parameters
schedule_id
required
integer

Schedule identifier. Request to update the schedule with schedule_id.

query Parameters
locale
string

Update version of the name field with provided locale.

header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Request Body schema: application/json
required

Data to update a schedule.

object (scheduleDaysOfWeek)

Standard events indexed by day of week.

ends_at
string or null <date-time>

Date-time that the schedule ends.

Array of objects or null (scheduleEvent)
name
string or null

Schedule name.

pictogram
string or null <= 255 characters

Schedule image or css reference point

starts_at
string or null <date-time>

Date-time that the schedule starts.

time_zone
string or null

Schedule time zone.

Responses

Request samples

Content type
application/json
{
  • "days_of_week": {
    },
  • "ends_at": "2018-03-21T21:43:56Z",
  • "events": [
    ],
  • "name": "string",
  • "pictogram": "string",
  • "starts_at": "2018-03-21T21:43:56Z",
  • "time_zone": "Australia/Sydney"
}

Response samples

Content type
application/json
{
  • "data": { },
  • "errors": {
    },
  • "meta": {
    }
}

Delete a schedule.

Request deletion of a schedule.

Authorizations:
api_key
path Parameters
schedule_id
required
integer

Schedule identifier. Request to delete the schedule with schedule_id.

query Parameters
locale
string

When :locale is present, delete name field instead of the whole record.

header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Responses

Response samples

Content type
application/json
{
  • "data": { },
  • "errors": {
    },
  • "meta": {
    }
}

Batch create/update/delete schedules.

Batch create/update/delete schedules.

Authorizations:
api_key
header Parameters
Authorization
required
string^[bB]earer [A-Za-z0-9]{64}$

Staff Access token type and token value.

Request Body schema: application/json
required

Data to create/update/delete schedules.

participant_id
integer

Participant identifier.

participant_kind
string
Enum: "Centre" "Store"

Type of participant. Used with participant_kind_id.

participant_kind_id
string

Participant kind identifier. Identifier for participant of type participant_kind.

Array of objects (scheduleBatchItemBody)

Responses

Request samples

Content type
application/json
{
  • "participant_id": 1234,
  • "participant_kind": "Centre",
  • "participant_kind_id": "string",
  • "schedules": [
    ]
}

Response samples

Content type
application/json
{
  • "data": { },
  • "errors": {
    },
  • "meta": {
    }
}

STORE TRADING HOURS

List all store trading-hours for a date range. Deprecated

Request an array of store trading hours filtered by allowed parameters.

Authorizations:
api_key
query Parameters
centre_id
required
string

Centre identifier. Request the store trading-hours with centre_id. Lowercase code name for a specific centre.

from
required
string <date>

Start date. Request the store trading-hours on or after start date of a range.

to
required
string <date>

End date. Request the store trading-hours on or before end date of a range.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

List store trading-hours. Deprecated

Request an array of store trading hours filtered by allowed parameters.

Authorizations:
api_key
path Parameters
store_id
required
integer

Store identifier. Request the store trading-hours with store_id.

query Parameters
centre_id
string

Centre identifier. Request the store trading-hours with centre_id. Lowercase code name for a specific centre. Must relate to store_id.

from
string <date>

Start date. Request the centre trading-hours on or after start date of a range.

to
string <date>

End date. Request the centre trading-hours on or before end date of a range.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

List store trading-hours for a date range. Deprecated

Request an array of store trading hours filtered by allowed parameters.

Authorizations:
api_key
path Parameters
store_id
required
integer

Store identifier. Request the store trading-hours with store_id.

query Parameters
centre_id
string

Centre identifier. Request the store trading-hours with centre_id. Lowercase code name for a specific centre.

from
string <date>

Start date. Request the store trading-hours on or after start date of a range.

to
string <date>

End date. Request the store trading-hours on or before end date of a range.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

CENTRE TRADING HOURS

List trading-hours for a centre. Deprecated

Request an array of centre trading-hours.

Authorizations:
api_key
path Parameters
centre_id
required
string

Centre identifier. Request the centre trading-hours with centre_id. Lowercase code name for a specific centre.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}

List centre trading hours for a date range. Deprecated

Request an array of centre trading hours filtered by allowed parameters.

Authorizations:
api_key
path Parameters
centre_id
required
string

Centre identifier. Request the centre trading-hours with centre_id. Lowercase code name for a specific centre.

query Parameters
from
required
string <date>

Start date. Request the centre trading-hours on or after start date of a range.

to
required
string <date>

End date. Request the centre trading-hours on or before end date of a range.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "errors": { },
  • "meta": {
    }
}