# Shopify scopes used by Shopify Backup

Copy-paste this list into your Shopify Partner Dashboard / Custom App config under **Configuration → Admin API integration → Scopes**.

```
read_themes,write_themes,write_theme_code,
read_content,write_content,
read_online_store_pages,write_online_store_pages,
read_online_store_navigation,write_online_store_navigation,
read_products,write_products,
read_files,write_files,
read_customers,write_customers,
read_legal_policies,write_legal_policies,
read_metaobjects,write_metaobjects,
read_translations,write_translations,
read_locales
```

(22 scopes total. The "App setup" tab in the UI shows them as copy-paste-ready.)

## Why each scope?

### Themes
| Scope | Reason |
|---|---|
| `read_themes`         | List themes, download every asset (sections, snippets, JSON, layouts). |
| `write_themes`        | Create the NEW unpublished theme that restore writes into. |
| `write_theme_code`    | Push individual theme files (Asset API). |

### Content (pages, blogs, redirects, menus, policies)
| Scope | Reason |
|---|---|
| `read_content`                       | Read pages, blogs, articles, redirects. |
| `write_content`                      | Restore pages, blogs, articles, redirects. |
| `read_online_store_pages`            | Read storefront pages metadata. |
| `write_online_store_pages`           | Restore storefront pages metadata. |
| `read_online_store_navigation`       | Read menus (GraphQL `menus` query). |
| `write_online_store_navigation`      | Restore menus (`menuCreate`, `menuUpdate`). |
| `read_legal_policies`                | Read shop policies (TOS, Privacy, Refund, etc). |
| `write_legal_policies`               | Restore shop policies (`shopPolicyUpdate`). |

### Catalog
| Scope | Reason |
|---|---|
| `read_products`  | Read products + variants + collections + product metafields. |
| `write_products` | Restore products / collections; assign membership. |

### Files CDN
| Scope | Reason |
|---|---|
| `read_files`  | Paginate `files` GraphQL, download every binary. |
| `write_files` | Restore via `stagedUploadsCreate` + `fileCreate`. |

### Customers + orders (backed up encrypted at rest)
| Scope | Reason |
|---|---|
| `read_customers`  | Read customers + orders for the encrypted PII dump. |
| `write_customers` | Reserved — restore engine **never** pushes customers back (compliance). |

### Localisation
| Scope | Reason |
|---|---|
| `read_locales`       | Read store locales. |
| `read_translations`  | Read all storefront translations (theme strings, products, articles, ...). |
| `write_translations` | Restore translations. |

### Metaobjects
| Scope | Reason |
|---|---|
| `read_metaobjects`  | Read metaobject definitions + entries. |
| `write_metaobjects` | Restore metaobject definitions + entries. |

---

## Reducing scopes

If you don't need a feature, you can drop the corresponding scope and the related backup section will be skipped.

- **No customer backups?** Drop `read_customers`, `write_customers`. Customers collector will skip.
- **No multilingual store?** Drop `read_locales`, `read_translations`, `write_translations`.
- **No metaobjects?** Drop `read_metaobjects`, `write_metaobjects`.
- **No restore (backup-only)?** Drop every `write_*` scope. The dashboard "Restore" buttons will return errors when used, but backups keep working.

Set the trimmed list in `.env` as `SHOPIFY_SCOPES=...` (comma-separated, no spaces) to override the default.
