Migrate customers
Migrate a customer from an old system to Masivo
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/customers/migrate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customers": [
{
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"registration_date": "2023-11-07T05:31:56Z",
"metrics": {
"lifetime": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_year": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_year": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_month": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_month": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_quarter": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_quarter": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_semester": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_semester": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"updated_at": "2023-11-07T05:31:56Z"
},
"balance": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"expiration_date": "2023-11-07T05:31:56Z",
"brand_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"funded_by": "<string>"
}
],
"devices": [
{
"device_token": "<string>",
"device_info": {
"platform": "ios",
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"status": "ACTIVE",
"metadata": {}
}
]
}'
This response does not have an example.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Your customer unique identifier
The full name of the customer
"John Smith"
The email of the customer
The date when the customer was registered
The starting wallet items of the new customer
The reward id of the balance item
The amount of the balance item
The expiration date of the balance item. Null if amount is 0.
The id of the brand that owns the reward of this balance item.
The id of the channel that owns the reward of this balance item.
The id of the store that owns the reward of this balance item.
The date when the balance item was originally issued. Defaults to right now.
Who funded the rewards used in this balance item
The gender of the customer
MALE
, FEMALE
The date of birth of the customer
The metrics of the customer
Metrics since customer registration
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the previous year
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the current year
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the previous month
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the current month
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the previous quarter
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the current quarter
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the previous semester
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Metrics for the current semester
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Total amount spent by the customer during this period
Number of purchases made by the customer during this period
Last time these metrics were updated
The devices of the customer
The unique token that identifies the device
Optional information about the device
The date when the device token expires
The date when the device was registered
The status of the customer
ACTIVE
, INACTIVE
The metadata of the customer
Response
Customers batch enqueued successfully
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/customers/migrate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customers": [
{
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"registration_date": "2023-11-07T05:31:56Z",
"metrics": {
"lifetime": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_year": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_year": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_month": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_month": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_quarter": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_quarter": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"last_semester": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"this_semester": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_visit": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"updated_at": "2023-11-07T05:31:56Z"
},
"balance": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"expiration_date": "2023-11-07T05:31:56Z",
"brand_id": "<string>",
"channel_id": "<string>",
"store_id": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"funded_by": "<string>"
}
],
"devices": [
{
"device_token": "<string>",
"device_info": {
"platform": "ios",
"model": "<string>",
"osVersion": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"status": "ACTIVE",
"metadata": {}
}
]
}'
This response does not have an example.