Skip to content

Promotions

This API provides various methods for managing promotions.

Clients can retrieve available promotions id or phone number, redeem promotions, and view redeemed ones.

List Customer Promotions

Request

Returns a list of all available promotions for a member.

Security
api_key
Path
customerIdstringrequired

Id of member.

The type of id parameter is configurable where the most common types are id, mobile phone or an external id.

curl -i -X GET \
  'https://api.oculos.no/v4/promotions/customerId/{customerId}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/json
Array [
idstring

Generated unique promotion id

Example:"2457B03E-9925-45E9-B551-25F10D7BD4F2"
typestring

Type of promotion

Example:"Promotion"
namestring

Name of promotion

Example:"Welcome coupon"
availableboolean

Boolean that shows the promotions availabilty status

Example:true
descriptionstring
Example:"This is a coupon that gives the customer 10% discount on any product"
termsstring

Terms and conditions of the promotion

Example:"This promotion is valid for all products in the store"
urlImagestring

Link to promotion image

Example:"https://cdn.oculos.no/img01.png"
validFromstring
Example:"2024-04-03T07:38:32.495Z"
validTostring
Example:"2024-04-03T07:38:32.495Z"
validTimeFromstring

Time of day the promotion becomes valid. Note: This is only a description field that can be used to display information, the actual validity is determined by validFrom and validTo. Default value is 00:00:00

Example:"08:00:00"
validTimeTostring

Time of day the promotion becomes invalid. Note: This is only a description field that can be used to display information, the actual validity is determined by validFrom and validTo. Default value is 00:00:00

Example:"20:00:00"
unlimitedRedemptionboolean

Can the promotion be redeemed unlimited times

Example:false
redemptionLimitinteger

How many times can the promotion be redeemed?

Example:5
redemptionCountinteger

How many times has the promotion been redeem until now

Example:1
sortOrderinteger

Sort order of the promotion. The sort order is defined in the Trigg application

Example:1
productsIncludedArray of objects
productsExcludedArray of objects
storesIncludedArray of objects
affiliateobject

Affiliate information

redemptionChannelsArray of objects
redemptionHistoryArray of objects
]
Response
[ { "id": "2457B03E-9925-45E9-B551-25F10D7BD4F2", "type": "Promotion", "name": "Welcome coupon", "available": true, "description": "This is a coupon that gives the customer 10% discount on any product", "terms": "This promotion is valid for all products in the store", "urlLink": "Link to the promotion", "urlImage": "https://cdn.oculos.no/img01.png", "validFrom": "2024-04-03T07:38:32.495Z", "validTo": "2024-04-03T07:38:32.495Z", "validTimeFrom": "08:00:00", "validTimeTo": "20:00:00", "unlimitedRedemption": false, "redemptionLimit": 5, "redemptionCount": 1, "sortOrder": 1, "productsIncluded": [ … ], "productsExcluded": [ … ], "storesIncluded": [ … ], "affiliate": { … }, "redemptionChannels": [ … ], "redemptionHistory": [ … ] } ]