# CodesWholesale (/ai/reference/catalog/codeswholesale)

Toolset `codeswholesale`, 2 tools.

> With the CodesWholesale app installed. Stores without the app do not see these tools.

## Records [#records]

### `codeswholesale_status` [#codeswholesale_status]

Whether CodesWholesale is configured and what it can do right now: auto-buy on or off, whether new purchases and catalog refreshes can start, the catalog size, whether a refresh is running, the account balance and health, and the operations still draining. There is one record; pass any id, e.g. "current".

- Permission: `integrations.read`
- Tools: `codeswholesale_status_get`
- Needs the CodesWholesale app installed

## Actions [#actions]

### `codeswholesale_product_sync` [#codeswholesale_product_sync]

Update a product's supplier price and CodesWholesale stock from the live listing.

The product must be linked to a CodesWholesale product (product_source_list). A dry run reads the live price and quantity next to what the store holds, with the selling price and the source settings, and changes nothing. Refused when another sync of the product is running.

- Action key: `codeswholesale.product.sync`
- Permission: `products.write`
- Approval: Waits for approval when the store requires it for this action.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.
- Dry run: supported, with `dry_run` set to true.
- Needs the CodesWholesale app installed and digital products enabled

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `product_id` | string | yes | Product ID |

Example input:

```json
{
  "product_id": "019bb58e-0ec1-79c1-9f40-d39d8d07674b"
}
```
