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": "[email protected]",
"registration_date": "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>"
}
],
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"updated_at": "2023-11-07T05:31:56Z"
},
"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"
}
],
"tags": {},
"status": "ACTIVE",
"metadata": {}
}
]
}
'{
"error": "<string>",
"details": "<string>"
}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": "[email protected]",
"registration_date": "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>"
}
],
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "<string>",
"document_number": "<string>",
"country": "<string>",
"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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "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",
"last_session": "2023-11-07T05:31:56Z",
"spend_total": 123,
"number_of_purchases": 123
},
"updated_at": "2023-11-07T05:31:56Z"
},
"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"
}
],
"tags": {},
"status": "ACTIVE",
"metadata": {}
}
]
}
'{
"error": "<string>",
"details": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
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
Show child attributes
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 document type of the customer. If provided, document_number is required.
The document number of the customer. If provided, document_type is required.
50The country of the customer
100The metrics of the customer
Show child attributes
Metrics since customer registration
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
Start date of the period
End date of the period
The tier ID associated with this period
Last customer visit during this period
Last customer session 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
Show child attributes
The unique token that identifies the device
Optional information about the device
Show child attributes
The date when the device token expires
The date when the device was registered
Include your conditions customer tags here
The status of the customer
ACTIVE, INACTIVE The metadata of the customer
Customers batch enqueued successfully