# Get Shop

> List the shops your account belongs to.

## Endpoint

| Environment | URL |
| --- | --- |
| Production | `https://online-gateway.ghn.vn/shiip/public-api/v2/shop/all` |
| Staging | `https://dev-online-gateway.ghn.vn/shiip/public-api/v2/shop/all` |

**Method**: `GET`

## Headers

| Header | Required | Description |
| --- | --- | --- |
| `Token` | Yes | Shop token (issued by GHN) — [get a token](https://developer.ghn.vn/en/docs/token/get-token.md) |

## Parameters

- **offset** (Int): Paging offset. Default: `0`
- **limit** (Int): Page size. Default: `0`
- **client_phone** (String): If set, returns the shops your account **owns** filtered to the staff member with this phone. If empty, returns all shops your account belongs to

## Request Example

```bash
curl -X GET "https://dev-online-gateway.ghn.vn/shiip/public-api/v2/shop/all?offset=0&limit=20" \
  -H "Token: 5c1d8a9e-2f4b-11ed-..."
```

## Response

### Success (HTTP 200)

_Captured from a real Staging-environment call (abridged to the common fields)._

```json
{
  "code": 200,
  "message": "Success",
  "data": {
    "last_offset": 200995,
    "shops": [
      {
        "_id": 196560,
        "name": "GHN Shirt Shop",
        "phone": "0395297295",
        "address": "7, 28 Đ. Thành Thái, Phường 10 (Quận 10), Quận 10, Thành phố Hồ Chí Minh, Vietnam",
        "ward_code": "21007",
        "district_id": 1452,
        "client_id": 2509893,
        "status": 1
      }
    ]
  }
}
```

### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| `last_offset` | Int | Offset cursor for the next page |
| `shops` | Object[] | List of shops |
| `shops[]._id` | Int | Shop ID — use it as `ShopId` on other APIs |
| `shops[].name` | String | Shop name |
| `shops[].phone` | String | Shop phone |
| `shops[].address` | String | Shop pickup address |
| `shops[].ward_code` | String | Pickup ward code |
| `shops[].district_id` | Int | Pickup district ID |
| `shops[].client_id` | Int | Owner account ID |
| `shops[].status` | Int | Shop status — `1` when active |

## Error Codes

| code_message | HTTP | When |
| --- | --- | --- |
| `USER_ERR_COMMON` | 400 | Negative `offset` / `limit`, or invalid input |
| `SERVER_ERROR_COMMON` | 500 | Internal error |
