Abra API Overview

Last updated: September 29, 2026

The Abra API lets you manage a store's Abra promotions, discounts, unique discount codes and webhook subscriptions from your own code. It's a REST API that takes and returns JSON. This page covers what every endpoint has in common. To make your first call, see Getting Started with the Abra API.

Beta. The Abra API is in beta, so its behavior may change. If something doesn't work as described, contact us at help@abrapromotions.com.

Base URL

Send requests to https://abra-api-333886610689.us-central1.run.app. The examples in this reference call it $ABRA_API_BASE and your token $ABRA_API_TOKEN.

Every call acts on the live store; there is no sandbox. Try your integration on a development store first. Browsers block calls to the API from other websites, so call it from your server, or test with curl or Postman.

https://abra-api-333886610689.us-central1.run.app

Authentication

Send the store's API token in the Authorization header of every request:

  • Authorization: Bearer <token>

Generate the token in the Abra app under Settings > API access. It's shown only once, so copy it straight away. A token belongs to one store and can use every endpoint for that store; there are no scopes. If you work with several stores, you need one token per store.

Each store has one active token. It's valid for 365 days. Regenerating it, or revoking it in the same place, stops the old token working at once. A missing, expired or revoked token gets 401 with the code UNAUTHORIZED.

The examples on these pages use two shell variables. Set them once:

export ABRA_API_BASE="https://abra-api-333886610689.us-central1.run.app"
export ABRA_API_TOKEN="your-api-token"

To check that your token works, list your promotions:

curl "$ABRA_API_BASE/v1/partner/promotions" \
  -H "Authorization: Bearer $ABRA_API_TOKEN"

Rate limits

Each store can make 500 reads (GET) and 400 writes (POST, PUT, DELETE) in any 60 seconds. Reads and writes are counted separately. Responses include these headers:

  • X-RateLimit-Limit: the limit for this kind of request.

  • X-RateLimit-Remaining: requests left in the current window.

  • X-RateLimit-Reset: Unix time, in seconds, by which the window has fully cleared.

Past the limit, you get 429 with the code RATE_LIMIT_EXCEEDED and a Retry-After header in seconds. Wait that long before you retry: requests that get a 429 still count toward the window.

Errors

Errors use standard HTTP status codes and one JSON shape: an error object with a machine-readable code and a description in words. When the request fails validation, the code is VALIDATION_FAILED and issues.fieldErrors lists the messages for each field by path, such as discounts.0.shopifyDiscountId. issues.formErrors holds messages that aren't about one field.

The codes below can come from several endpoints. Each endpoint lists its own. Discount endpoints can also return 400 with a code for a rule of one discount type, such as TIERED_TIER_THRESHOLD_NOT_INCREASING; error.description says what to fix.

Name

Description

error

object

Fields listed under error below.

issues

object

With VALIDATION_FAILED: fieldErrors maps each field path to its messages, and formErrors lists messages that aren't about one field.

error

Name

Description

code

string

Machine-readable error code.

description

string

What went wrong, in words.

Common error codes:

Status

Code

Description

400

VALIDATION_FAILED

The body or query has invalid fields. See issues.

400

BAD_REQUEST

The request was rejected for another reason, for example a webhook URL that isn't allowed. See error.description.

400

SORT_FIELD_INVALID

sort uses a field that can't be sorted on.

400

SORT_DIRECTION_INVALID

The sort direction isn't asc or desc.

400

UNKNOWN_DISCOUNT_VALUE_TYPE

discountValue.type isn't one of the supported types.

400

BULK_CODES_REQUIRE_CODE_DISCOUNT

Unique codes need a code discount (typeName DiscountCodeApp).

401

UNAUTHORIZED

The token is missing, expired or revoked.

403

CANNOT_EDIT_NATIVE_DISCOUNT

Native Shopify discounts can't be edited through the API.

404

NOT_FOUND

Nothing with this ID in the store, or the path doesn't exist.

409

CONFLICT

The request clashes with the current state, for example another request is changing the same promotion. See error.description.

409

DISCOUNT_TITLE_CONFLICT

Another discount in Abra or Shopify already has this title.

413

PAYLOAD_TOO_LARGE

The request body is over 10 MB.

422

DISCOUNT_NOT_RESOLVABLE

A Shopify discount ID in a promotion's discounts can't be found, attached or looked up in Shopify.

422

NATIVE_DISCOUNT_REQUIRES_SHOPIFY_ID

A native Shopify discount type was sent without discountId.

422

SHOPIFY_USER_ERROR

Shopify rejected the change. error.description has Shopify's message.

422

SHOPIFY_GRAPHQL_ERROR

The call to Shopify failed. Try again.

422

DISCOUNT_NOT_SYNCED

The discount isn't in Shopify yet.

429

RATE_LIMIT_EXCEEDED

Too many requests. Wait for Retry-After seconds.

500

INTERNAL_ERROR

Something failed on Abra's side. Try again later, or contact support if it keeps happening.

500

REDEEM_CODES_ENQUEUE_FAILED

A code generation job couldn't be started. Try again.

Pagination

List promotions and List discounts return one page at a time. Pass page (from 1) and limit (1 to 100, default 25). The items are in data, and pagination holds page, limit, total, totalPages, hasNextPage and hasPreviousPage. Ask for the next page while hasNextPage is true.

The other lists (webhook subscriptions and code generation jobs) come back in a single response.

Name

Description

page

number

Current page number.

limit

number

Number of items per page.

total

number

Total number of items.

totalPages

number

Total number of pages.

hasNextPage

boolean

Whether there is a next page.

hasPreviousPage

boolean

Whether there is a previous page.

Versioning

The version is part of the path. Every endpoint is under /v1, the only version today, so include it in every request. The API is in beta, so details can still change within /v1.

Endpoints

Promotions API

Discounts API

Webhooks API

This page is generated from the Abra API specification (build bc96ccc) ยท ref b7f383905d1c. Edits made in Pylon are overwritten.