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

# Jobs and lifecycle

> Which resources are asynchronous, what their statuses mean, and what a completed job returns.

Most LocalAds resources are asynchronous: a request accepts the job, answers
`202 Accepted` with the resource in its initial state, and the work happens
after the response. Each `202` also carries a `Location` header pointing at
the resource, the same URL you poll.

Only four things are synchronous: `GET` requests, creating brands and
audiences (`201`), and the free rewrites (`200`).

## Resource statuses

Each resource's statuses, exactly as the API returns them:

| Resource | Statuses | Completed means |
| - | - | - |
| Product | `draft`, `processing`, `ready`, `failed` | Images processed; the product can be used for any workflow |
| Audience generation | `idle`, `generating`, `ready`, `failed` | Saved audiences available in `GET /products/{product_id}/audiences` |
| Campaigns and campaign creatives | `queued`, `in_progress`, `completed`, `failed`, `canceled` | Each creative has `image_url`, `width` and `height` |
| Photoshoots and their outputs | `queued`, `in_progress`, `completed`, `failed`, `canceled` | Each output has `image_url`, dimensions and `caption` |
| Moodboards | `queued`, `in_progress`, `completed`, `failed`, `canceled` | `image_url` is the finished 3 x 3 grid |
| ChatGPT ad groups | `in_progress`, `completed`, `failed` | Copy is filled in: `title` and `body` on every ad, `context_hints` and `negative_phrases` on the group |
| ChatGPT ads | `queued`, `in_progress`, `completed`, `failed`, `canceled` | The ad has its image, `title` and `body` |
| Listing idea slots | `idea`, `queued`, `in_progress`, `completed`, `failed`, `canceled` | The slot has its `image_url` and `creative_id` |
| Video concepts | `queued`, `in_progress`, `completed`, `failed` | The concept has a `title`; it can be picked as soon as the title is there |
| Videos | `queued`, `in_progress`, `completed`, `failed`, `canceled` | `video_url` and `thumbnail_url` are set |

A whole job can succeed while single items inside it fail: a photoshoot can be
`completed` with one `failed` output, a campaign with one failed creative.
Check item-level statuses, not just the job's.

## What a failure means for credits

A failed job or failed item is refunded: `credits_charged` counts only what
completed. Nothing is charged when a request is refused outright
(`insufficient_credits`, `credit_limit_exceeded`). See
[Credits and spending](/concepts/credits-and-spending).

## Reading the result

Poll the `Location` URL with backoff until the status is terminal. See
[Polling](/concepts/polling) for the recommended loop, and
[Creatives](/concepts/creatives) for the cross-type list of everything that
finished.
