> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 6caee09e-ff00-4c71-a51b-23b822b9772a
---

# Get all line items

> Get all line items from an account, up to 100 per request. By default you will only get the object ID, the portal ID (HubSpot Account ID) and a deleted field to indicate if the line item as been archived or not in the response. If you want to get specific properties, you'll need to use the &properties= parameter in the request URL. The parameter can be included multiple times, so you can request any properties you may need. See the parameter descriptions below and the examples for more details. Note: Line items created using the HubSpot sales tools may not always have a hs_product_id set. Products created from the deal line item editor will not be added to your product library and will therefore not have a hs_product_id. See the details in this knowledge doc for more information.

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['e-commerce']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v1/crm-line-items-v1.json GET /crm-objects/v1/objects/line_items/paged
openapi: 3.0.0
info:
  title: CRM Line Items API v1
  version: 1.0.0
  description: >-
    Use the line items API to add instances of products to deals and quotes. You
    can create line items from existing products or create them as custom line
    items with no product attached.
  x-hubspot-introduction: >-
    Use the line items API to add instances of products to deals and quotes. You
    can create line items from existing products or create them as custom line
    items with no product attached.
  x-hubspot-api-use-case: >-
    When creating a set of quotes for sales reps to send to potential buyers,
    use this API to add goods and services to the quotes.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /crm-objects/v1/objects/line_items/paged:
    get:
      summary: Get all line items
      description: >-
        Get all line items from an account, up to 100 per request. By default
        you will only get the object ID, the portal ID (HubSpot Account ID) and
        a deleted field to indicate if the line item as been archived or not in
        the response. If you want to get specific properties, you'll need to use
        the &properties= parameter in the request URL. The parameter can be
        included multiple times, so you can request any properties you may need.
        See the parameter descriptions below and the examples for more details.
        Note: Line items created using the HubSpot sales tools may not always
        have a hs_product_id set. Products created from the deal line item
        editor will not be added to your product library and will therefore not
        have a hs_product_id. See the details in this knowledge doc for more
        information.
      operationId: getcrmobjectsv1objectslineitemspaged
      responses:
        '200':
          description: >-
            Successful response - Get all line items from an account, up to 100
            per request
          content:
            application/json:
              schema:
                type: object
              examples:
                example1:
                  summary: Get all line items - Example 1
                  value:
                    - versions:
                        - name: hs_product_id
                          value: '1642736'
                          sourceVid: []
                      value: '1642736'
                      timestamp: 0
                      source: null
                      sourceId: null
                    - versions:
                        - name: hs_product_id
                          value: '1645187'
                          sourceVid: []
                      value: '1645187'
                      timestamp: 0
                      source: null
                      sourceId: null
                    - versions:
                        - name: quantity
                          value: '50'
                          timestamp: 1525367734768
                          source: API
                          sourceVid: []
                      value: '50'
                      timestamp: 1525367734768
                      source: API
                      sourceId: null
                    - versions:
                        - name: price
                          value: '9.50'
                          timestamp: 1525367734768
                          source: API
                          sourceVid: []
                      value: '9.50'
                      timestamp: 1525367734768
                      source: API
                      sourceId: null
                    - versions:
                        - name: name
                          value: >-
                            A custom name for the product for this line item.
                            Discounting 5% on bulk purchase.
                          timestamp: 1525368457923
                          source: API
                          sourceVid: []
                      value: >-
                        A custom name for the product for this line item.
                        Discounting 5% on bulk purchase.
                      timestamp: 1525368457923
                      source: API
                      sourceId: null
                    - versions:
                        - name: hs_product_id
                          value: '1642736'
                          sourceVid: []
                      value: '1642736'
                      timestamp: 0
                      source: null
                      sourceId: null
                    - versions:
                        - name: quantity
                          value: '15'
                          timestamp: 1525368534412
                          source: API
                          sourceVid: []
                      value: '15'
                      timestamp: 1525368534412
                      source: API
                      sourceId: null
                    - versions:
                        - name: price
                          value: '100.00'
                          timestamp: 1525368534412
                          source: API
                          sourceVid: []
                      value: '100.00'
                      timestamp: 1525368534412
                      source: API
                      sourceId: null
                    - versions:
                        - name: name
                          value: Magical widgets - special order
                          timestamp: 1525368534412
                          source: API
                          sourceVid: []
                      value: Magical widgets - special order
                      timestamp: 1525368534412
                      source: API
                      sourceId: null
                    - versions:
                        - name: hs_product_id
                          value: '1645187'
                          sourceVid: []
                      value: '1645187'
                      timestamp: 0
                      source: null
                      sourceId: null
      security:
        - oauth2:
            - e-commerce
        - oauth2_legacy: []
        - private_apps:
            - e-commerce
        - private_apps_legacy: []
components: {}

````