# Products

Received Products' APIs allow our users to manage their products and pricing models. The APIs support operations such as creating new products and pricing models, updating existing products, and fetching products to use in customer contracts and subscriptions.

{% code title="Endpoint on this page" lineNumbers="true" %}

```javascript
GET https://api.received.ai/api/products
```

{% endcode %}

{% hint style="info" %}
Don't forget! APIs must include:

1. **Bearer Token** - return from the login call
2. **API version** - {"Version": "V0"}
   {% endhint %}

## Getting Products and Pricing

Fetching products and pricing provides detailed listings of available offerings and their associated costs. This information is crucial to build a contract, tailor their purchase orders, and negotiate contracts effectively.

### Get Products

{% code lineNumbers="true" %}

```javascript
GET https://api.received.ai/api/products
```

{% endcode %}

#### Response

{% code lineNumbers="true" %}

```javascript
[
    {
      "pricing_ref": "35bfdd59-6462-4ec6-bd7b-b3e654d85774",
      "product_name": "Subscriptions",
      "pricing_name": "Plans",
      "line_items": [
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f689"
          "item": "Starter",
          "price": 3000,
          "quantity": 1,
          "amount": 3000
        },
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f680"
          "item": "Professional",
          "price": 6000,
          "quantity": 1,
          "amount": 6000
        },
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f681"
          "item": "Organization",
          "price": 9000,
          "quantity": 1,
          "amount": 9000
        }
      ]
    },
    {
      "pricing_ref": "946ba17b-6f16-491e-bfa3-d189e827a9a3",
      "product_name": "Pay-as-you-go",
      "pricing_name": "Tiered",
      "line_items": [
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f682"
          "item": "Starter",
          "price": 10,
          "quantity": 0,
          "amount": 0
        },
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f683"
          "item": "Professional",
          "price": 9,
          "quantity": 0,
          "amount": 0
        },
        {
          "line_item_ref": "e72dd70c-cc65-4804-af2f-2fe6dab5f684"
          "item": "Organization",
          "price": 8,
          "quantity": 0,
          "amount": 0
        }
      ]
    }
]
```

{% endcode %}

#### Response Schema

Return list of pricing model with a product as a property. Those pricing and their lineitems can be used to build a contract (see [Contract page](https://docs.received.ai/api-docs/contracts))

**Pricing Schema**

<table><thead><tr><th width="201">Term</th><th width="99">Type</th><th width="330">Description </th><th width="378">Example</th></tr></thead><tbody><tr><td><code>pricing_ref</code></td><td><mark style="color:purple;">String</mark></td><td>The ID of the related product pricing</td><td>35bfdd59-6462-4ec6-bd7b-b3e654d85774</td></tr><tr><td><code>product_name</code></td><td><mark style="color:purple;">String</mark></td><td>The pricing's related product</td><td>Subscription</td></tr><tr><td><code>pricing_name</code></td><td><mark style="color:purple;">String</mark></td><td>Name of the pricing</td><td>Plans</td></tr><tr><td><code>line_items</code></td><td><mark style="color:purple;">Array</mark></td><td>List of pricing related lineitems</td><td></td></tr></tbody></table>

**Lineitem Schema**

<table><thead><tr><th width="350">Term</th><th width="99">Type</th><th width="330">Description </th><th width="378">Example</th></tr></thead><tbody><tr><td><code>line_item_ref</code></td><td><mark style="color:purple;">String</mark></td><td>The ID of the related lineitem</td><td>e72dd70c-cc65-4804-af2f-2fe6dab5f689</td></tr><tr><td><code>item</code></td><td><mark style="color:purple;">String</mark></td><td>Item name</td><td>Starter</td></tr><tr><td><code>price</code></td><td><mark style="color:purple;">String</mark></td><td>Item price</td><td>30000</td></tr><tr><td><code>quantity</code></td><td><mark style="color:purple;">String</mark></td><td>Item quantity</td><td>1</td></tr><tr><td><code>amount</code></td><td><mark style="color:purple;">Array</mark></td><td>Total amount of the item</td><td>3000</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.received.ai/api-docs/products.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
