Get contact from list based on cookie ID or e-mail
1 |
GET /api/1/list/lookup/{listID} |
Parameters
Name | Parameter Type |
Allow Multiple |
Required/ Optional |
Data Type | Description |
---|---|---|---|---|---|
Authorization | Header | False | Required | String(Bearer {access token}) | Pass the authentication token that was granted when you authorized access. |
cookieid | Query | False | Optional | String | If provided the contact is searched for by cookieid first. If not found then email is used if provided. Request must include either cookieid or email and can contain both. |
Query | False | Optional | String | If provided, the contact is searched for by cookieid first. If not found then email is used, if provided. Request must include either cookieid or email and can contain both. |
In order to use the “cookieID” parameter you must have the visitor’s cookieID which can be obtained using a Javascript function on any page with the Act-On tracking beacon script:
"ActOn.Beacon.cookie['<ACCOUNT #>']"
Request
HTTP
1 2 3 |
GET /api/1/list/lookup/{listID}?cookieid={<wbr />URL-Encoded-CookieID}&email={<wbr />URL-Encoded-Email}HTTP/1.1 Host: <a href="http://restapi.actonsoftware.com/" target="_blank">restapi.actonsoftware.com</a> Authorization: Bearer {token} Cache-Control: no-cache |
curl
1 |
curl -X GET -H "Authorization: Bearer 4bce2069eca9ffd66bac9360589cf7" -H "Cache-Control: no-cache" https://restapi.actonsoftware.com/api/1/list/lookup/l-002b?cookieid={<wbr />URL-Encoded-CookieID}&email={<wbr />URL-Encoded-Email} |
Response
A successful request results in an HTTP 200 response with a JSON object that contains the contact:
1 2 3 4 5 6 7 8 |
{ "First Name": "Bugs", "Last Name": "Bunny", "E-mail Address": "bugs.bunny@acme.com", "Description": "Cartoon Rabbit", ".tz": "", "XXX": "some custom field value" } |