Customers
Customers are identified by phone number and upserted, so the same call is safe to repeat.
Endpoints
POST
/customersUpsert a customer by phone. What you send (name, first_name, last_name, gender, email, birthday) is your business's own copy of the details; the customer's own profile is never changed. Returns the merged view with source per field.
GET
/customers/{id}One customer as this business sees them: their own details where they set them, else your copy, with source saying which (customer or business).
POST
/lookupEvery card a phone number holds in this business.
Example
curl -X POST https://perfito.al/v1/customers \ -H "Authorization: Bearer sk_test_…" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 7171c986" \ -d '{ "phone": "+355691234567", "name": "Arber Hoxha" }'
$ch = curl_init('https://perfito.al/v1/customers'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => '{ "phone": "+355691234567", "name": "Arber Hoxha" }', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Content-Type: application/json'], ]); $data = json_decode(curl_exec($ch), true);
const res = await fetch('https://perfito.al/v1/customers', { method: 'POST', headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ "phone": "+355691234567", "name": "Arber Hoxha" }), }); const data = await res.json();