Import loyalty points
POST {{baseUrl}}/v1/loyalty_programs/:loyaltyProgramId/import_points
Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data.
Depending on the loyalty program type, you can import the points into a given customer profile or into a given active loyalty card.
The CSV file contains the following columns:
customerprofileid
(optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported.identifier
(optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported.amount
: The amount of points to award to the customer profile.startdate
(optional): The earliest date when the points can be redeemed. The points areactive
from this date until the expiration date.
Note: It must be an RFC3339 timestamp string or string immediate
. Empty or missing values are considered immediate
.
- expirydate
(optional): The latest date when the points can be redeemed. The points are expired
after this date.
Note: It must be an RFC3339 timestamp string or string unlimited
. Empty or missing values are considered unlimited
.
- subledgerid
(optional): The ID of the subledger that should received the points.
- reason
(optional): The reason why these points are awarded.
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
Note: For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the
value provided for startdate
. If startdate
matches the current date, the imported points are active. If it is later, the points are pending until
the date provided for startdate
is reached.
Note: We recommend limiting your file size to 500MB.
Example for profile-based programs:
customerprofileid,amount,startdate,expirydate,subledgerid,reason
URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement
Example for card-based programs:
identifier,amount,startdate,expirydate,subledgerid,reason
summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement
Request Body
[{"name"=>"upFile", "value"=>"velit", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |