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

# Get Listings

> Returns a paginated list of listings.



## OpenAPI

````yaml GET /v1/listings
openapi: 3.0.1
info:
  title: OpenAPI Treet Listings
  description: Treet API to manage brand store listings
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.treet-test.co
security:
  - ClientIdAuth: []
    ApiKeyAuth: []
paths:
  /v1/listings:
    get:
      summary: Get listings
      description: Returns a paginated list of listings.
      parameters:
        - name: state
          in: query
          required: false
          description: Filter by listing state.
          schema:
            type: string
            enum:
              - OPEN
              - CLOSED
        - name: limit
          in: query
          required: false
          description: >-
            Number of listings to return per page. Must be between 1 and 200.
            Defaults to 50.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: after
          in: query
          required: false
          description: >-
            A cursor for use in pagination. `after` defines your place in the
            list. For example, if a previous response's `pageInfo.endCursor` was
            `abc`, set `after=abc` to fetch the next page.
          schema:
            type: string
      responses:
        '200':
          description: Paginated listings response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ListingsResponse:
      required:
        - listings
        - pageInfo
      type: object
      properties:
        listings:
          description: Page of listings.
          type: array
          items:
            $ref: '#/components/schemas/ListingDetails'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    ListingDetails:
      required:
        - id
        - state
        - condition
        - sku
        - availableInventory
        - externalIdentifier
      type: object
      properties:
        id:
          description: Unique Treet identifier
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        state:
          description: Current state of the listing
          type: string
          enum:
            - OPEN
            - CLOSED
          example: OPEN
        condition:
          description: Item's condition
          type: string
          enum:
            - NEW_WITH_TAGS
            - NEW_WITHOUT_TAGS
            - EXCELLENT
            - GOOD
            - MINOR_DEFECT
          example: GOOD
        sku:
          description: >-
            SKU on the underlying product variant (sourced from the connected
            commerce platform, e.g. Shopify). For the partner-supplied
            identifier passed at listing creation, see `externalIdentifier`.
          type: string
          example: SKU325
          nullable: true
        availableInventory:
          description: Number of units currently available for sale.
          type: integer
          example: 1
          nullable: true
        externalIdentifier:
          description: >-
            Partner-supplied identifier for the listing, set via the
            `externalIdentifier` field on listing creation. `null` if none was
            provided.
          type: string
          example: SKU325-good
          nullable: true
    PageInfo:
      description: Pagination metadata. Shared by all paginated Treet API endpoints.
      type: object
      required:
        - hasNextPage
        - endCursor
      properties:
        hasNextPage:
          description: Whether more results exist after this page.
          type: boolean
          example: true
        endCursor:
          description: >-
            A cursor identifying the last item on this page. Pass it as the
            `after` query parameter on the next request to fetch the following
            page. `null` when there are no more pages.
          type: string
          nullable: true
          example: NTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAw
  securitySchemes:
    ClientIdAuth:
      type: apiKey
      in: header
      name: X-Treet-Client-Id
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Treet-Authentication-Key

````