> For the complete documentation index, see [llms.txt](https://docs.pgecom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pgecom.com/api-endpoint/ecommerce/shop/getshopbyid.md).

# GetShopById

## Get shop details by shop id

<mark style="color:blue;">`GET`</mark> `https://sandbox.pgecom.com/api/v1/shop/{{shopId}}`

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "id": "0a40d129-0728-4b10-b32e-117abd6938c3",
    "theme": "default",
    "user": {
        "id": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
        "email": "info@pgecom.com",
        "phone": "+14048253444",
        "avatar": "https://pgecom-staging.s3.amazonaws.com/c5400b13-c8de-4cb2-bc12-f4850958169f-profile.png",
        "verified": true,
        "name": {
            "firstName": "Esterling",
            "lastName": "Accime"
        }
    },
    "email": "info@pgecom.com",
    "name": "facebook",
    "phone": "+1 404 825 3444",
    "merchantId": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
    "description": "Testing and testing",
    "verified": true,
    "paymentMethods": [
        "stripe"
    ],
    "coverPicture": null,
    "headerColorHex": "#e1e3fd",
    "footerColorHex": "#f7a1f3",
    "primaryColorHex": "#95f695",
    "secondaryColorHex": "#fffcfc",
    "crispWebsiteId": "1b38e124-7b98-4652-9599-b45ff96e5e4c",
    "profilePicture": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1701756145/5f56dfa3-a415-4818-8275-44fc63ece3fd/facebook/logo/image.png",
    "socialLinks": {
        "facebook": null,
        "youtube": null,
        "twitter": null,
        "instagram": null
    },
    "products": [
        {
            "productType": "physical",
            "published": false,
            "inventory": 50,
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "comparePrice": 0,
            "status": "draft",
            "slug": "hair",
            "createdAt": "2023-11-21T13:23:04Z",
            "vendor": "facebook",
            "name": "Hair",
            "isFeatured": false,
            "costPerItem": 0,
            "isContinueSellingOutStock": false,
            "updatedAt": "2023-11-21T13:23:04Z",
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "description": "This is a simple depo here",
            "price": 29,
            "id": "25333a45-5b26-41a5-9c4f-a886383aa31c",
            "mainImageUrl": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1700572977/facebook/products/whatsapp-image-2023-04-28-at-11.10.17-am-2.jpg"
        },
    ],
    "categories": [
        {
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "href": "/shoes",
            "updatedAt": "2023-11-22T22:55:37Z",
            "menuItemId": "db123901-5646-4061-88d8-bfcb83df21aa",
            "createdAt": "2023-11-22T22:55:37Z",
            "productIds": [],
            "id": "acdc3018-1fb9-4127-9097-f1b8270d87d5",
            "title": "Shoes"
        },
        {
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "href": "/bags",
            "updatedAt": "2023-11-22T22:56:11Z",
            "menuItemId": "db123901-5646-4061-88d8-bfcb83df21aa",
            "createdAt": "2023-11-22T22:56:11Z",
            "productIds": [],
            "id": "5700fd43-1fae-43b4-9201-9b3cde4ef4e2",
            "title": "Bags"
        },
        {
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "href": "/avocado",
            "updatedAt": "2023-12-05T06:28:54Z",
            "menuItemId": "fa930cf7-ac0e-419d-8a78-4701904a4091",
            "createdAt": "2023-12-05T06:28:54Z",
            "productIds": [],
            "id": "4f755e62-6071-457b-8bea-a7b43f15681c",
            "title": "Avoca"
        }
    ],
    "collections": [
        {
            "productType": "physical",
            "published": false,
            "inventory": 50,
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "comparePrice": 0,
            "status": "active",
            "slug": "hair",
            "createdAt": "2023-11-21T13:23:04Z",
            "vendor": "facebook",
            "name": "Hair",
            "isFeatured": false,
            "costPerItem": 0,
            "isContinueSellingOutStock": false,
            "updatedAt": "2023-11-21T13:23:04Z",
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "description": "This is a simple depo here",
            "price": 29,
            "id": "25333a45-5b26-41a5-9c4f-a886383aa31c",
            "mainImageUrl": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1700572977/facebook/products/whatsapp-image-2023-04-28-at-11.10.17-am-2.jpg"
        },
        {
            "categoryIds": [],
            "productType": "physical",
            "published": false,
            "inventory": 20,
            "shopId": "0a40d129-0728-4b10-b32e-117abd6938c3",
            "comparePrice": 0,
            "status": "active",
            "slug": "pantalon",
            "createdAt": "2023-11-21T13:32:19Z",
            "vendor": "facebook",
            "name": "Pantalon",
            "isFeatured": false,
            "costPerItem": 0,
            "isContinueSellingOutStock": false,
            "updatedAt": "2023-11-21T13:32:19Z",
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "description": "This is another great demo",
            "price": 49,
            "id": "999f182d-8547-4c47-a4ee-6d3d83598924",
            "mainImageUrl": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1700573529/facebook/products/whatsapp-image-2023-04-28-at-11.10.17-am-3.jpg"
        }
    ]
}
```

{% endtab %}

{% tab title="404: Not Found Not found" %}

```javascript
{
    "message": "Shop with id a0f30628-1ff7-41d8-8392-7c703066e66c not found",
    "status": 404
}
```

{% endtab %}

{% tab title="429: Too Many Requests Too many requests" %}

```javascript
{
    "message": "Too many requests, please try again later.",
    "status": 429
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Nodejs" %}

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3',
  headers: { }
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
```

{% endtab %}

{% tab title="Curl" %}

```javascript
curl --location 'https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pgecom.com/api-endpoint/ecommerce/shop/getshopbyid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
