PGecom
  • 🚀Introduction
  • đŸŽ¯Guides
    • Getting authenticated
  • 📚Concepts
    • Sandbox Environment
  • 🧑‍đŸ’ģAPI Endpoint
    • Ecommerce
      • đŸ›ī¸Shop
        • GetShopById
        • CreateShop
      • 👔Product
        • ProductSchema
        • GetProductById
        • GetProductBySlug
        • CreateNewProduct
      • 🛒Checkout
        • CreateCheckoutSession
      • Form
        • GetFormById
      • Invoice
        • GetInvoiceById
    • Wordpress Plugin
    • Chrome Extension
    • GiftCards
      • â„šī¸Gift Card Schema
      • ✅List giftcards
      • â˜‘ī¸Order a gift card
      • â˜‘ī¸Get giftcard
      • â˜‘ī¸Rates
    • Send rewards
      • â„šī¸Rewards Schema
      • â˜‘ī¸Send rewards
    • Withdraw
      • â„šī¸Withdraw Schema
      • â˜‘ī¸Process Withdraw
      • â˜‘ī¸Rates
    • Radar
      • â„šī¸Radar Schema
      • â˜‘ī¸Check for Fraudster
    • Top Up
      • â„šī¸Topup Schema
      • â˜‘ī¸Estimate
      • â˜‘ī¸Send
    • Payment
      • Mon Cash
        • CreateMonCashPayment
        • VerifyMonCashPayment
        • WithdrawToMonCashEstimate
        • WithdrawFundsToMonCash
      • PG Pay
        • ConfigurePGPay
        • CreatePGPayPayment
        • VerifyPGPaymentWithToken
        • VerifyPGPaymentWithOrderId
    • Deprecated
      • Card Holder
        • â„šī¸Card Holder Schema
        • â˜‘ī¸Update
      • Card
        • â„šī¸Card Schema
        • ✅Retrieve a single card
        • ✅List cards
        • â˜‘ī¸Create a card
        • â˜‘ī¸Create Customer
  • 🎓Resources
    • Support
    • Production Access
Powered by GitBook
On this page

Was this helpful?

  1. API Endpoint
  2. Ecommerce
  3. Shop

CreateShop

Use this endpoint to create a shop

Get shop details by shop id

Post https://sandbox.pgecom.com/api/v1/shop

{
    "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"
        }
    ]
}
{
    "message": "Shop with id a0f30628-1ff7-41d8-8392-7c703066e66c not found",
    "status": 404
}
{
    "message": "Too many requests, please try again later.",
    "status": 429
}
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);
});
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)
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
<?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();
}
curl --location 'https://sandbox.pgecom.com/api/v1/storefront/shop/0a40d129-0728-4b10-b32e-117abd6938c3'

PreviousGetShopByIdNextProduct

Last updated 5 months ago

Was this helpful?

🧑‍đŸ’ģ
đŸ›ī¸