Westfield Deals APIs (1)

Download OpenAPI specification:Download

Information on shopping promotions at Westfield malls.

Deals

Endpoints related to Deals

Deal Service Health Check

Endpoint for deal service to check if service is running

Authorizations:
api_key

Responses

List deals.

Request an array of deals filtered by allowed parameters.

Authorizations:
api_key
query Parameters
all
boolean
Default: false

Request all deals or published through available deals.

campaign_code
string

Campaign code. Request deals with campaign_code.

campaign_id
integer

Campaign identifier. Request deals with campaign_id.

centre_id
string

Centre identifier. Request deals with centre_id. Lowercase code name for a specific centre. Must relate to store_id. Examples: ['sanfrancisco','sydney','london']

country
string
Enum: "us" "uk" "se" "fr" "es" "nl" "at" "de" "sk" "pl" "dk" "cz"

Country code. Request deals with country code. Lowercase two-character code for country.

deal_ids
string

List of deal ids to be used for additional filtering of results.

destination_type_ids
string

List of destination type Ids to be used for additional filtering of results.

eligibilities
string

List of eligibility type Ids to be used for additional filtering of results.

featured
boolean

Featured deals. Request to include only featured (true) or not featured (false) deals. Default to return all deals.

fields
string

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

offer_types
string

List of offer type Ids to be used for additional filtering of results.

page
integer
Default: 1

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

per_page
integer <= 100
Default: 25

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

redeemable
boolean

Instant deals. Request to include only redeemable or non redeemable (false) deals. Default to return non-redeemable deals.

retailer_id
integer

Retailer identifier. Request the deals with retailer_id.

sort
string
Default: "featured desc"
Enum: "ends_at asc" "ends_at desc" "featured asc" "featured desc" "published_at asc" "published_at desc" "starts_at asc" "starts_at desc"

Sort results by one or more fields. Change sort order by adding desc or asc after field name.

state
string
Enum: "all" "archived" "draft" "expired" "live" "pending_approval" "published" "scheduled" "withdrawn"

State. Request deals with state.

statuses
Array of strings
Items Enum: "pending" "preview" "live" "expired" "invalid" "disabled"

Statuses. Requests deals that include one of the listed statuses.

store_id
integer

Store identifier. Request the deals with store_id.

support_diffusions
Array of integers

Identifiers of channel diffusion (web/mobile/digital directory).

updated_since
string <date-time>

Updated since. Request the deals updated since a specific date and time. ISO-8601 format.

locale
string

Retrieve localized versions of all deals in response body.

strict
string

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

Responses

Response samples

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

Create a deal.

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

Authorizations:
(api_keybearerAuth)
Request Body schema: application/json
bar_code
string

Deal barcode.

bar_code_timer
integer

Barcode timer validity period in minutes.

campaign_ids
Array of integers

Campaign identifiers. List of identifiers to retrieve the campaigns related to this deal.

category_ids
Array of integers

Category identifiers. List of identifiers to retrieve the categories related to this deal.

Array of objects (DealComment)

List of comments related to a deal.

description
string <= 5000 characters

Description of deal.

destination_type_ids
Array of integers

Identifiers of destination type the deal belongs to.

display_date_front
required
boolean

Boolean to display start and end dates of the deal.

eligibilities
Array of integers

Eligibility requirements of deal.

ends_at
required
string <date-time>

Date-time that the deal ends.

external_id
string

External system ID reference for mapping.

external_name
string

External system name reference.

external_offer_logo
string

The link to the external offer logo.

external_url
string

External URL for offer.

featured
boolean

Featured deals. Deal is featured (true) or not featured (false) deals. Default is false.

image_ref
string

Image reference use internally to retrieve the related image file.

limit_per_person
integer

Total number of redemptions allowed per person, 0 for infinite.

limit_per_person_period
integer

Limit per person allowed within a period in hours, 0 for until deal expires.

mobile_offer_visual
string

The link to the mobile app image for the deal.

offer_types
Array of integers

Identifiers of the type of deal.

published_at
required
string <date-time>

Date-time the deal is published.

quantity_limit
integer

Total number of redemptions allowed, 0 for infinte.

quantity_limit_period
integer

Total number of redemptions allowed within a period in hours, 0 for until deal expires.

redeemable
boolean

Flag to determine deal is an instant deal.

redeemable_period
integer

Redemption timer validity of instant deal period in minutes when redeemed, 0 for infinte.

redemption_text
string

Text of noting how to redeem deal.

redemption_image
string

Url of uploaded image to be used to redeem a deal.

starts_at
required
string <date-time>

Date-time the deal starts.

state_event
string (StateEvents)
Enum: "submit" "approve" "reject" "withdraw"

Event to set the state of the deal.

