# HubSpot docs: APIs Legacy CRM Objects Line Items

## Line Items

- [Line items API](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/guide.md): When a product is attached to a deal, it becomes a line item. The line items endpoints allow you to manage and sync this data.
- [Create](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/create-line-item.md): Create a line item with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard line items is provided.
- [Read](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/get-line-item.md): Read an Object identified by `{lineItemId}`. `{lineItemId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param.  Control what is returned via the `properties` query param.
- [List](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/get-line-items.md): Read a page of line items. Control what is returned via the `properties` query param.
- [Update](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/update-line-item.md): Perform a partial update of an Object identified by `{lineItemId}`or optionally a unique property value as specified by the `idProperty` query param. `{lineItemId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the obje…
- [Archive](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/delete-line-item.md): Move an Object identified by `{lineItemId}` to the recycling bin.

### Batch

- [Create a batch of line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/batch/create-line-items.md): Create multiple line items in a single request by providing the necessary properties and associations for each item. This endpoint allows for efficient batch processing of line items, returning the created objects with their unique identifiers.
- [Read a batch of line items by internal ID, or unique property values](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/batch/get-line-items.md): Retrieve records by record ID or include the `idProperty` parameter to retrieve records by a custom unique value property.
- [Update a batch of line items by internal ID, or unique property values](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/batch/update-line-items.md): Update multiple line items using their internal IDs or unique property values. This endpoint allows for batch processing of updates, ensuring efficient modification of line item records in bulk.
- [Create or update a batch of line items by unique property values](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/batch/upsert-line-items.md): Create or update records identified by a unique property value as specified by the `idProperty` query param. `idProperty` query param refers to a property whose values are unique for the object.
- [Archive a batch of line items by ID](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/batch/delete-line-items.md): Archive multiple line items simultaneously by specifying their IDs in the request body.

### Search

- [Search for line items using specified criteria.](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/search/search-line-items.md): Execute a search for line items based on filters, properties, and sorting options provided in the request body. This endpoint allows you to retrieve line items that match specific conditions, facilitating targeted data retrieval in CRM operations.

### v1

- [Get a log of changes for line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/get-crm-objects-v1-changelog-line-items.md): Create a new line item. The request body should be a list of properties you want to set for the new line item, with each entry being the internal name of the property to be set, and the value of that property. You must set the hs_product_id property when creating a line item. This property needs to…
- [Get a line item by ID](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/get-crm-objects-v1-objects-line-items-id.md): Get a specific line item by its ID. By default, the response will only include the ID. You can get specific properties in the response by using the &properties= parameter in the URL, and that parameter can be included multiple times to get multiple properties. See the example for more details.
- [Get all line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/get-crm-objects-v1-objects-line-items-paged.md): 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 &properti…
- [Update a group of line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/post-crm-objects-v1-objects-line-items-batch-create.md): Update a group of existing line items. Up to 100 line items can be updated in a single request. The request body will be an array, with each element containing the ID of the line item to update and a list of properties to update for that line item. See the examples for details.
- [Create a line item](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/post-crm-objects-v1-objects-line-items-batch-delete.md): Update an existing line item by its ID. The request body must be a list of properties you want to update, with each entry including the internal name of the property you want to update, and the new value for that property. See the example for details.
- [Get a group of line items by ID](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/post-crm-objects-v1-objects-line-items-batch-read.md): Create a group of line items. Up to 100 line items can be created in a single request. This would allow you to create all of the line items for an entire order (or multiple orders) in a single request. The request body will be an array, with each entry being a list of properties you want to set for…
- [Create a group of line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/post-crm-objects-v1-objects-line-items-batch-update.md): Delete an existing line item. Note: This action cannot be undone. Deleted line items cannot be updated and there is no way to restore them.
- [Delete a group of line items](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/post-crm-objects-v1-objects-line-items.md): Delete a group of existing line items. Up to 100 line items can be deleted in a single request. Note: This action cannot be undone. Deleted line items cannot be updated and there is no way to restore them.
- [Update a line item](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/put-crm-objects-v1-objects-line-items-id.md): Get a list of changes to line item objects. Returns 1000 (or fewer) changes, starting with the _least recent_ change. This endpoint is designed to be polled periodically, allowing your integration to keep track of which objects have been updated so that you can get the details of those updated objec…
- [Delete a line item](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/line-items/v1/delete-crm-objects-v1-objects-line-items-id.md): Get a group of line items by their IDs. Up to 100 IDs can be included in a single request. By default, the response will only include the ID a few system fields, and the hs_product_id property. You can get specific properties in the response by using the properties parameter in the URL, and that par…

## OpenAPI Specs

- [crm-line-items-v3](/docs/specs/legacy/v3/crm-line-items-v3.json)
- [crm-line-items-v1](/docs/specs/legacy/v1/crm-line-items-v1.json)
