GetCollectionById
This endpoint is there to get collection by id
You'll need to replace the {{collectionId}} with the actual collection to fetch the API
GET
https://sandbox.pgecom.com/api/v1/collection/{{collectionId}}
{
"searchEngineDescription": "desc",
"shopId": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
"searchEngineTitle": "Page Electronics",
"updatedAt": "2023-03-03T23:45:25Z",
"createdAt": "2023-03-03T23:45:25Z",
"description": "Eletronics gadget",
"id": "a20e63c3-47e8-489f-a68e-ca4bfdcefd2d",
"name": "Electronics",
"mainImageUrl": "https://pg-ecommerce-dev.s3.amazonaws.com/collection/c45ea8cc-7767-46f3-86a7-d9c1f576e715/137c797a75baa78dbbfae7f16ccc653e.jpg",
"searchEngineUrl": "undefined",
"products": []
}
const axios = require('axios');
let config = {
method: 'get',
url: 'https://sandbox.pgecom.com/api/v1/storefront/collection/a20e63c3-47e8-489f-a68e-ca4bfdcefd2',
headers: { }
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Last updated
Was this helpful?