curl --request GET \
--url https://app.masivo.ai/api/storefront/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.masivo.ai/api/storefront/v1/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.masivo.ai/api/storefront/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.masivo.ai/api/storefront/v1/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"customer_id": "<string>",
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"registration_date": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"is_anonymous": false,
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "CL_RUT",
"document_number": "<string>",
"country": "Chile",
"phone": "+593 99 123 4567",
"phone_verified": false,
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"whatsapp_marketing": true,
"audience_marketing": true,
"inapp_messages": true,
"news_feed": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ACTIVE",
"team_ids": [
"<string>"
],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": {},
"platforms": [
"<string>"
],
"labels": [
"<string>"
],
"stores": [
"<string>"
],
"channels": [
"<string>"
],
"products": [
"<string>"
],
"tiers": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Get customer by document, phone or email
Look up a customer by document number, phone, email, or any combination of them within your account. When more than one is sent, the customer must match all of them. document_type narrows a document_number lookup and cannot be sent on its own. Requires a SERVER API key; CLIENT API keys cannot access this endpoint.
curl --request GET \
--url https://app.masivo.ai/api/storefront/v1/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.masivo.ai/api/storefront/v1/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.masivo.ai/api/storefront/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.masivo.ai/api/storefront/v1/customers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"customer_id": "<string>",
"customer": {
"id": "<string>",
"name": "John Smith",
"email": "jsmith@example.com",
"registration_date": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"is_anonymous": false,
"gender": "MALE",
"dob": "2023-11-07T05:31:56Z",
"document_type": "CL_RUT",
"document_number": "<string>",
"country": "Chile",
"phone": "+593 99 123 4567",
"phone_verified": false,
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": {},
"consent": {
"consent_string": "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA",
"version": "2.0",
"consent_timestamp": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"purposes": {
"behavioral_campaigns": true,
"coupon_campaigns": true,
"punchcard_campaigns": true,
"email_marketing": true,
"push_notifications": true,
"whatsapp_marketing": true,
"audience_marketing": true,
"inapp_messages": true,
"news_feed": true,
"link_tracking": true
},
"vendors": {
"vendor_123": true,
"vendor_456": false
}
},
"metrics": {},
"metadata": {}
},
"wallet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"amount": 123,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"expiration_date": "2023-11-07T05:31:56Z",
"reservation_expires_at": "2023-11-07T05:31:56Z"
}
],
"totals": [
{
"total": 127.6,
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiration_date": "2023-11-07T05:31:56Z",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ACTIVE",
"team_ids": [
"<string>"
],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": {},
"platforms": [
"<string>"
],
"labels": [
"<string>"
],
"stores": [
"<string>"
],
"channels": [
"<string>"
],
"products": [
"<string>"
],
"tiers": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
}
}
]
}
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}document_number, phone, email, or any combination. When more than one is sent, the customer must match all of them. email is matched case-insensitively. document_type is optional and only valid together with document_number. CLIENT keys receive 403.Authorizations
Query Parameters
The customer's document type. Only valid together with document_number; sending it alone returns 400.
Identity document code. The value is {ISO country code}_{type} (for example CL_RUT). A name without the prefix, such as RUT, is rejected with 422. When this field is set, document_number is required. The prefix is not checked against country.
AR_DNI, AR_CUIT, AR_CUIL, AR_PASSPORT, AR_DRIVER_LICENSE, AR_OTHER, BO_CI, BO_NIT, BO_PASSPORT, BO_DRIVER_LICENSE, BO_OTHER, BR_RG, BR_CPF, BR_PASSPORT, BR_DRIVER_LICENSE, BR_OTHER, CL_RUN, CL_RUT, CL_PASSPORT, CL_DRIVER_LICENSE, CL_OTHER, CO_CC, CO_RUT, CO_NIT, CO_PASSPORT, CO_DRIVER_LICENSE, CO_OTHER, CR_CI, CR_PASSPORT, CR_DRIVER_LICENSE, CR_OTHER, DO_CI, DO_PASSPORT, DO_DRIVER_LICENSE, DO_OTHER, EC_CC, EC_RUC, EC_PASSPORT, EC_DRIVER_LICENSE, EC_OTHER, SV_DUI, SV_NIT, SV_PASSPORT, SV_DRIVER_LICENSE, SV_OTHER, GT_DPI, GT_PASSPORT, GT_DRIVER_LICENSE, GT_OTHER, HN_CI, HN_RTN, HN_PASSPORT, HN_DRIVER_LICENSE, HN_OTHER, MX_CURP, MX_RFC, MX_INE, MX_PASSPORT, MX_DRIVER_LICENSE, MX_OTHER, NI_CI, NI_PASSPORT, NI_DRIVER_LICENSE, NI_OTHER, PA_CIP, PA_PASSPORT, PA_DRIVER_LICENSE, PA_OTHER, PY_CI, PY_RUC, PY_PASSPORT, PY_DRIVER_LICENSE, PY_OTHER, PE_DNI, PE_RUC, PE_PASSPORT, PE_DRIVER_LICENSE, PE_OTHER, UY_CI, UY_RUT, UY_PASSPORT, UY_DRIVER_LICENSE, UY_OTHER, VE_CI, VE_RIF, VE_PASSPORT, VE_DRIVER_LICENSE, VE_OTHER "CL_RUT"
The customer's phone, 10 to 15 digits. Matched as the same number regardless of format: spaces, dashes, +, the country code, a leading 0, a 0 kept after the country code and the mobile 9 (Argentina, Brazil) are ignored. For example +593 99 123 4567, 0991234567 and +5930991234567 find the same customer. When other filters are also sent, the customer must match all of them.
"+593 99 123 4567"