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

# Mutasib Shops API: Get and Update Shop Details

> Retrieve and update shop details through the Mutasib REST API. All shop endpoints require a valid API token.

The Shops API is the foundation of Mutasib. Every product, staff member, and transaction belongs to a shop, so you'll typically retrieve a shop before working with any other resource. All endpoints require a valid API token in the `Authorization` header.

<Note>
  Shops are created and administered from the [Mutasib dashboard](https://mutasib.com/dashboard). The API exposes read and update operations on an existing shop.
</Note>

## Get a shop

Fetch the full details of a shop by its ID.

**`GET /api/v1/shops/{shop_id}`**

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.mutasib.com/api/v1/shops/42 \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.mutasib.com/api/v1/shops/42",
      headers={"Authorization": "Bearer YOUR_API_TOKEN"},
  )
  print(response.json())
  ```

  ```js JavaScript theme={null}
  const response = await fetch("https://api.mutasib.com/api/v1/shops/42", {
    headers: { Authorization: "Bearer YOUR_API_TOKEN" },
  });
  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

### Response — `ShopOut`

<ResponseField name="id" type="integer">
  Unique shop ID.
</ResponseField>

<ResponseField name="name" type="string">
  Display name of the shop.
</ResponseField>

<ResponseField name="address" type="string">
  Physical address of the shop.
</ResponseField>

<ResponseField name="category" type="string">
  Shop category (e.g. `grocery`, `pharmacy`, `boutique`).
</ResponseField>

<ResponseField name="description" type="string">
  Free-text shop description shown to customers.
</ResponseField>

<ResponseField name="phone_number" type="string">
  Contact phone number for the shop.
</ResponseField>

<ResponseField name="is_active" type="boolean">
  Whether the shop is currently active.
</ResponseField>

<ResponseField name="plan" type="string">
  Current subscription plan on the shop.
</ResponseField>

<ResponseField name="plan_features" type="object">
  Feature flags and limits derived from the shop's active plan.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the shop was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the last update.
</ResponseField>

## Update a shop

Update one or more fields on a shop. Send only the fields you want to change.

**`PATCH /api/v1/shops/{shop_id}`**

<ParamField body="name" type="string">
  New display name.
</ParamField>

<ParamField body="address" type="string">
  Updated physical address.
</ParamField>

<ParamField body="category" type="string">
  Updated category.
</ParamField>

<ParamField body="description" type="string">
  Updated shop description.
</ParamField>

<ParamField body="phone_number" type="string">
  Updated contact phone number.
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -X PATCH https://api.mutasib.com/api/v1/shops/42 \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -d '{
      "description": "Now open until midnight, seven days a week.",
      "phone_number": "+966501112233"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      "https://api.mutasib.com/api/v1/shops/42",
      json={
          "description": "Now open until midnight, seven days a week.",
          "phone_number": "+966501112233",
      },
      headers={"Authorization": "Bearer YOUR_API_TOKEN"},
  )
  print(response.json())
  ```

  ```js JavaScript theme={null}
  const response = await fetch("https://api.mutasib.com/api/v1/shops/42", {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_TOKEN",
    },
    body: JSON.stringify({
      description: "Now open until midnight, seven days a week.",
      phone_number: "+966501112233",
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

Returns the updated `ShopOut` object on success.
