Hey @a_funs,
I know as per the documentation here the “e-commerce” scope is defined as giving access to “Products and line items endpoints”. However it also applies to when you are configuring a webhook for a Line item. For instance when I was creating a webhook via the UI (as opposed to the API) I was prompted to add the e-commerce scope. See the screenshot below. It also specifies that it’s a required scope from the scopes listed in this table here .
Once I set the scope up, activated the webhook and re-installed my app I started seeing events coming from HubSpot to my endpoint. (as per screenshot in my original post).
When viewing or editing webhook subscriptions via the Webhook API you just use developer portal API key. You do however need to make sure you’ve configured your scopes for the app from within the app settings interface (auth tab). See mine below:
Providing you’ve the appropriate scopes in place dependent on the type of object(s) your subscriptions are going to be configured for you can retrieve webhooks making a GET as per below:
GET https://api.hubapi.com/webhooks/v3/{{APP_ID}}/subscriptions?hapikey={{DEV_API_KEY}}
RESPONSE
{
"results": [
{
"eventType": "contact.creation",
"propertyName": null,
"active": true,
"id": "2185980",
"createdAt": "2023-07-20T16:24:55.629Z",
"updatedAt": null
},
{
"eventType": "company.propertyChange",
"propertyName": "notes_last_updated",
"active": true,
"id": "2219950",
"createdAt": "2023-08-11T14:23:19.117Z",
"updatedAt": null
},
{
"eventType": "line_item.propertyChange",
"propertyName": "hs_recurring_billing_period",
"active": true,
"id": "2245350",
"createdAt": "2023-08-28T22:14:07.184Z",
"updatedAt": null
},
{
"eventType": "line_item.creation",
"propertyName": null,
"active": true,
"id": "2245363",
"createdAt": "2023-08-28T22:16:01.377Z",
"updatedAt": null
}
]
}
You can also update any one of those subscriptions, for instance pausing the “line_item.creation” subscription:
PATCH https://api.hubapi.com/webhooks/v3/{{APP_ID}}/subscriptions/{{SUB_ID}}?hapikey={{DEV_API_KEY}}
BODY
{ "active": false }
RESPONSE
{
"eventType": "line_item.creation",
"propertyName": null,
"active": false,
"id": "2245363",
"createdAt": "2023-08-28T22:16:01.377Z",
"updatedAt": null
}
Or you could create a brand new one to listen for changes to another “line_item” property:
GET https://api.hubapi.com/webhooks/v3/{{APP_ID}}/subscriptions?hapikey={{DEV_API_KEY}}
BODY:
{
"active": true,
"eventType": "line_item.propertyChange",
"propertyName": "quantity"
}
RESPONSE:
{
"eventType": "line_item.propertyChange",
"propertyName": "quantity",
"active": true,
"id": "2245553",
"createdAt": "2023-08-29T08:33:19.006Z",
"updatedAt": null
}
Hope this helps!

