Cannot retrieve line items from a deal using HubSpot API – endpoints return empty or error

Hi all,

I’m attempting to retrieve line items associated with a deal using a Custom Code Action in a HubSpot Workflow. I’m using a Private App with full CRM read access. Authentication works, and I can fetch general deal information, but I’m consistently unable to retrieve associated line items—even though they’re clearly visible in the HubSpot UI.

What is working:

  • I can retrieve deal information using /crm/v3/objects/deals/dealId.
  • Authentication via Private App works with Bearer token.
  • Deal records are new and contain line items added through the “Add Product” button.

What is not working:

  1. GET /crm/v3/objects/deals/dealId/line_items
    Returns: results:
  2. GET /crm/v4/objects/deals/dealId/associations/line_items/deal_to_line_item
    Returns: 405 Method Not Allowed
  3. GET /crm/v4/objects/deals/{dealId}/associations/line_items
    Returns: 404 Not Found
  4. Checked for associated quotes using /crm/v4/objects/deals/{dealId}/associations/quotes – no quotes found.
  5. Tried adding archived=false in requests. No difference.
  6. Removed all property filters to rule out filtering as a cause.

Goal:
I simply need to access the names (or product values) of the line items associated with a deal using a supported method within a workflow-based custom code action. So far, no combination of endpoints is returning the expected line item data, and I would appreciate a working approach or confirmation if there are known limitations here.

If you need more context:

  • The portal uses a private app with full object scopes
  • Deals are created recently
  • Line items are added from the product library
  • No quotes are involved

Thanks in advance for any guidance.

Hi @oddleon
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@sylvain_tirreau @GRajput @HubDoPete - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor

Hi @oddleon

As you have already retrieved the associated line item IDs using the Deal Associations API, the next step is to store these IDs in an array. Once you have the list of line item IDs, you can use the line item API to fetch detailed information about each line item, such as name, price, quantity, and associated product data. Here is the link to the line-item doc -

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!