很抱歉,本页面中文版尚未完成,正在由Emarsys本地化团队努力筹备中。
Returns the internal ID of a contact based on a specified key ID.
Endpoint
GET https://api.emarsys.net/api/v2/contact/<key_field_id>=<key_field_value>
Parameters
Name | Type | Description | Comments |
---|---|---|---|
key_field_id | mixed | ID of the key field to use | |
key_field_value | field dependent | Key field value to use in the query |
URI Examples
https://api.emarsys.net/api/v2/contact/?3=email@example.com
https://api.emarsys.net/api/v2/contact/?5=1
https://api.emarsys.net/api/v2/contact/?98012=1,2,3,4
https://api.emarsys.net/api/v2/contact/?98205=http:////www.example.com
Result Example
{ "replyCode": 0, "replyText": "OK", "data": { "id": "123" } }
Errors
HTTP Code | Reply Code | Message | Description |
---|---|---|---|
400 | 2004 | Invalid key field id: [field_id] | The field ID does not exist. |
400 | 2005 | No value provided for key field: [field_id] | The value of the key field has not been provided or is empty. |
400 | 2008 | No contact found with the specified external ID | There is no match for the specified ID. |
400 | 2010 | More than one contact found with the specified external ID | More than one contact with the provided key field value exists in the database. A unique external key must be provided. Please note that using multiple identifiers is not possible via the API. If you need multiple identifiers, you need to use the Import page. |