Async Job Processing & Error Handling

⚠️

Documentation Disclaimer

This documentation is not exhaustive and does not guarantee system behavior. Integrators are responsible for testing against actual API responses. See Documentation Disclaimer for full details.

Async Job Processing & Error Handling

All write operations in the Yelp Ads API (create, modify, terminate) are asynchronous. Understanding this model is critical to building a reliable integration.

Table of Contents


How Async Jobs Work

Every create, modify, or terminate request returns a job_id immediately:

{ "job_id": "prvtN-nilb4mUynGGgKuBQ" }

This response only confirms the job was queued — not that it succeeded. Validation happens in a background worker, not at submission time. A 200 response with a job_id is a receipt, not a confirmation.

Jobs can be accepted and later REJECTED. Never infer success from the initial response alone.


Polling for Status

Poll GET /v1/reseller/status/{job_id} until the job reaches a terminal state:

curl \
  -X GET \
  --user "{username}:{password}" \
  https://partner-api.yelp.com/v1/reseller/status/<job_id>

Always store the job_id from each submission. You will need it to confirm outcomes and debug rejections.


Terminal States

StatusMeaning
COMPLETEDJob succeeded — changes are live
REJECTEDJob failed — see error fields for root cause
PROCESSING / 202Still in queue — keep polling

Do not assume PROCESSING will always resolve to COMPLETED. Always poll until COMPLETED or REJECTED.


Error Structure & PARENT_WAS_REJECTED

Errors appear at two levels in the response:

  1. business_results.status = REJECTED — the business-level request failed (e.g. business is closed or restricted)
  2. update_results.program_added.status = REJECTED — the program-level operation failed even if the business-level status is COMPLETED

PARENT_WAS_REJECTED

When a top-level field fails validation, all child fields are automatically marked PARENT_WAS_REJECTED. This is cascading — it does not mean every field independently failed.

How to debug: Ignore all PARENT_WAS_REJECTED entries and find the single field with a specific error code. That is the root cause.

Example: an invalid ad_categories value will cause every other field (start, end, budget, etc.) to show PARENT_WAS_REJECTED, but the actual error is only on ad_categories.


Common Rejection Errors

Error CodeCause
INVALID_OR_MISSING_KEYRequired field missing or malformed
CONFLICTS_WITH_ANOTHER_ACTIVE_PROGRAMAn overlapping program already exists for this business
PROGRAM_ALREADY_RUNNING_BY_ANOTHER_PROVIDERAnother partner already owns this program type for this business
CANNOT_ADD_PROGRAM_IN_PASTStart date is in the past
PROGRAM_ALREADY_REQUESTEDDuplicate submission already in queue
CANNOT_DECREASE_BUDGET_BELOW_AMOUNT_ALREADY_SPENTBudget reduction would go below spend already incurred
INVALID_PRICEBudget or bid not formatted as integer cents
BID_TOO_HIGH_FOR_BUDGETmax_bid exceeds prorated monthly budget
UNSUPPORTED_CATEGORIESBusiness category is blocked from advertising
BUSINESS_RESTRICTED_FROM_ADVERTISINGBusiness has been blocked from advertising by Yelp
CURRENCY_MISMATCHCannot change currency on an existing program
CAMPAIGN_BUDGET_VIOLATES_PROMO_RESTRICTIONSBudget falls outside the constraints of an attached promo
PARENT_WAS_REJECTEDCascading failure — find the root error in a sibling field
COULD_NOT_MODIFY_PROGRAMGeneric modification failure — contact [email protected]
NO_CATEGORIESBusiness has no categories or they are pending approval

Concurrency & Race Conditions

Do not submit overlapping updates to the same program simultaneously.

If two jobs targeting the same program_id are in flight at the same time, the last one to complete wins. The earlier job's changes may be silently overwritten.

Best practice: Wait for a terminal state (COMPLETED or REJECTED) before submitting another modification to the same program.


Did this page help you?