sticker
string

% off of deal.

required
Array of objects (DealStores)

An array of stores related to a deal.

subtitle
string <= 5000 characters

Subtitle of the deal.

support_diffusions
required
Array of integers

Identifiers of channel diffusion (web/mobile/digital directory).

terms_and_conditions
string

Terms and conditions of the deal.

title
required
string <= 100 characters

Title of the deal.

modified_by
string
Default: ""

User that modified the deal, mainly used for instant deals

Responses

Request samples

Content type
application/json
{
  • "bar_code": "string",
  • "bar_code_timer": 0,
  • "campaign_ids": [
    ],
  • "category_ids": [
    ],
  • "comments": [
    ],
  • "description": "string",
  • "destination_type_ids": [
    ],
  • "display_date_front": true,
  • "eligibilities": [
    ],
  • "ends_at": "2018-03-21T21:43:56Z",
  • "external_id": "string",
  • "external_name": "string",
  • "external_offer_logo": "string",
  • "external_url": "string",
  • "featured": true,
  • "image_ref": "string",
  • "limit_per_person": 0,
  • "limit_per_person_period": 0,
  • "mobile_offer_visual": "string",
  • "offer_types": [
    ],
  • "published_at": "2018-03-21T21:43:56Z",
  • "quantity_limit": 0,
  • "quantity_limit_period": 0,
  • "redeemable": true,
  • "redeemable_period": 0,
  • "redemption_text": "string",
  • "redemption_image": "string",
  • "starts_at": "2018-03-21T21:43:56Z",
  • "state_event": "submit",
  • "sticker": "string",
  • "stores": [
    ],
  • "subtitle": "string",
  • "support_diffusions": [
    ],
  • "terms_and_conditions": "string",
  • "title": "string",
  • "modified_by": "user@urw.com"
}

Response samples

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

Individual deal.

Request a single deal.

Authorizations:
api_key
path Parameters
deal_id
required
integer

Deal identifier. Request the deal with deal_id.

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.

locale
string

Retrieve localized version of description, subtitle, terms_and_conditions, title fields in response body.

strict
string

When retrieving localized fields with :locale parameter, return an empty string on each field where no applicable translations exist.

Responses

Response samples

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

Update a deal.

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

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

Deal identifier. Request to update the deal with deal_id.

query Parameters
locale
string

Update description, subtitle, terms_and_conditions, or title fields in with provided locale.

Request Body schema: application/json
bar_code
string

Deal barcode.

bar_code_timer
integer

Barcode timer validity period in minutes.

campaign_ids
Array of integers

Campaign identifiers. List of identifiers to retrieve the campaigns related to this deal.

category_ids
Array of integers

Category identifiers. List of identifiers to retrieve the categories related to this deal.

Array of objects (DealComment)

List of comments related to a deal.

description
string <= 5000 characters

Description of deal.

destination_type_ids
Array of integers

Identifiers of destination type the deal belongs to.

display_date_front
boolean

Boolean to display start and end dates of the deal.

eligibilities
Array of integers

Eligibility requirements of deal.

ends_at
string <date-time>

Date-time that the deal ends.

external_id
string

External system ID reference for mapping.

external_offer_logo
string

The link to the external offer logo.

external_name
string

External system name reference.

external_url
string

External URL for offer.

featured
boolean

Featured deals. Deal is featured (true) or not featured (false) deals. Default is false.

image_ref
string

Image reference use internally to retrieve the related image file.

limit_per_person
integer

Total number of redemptions allowed per person, 0 for infinite.

limit_per_person_period
integer

Limit per person allowed within a period in hours, 0 for until deal expires.

mobile_offer_visual
string

The link to the mobile app image for the deal.

offer_types
Array of integers

Identifiers of the type of deal.

published_at
string <date-time>

Date-time the deal is published.

quantity_limit
integer

Total number of redemptions allowed, 0 for infinte.

quantity_limit_period
integer

Total number of redemptions allowed within a period in hours, 0 for until deal expires.

redeemable
boolean

Flag to determine deal is an instant deal.

redeemable_period
integer

Redemption timer validity of instant deal period in minutes when redeemed, 0 for infinte.

redemption_text
string

Text of noting how to redeem deal.

redemption_image
string

Url of uploaded image to be used to redeem a deal.

starts_at
string <date-time>

Date-time the deal starts.

state_event
string (StateEvents)
Enum: "submit" "approve" "reject" "withdraw"

Event to set the state of the deal.

sticker
string

% off of deal.

Array of objects (DealStores)

An array of stores related to a deal.

subtitle
string <= 5000 characters

Subtitle of the deal.

support_diffusions
Array of integers

Identifiers of channel diffusion (web/mobile/digital directory).

terms_and_conditions
string

