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

# Add To Cart

> Add a Purchasable to the Cart.



## OpenAPI

````yaml openapi/ecommerce.yaml post /public/{user_id}/cart/{cart_uuid}/lines
openapi: 3.0.1
info:
  title: Ecommerce API
  description: ''
  version: '1.0'
servers:
  - url: https://apigw.ipxo.com/ecommerce
security:
  - bearerAuth: []
tags:
  - name: User
    description: ''
  - name: Cart
    description: ''
  - name: Stripe
    description: ''
  - name: Address
    description: ''
  - name: Gateway
    description: ''
  - name: Invoice
    description: ''
  - name: Order
    description: ''
  - name: Payment
    description: ''
  - name: Product
    description: ''
  - name: Subscription
    description: ''
  - name: Customer
    description: ''
  - name: Projection
    description: ''
  - name: Stripe EU
    description: ''
  - name: Vat
    description: ''
  - name: Legal
    description: ''
paths:
  /public/{user_id}/cart/{cart_uuid}/lines:
    post:
      tags:
        - Cart
      summary: Add To Cart
      description: Add a Purchasable to the Cart.
      operationId: addToCart
      parameters:
        - name: user_id
          in: path
          description: The ID of the user.
          required: true
          schema:
            type: string
          example: cumque
        - name: cart_uuid
          in: path
          description: ''
          required: true
          schema:
            type: string
          example: 2c3d6247-87a4-3854-bef9-912c128ecead
      requestBody:
        content:
          application/json:
            schema:
              required:
                - price_id
              type: object
              properties:
                price_id:
                  type: string
                  description: >-
                    Must be a valid UUID.  The <code>uuid</code> of an existing
                    record in the prices table.
                  example: 2f6c41a7-cc74-35c1-833d-43221c3286af
                quantity:
                  type: number
                  description: Must be at least 1.
                  example: 20
            example:
              price_id: 2f6c41a7-cc74-35c1-833d-43221c3286af
              quantity: 20
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      uuid:
                        type: string
                        example: a13651d1-84e3-4601-8b2e-c61ced85c9ea
                      reference_id:
                        type: string
                        example: f4d4a43c-9215-3bd8-84f9-29ab23cd7e8f
                      title:
                        type: string
                        example: Dr.
                      description:
                        type: string
                        example: Ullam ut qui dignissimos nam.
                      quantity:
                        type: integer
                        example: 1
                      unit_quantity:
                        type: integer
                        example: 1
                      purchasable_type:
                        type: string
                        example: product_variant
                      purchasable_id:
                        type: string
                        example: e5fe7d27-6e76-337e-bc97-558b204bcdc2
                      unit_price:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      sub_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      discount_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      tax_total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      total:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      total_before_tax:
                        type: object
                        properties:
                          currency:
                            type: string
                            example: USD
                          amount:
                            type: string
                            example: '0.00'
                          amount_minor:
                            type: integer
                            example: 0
                      exchange_rate:
                        type: string
                        example: '0.80000000'
                      exchange_rate_fetched_at:
                        type: string
                        example: '2026-03-03T14:05:29+00:00'
                example:
                  data:
                    uuid: a13651d1-84e3-4601-8b2e-c61ced85c9ea
                    reference_id: f4d4a43c-9215-3bd8-84f9-29ab23cd7e8f
                    title: Dr.
                    description: Ullam ut qui dignissimos nam.
                    quantity: 1
                    unit_quantity: 1
                    purchasable_type: product_variant
                    purchasable_id: e5fe7d27-6e76-337e-bc97-558b204bcdc2
                    unit_price:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    sub_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    discount_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    tax_total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    total:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    total_before_tax:
                      currency: USD
                      amount: '0.00'
                      amount_minor: 0
                    exchange_rate: '0.80000000'
                    exchange_rate_fetched_at: '2026-03-03T14:05:29+00:00'
              example:
                data:
                  uuid: a13651d1-84e3-4601-8b2e-c61ced85c9ea
                  reference_id: f4d4a43c-9215-3bd8-84f9-29ab23cd7e8f
                  title: Dr.
                  description: Ullam ut qui dignissimos nam.
                  quantity: 1
                  unit_quantity: 1
                  purchasable_type: product_variant
                  purchasable_id: e5fe7d27-6e76-337e-bc97-558b204bcdc2
                  unit_price:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  sub_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  discount_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  tax_total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  total:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  total_before_tax:
                    currency: USD
                    amount: '0.00'
                    amount_minor: 0
                  exchange_rate: '0.80000000'
                  exchange_rate_fetched_at: '2026-03-03T14:05:29.0000000+00:00'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````