Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Splio Reward API
version: 1.0.0
description: 'Operations tagged Reward across 2 of this provider''s published API definitions: splio-doc-swagger2.json, splio-customer-platform-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.splio.com
- url: http://api.splio.com
tags:
- name: Reward
paths:
/loyalty/v2/contacts/{id}/rewards:
get:
summary: List a contact’s rewards (granted & used)
description: Get the list of a contact's reward (granted & used)
parameters:
- name: id
in: path
required: true
description: Contact's unique key.
schema:
type: string
- name: limit
in: query
required: false
description: Number of items displayed.
schema:
type: integer
default: 50
maximum: 1000
minimum: 1
- name: before
in: query
required: false
description: Display elements before cursor X.
schema:
type: string
- name: after
in: query
required: false
description: Display elements after cursor X.
schema:
type: string
- name: card_code
in: query
required: false
description: 'Allows search on card_code property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: program_name
in: query
required: false
description: 'Allows search on program_name property. Operators: equals, not equals, contains, begins, ends.'
schema:
type: string
- name: with_custom_fields
in: query
required: false
description: Add custom fileds from master reward to each reward attribution
schema:
type: boolean
responses:
'200':
description: List of a contact’s rewards
content:
application/json:
example:
paging:
cursors:
after: null
before: null
previous: ''
next: ''
count_element: 1
elements:
- external_id: EG28
loyalty_status_id: 47
card_code: '1674075318835'
program_name: Flying blue
individual_id: 3028687
earned_date: '2020-09-03 17:24:02'
status: valid
burned_date: null
expiration_date: null
interaction_details: Attribution of the reward
interaction_type: reward_attribution
reason_msg: Store visit while event
reason_rule_id: id of the rule that trigger the reward
reward_definition:
name: the 4th given
external_id: E2
monetary: true
monetary_type: value
monetary_value: 0
nqp_value: 0
image_url: ''
'404':
description: Contact not found.
content:
application/json:
example:
status: 404
errors:
- error_key: id
error: wrong_value
error_description: Record not found for id unique_key.
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v1/rewards:
post:
summary: Create a reward
description: Create a new reward that can be given to members.
responses:
'201':
description: Reward creation is successful.
content:
application/json:
example:
name: the 4th given
external_id: E2
monetary: false
monetary_type: ''
monetary_value: 0
nqp_value: 4
description: An incredible cake
rich_description: ''
image_url: ''
holding_days: 10
validity_interval_type: months
validity_interval_count: 1
forced_validity: true
forced_validity_start: '2020-06-01 00:00:00'
forced_validity_end: '2020-09-01 00:00:00'
limited: true
auto_generated: true
max_attribution_count: 87
custom_fields:
- name: code_1
id: 0
value: test 2
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
required:
- external_id
- type
- name
- nqp_value
- holding_days
properties:
auto_generated:
example: false
type: boolean
default: false
custom_fields:
items:
$ref: '#/components/schemas/CustomField'
type: array
description:
example: Description
type: string
external_id:
example: ExternalID
type: string
maxLength: 128
forced_validity:
example: false
type: boolean
default: false
forced_validity_end:
example: '2018-01-12 15:34:22'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
forced_validity_start:
example: '2018-01-12 15:34:22'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
holding_days:
example: 10
type: integer
image_url:
example: https://your_image.png
type: string
limited:
example: false
type: boolean
default: false
max_attribution_count:
example: 10
type: string
monetary:
example: false
type: boolean
default: false
monetary_type:
example: percentage
type: string
enum:
- percentage
- value
monetary_value:
description: Value of the reward (in percentage or currency)
example: 5.5
type: number
name:
example: Name
type: string
maxLength: 128
nqp_value:
description: Non qualifying points price of the reward.
example: 1
type: integer
rich_description:
example: Rich description
type: string
validity_interval_count:
example: 10
type: integer
validity_interval_type:
example: days
type: string
enum:
- days
- weeks
- months
- years
type: object
description: Create a reward.
required: true
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v1/rewards/{id}:
get:
summary: Get a reward
description: Get the data of a created reward.
parameters:
- name: id
in: path
required: true
description: Reward external identifier.
schema:
type: string
responses:
'200':
description: Reward retrieval is successful.
content:
application/json:
example:
name: the 4th given
external_id: E2
monetary: false
monetary_type: ''
monetary_value: 0
nqp_value: 4
description: An incredible cake
rich_description: ''
image_url: ''
holding_days: 10
validity_interval_type: months
validity_interval_count: 1
forced_validity: true
forced_validity_start: '2020-06-01 00:00:00'
forced_validity_end: '2020-09-01 00:00:00'
limited: true
auto_generated: true
max_attribution_count: 87
stock: 1087
custom_fields:
- name: code_1
id: 0
value: test 2
'404':
description: Reward not found.
content:
application/json:
example:
status: 404
errors:
- error_key: ''
error: ''
error_description: E24444 not found
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
patch:
summary: Update a reward
description: Edit the data of an existing reward. All new granted rewards will inherit of the updated data.
parameters:
- name: id
in: path
required: true
description: Reward external identifier.
schema:
type: string
responses:
'200':
description: Reward has successfully been updated.
content:
application/json:
example:
name: the 4th given
external_id: E2
monetary: false
monetary_type: ''
monetary_value: 0
nqp_value: 4
description: An incredible cake
rich_description: ''
image_url: ''
holding_days: 10
validity_interval_type: months
validity_interval_count: 1
forced_validity: true
forced_validity_start: '2020-06-01 00:00:00'
forced_validity_end: '2020-09-01 00:00:00'
limited: true
auto_generated: true
max_attribution_count: 1087
custom_fields:
- name: code_1
id: 0
value: test 2
'404':
description: Reward not found.
content:
application/json:
example:
status: 404
errors:
- error_key: reward_id
error: wrong_value
error_description: Reward not found for given identifier.
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
properties:
name:
example: Nom
type: string
maxLength: 128
description:
example: Description
type: string
rich_description:
example: Rich description
type: string
image_url:
example: /path/to/picture
type: string
external_id:
example: reward_ext_id_12
type: string
forced_validity:
example: true
type: boolean
forced_valitidy_end:
example: '2024-08-27 17:19:00'
type: string
forced_validity_start:
example: '2024-08-27 17:19:00'
type: string
holding_days:
example: 0
type: integer
max_attribution_count:
example: 1000
type: integer
monetary:
example: true
type: boolean
monetary_type:
example: percentage | value
type: string
monetary_value:
example: 0
type: number
nqp_value:
example: 12
type: integer
valitidy_interval_count:
example: 1
type: integer
validity_interval_type:
example: days;weeks;months;years
type: string
custom_fields:
items:
$ref: '#/components/schemas/CustomField'
type: array
type: object
description: Edit a reward.
required: true
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v1/rewards/{id}/attributions:
get:
summary: List granted rewards by reward ID
description: Get the list of all granted reward for a specific reward (using it's ID).
parameters:
- name: id
in: path
required: true
description: Reward external identifier.
schema:
type: string
responses:
'200':
description: Get granted reward list
content:
application/json:
example:
paging:
cursors:
after: null
before: null
previous: ''
next: ''
count_element: 1
elements:
- external_id: EG28
loyalty_status_id: 0
earned_date: '2018-03-19 16:51:25'
status: valid
burned_date: null
store_id: null
expiration_date: '2099-04-19 16:51:25'
reward_definition:
name: the 4th given
external_id: E2
monetary: false
monetary_type: ''
monetary_value: 0
nqp_value: 4
image_url: ''
'404':
description: Reward not found.
content:
application/json:
example:
status: 404
errors:
- error_key: reward_id
error: wrong_value
error_description: Reward not found for given identifier.
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v2/rewards:
get:
summary: List rewards
description: Get the list of created rewards.
parameters:
- name: limit
in: query
required: false
description: Number of items displayed.
schema:
type: integer
default: 50
maximum: 1000
minimum: 1
- name: order
in: query
required: false
description: display result asc or desc
schema:
type: string
default: desc
- name: sort
in: query
required: false
description: display result sorting by a result field (nqp_value is the only allowed field)
schema:
type: string
- name: before
in: query
required: false
description: Display elements before cursor X.
schema:
type: string
- name: after
in: query
required: false
description: Display elements after cursor X.
schema:
type: string
- name: name
in: query
required: false
description: 'allows search on name property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: external_id
in: query
required: false
description: 'allows search on external_id property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: monetary
in: query
required: false
description: 'allows search on monetary property. Operators: equals, not equals'
schema:
type: string
- name: monetary_type
in: query
required: false
description: 'allows search on monetary_type property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: monetary_value
in: query
required: false
description: 'allows search on monetary_value property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: nqp_value
in: query
required: false
description: 'allows search on nqp_value property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: description
in: query
required: false
description: 'allows search on description property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: rich_description
in: query
required: false
description: 'allows search on rich_description property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: image_url
in: query
required: false
description: 'allows search on image_url property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: holding_days
in: query
required: false
description: 'allows search on holding_days property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: validity_interval_type
in: query
required: false
description: 'allows search on validity_interval_type property. Operators: equals, not equals, contains, begins, ends'
schema:
type: string
- name: validity_interval_count
in: query
required: false
description: 'allows search on validity_interval_count property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: forced_validity
in: query
required: false
description: 'allows search on forced_validity property. Operators: equals, not equals'
schema:
type: string
- name: forced_validity_start
in: query
required: false
description: 'allows search on forced_validity_start property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: forced_validity_end
in: query
required: false
description: 'allows search on forced_validity_end property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: limited
in: query
required: false
description: 'allows search on limited property. Operators: equals, not equals'
schema:
type: string
- name: auto_generated
in: query
required: false
description: 'allows search on auto_generated property. Operators: equals, not equals'
schema:
type: string
- name: max_attribution_count
in: query
required: false
description: 'allows search on max_attribution_count property. Operators: equals, not equals, gt, gte, lt, lte'
schema:
type: string
- name: c0
in: query
required: false
description: 'This is filter to apply to request. c0 is an exemple but how can use all custom field by name or id. Payload has give value and comparaison operator: c0={value: 12, operator: lte}. Operator depend on your filed type (text, number, date)'
schema:
type: string
responses:
'200':
description: Rewards retrieval is successful.
content:
application/json:
example:
paging:
cursors:
after: null
before: null
previous: ''
next: ''
count_element: 1
elements:
- auto_generated: true
custom_fields:
- id: 0
name: string
value: string
description: string
external_id: string
forced_validity: true
forced_validity_end: '1970-01-01 00:00:00'
forced_validity_start: '1970-01-01 00:00:00'
holding_days: 0
image_url: string
limited: true
max_attribution_count: 0
stock: 50
monetary: true
monetary_type: percentage,value
monetary_value: 0
name: string
nqp_value: 0
rich_description: string
use_internal_id: true
validity_interval_count: 0
validity_interval_type: days,weeks,months,years
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/rewards/eligibility/{card_code}:
post:
summary: Get a member’s eligible rewards
description: Get the list of the available rewards depending on various parameters.
parameters:
- name: card_code
in: path
required: true
description: Individual fidelity card code.
schema:
type: string
- name: c0
in: query
required: false
description: 'This is filter to apply to request. c0 is an exemple but how can use all custom field by name or id. Payload has give value and comparaison operator: c0={value: 12, operator: lte}'
schema:
type: string
responses:
'200':
description: Rewards retrieval is successful.
content:
application/json:
example:
paging:
cursors:
after: null
before: null
previous: ''
next: ''
count_element: 1
elements:
- auto_generated: true
custom_fields:
- id: 0
name: string
value: string
description: string
external_id: string
forced_validity: true
forced_validity_end: '1970-01-01 00:00:00'
forced_validity_start: '1970-01-01 00:00:00'
holding_days: 0
image_url: string
limited: true
max_attribution_count: 0
stock: 0
monetary: true
monetary_type: percentage,value
monetary_value: 0
name: string
nqp_value: 0
rich_description: string
use_internal_id: true
validity_interval_count: 0
validity_interval_type: days,weeks,months,years
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v1/rewards/{id}/grant:
post:
summary: Grant a reward
description: Grant a reward to a member that he can use.
parameters:
- name: id
in: path
required: true
description: Reward external identifier.
schema:
type: string
responses:
'200':
description: Reward grant is successful.
content:
application/json:
example:
- uuid: 7061f345-d70f-4e7f-a803-8aa226b2d914
external_ids:
- '978020137962'
- '123456789012'
'404':
description: Reward not found.
content:
application/json:
example:
status: 404
errors:
- error_key: reward_id
error: wrong_value
error_description: Reward not found for given identifier.
'400':
description: The request validation failed.
x-readme: BODYBODY
content:
application/json:
example:
status: 400
errors:
- error_key: field_1
error: wrong_value
error_description: The request was malformed and it is unable to be processed. Please review and try again.
'401':
description: Authentication failed.
'403':
description: Forbidden.
tags:
- Reward
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
required:
- card_code
properties:
card_code:
example: '44010000002'
type: string
quantity:
example: 2
type: integer
default: 1
reason_msg:
example: Catching up summer's free cake offer.
type: string
grant_date:
example: '2018-01-12 15:00:00'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
burned_date:
example: '2018-01-12 15:00:00'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
validity_start:
example: '2018-01-12 15:00:00'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
validity_end:
example: '2019-01-12 15:00:00'
type: string
pattern: ^\d\d\d\d-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|3[01]) (00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$
store_id:
example: store01
type: string
attribution_ids:
example:
- reward_attribution_id_1
- reward_attribution_id_2
items:
type: string
type: array
idempotency_key:
example: 733d3ebf-36fe-41f4-8468-c463202225c1
type: string
type: object
description: Grant a reward to a loyalty member based on its card code.
required: true
servers:
- url: https://api.splio.com
- url: http://api.splio.com
/loyalty/v1/rewards/grant:
post:
summary: Grant a list of reward
description: Grant a list of reward
responses:
'200':
description: Reward grant is successful.
content:
application/json:
example:
- external_id: '978020137962'
card_code: '44010000002'
program_name: My program
earned_date: '2019-12-31 23:59:59'
status: burned
burned_date: '2020-12-24 23:59:59'
expiration_date: '2020-12-31 23:59:59'
interaction_details: Attribution of the reward
interaction_type: reward_attribution
reason_msg: Social message
reward_definition:
name: 'Reward #1'
external_id: REWARD01
monetary: true
monetary_type: value
monetary_value: 0
nqp_value: 0
image_url: https://www.splio.com/wp-content/uploads/20
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/splio/refs/heads/main/openapi/splio-reward-api-openapi.yml