Deal terms and conditions.

title
string <= 100 characters

Title of the deal.

modified_by
string
Default: ""

User that modified the deal, mainly used for instant deals

Responses

Request samples

Content type
application/json
{
  • "bar_code": "string",
  • "bar_code_timer": 0,
  • "campaign_ids": [
    ],
  • "category_ids": [
    ],
  • "comments": [
    ],
  • "description": "string",
  • "destination_type_ids": [
    ],
  • "display_date_front": true,
  • "eligibilities": [
    ],
  • "ends_at": "2018-03-21T21:43:56Z",
  • "external_id": "string",
  • "external_offer_logo": "string",
  • "external_name": "string",
  • "external_url": "string",
  • "featured": true,
  • "image_ref": "string",
  • "limit_per_person": 0,
  • "limit_per_person_period": 0,
  • "mobile_offer_visual": "string",
  • "offer_types": [
    ],
  • "published_at": "2018-03-21T21:43:56Z",
  • "quantity_limit": 0,
  • "quantity_limit_period": 0,
  • "redeemable": true,
  • "redeemable_period": 0,
  • "redemption_text": "string",
  • "redemption_image": "string",
  • "starts_at": "2018-03-21T21:43:56Z",
  • "state_event": "submit",
  • "sticker": "string",
  • "stores": [
    ],
  • "subtitle": "string",
  • "support_diffusions": [
    ],
  • "terms_and_conditions": "string",
  • "title": "string",
  • "modified_by": "user@urw.com"
}

Response samples

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

Delete a deal.

Request deletion of a deal.

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

Deal identifier. Request to delete the deal with deal_id.

query Parameters
locale
string

When :locale is present, delete description, subtitle, terms_and_conditions, or title fields instead of the whole record.

Responses

Response samples

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

List deal comments.

Request an array of deal comments.

Authorizations:
api_key
path Parameters
deal_id
required
integer

Deal identifier. Request the deal with deal_id.

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.

Responses

Response samples

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

Individual deal comment.

Request a single deal comment.

Authorizations:
api_key
path Parameters
comment_id
required
integer

Comment identifier. Request the deal with comment_id.

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.

Responses

Response samples

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

Returns deal versions.

Request deal versions.

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

Deal identifier. Request the deal version with deal_id.

query Parameters
page
number
Default: 1
Example: page=2

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

per_page
number <= 100
Default: 10
Example: per_page=25

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

sort
string
Example: sort=created_at desc,created_at asc

Sort results by one field created_at. Change sort order by adding desc or asc after field name

version_action
string
Enum: "create" "update" "destroy"

Version Action. Request for versions with action.

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

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

Instant Deals

Endpoints related to Instant Deals

List instant deals.

Get deals that are redeemed and reedemable.

Authorizations:
(api_keyvisitor)
query Parameters
centre_id
required
string

Centre identifier. Request deals with centre_id. Lowercase code name for a specific centre. Must relate to store_id. Examples: ['sanfrancisco','sydney','london']

customer_type
string
Enum: "pas" "fid" "visitor"

Type of customer. Examples: ['pas','fid','visitor']

customer_id
string

Customer id

Responses

Response samples

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

Instant deal redemptions list.

Get list of all redemptions of a deal.

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

Deal identifier. Request the deal with deal_id.

header Parameters
AuthType
required
string
Enum: "FID" "PAS"

Customer Type, FID or PAS.

Responses

Response samples

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

Redeem a Instant Deal.

Redeem a slot of the instant deal after following mutex logic of less than total redemption limit and redemption per customer limit.

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

ID of Instant Deal

header Parameters
AuthType
required
string
Enum: "FID" "PAS"

Customer Type, FID or PAS

Request Body schema: application/json
centre_id
string

Deal centre_id.

redemption_text
string

Text of how to redeem deal.

redemption_image
string

Url of uploaded image to be used to redeem a deal.

barcode
string

Deal barcode. EAN-13 if EU, rarely used.

Responses

Request samples

Content type
application/json
{
  • "centre_id": "string",
  • "redemption_text": "string",
  • "redemption_image": "string",
  • "barcode": "string"
}

Response samples

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

Individual deal redemption.

Get redeemed deal data for customer.

Authorizations:
(api_keybearerAuth)
path Parameters
deal_id
required
integer

Deal identifier. Request the deal with deal_id.

redemption_id
required
integer

Redemption id.

header Parameters
AuthType
required
string
Enum: "FID" "PAS"

Customer Type, FID or PAS.

Responses

Response samples

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

Get Instant Deal Status.

Gets the statistics and status of the instant deal.

Authorizations:
api_key
path Parameters
deal_id
required
integer

Deal identifier. Request the deal with deal_id.

Responses

Response samples

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