GetProductById

This endpoint is there to get product by id

You'll need to replace the {{productId}} with the actual productId to fetch the API

GET https://sandbox.pgecom.com/api/v1/storefront/product/{{productId}}

{
    "id": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd",
    "slug": "hair",
    "shop": {
        "id": "9c4e8c79-b901-4b71-a305-0374664a0b65",
        "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"
            }
        },
        "name": "pgecom",
        "merchantId": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
        "verified": true,
        "coverPicture": null,
        "crispWebsiteId": null,
        "socialLinks": {
            "facebook": null,
            "youtube": null,
            "twitter": null,
            "instagram": null
        }
    },
    "title": "Hair",
    "brand": "pgecom",
    "price": 50,
    "merchant": {
        "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,
        "firstName": "Esterling",
        "lastName": "Accime",
        "name": {
            "firstName": "Esterling",
            "lastName": "Accime"
        }
    },
    "merchantId": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
    "size": null,
    "colors": [],
    "comparePrice": 0,
    "mainImageUrl": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063414/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/ebd7830c-f4aa-43fa-aeb4-ef2fedc4569e.jpg",
    "images": [
        {
            "size": 85113,
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "altText": "binance_to_moncash.jpeg",
            "updatedAt": "2023-11-04T02:03:34Z",
            "createdAt": "2023-11-04T02:03:34Z",
            "publicId": "ebd7830c-f4aa-43fa-aeb4-ef2fedc4569e",
            "url": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063414/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/ebd7830c-f4aa-43fa-aeb4-ef2fedc4569e.jpg",
            "key": "515680fa0498fe1ed7d66f300",
            "id": "ebd7830c-f4aa-43fa-aeb4-ef2fedc4569e",
            "name": "binance_to_moncash.jpeg",
            "productId": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd"
        },
        {
            "size": 98651,
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "altText": "binance_to_moncash_lady.jpeg",
            "updatedAt": "2023-11-04T02:03:30Z",
            "createdAt": "2023-11-04T02:03:30Z",
            "publicId": "b34ba0a2-ba34-4f1b-a51b-2706f97a72ca",
            "url": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063410/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/b34ba0a2-ba34-4f1b-a51b-2706f97a72ca.jpg",
            "key": "85a3c490b2ceaf6d5f1057b00",
            "id": "b34ba0a2-ba34-4f1b-a51b-2706f97a72ca",
            "name": "binance_to_moncash_lady.jpeg",
            "productId": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd"
        },
        {
            "size": 85005,
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "altText": "venmo_to_moncash.jpeg",
            "updatedAt": "2023-11-04T02:03:34Z",
            "createdAt": "2023-11-04T02:03:34Z",
            "publicId": "a2bca0e2-1031-425c-9e34-2a205bfa0336",
            "url": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063413/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/a2bca0e2-1031-425c-9e34-2a205bfa0336.jpg",
            "key": "92375e5a2ea2b105235505c00",
            "id": "a2bca0e2-1031-425c-9e34-2a205bfa0336",
            "name": "venmo_to_moncash.jpeg",
            "productId": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd"
        },
        {
            "size": 85395,
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "altText": "cashapp_to_moncash.jpeg",
            "updatedAt": "2023-11-04T02:03:31Z",
            "createdAt": "2023-11-04T02:03:31Z",
            "publicId": "bf0a57c7-d8a4-4f26-adb3-7da7ae89ae4b",
            "url": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063410/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/bf0a57c7-d8a4-4f26-adb3-7da7ae89ae4b.jpg",
            "key": "feb3448de71fb0e3b39028e00",
            "id": "bf0a57c7-d8a4-4f26-adb3-7da7ae89ae4b",
            "name": "cashapp_to_moncash.jpeg",
            "productId": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd"
        },
        {
            "size": 80314,
            "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
            "altText": "zelle_to_moncash.jpeg",
            "updatedAt": "2023-11-04T02:03:30Z",
            "createdAt": "2023-11-04T02:03:30Z",
            "publicId": "1aedd050-2518-4f34-b225-fc1cfc7f45ec",
            "url": "https://res.cloudinary.com/dnfoyqynm/image/upload/v1699063410/5f56dfa3-a415-4818-8275-44fc63ece3fd/pgecom/products/1aedd050-2518-4f34-b225-fc1cfc7f45ec.jpg",
            "key": "d15c83ecd0393d676a3737200",
            "id": "1aedd050-2518-4f34-b225-fc1cfc7f45ec",
            "name": "zelle_to_moncash.jpeg",
            "productId": "b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd"
        }
    ],
    "categories": [],
    "status": "active",
    "reviews": [],
    "variants": [],
    "for": {
        "demo": "market-1",
        "type": "flash-deals"
    },
    "description": "Hair Product",
    "inventory": 20
}
```
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://sandbox.pgecom.com/api/v1/storefront/product/b72b1e68-bb0d-48c2-ab85-ed0d24b7adfd',
  headers: { }
};

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

Last updated