# Set the supplier of one order item

> Eto API reference for `PUT /api/v1/orders/{shop_id}/{receipt_id}/items/{transaction_id}/supplier`. Base URL `https://eto.tools/api/v1/`. Authenticate with the `X-Eto-API-Key` header.

Part of the [Eto API reference](https://eto.tools/dev/docs/). The full reference in one file is at [llms-full.txt](https://eto.tools/dev/docs/llms-full.txt); the machine-readable schema is at [openapi.json](https://eto.tools/dev/docs/openapi.json).

## PUT /api/v1/orders/{shop_id}/{receipt_id}/items/{transaction_id}/supplier

Set the supplier of one order item

- Operation ID: `order_item_supplier`
- Slug: `order-item-supplier`
- Category: Orders
- Authentication: API key only. Reads or writes data Eto holds for your own account.
- HTML: https://eto.tools/dev/docs/#ep-order-item-supplier
- Markdown: https://eto.tools/dev/docs/orders/order-item-supplier.md

Choose who handles ONE item of one order, overriding the product and store rules for that item only. Body: `supplier_id` (a supplier id, or null for "no supplier"), or `follow_rules: true` to drop the item's own choice. The supplier must be able to see the order. A shipped item keeps its supplier and answers 409 PACKAGE_CONFLICT. Returns the order's `items` (by Etsy transaction id) with their supplier, and `supplier_progress`. Zero Etsy calls.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `shop_id` | path | `integer` | yes | Connected shop id |
| `receipt_id` | path | `integer` | yes | Etsy receipt id |
| `transaction_id` | path | `integer` | yes | Etsy transaction id of the item |
| `supplier_id` | body | `integer` | no | Supplier id, or null for no supplier |
| `follow_rules` | body | `boolean` | no | true drops this item's own choice |

### Request

```bash
curl -X PUT "https://eto.tools/api/v1/orders/12345678/987654321/items/333111222/supplier" \
  -H "X-Eto-API-Key: eto_your_key"
```

```python
import requests

url = "https://eto.tools/api/v1/orders/12345678/987654321/items/333111222/supplier"
headers = {"X-Eto-API-Key": "eto_your_key"}

response = requests.put(url, headers=headers, timeout=120)
response.raise_for_status()
print(response.json())
```

```javascript
const url = "https://eto.tools/api/v1/orders/12345678/987654321/items/333111222/supplier";

const response = await fetch(url, {
  method: "PUT",
  headers: {
    "X-Eto-API-Key": "eto_your_key",
  },
});
if (!response.ok) throw new Error(`Eto API ${response.status}`);
const data = await response.json();
```

### Response

```json
{
  "receipt_id": 3456789012, "transaction_id": 4123456789,
  "supplier_id": 41, "source": "item", "pinned": true,
  "items": {"4123456789": {"id": 41, "name": "Anna (mugs)", "source": "item", "done": false,
            "done_reason": "", "package_id": null}},
  "supplier_progress": [{"supplier_id": 41, "name": "Anna (mugs)", "done": 0, "total": 1}]
}
```

### Errors

Failures answer with the shared error body described in the Errors section: `{"error": {"code", "status", "message", "hint", "docs"}}`. Branch on `code`, not on the message.
