Using the API
Platform API
Extraction API
- Introduction
- Appointments
- Calls
- Clients
- Emails
- Ideabook
- Messages
- Notes
- Reminders
- Sales Associates
- Slices
Creates or updates a Client (Shopper) in BSPK
Creates or updates a Shopper in BSPK
curl --request POST \
--url https://api.bspk.com/api/platform/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name"
}
}'
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Client's unique identifier provided by your backend system.
"CLI-789"
Client's first name.
"John"
Client's last name.
"Meyer"
Client's alternate first name.
"Johnny"
Client's alternate last name.
"Meyers"
Gender of the client, being: M = Male or F = Female
"M"
Client's email
"client1@email.com"
Client's mobile phone (with country code)
"+5511987669944"
Client's other phone (with country code)
"+551154772457"
Client's address
"Av. Paulista, 1000"
Client's address 2nd line
"10th floor"
Client's address 3rd line
"Suite 100"
Client's address 4th line
"Building 1"
Client's city
"New York"
Client's state
"NY"
Client's zip code
"10001"
Client's country code
"US"
Client's segment
"VIP"
Valid entries are chat, email, line, whatsapp, wechat, call
"whatsapp"
Client's Nationality
"US"
Client's Passport Number
"AA0199929992"
Client's languages
"en;fr"
Define if client gave their aggreement to be contacted by email
"true"
Define if client gave their aggreement to be contacted by phone call
"false"
Define if client gave their aggreement to be contacted by chat
"false"
Define if client is interested in receiving messages about new products
"true"
Client's birth day, full or partial (YYYY-MM-DD or MM-DD)
"1982-02-22"
Client's creation date
"01/05/2022"
Client's record was created at this store
"22"
Client's current associate
"1101"
Client's preferred product categories. Must belong to the company “shopper preferences”
"Young Professional; Lawyer"
Attributes to be ignored during while saving the record (BSPK will not override values for the specified attributes).
"first_name;last_name"
Response
Successful response on update
curl --request POST \
--url https://api.bspk.com/api/platform/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name"
}
}'