segments
POST
https://hermeticor.com /v1/segments/preview Request body
application/json
definitionobjectrequiredShow child parameters
typestringrequiredopstringrequirednegatebooleanchildrenschema0[]requiredsubjectstring{
"definition": {
"type": "group",
"op": "and",
"negate": true,
"children": [
{}
]
},
"subject": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/preview" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"definition":{"type":"group","op":"and","negate":true,"children":[{}]},"subject":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"count": 0,
"sample": [
{
"id": "string",
"emailPrimary": "string",
"phonePrimary": "string",
"firstName": "string",
"lastName": "string",
"timezone": "string",
"locale": "string",
"country": "string",
"city": "string",
"region": "string",
"source": "string",
"lifecycleStage": "string",
"ownerUserId": "string",
"attributes": {},
"tags": [
"string"
],
"mergedIntoId": "string",
"archivedAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"consentIgnored": [
"email"
]
}
],
"explanation": [
"string"
],
"evaluatedAt": "2024-01-01T00:00:00Z"
}Schema
countintegerrequiredsampleItemsItem2[]requiredShow child parameters
idstringrequiredemailPrimarystringrequiredphonePrimarystringrequiredfirstNamestringrequiredlastNamestringrequiredtimezonestringrequiredlocalestringrequiredcountrystringrequiredcitystringrequiredregionstringrequiredsourcestringrequiredlifecycleStagestringrequiredownerUserIdstringrequiredattributesobjectrequiredtagsstring[]requiredmergedIntoIdstringrequiredarchivedAtstringcreatedAtstringrequiredupdatedAtstringrequiredconsentIgnoredstring[]explanationstring[]requiredevaluatedAtstringrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectPOST
https://hermeticor.com /v1/segments/explain-match Why a profile matches or does not match a draft definition: the verdict of each condition and group
Request body
application/json
definitionobjectrequiredShow child parameters
typestringrequiredopstringrequirednegatebooleanchildrenschema0[]requiredprofileIdstringrequired{
"definition": {
"type": "group",
"op": "and",
"negate": true,
"children": [
{}
]
},
"profileId": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/explain-match" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"definition":{"type":"group","op":"and","negate":true,"children":[{}]},"profileId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"segmentId": "string",
"profileId": "string",
"matched": true,
"member": true,
"tree": {},
"evaluatedAt": "2024-01-01T00:00:00Z"
}Schema
segmentIdstringrequiredprofileIdstringrequiredmatchedbooleanrequiredmemberbooleanrequiredtreerequiredevaluatedAtstringrequiredGET
https://hermeticor.com /v1/segments/{id}/explain-match/{profileId} Why a profile is or is not in this segment, condition by condition, next to its stored membership
Parameters
idstringpathrequiredprofileIdstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/{id}/explain-match/{profileId}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermeticor.com /v1/segments/settings Spend-tier boundaries and the geocoding provider
Code samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/settings" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"spendTiers": {
"mid": 0,
"high": 0,
"top": 0
},
"geocoder": "none",
"geocoderKeySet": true
}Schema
spendTiersobjectrequiredShow child parameters
midnumberrequiredhighnumberrequiredtopnumberrequiredgeocoderstringrequiredgeocoderKeySetbooleanrequiredPUT
https://hermeticor.com /v1/segments/settings Change spend tiers or the geocoding provider; segments that use them recalculate
Request body
application/json
spendTiersobjectShow child parameters
midnumberrequiredhighnumberrequiredtopnumberrequiredgeocoderstringgeocoderKeystring{
"spendTiers": {
"mid": 0,
"high": 0,
"top": 0
},
"geocoder": "none",
"geocoderKey": "string"
}Code samples
cURL
curl -X PUT "https://hermeticor.com/v1/segments/settings" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spendTiers":{"mid":0,"high":0,"top":0},"geocoder":"none","geocoderKey":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /v1/segments/places/check Is a postal code placed on the map, and how many profiles can be located
Request body
application/json
countrystringrequiredpostalCodestringrequired{
"country": "string",
"postalCode": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/places/check" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country":"string","postalCode":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"placed": true,
"lat": 0,
"lng": 0,
"source": "string",
"profilesPositioned": 0,
"profilesTotal": 0,
"geocoder": "none"
}Schema
placedbooleanrequiredlatnumberrequiredlngnumberrequiredsourcestringrequiredprofilesPositionedintegerrequiredprofilesTotalintegerrequiredgeocoderstringrequiredPOST
https://hermeticor.com /v1/segments/places Set the position of a postal code by hand
Request body
application/json
countrystringrequiredpostalCodestringrequiredlatnumberrequiredlngnumberrequired{
"country": "string",
"postalCode": "string",
"lat": 0,
"lng": 0
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/places" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country":"string","postalCode":"string","lat":0,"lng":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"ok": true
}Schema
okbooleanrequiredPOST
https://hermeticor.com /v1/segments/places/lookup Place a postal code with the configured geocoding provider
Request body
application/json
countrystringrequiredpostalCodestringrequired{
"country": "string",
"postalCode": "string"
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/places/lookup" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country":"string","postalCode":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermeticor.com /v1/segments/places/geocode-missing Place up to 25 postal codes that profiles carry but nobody has located
Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/places/geocode-missing" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"placed": 0,
"failed": 0,
"remaining": 0
}Schema
placedintegerrequiredfailedintegerrequiredremainingintegerrequiredUpdated