Website

In our APIs, we are referencing a website as a Tag. Creating a tag is the most essential step, as it serves as the foundation for all subsequent calls. When you create a tag, we will return tagId and domain back to you. The domain is a subdomain that we generated for this tag, a first-party subdomain. This tagId is an identifier that you will need to save on your end, as it will be required for all subsequent calls related to this specific website.

My own Cloudflare account

If you would like to host websites in your own Cloudflare account, make sure that you first add a POST /host (make sure that you save hostId as you will need it in this step). After that, you will need to set managed to false and set hostId to the ID that you received from the host POST call.

Before adding a host, ensure that Cloudflare is set up according to our recommendations.

POST /tag

fetch('https://api-sandbox.edgetag.io/tag', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer your-token',
    'Team-Id': '{your-team-id}'
  },
  body: JSON.stringify({
    name: 'Domain',
    rootDomain: 'domain.com',
    debug: false,
    sameSite: 'Lax',
    managed: false,
    hostId: '{your-host-id}',
    teamId: '{your-team-id}',
    cookieMapKey: '_shopify_y',
    platform: "SHOPIFY"
  })
})

Managed account

A managed account in our Cloudflare infrastructure can be easily defined with managed the flag set to true and an empty string for hostId. For each website, we create a dedicated bubble in Cloudflare, ensuring that all data is processed and stored separately. Infrastructure was designed with privacy in mind.

POST /tag

Last updated

Was this helpful?