ads

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-ads"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/c2535669-01a3-482f-a371-11a539962017/social-card.svg?v=3e7ae33eec8b" alt="ads" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/ads/accounts/{id}/objects

Campaigns, ad sets and ads on the platform with last-30-day reach, spend and ROAS

Parameters

kindstringquery
campaign | adset | ad
limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired

Code 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[]required
Show child parameters
idstringrequired
accountIdstringrequired
kindstringrequired
campaign | adset | ad
externalIdstringrequired
parentExternalIdstringrequired
namestringrequired
statusstringrequired
insightsobjectrequired
Show child parameters
reachnumber
impressionsnumber
clicksnumber
spendnumber
revenuenumber
roasnumber
currencystring
insightsAtstringrequired
nextCursorstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

POSThttps://hermeticor.com/v1/ads/accounts/{id}/objects/refresh

Pull ad objects and insights now

Parameters

idstringpathrequired

Code 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
pulledintegerrequired
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

GEThttps://hermeticor.com/v1/ads/accounts/{id}/lead-forms

Lead-ad forms on the account's Facebook page, with their questions and consent checkboxes

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired

Code 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[]required
Show child parameters
idstringrequired
namestringrequired
statusstringrequired
questionsobject[]required
Show child parameters
keystringrequired
labelstringrequired
checkboxesobject[]required
Show child parameters
keystringrequired
textstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

GEThttps://hermeticor.com/v1/ads/lead-syncs

Lead-ad forms synced into forms

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code 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[]required
Show child parameters
accountIdstringrequired
externalFormIdstringrequired
namestringrequired
formIdstringrequired
fieldMapobjectrequired
consentMapobjectrequired
= {}
idstringrequired
pageIdstringrequired
enabledbooleanrequired
lastLeadAtstringrequired
lastSyncedAtstringrequired
lastErrorstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

POSThttps://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
accountIdstringrequired
externalFormIdstringrequired
namestringrequired
formIdstringrequired
fieldMapobjectrequired
consentMapobject
= {}
{
  "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
accountIdstringrequired
externalFormIdstringrequired
namestringrequired
formIdstringrequired
fieldMapobjectrequired
consentMapobjectrequired
= {}
idstringrequired
pageIdstringrequired
enabledbooleanrequired
lastLeadAtstringrequired
lastSyncedAtstringrequired
lastErrorstringrequired
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

DELETEhttps://hermeticor.com/v1/ads/lead-syncs/{id}

Stop syncing a lead-ad form

Parameters

idstringpathrequired

Code 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
okbooleanrequired
true
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

PATCHhttps://hermeticor.com/v1/ads/lead-syncs/{id}

Pause or remap a lead-ad sync

Parameters

idstringpathrequired

Request body

application/json
enabledboolean
fieldMapobject
consentMapobject
{
  "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

200 Default Response

Same as 201 · POST /v1/ads/lead-syncs

4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

GEThttps://hermeticor.com/v1/ads/lead-syncs/{id}/imports

Leads imported by a sync

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired

Code 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[]required
Show child parameters
idstringrequired
externalLeadIdstringrequired
statusstringrequired
imported | failed
reasonstringrequired
submissionIdstringrequired
consentFieldsstring[]required
createdAtstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

5XX Default Response

Same as 4XX · GET /v1/ads/accounts/{id}/objects

Updated