CorefinityCorefinityDocs
Open the Control PanelControl Panel
Varnish · 9 of 19

Get a site's custom VCL

Answers the three snippets a site may add to the platform's VCL, the version every save sends back, the revision Varnish runs and the limits.

GET/api/corestack/sites/{site}/varnish/vcl

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The site's custom VCL.

Fields of the 200 answer
applied_atstring or null

Format: date-time.

applied_byany

Who saved it.

applied_revisioninteger or nullRequired

The number of the revision Varnish runs.

availablebooleanRequired
enabledboolean or nullRequired

Whether Varnish is on.

hooksobjectRequired

The three snippets: recv runs when a request arrives, backend_response when Magento has answered, deliver before the answer is sent.

Fields
backend_responsestringRequired
deliverstringRequired
recvstringRequired
limitsobjectRequired
Fields
per_hook_bytesintegerRequired
statements_per_hookintegerRequired
total_bytesintegerRequired
usedobject
lockedbooleanRequired

True while Corefinity manages the site's VCL: saves are refused vcl_locked.

platformobjectRequired

The platform's part of the VCL, which your snippets run inside.

Fields
content_urlstringRequired

The path of GET /corestack/sites/{site}/varnish/vcl/platform, with the /api prefix.

policy_urlstringRequired

The path of GET /corestack/sites/{site}/varnish/vcl/policy, with the /api prefix.

refusalany

Why Varnish refused the saved revision, when it did.

revertany

The automatic return to the revision before a refused one, while it runs or after it failed.

revisioninteger or nullRequired

The number of the saved revision.

snippets_urlstringRequired

The path of GET /corestack/sites/{site}/varnish/vcl/snippets, with the /api prefix.

statusstring or nullRequired

Where the saved revision stands, such as applied, saving, pending_verify or saved_dormant.

status_reasonstring or null
varnish_versionstring or null
versionintegerRequired

Send it back with every save.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409varnish_not_offeredVarnish is available for Magento 2 sites only. Nothing to change here.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/varnish/vcl \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "applied_at": "2026-11-02T15:41:09Z",
  "applied_by": {
    "mcp": false,
    "name": "Eleanor Finch"
  },
  "applied_revision": 1,
  "available": true,
  "enabled": true,
  "hooks": {
    "backend_response": "# Your vcl_backend_response snippet. Empty means the platform VCL only.\n",
    "deliver": "# Your vcl_deliver snippet. Empty means the platform VCL only.\n",
    "recv": "if (req.url ~ \"^/stock-checker/\") {\n    return (pass);\n}\n"
  },
  "limits": {
    "per_hook_bytes": 16384,
    "statements_per_hook": 200,
    "total_bytes": 49152,
    "used": {
      "backend_response_bytes": 72,
      "deliver_bytes": 63,
      "recv_bytes": 57,
      "total_bytes": 192
    }
  },
  "locked": false,
  "platform": {
    "content_url": "/api/corestack/sites/1042/varnish/vcl/platform"
  },
  "policy_url": "/api/corestack/sites/1042/varnish/vcl/policy",
  "refusal": null,
  "revert": null,
  "revision": 1,
  "snippets_url": "/api/corestack/sites/1042/varnish/vcl/snippets",
  "status": "applied",
  "status_reason": null,
  "varnish_version": "7.7",
  "version": 1
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT