APIs & Integrations

dkimmo
Mitglied

404 Error Returned by Products GET API

lösung

dkimmo_0-1685580138053.png

Have tried using both properties and the internal product ID but I'm still getting a 404 error any time I try getting product properties from the products/{productId} API. Am I doing something wrong here?

0 Upvotes
1 Akzeptierte Lösung
skimura
Lösung
Mitwirkender/Mitwirkende | Platinum Partner
Mitwirkender/Mitwirkende | Platinum Partner

404 Error Returned by Products GET API

lösung

@dkimmo 

Hi.

 

Please let me ask you some questions.

 

-Are you using the correct access token/API key associated with the product ID?

 

-Is the Product ID specifying the correct ID? Where did you get it?

In my case, I check the product ID as follows.

 

Display the product on the product list page.

https://app.hubspot.com/settings/{PORTAL_ID}/sales/products

 

And I'm checking the HTML attribute [data-line-item-id] .

...
<span data-line-item-id="{XXXXXXXXX}" data-selenium-test="line-item-name-cell" data-test-id="line-item-name-cell" class="private-truncated-string private-truncated-string--has-tooltip" data-content="true" tabindex="0">
    <span class="private-truncated-string__inner"><span>
    <span>target_product_name</span>
</span>
...

 

 

Thanks.

 

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
2 Antworten
skimura
Lösung
Mitwirkender/Mitwirkende | Platinum Partner
Mitwirkender/Mitwirkende | Platinum Partner

404 Error Returned by Products GET API

lösung

@dkimmo 

Hi.

 

Please let me ask you some questions.

 

-Are you using the correct access token/API key associated with the product ID?

 

-Is the Product ID specifying the correct ID? Where did you get it?

In my case, I check the product ID as follows.

 

Display the product on the product list page.

https://app.hubspot.com/settings/{PORTAL_ID}/sales/products

 

And I'm checking the HTML attribute [data-line-item-id] .

...
<span data-line-item-id="{XXXXXXXXX}" data-selenium-test="line-item-name-cell" data-test-id="line-item-name-cell" class="private-truncated-string private-truncated-string--has-tooltip" data-content="true" tabindex="0">
    <span class="private-truncated-string__inner"><span>
    <span>target_product_name</span>
</span>
...

 

 

Thanks.

 

0 Upvotes
dkimmo
Mitglied

404 Error Returned by Products GET API

lösung

Ah sorry, I was using the accesstoken. Thanks!

0 Upvotes