> ## 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.

# Shops: Your Core Business Entity in Mutasib

> A shop is the root resource in Mutasib. Every product, sale, and cashier belongs to a shop. Learn about the data model and API access.

A shop is the central resource that ties everything together in Mutasib. Every product you list, every sale you record, and every analytics report you generate belongs to a specific shop.

<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 — it does not create, activate, deactivate, or delete shops.
</Note>

## Shop Data Model

The table below describes the key fields returned in a `ShopOut` response object.

| Field           | Type          | Description                                                                  |
| --------------- | ------------- | ---------------------------------------------------------------------------- |
| `id`            | integer       | Unique identifier for the shop                                               |
| `name`          | string        | Display name of the shop                                                     |
| `description`   | string        | Short public description shown in search results                             |
| `address`       | string        | Physical street address                                                      |
| `category`      | string        | Business category (see [Shop Categories](#shop-categories))                  |
| `phone_number`  | string        | Contact phone number                                                         |
| `opening_hours` | object        | Per-day open/close times (see [Opening Hours Format](#opening-hours-format)) |
| `latitude`      | float \| null | Optional GPS latitude for geo-search                                         |
| `longitude`     | float \| null | Optional GPS longitude for geo-search                                        |
| `is_active`     | boolean       | Whether the shop is currently online                                         |
| `plan`          | string        | Active plan on the shop                                                      |
| `plan_features` | object        | Feature flags and limits enforced by the current plan                        |

## Opening Hours Format

The `opening_hours` field is a JSON object keyed by lowercase day name. Each day contains an `open` and `close` time in 24-hour `HH:MM` format. Set a day to `null` to mark it as closed.

```json theme={null}
{
  "opening_hours": {
    "monday":    { "open": "09:00", "close": "21:00" },
    "tuesday":   { "open": "09:00", "close": "21:00" },
    "wednesday": { "open": "09:00", "close": "21:00" },
    "thursday":  { "open": "09:00", "close": "22:00" },
    "friday":    { "open": "14:00", "close": "23:00" },
    "saturday":  { "open": "10:00", "close": "22:00" },
    "sunday":    null
  }
}
```

## Shop Categories

The `category` field classifies your business and helps customers find you in filtered searches. Common values include:

| Value         | Business type                               |
| ------------- | ------------------------------------------- |
| `grocery`     | Supermarkets and general grocery stores     |
| `restaurant`  | Dine-in and takeaway food service           |
| `pharmacy`    | Pharmacies and drug stores                  |
| `electronics` | Consumer electronics and accessories        |
| `clothing`    | Apparel and fashion retail                  |
| `bakery`      | Bread, pastries, and baked goods            |
| `butcher`     | Meat and poultry shops                      |
| `bookstore`   | Books, stationery, and educational supplies |

## API Endpoints

The following endpoints let you read and update a shop. All requests require a valid API token in the `Authorization` header.

<AccordionGroup>
  <Accordion title="GET /api/v1/shops/{shop_id} — Get shop details">
    Returns the full `ShopOut` object for a single shop.

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

  <Accordion title="PATCH /api/v1/shops/{shop_id} — Update a shop">
    Partially updates shop fields. Only include the fields you want to change.

    ```bash theme={null}
    curl -X PATCH https://api.mutasib.com/api/v1/shops/42 \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "description": "Now open on Sundays!" }'
    ```
  </Accordion>
</AccordionGroup>
