GiftCard
id
Adelya Internal object ID
Alphanumeric (even if yet just number are in), it's the table primary key, returned on persist or use for fast look-up
idExternal
Your reference
Alphanumeric (see faq entry on idExternal)
255 characters max
group
On which group does this card was created ?
see Group
member
To who this card belongs
see FidelityMember
dateCreate
The creation date of this card
datetime
startDate
The start date of the avaibility range for this card
date
endDate
The end date off the avaibility range for this range
date
dateUpdate
The date of the last update of this card
datetime
uid
RFID card number
64 characters max
cardnumber
Card number
64 characters max
cvv2
3 digits confirmation code
integer
3 characters max
activationCode
A random code of 6 digits
integer
6 characters max
status
The status of the card.(default is INACTIVE)
"INACTIVE", "PREACTIVE", "ACTIVE", "BLOCKED" or "EOL"
dateUpdateStatus
When was the last update of this object
datetime
credit
The current credit present on this card (default is 0.0)
double, limited to 2 decimals
initialAmount
The initial credit put on this card (default is 0.0)
double
giftCardProgramCode
String
128 characters max
brief
Description for this card
255 characters max
defaultCountry
Country of target by default (default is FR)
2 chars ISO code
2 characters max
GiftCardEvent
All events in the lifecycle of card are represented here, when we activate the card, remove credits, add credits, block the card...
id
integer
type
Kind of event
STATUS, addCredit, addDebit
255 characters max
date
creation date of this event
datetime
idExternal
Your reference
Alphanumeric (see faq entry on idExternal)
127 characters max
card
On which card this event is linked
see GiftCard
fvalue
value of this event, for example, how many credit do we want to debit on the card
Double
fparam
Some numeric parameter
Double
sparam
Some string parameter, for example, when we change status, the wanted status
Alphanumeric
255 characters max
comment
Free text usually used for commenting the event
Alphanumeric
univers
Segmentation textual information
127 characters max
status1
Cancelation status
0 or 1
status2
Usage status (e.g. for coupons, indicates if already burned)
0 or 1
status3
View or Read status (e.g. for email, 1 indicates an email opened)
0 or 1
dateUpdateStatus1
When do status1 was last updated
datetime
dateUpdateStatus2
When do status2 was last updated
datetime
dateUpdateStatus3
When do status3 was last updated
datetime
group
Wherer was created this event
Examples
initialize a credit card and assigne it to an existing member
PUT
{
"GiftCard":{
"cardnumber": "3832000",
"member": {id:1002}
}
}
add GiftCard credit
PUT
{
"GiftCardEvent":{
"card":{
loadFromKeys: { cardnumber: "3832000"}
},
type:"addCredit",
fvalue:"50",
comment:""
}
}
using GiftCard credit
PUT
{
"GiftCardEvent":{
"card":{
loadFromKeys: { cardnumber: "3832000"}
},
type:"addDebit",
fvalue:"10",
comment:""
}
}