Hello, I have a use case which is very frustrating.
We set up Payment Links for customers to purchase our products. We may set up various Payment Links based on bundles or campaigns; these contain Line Items which be copied from the same Product. All good so far.
My issue started when we began to replace/update some of our Products and we wanted to created new Line Items - I don’t have a good way to figure out which Payment Links need their Line Items updated.
ISSUE: there doesn’t appear to be a way to obtain the line item number from a Payment Link, or vice-versa, whihc is very bizarre since they are obviously associated in the GUI.
Despite https://api.hubapi.com/crm/v3/schemas/line_items list them as asscioated:
```
…
“assocations”: [
…
{
“fromObjectTypeId”: “0-8”,
“toObjectTypeId”: “0-118”,
“name”: “LINE_ITEM_TO_PAYMENT_LINK”,
“cardinality”: “ONE_TO_ONE”,
“inverseCardinality”: “ONE_TO_MANY”,
“hasUserEnforcedMaxToObjectIds”: false,
“hasUserEnforcedMaxFromObjectIds”: false,
“maxToObjectIds”: 1,
“maxFromObjectIds”: 50000,
“id”: “759”,
“createdAt”: null,
“updatedAt”: null
},
{
“fromObjectTypeId”: “0-118”,
“toObjectTypeId”: “0-8”,
“name”: “PAYMENT_LINK_TO_LINE_ITEM”,
“cardinality”: “ONE_TO_MANY”,
“inverseCardinality”: “ONE_TO_ONE”,
“hasUserEnforcedMaxToObjectIds”: false,
“hasUserEnforcedMaxFromObjectIds”: false,
“maxToObjectIds”: 50000,
“maxFromObjectIds”: 1,
“id”: “758”,
“createdAt”: null,
“updatedAt”: null
},
```
Nothing ever shows up:
https://api.hubapi.com/crm/v4/objects/payment_link/5384832/associations/line_items
```
“status”: “error”,
“message”: “The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”
```
`https://api.hubapi.com/crm/v4/objects/line_items/34024136239/associations/payment_link` results in
```
{
“results”: []
}
```
And despite https://api.hubapi.com/crm/v3/properties/line_item show ‘payment_link’,
All results here have payment_link and hs_url set to Null:
https://api.hubapi.com/crm/v4/objects/line_items?limit=100&properties=payment_link?properties=hs_url
For some reason, https://api.hubapi.com/crm/v3/objects/line_items/search allows property ‘hs_url’ to show up but, payment_link is always blank still.
The hs_url from search is techinically enough information with which to manually proceed, but to pour salt on the wound, that URL can’t be inspected via the GUI https://app.hubspot.com/payment-links/***, without manually copying the link for each one, AND all of the payment link search/listing endpoints give me the error “not available for public use”.
Please help!