> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pcnaid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Abandoned Cart Pro API overview

> Externally reachable endpoints for Abandoned Cart Pro, including the public read-only API, pixel ingest, unsubscribe, and health check.

# Abandoned Cart Pro API overview

This page documents the endpoints that are reachable from outside Shopify admin. All Shopify Admin calls the app makes use GraphQL API `2026-01`. The following routes are the external surface; other `/app/*` routes require an authenticated embedded admin session.

## Health check

`GET /healthz` verifies PostgreSQL connectivity before returning HTTP 200 and reports the served commit SHA. It needs no authentication.

```bash theme={null}
curl --fail-with-body "${APP_ORIGIN:?Set APP_ORIGIN}/healthz"
```

Replace `APP_ORIGIN` with your deployed HTTPS origin, without a trailing slash.

## Public read-only API

Available to **Advanced** merchants. Authenticate with `Authorization: Bearer <publicApiKey>` and pass `?shop=<shop.myshopify.com>&resource=<name>`. The key is generated in **Settings** and shown once. All reads are scoped to the shop and fail closed when the shop is not on Advanced or has no key.

```bash theme={null}
curl --fail-with-body "${APP_ORIGIN:?Set APP_ORIGIN}/api/public?shop=example.myshopify.com&resource=overview" \
  -H "Authorization: Bearer <PUBLIC_API_KEY>"
```

Resources:

| `resource` | Returns |
| - | - |
| `overview` (default) | Recovery emails sent and conversions in the last 30 days, plus open operator inbox items |
| `inbox` | Up to 100 operator inbox items, oldest due first |
| `emails` | Up to 100 recent recovery email records |
| `conversions` | Up to 100 successful conversions |

Unknown resources return HTTP 400 with "Unknown resource. Use overview, inbox, emails, or conversions." A missing `shop` returns HTTP 400; invalid or unauthorized keys return the authentication error and status.

## Web pixel event ingest

`POST /api/pixel` receives storefront cart and checkout events. The edge credentials are the shop domain and a per-shop pixel token. The app validates the `*.myshopify.com` shop syntax, verifies the token, and writes inside that shop's context. Send JSON with `shop`, `token`, and `eventName`; optional `clientId` and `payload` fields are accepted. The endpoint responds with CORS headers and accepts `OPTIONS` preflight.

## Unsubscribe

`GET /unsubscribe/:token` handles one-click unsubscribe. The token is an HMAC-authenticated `(shop, email)` value; suppression runs inside the decoded shop context. Invalid tokens do not establish a database tenant.

## Authentication model

* Embedded admin routes use `authenticate.admin` and derive the shop from the authenticated session.
* Webhook deliveries are verified by the Shopify SDK (`authenticate.webhook`).
* The public API authenticates a rotated per-shop Bearer key.
* The pixel endpoint verifies a per-shop token before entering the shop context.

## Related

* [Webhooks reference](https://docs.pcnaid.com/nodes/shopify/abandoned-cart-pro/developer/webhooks/index.md)
* [Architecture overview](https://docs.pcnaid.com/nodes/shopify/abandoned-cart-pro/developer/architecture-overview.md)

[Pcnaid Documentation](https://docs.pcnaid.com/namespace/index.md) › [Shopify Ecosystem](https://docs.pcnaid.com/hubs/shopify-ecosystem/index.md) › [Abandoned Cart Pro](https://docs.pcnaid.com/nodes/shopify/abandoned-cart-pro/index.md) › [Developer](https://docs.pcnaid.com/nodes/shopify/abandoned-cart-pro/developer/index)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.