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

# Get cart

> Get a cart with its lines, the discounts and promotions applied to them, the customer's assigned sales reps, and who created and last changed the cart. `cart_total` is the sum of the lines, before any cart-level promotion. Fetch the cart named by an `open_cart.created` or `open_cart.updated` webhook with this.



## OpenAPI

````yaml get /v1/carts/{id}
openapi: 3.1.0
info:
  description: Client-facing Open APIs for WizCommerce
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v1/carts/{id}:
    get:
      tags:
        - Carts
      summary: Get cart
      description: >-
        Get a cart with its lines, the discounts and promotions applied to them,
        the customer's assigned sales reps, and who created and last changed the
        cart. `cart_total` is the sum of the lines, before any cart-level
        promotion. Fetch the cart named by an `open_cart.created` or
        `open_cart.updated` webhook with this.
      parameters:
        - description: Cart ID
          name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dtos.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/dtos.CartDetailResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dtos.SuccessResponse:
      type: object
      properties:
        data:
          x-order: '1'
    dtos.CartDetailResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 000048fc-c17e-4524-a684-0709c009e353
        customer_id:
          type: string
          x-order: '2'
          example: 4bd02cd3-06d2-498a-9749-b4f87faeccd7
        order_id:
          type: string
          x-order: '3'
          example: 691aba0b-de2e-442a-9a3c-e782550e536a
        name:
          type: string
          x-order: '4'
          example: New Cart
        type:
          type: string
          x-order: '5'
          example: cart
        cart_status:
          type: string
          x-order: '6'
          example: open
        cart_total:
          description: Sum of item_total, before any cart-level promotion.
          type: number
          x-order: '7'
          example: 220
        currency_code:
          type: string
          x-order: '8'
          example: USD
        price_list:
          allOf:
            - $ref: '#/components/schemas/dtos.CartPriceListInfoResponse'
          x-order: '9'
        applied_promotion:
          description: >-
            The promotion applied to the whole cart; omitted when none.
            cart_total does not include its discount.
          allOf:
            - $ref: '#/components/schemas/dtosv2.AppliedPromotionResponse'
          x-order: '10'
        assigned_sales_reps:
          description: The customer's assigned sales reps, as Get Customer returns them.
          type: array
          items:
            $ref: '#/components/schemas/dtos.UserResponse'
          x-order: '11'
        created_by:
          allOf:
            - $ref: '#/components/schemas/dtosv2.UserInfoResponse'
          x-order: '12'
        updated_by:
          allOf:
            - $ref: '#/components/schemas/dtosv2.UserInfoResponse'
          x-order: '13'
        created_at:
          type: string
          x-order: '14'
          example: '2024-06-24T18:45:35Z'
        updated_at:
          type: string
          x-order: '15'
          example: '2024-10-09T08:52:27Z'
        items:
          type: array
          items:
            $ref: '#/components/schemas/dtos.CartDetailItemResponse'
          x-order: '16'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    dtos.CartPriceListInfoResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 3e6b41c3-2e17-4395-87ce-74699590aa0b
        name:
          type: string
          x-order: '2'
          example: Default Price List
    dtosv2.AppliedPromotionResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
        name:
          type: string
          x-order: '2'
        reference_id:
          type: string
          x-order: '3'
        promo_code:
          type: string
          x-order: '4'
    dtos.UserResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        email:
          type: string
          x-order: '2'
          example: john.doe@example.com
        first_name:
          type: string
          x-order: '3'
          example: John
        last_name:
          type: string
          x-order: '4'
          example: Doe
        phone:
          type: string
          x-order: '5'
          example: '+14155552671'
        department:
          type: string
          x-order: '6'
          example: Sales
        status:
          type: string
          x-order: '7'
          example: active
        created_by:
          type: string
          x-order: '8'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        updated_by:
          type: string
          x-order: '9'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        created_at:
          type: string
          x-order: '10'
          example: '2021-01-01T00:00:00Z'
        updated_at:
          type: string
          x-order: '11'
          example: '2021-01-01T00:00:00Z'
    dtosv2.UserInfoResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        email:
          type: string
          x-order: '2'
          example: user@example.com
    dtos.CartDetailItemResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 0000105c-f8ef-4289-b501-441ddc09e9dd
        product_id:
          type: string
          x-order: '2'
          example: 95458b31-5398-42cb-98ed-69cce35eed81
        sku:
          type: string
          x-order: '3'
          example: BH1841-320
        name:
          type: string
          x-order: '4'
          example: EMILIE 5'0" Q FOOTBOARD & SLATS
        quantity:
          type: integer
          x-order: '5'
          example: 2
        reference_id:
          type: string
          x-order: '6'
          example: LINE-001
        unit_price:
          description: Per-unit price before the line's discount or promotion.
          type: number
          x-order: '7'
          example: 125
        amount:
          description: Per-unit price after the line's discount or promotion.
          type: number
          x-order: '8'
          example: 110
        discount:
          description: The line's discount, read with discount_type; 0 when none.
          type: number
          x-order: '9'
          example: 12
        discount_type:
          description: percentage or value; empty when the line has no discount.
          type: string
          enum:
            - percentage
            - value
          x-order: '10'
          example: percentage
        applied_promotion:
          description: The promotion that set the line's discount; omitted when none.
          allOf:
            - $ref: '#/components/schemas/dtosv2.AppliedPromotionResponse'
          x-order: '11'
        item_total:
          description: amount × quantity.
          type: number
          x-order: '12'
          example: 220
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.