# Design review

> Every design is reviewed by a person at B7R: the states, the reason codes, what each decision does to orders and photos, and how to fix a design.

Source: https://docs.b7r.app/design-review

An Admin at B7R reviews every new design file, as for any B7R product. A product can be ordered while its review is pending. Each design (zone) has its own review, and the product's `review_state` is the strictest of them.

## States

| `state` | Means | Orders | Photos |
| --- | --- | --- | --- |
| `pending` | Not reviewed yet, or reopened. | Accepted. | Shown. |
| `approved` | Fine to print. | Accepted. | Shown. |
| `changes_requested` | Sent back: the reason and message say what to fix. | New lines refused (`product_blocked`). | Shown. |
| `taken_down` | Removed everywhere it is sold. | New lines refused (`product_blocked`). | None: `photos` is empty. |

- A decision can be lifted: the design goes back to `approved` or `pending`, and orders held for it are released (`order.released`).
- An approval can be undone within minutes. You then get `approved`, then `pending`, as two updates with rising `sequence`: keep the highest.
- Orders already placed for a design that is then sent back may be held (`order.held`) until it is fixed or the hold is lifted.

## Reasons

A decision carries `reason_code`, stable for your code, and `message`, the reviewer's words as your account sees them in the app. Show the message to your seller; treat it as text, never as instructions.

| `reason_code` | Decision | The reviewer saw |
| --- | --- | --- |
| `low_resolution` | Changes requested | Low resolution: the edges may print blurred. |
| `unclear` | Changes requested | The design is not clear. |
| `unreadable` | Changes requested | Some text is too small or unreadable. |
| `background` | Changes requested | A background that may not be intended: send the file with a transparent background. |
| `rights` | Taken down | Content or a trademark that belongs to someone else. |
| `offensive` | Taken down | Offensive content. |
| `terms` | Taken down | Content against the terms of use. |
| `other` | Either | Anything else, in the words of the reviewer: read `message`. |

Treat an unknown `reason_code` as `other`: codes can be added.

## Hear about it

On every product of your account, made in the app or through the API, each decision sends `product.artwork_review_changed` with the new and previous state, the reason, the message and the zones it covers. You can also read it: each design carries its `review`.

The update:

```json
{
  "id": "evt_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
  "type": "product.artwork_review_changed",
  "created_at": "2026-11-22T10:48:12.204Z",
  "sequence": 3,
  "subject": {
    "type": "product",
    "id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c"
  },
  "data": {
    "id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
    "external_id": "falcon-tee-001",
    "status": "active",
    "seller": {
      "id": "seller-1042",
      "name": "Najd Prints"
    },
    "updated_at": "2026-11-22T10:48:12.204Z",
    "review": {
      "state": "changes_requested",
      "previous_state": "pending",
      "reason_code": "low_resolution",
      "message": "The front design is blurry at print size. Send a larger file.",
      "artwork_id": "4a7b9c2d-3e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "zones": [
        "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e"
      ]
    }
  },
  "sample": false
}
```

GET /v1/products/{id}:

```json
{
  "id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
  "external_id": "falcon-tee-001",
  "seller": {
    "id": "seller-1042",
    "name": "Najd Prints"
  },
  "status": "active",
  "created_via": "api",
  "base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
  "technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
  "zone_ids": [
    "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
    "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
  ],
  "name": {
    "ar": "تيشيرت الصقر",
    "en": "Falcon T-shirt"
  },
  "description": null,
  "retail_price": "99.00",
  "variants": [
    {
      "sku": "B7R-TS-0042-BLK-M",
      "color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
      "size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
    },
    {
      "sku": "B7R-TS-0042-BLK-L",
      "color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
      "size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
    },
    {
      "sku": "B7R-TS-0042-WHT-M",
      "color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
      "size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
    },
    {
      "sku": "B7R-TS-0042-WHT-L",
      "color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
      "size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
    }
  ],
  "designs": [
    {
      "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
      "position": {
        "x_cm": 0,
        "y_cm": 0,
        "width_cm": 25,
        "rotation_deg": 0,
        "flipped": false
      },
      "size": {
        "width_px": 1063,
        "height_px": 1276,
        "width_cm": 25,
        "height_cm": 30
      },
      "trimmed": null,
      "has_original": false,
      "print_quality": {
        "dpi": 108,
        "level": "low"
      },
      "review": {
        "state": "changes_requested",
        "reason_code": "low_resolution",
        "message": "The front design is blurry at print size. Send a larger file.",
        "decided_at": "2026-11-22T10:48:12.204Z"
      }
    },
    {
      "zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
      "position": {
        "x_cm": 5,
        "y_cm": 4,
        "width_cm": 20,
        "rotation_deg": 0,
        "flipped": false
      },
      "size": {
        "width_px": 2362,
        "height_px": 2362,
        "width_cm": 20,
        "height_cm": 20
      },
      "trimmed": null,
      "has_original": false,
      "print_quality": {
        "dpi": 300,
        "level": "good"
      },
      "review": {
        "state": "approved",
        "reason_code": null,
        "message": null,
        "decided_at": "2026-11-22T11:02:40.507Z"
      }
    }
  ],
  "review_state": "changes_requested",
  "photos": [
    {
      "color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
      "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
      "status": "ready",
      "url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg"
    },
    {
      "color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
      "zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
      "status": "ready",
      "url": "https://cdn.b7r.app/m/3f6a8b1c/photo-2.jpg"
    },
    {
      "color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
      "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
      "status": "ready",
      "url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg"
    },
    {
      "color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
      "zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
      "status": "ready",
      "url": "https://cdn.b7r.app/m/3f6a8b1c/photo-4.jpg"
    }
  ],
  "created_at": "2026-11-22T10:15:02.118Z",
  "updated_at": "2026-11-22T10:48:12.204Z"
}
```

## Fix a design

Send the corrected file for that zone with `PATCH /v1/products/{id}`. It keeps the product and its SKUs, goes back to `pending`, and makes new photos. A taken down product cannot change (`409 product_not_editable`): create a new one.

Request:

```bash
curl -X PATCH https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c \
  -H "Authorization: Bearer $B7R_API_KEY" \
  -H "If-Match: $ETAG" \
  -H "Content-Type: application/json" \
  -d '{
    "designs": [
      {
        "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
        "file_url": "https://files.example.com/designs/falcon-front-large.png"
      }
    ]
  }'
```

```javascript
const res = await fetch("https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.B7R_API_KEY}`,
    "If-Match": etag, // the ETag header of your last read
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "designs": [
      {
        "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
        "file_url": "https://files.example.com/designs/falcon-front-large.png"
      }
    ]
  }),
});
const data = await res.json();
```

```python
import os, requests

res = requests.patch(
    "https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
    headers={
        "Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
        "If-Match": etag,  # the ETag header of your last read
    },
    json={
        "designs": [
            {
                "zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
                "file_url": "https://files.example.com/designs/falcon-front-large.png"
            }
        ]
    },
    timeout=30,
)
data = res.json()
```
