Update a request to activate a loyalty / gift card. See the Gift Cards Activation sequence diagram for more details.
PUT ~/loyalty/cards/activation/:request-id
Headers
Field | Type | Description |
---|---|---|
doshii-location-id | String |
The hashed ID of the location you're targeting. See Hashed Location IDs |
Parameters
Field | Type | Description |
---|---|---|
:request-id | String |
The ID of the card activation request that needs to be updated |
eventoptional | String |
The loyalty card request event - |
status | String |
The status of the activation request. Can be either 'activated' or 'cancelled'. |
amountoptional | Number |
The amount in cents that is available on the card. Accepts either String or Integer. This property is mandatory if the status is 'activated' |
expiryDateoptional | Date |
A |
referenceoptional | String |
A free-text field for providing any external reference # from the card provider. |
cancelledReasonoptional | String |
A free-text field for providing a reason for the request to be cancelled. |
logoptional | Object |
An optional object containing additional log properties you might want to store on the card request. |
employeeIdoptional | String |
A Doshii employeeId for the employee making the action |
employeeNameoptional | String |
The name of the employee making the action |
employeePosRefoptional | String |
A POS reference for the employee making the action |
deviceRefoptional | String |
An internal reference for the device at which the request was made |
deviceNameoptional | String |
A name for the device at which the request was made |
areaoptional | String |
The area at which the request was made |
Response
Field | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
id | String |
Unique number identifying this activation request |
||||||||||
event | String |
The event describing this activation request |
||||||||||
type | String |
The type of card being activated. Currently only supports 'giftcard'. |
||||||||||
status | String |
The current status of the request.
|
||||||||||
orderId | String |
Unique number identifying the order this request relates to |
||||||||||
reference | String |
A free-text field for entering external identifiers eg: card activation reference no. |
||||||||||
amount | String |
An integer indicating the card balance in cents |
||||||||||
notes | String |
A free-text field for the POS to provide any notes to the card provider |
||||||||||
expiryDate | String |
Date indicating when the card will expire |
||||||||||
cancelledReason | String |
A free-text field for the POS or App to provide details on why the request was cancelled/rejected |
||||||||||
updatedAt | String |
Date when the record is last updated |
||||||||||
createdAt | String |
Date when the record is created |
||||||||||
uri | String |
The url to access the card request details |
||||||||||
log | String |
The url to access the card request audit activity |
||||||||||
processedByApp | String |
ID identifying the App that is processing the card request. Will not return if not set. |
||||||||||
posTerminalId | String |
A hashed ID of the POS terminal that is associated to this transaction. Will not return if not set. |
||||||||||
requestedAppId | String |
ID identifying the App that the POS has requested to process this transaction. Will not return if not set. |
Examples
Request: Cancel/Reject a request to activate a gift card
{
"event": "card_activate",
"status": "cancelled",
"cancelledReason": "Gift card is not valid",
"reference": "1af533-23f342d-2342"
}
Response
{
"id": "124",
"type": "giftcard",
"event": "card_activate",
"orderId": "122",
"status": "cancelled",
"cancelledReason": "Gift card is not valid",
"reference": "1af533-23f342d-2342",
"processedByApp": "543",
"requestedAppId": "543",
"updatedAt": "2018-09-27T04:58:38.485Z",
"createdAt": "2018-09-27T04:58:38.485Z",
"uri": "https://sandbox.doshii.co/partner/v3/loyalty/cards/activation/124",
"log": "https://sandbox.doshii.co/partner/v3/loyalty/cards/activation/124/logs"
}
Request: Activate a gift card
{
"event": "card_activate",
"status": "activated",
"amount": "2500",
"expiryDate": "2019-09-27T04:58:38.485Z",
"reference": "1af533-23f342d-2342"
}
Response
{
"id": "124",
"type": "giftcard",
"event": "card_activate",
"orderId": "122",
"status": "activated",
"reference": "1af533-23f342d-2342",
"amount": "2500",
"expiryDate": "2019-09-27T04:58:38.485Z",
"processedByApp": "543",
"requestedAppId": "543",
"updatedAt": "2018-09-27T04:58:38.485Z",
"createdAt": "2018-09-27T04:58:38.485Z",
"uri": "https://sandbox.doshii.co/partner/v3/loyalty/cards/activation/124",
"log": "https://sandbox.doshii.co/partner/v3/loyalty/cards/activation/124/logs"
}
Comments
0 comments
Please sign in to leave a comment.