ads
GET
https://hermeticor.com /v1/ads/accounts/{id}/objects Campaigns, ad sets and ads on the platform with last-30-day reach, spend and ROAS
Parameters
kindstringquerylimitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/ads/accounts/{id}/objects" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"accountId": "string",
"kind": "campaign",
"externalId": "string",
"parentExternalId": "string",
"name": "string",
"status": "string",
"insights": {
"reach": 0,
"impressions": 0,
"clicks": 0,
"spend": 0,
"revenue": 0,
"roas": 0,
"currency": "string"
},
"insightsAt": "string"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequiredaccountIdstringrequiredkindstringrequiredexternalIdstringrequiredparentExternalIdstringrequirednamestringrequiredstatusstringrequiredinsightsobjectrequiredShow child parameters
reachnumberimpressionsnumberclicksnumberspendnumberrevenuenumberroasnumbercurrencystringinsightsAtstringrequirednextCursorstringrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectPOST
https://hermeticor.com /v1/ads/accounts/{id}/objects/refresh Pull ad objects and insights now
Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://hermeticor.com/v1/ads/accounts/{id}/objects/refresh" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"pulled": 0
}Schema
pulledintegerrequiredGET
https://hermeticor.com /v1/ads/accounts/{id}/lead-forms Lead-ad forms on the account's Facebook page, with their questions and consent checkboxes
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/ads/accounts/{id}/lead-forms" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"name": "string",
"status": "string",
"questions": [
{
"key": "string",
"label": "string"
}
],
"checkboxes": [
{
"key": "string",
"text": "string"
}
]
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequirednamestringrequiredstatusstringrequiredquestionsobject[]requiredShow child parameters
keystringrequiredlabelstringrequiredcheckboxesobject[]requiredShow child parameters
keystringrequiredtextstringrequirednextCursorstringrequiredGET
https://hermeticor.com /v1/ads/lead-syncs Lead-ad forms synced into forms
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/ads/lead-syncs" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"accountId": "string",
"externalFormId": "string",
"name": "string",
"formId": "string",
"fieldMap": {},
"consentMap": {},
"id": "string",
"pageId": "string",
"enabled": true,
"lastLeadAt": "string",
"lastSyncedAt": "string",
"lastError": "string"
}
],
"nextCursor": "string"
}Schema
itemsItemsItem175[]requiredShow child parameters
accountIdstringrequiredexternalFormIdstringrequirednamestringrequiredformIdstringrequiredfieldMapobjectrequiredconsentMapobjectrequiredidstringrequiredpageIdstringrequiredenabledbooleanrequiredlastLeadAtstringrequiredlastSyncedAtstringrequiredlastErrorstringrequirednextCursorstringrequiredPOST
https://hermeticor.com /v1/ads/lead-syncs Sync a lead-ad form into a form. Consent is recorded only from the mapped consent checkboxes
Request body
application/json
accountIdstringrequiredexternalFormIdstringrequirednamestringrequiredformIdstringrequiredfieldMapobjectrequiredconsentMapobject{
"accountId": "string",
"externalFormId": "string",
"name": "string",
"formId": "string",
"fieldMap": {},
"consentMap": {}
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/ads/lead-syncs" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountId":"string","externalFormId":"string","name":"string","formId":"string","fieldMap":{},"consentMap":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"accountId": "string",
"externalFormId": "string",
"name": "string",
"formId": "string",
"fieldMap": {},
"consentMap": {},
"id": "string",
"pageId": "string",
"enabled": true,
"lastLeadAt": "string",
"lastSyncedAt": "string",
"lastError": "string"
}Schema
accountIdstringrequiredexternalFormIdstringrequirednamestringrequiredformIdstringrequiredfieldMapobjectrequiredconsentMapobjectrequiredidstringrequiredpageIdstringrequiredenabledbooleanrequiredlastLeadAtstringrequiredlastSyncedAtstringrequiredlastErrorstringrequiredDELETE
https://hermeticor.com /v1/ads/lead-syncs/{id} Stop syncing a lead-ad form
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://hermeticor.com/v1/ads/lead-syncs/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"ok": true
}Schema
okbooleanrequiredPATCH
https://hermeticor.com /v1/ads/lead-syncs/{id} Pause or remap a lead-ad sync
Parameters
idstringpathrequiredRequest body
application/json
enabledbooleanfieldMapobjectconsentMapobject{
"enabled": true,
"fieldMap": {},
"consentMap": {}
}Code samples
cURL
curl -X PATCH "https://hermeticor.com/v1/ads/lead-syncs/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":true,"fieldMap":{},"consentMap":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermeticor.com /v1/ads/lead-syncs/{id}/imports Leads imported by a sync
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/ads/lead-syncs/{id}/imports" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"externalLeadId": "string",
"status": "imported",
"reason": "string",
"submissionId": "string",
"consentFields": [
"string"
],
"createdAt": "string"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequiredexternalLeadIdstringrequiredstatusstringrequiredreasonstringrequiredsubmissionIdstringrequiredconsentFieldsstring[]requiredcreatedAtstringrequirednextCursorstringrequiredUpdated