May 2, 2019 3:09 AM
we have 100 of countries exist.Now I have created same URL structure for pages to the countries that we have for e.g India URL is https://dev.transfast.com/india for Pakistan https://dev.transfast.com/pakistan but for some countries we have yet not build any pages. and now my need is to hide those country on main page which have no page exist in Hubspot for e.g we have country Benin for which we have not build page yet.So here we have domain and country name.Now I want to use Hubspot API to check is page with URL https://dev.transfast.com/benin exist in Hubspot
May 2, 2019 1:26 PM
Could you pull all of the pages in your account through the CMS Page Publishing API? Here's our documentation for it: https://developers.hubspot.com/docs/methods/pages/get_pages . Both the "absolute_url" and the "slug" are returned in the response for each page. You could loop through all of the page objects to see if your page exists. Other than this, so far as I know it's not possible to check specifically for a page by its URL. Does this help with what you're trying to do?
Leland ScanlanHubSpot Developer Support
May 6, 2019 1:29 AM
I have checked above provided solution with additional filter using parameter 'name' with 'icontains'. Is there any way to work same thing using parameter 'absolute_url' instead of parameter 'name'.