> For the complete documentation index, see [llms.txt](https://docs.perkville.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perkville.com/faqs/api/error-codes.md).

# Error codes

This page describes validation error codes from the API and what they mean.

**`pv_api_bad_ext_loc_id`**: external\_location\_id did not match an active location at the business.

**`pv_api_bad_loc_id`**: Location did not match the business.

**`pv_api_bad_perk_id`**: Perk ID was invalid for the business.

**`pv_api_ext_member_not_found`**: external\_member\_id + external\_system\_id did not match a user, and there was no usable fallback user/email.

**`pv_user_email_disallowed`**: supplied email is opted out / disallowed in Perkville.

**`pv_txn_user_inactive`** This person has closed their Perkville account. Users cannot re-open a closed Perkville account on their own, but a business staff member can do it for them following [this guide](https://docs.perkville.com/features/customers/reversing-a-users-perkville-account-closure.md).

**`pv_txn_exists`**: trans\_source\_id already exists for that business.

**`pv_txn_biz_not_active`**: business is cancelled or inactive.

**`pv_txn_perk_not_active`**: perk is inactive.

**`pv_txn_ineligible_loc`**: perk is not eligible at that location.

**`pv_txn_before_start_date`**: transaction is before the business start date.

**`pv_txn_has_zero_points`**: standard earn perk would award 0 points.

**`pv_external_perks_cannot_make_txns`**: tried to create a transaction from an external-reward perk.

**`pv_privilege_perk_invalid`**: privilege perks cannot create transactions.

**`pv_perk_not_available`**: perk is outside its allowed date range.

**`pv_txn_user_not_active`**: user has not joined the rewards program, and the business blocks pending users from transacting.

**`pv_txn_user_external_membership_not_active`**: business requires active membership, and the user’s external membership is not active.

**`pv_txn_user_banned`**: user is banned from the business rewards program.

**`pv_txn_staff_banned`**: business blocks staff from transacting, and the target user is staff.

**`ab_test_txn_restricted`**: user is in an A/B test bucket that blocks transactions.

**`pv_txn_insufficient_points`**: redeem would overdraw the user's balance.

**`pv_txn_user_already_earned`**: this perk was set to be limited to once per day, and the user already earned that perk that day.

**`pv_perk_redemption_limit_reached`**: user hit the perk's redemption limit.

**`pv_perk_earning_limit_reached`**: user hit the perk's earning limit.

**`pv_perk_earning_limit_exceeded`**: requested quantity would exceed the remaining earning limit.

**`txn_exceeds_staff_point_limit`**: admin/staff earn transaction exceeds configured per-transaction point limit.

**`pv_txn_staff_required`**: instant-reward transaction requires ADMIN/EMPLOYEE staff context.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.perkville.com/faqs/api/error-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
