Contacts Import | Web Service
Version 3.5.5 - Applies to v3 and v4 Popsell instances
CONTACT LIST: WEB SERVICE INTEGRATION GUIDE
This guide describes the interface used by Popsell to import contact data by querying web services.
CSV files on FTP servers can also be used for data exchange, please refer to the specific guide.
Contacts and categories
Popsell can automatically import the contact directory from an external database:
Contacts are always associated to a unique sales representative.
Different sales representatives can share same people in their contact lists, but they are stored as separated records.
Contacts can be classified into several categories, and these categories are imported at the same time.
Deletes are also taken into account (soft deletes)
If automatic contact import is activated for a brand, users cannot modify any data on the Popsell platform (contact page is on a read only mode).
The web service is called to retrieve the contacts associated to one sales representative at a time (no global import of the database, for performance purposes).
The web service is automatically called to retrieve the latest data, each time a user logs in to the Popsell platform, and each time the user accesses a list of contact.
The last update time can be passed to the web service, in order to get only the data that has been modified since the last call, thus improving the data synchronisation process [optional]
Web Service parameters
Customer ID | Customer’s unique ID (sales representative Identifier) |
Token | A MD5 hash of: A static key The customer ID |
Last update | Date: time used to filter only the last updated records (Optional) Format: “YYYY-MM-DD HH:MM:SS” |
Examples of URL structures:
https://example.com/contactimport?id=[customer_ID]&token=[Token]&date=”2015-12-05 10:12:54”
http://example.com/api/[customer_ID]/contacts?token=[token]
The URL structure and the static key must be given to Popsell at the beginning of the project.
Web Service response
A json Object, encoded: application/json; charset=utf-8
ErrorMessage | Error message if any |
ErrorCode | Error code if any |
IsSuccessfull | true if success, false otherwise |
Contacts | Array[contact] |
Contacts structure
A json object (All data are optional except Id):
Id | Contact identifier |
String – email address | |
FirstName | String |
LastName | String |
Gender | M or F |
Comment | String - Comments |
Street1 | String - Address line 1 |
Street2 | String - Address line 2 |
Postcode | String |
City | String |
Country | String |
Phone1 | String Home phone |
Phone2 | String Mobile Phone |
IsAcceptingEmailing | true or false – contact is accepting email from ambassador |
isAcceptingBrandEmailing | true or false – contact is accepting email from brand |
IsSoftDeleted | true or false |
LanguageCode | String: fr_FR (can be null) |
LastModificationDate | Format “YYYY-MM-DD HH:MM:SS” |
Tags[] | Tags (keywords) associated to the contacts Eg : [“tag1”,”tag2”,”tag3] |
Type | Integer: Type of contact
|
Extra_data | A JSON list containing extra data for specific usage |
Example of Extra_data JSON list:
“Extra_data” : {
”Number of children”:3,
”Hair color”:”Blond”,
”Club level”:”Coached Club Member”
};
Example of structure:
{
"IsSuccessfull": true,
"ErrorCode": null,
"ErrorMessage": null,
"Contacts": [
{
"Id": “AB1234”,
“Gender”: “M”,
"FirstName": "Aurélie",
"LastName": "Durand",
"Email": "adur123@hotmail.fr",
"LanguageCode": null,
"Tags": [],
"Type": 1,
"IsSoftDeleted": false,
"IsAcceptingEmailing": true,
"IsAcceptingBrandEmailing": false,
"LastModificationDate": “2015-12-05 10:12:54",
"Extra_data": {"Hair color":"Brown", "Age":36}
},
[...]
]
}
Technical support
For any support, or any specific demand, please contact Popsell at: support@popsell.com