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

# Get Target Rules

> Retrieves a list of TargetRules according to any specified filter criteria and sort options



## OpenAPI

````yaml /openapi/openapi_shipping_admin.json get /commerce/targetrules
openapi: 3.0.1
info:
  description: OpenAPI Spec for Kibo Shipping Admin Service
  title: Shipping Admin
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/targetrules:
    get:
      tags:
        - TargetRules
      summary: Get Target Rules
      description: >-
        Retrieves a list of TargetRules according to any specified filter
        criteria and sort options
      parameters:
        - description: >-
            Used to page results from a query. Indicates the zero-based offset
            in the complete result set where the returned entities begin. The
            default value is 0.
          in: query
          name: startIndex
          schema:
            default: 0
            format: int32
            type: integer
        - description: >-
            Used to page results from a query. Indicates the maximum number of
            entities to return from a query. The default value is 20 and the
            maximum value is 200.
          in: query
          name: pageSize
          schema:
            default: 0
            format: int32
            type: integer
        - description: >-
            The element to sort the results by and the order in which the
            results appear. Either ascending (a-z) or descending (z-a) order.
          in: query
          name: sortBy
          schema:
            type: string
        - description: >-
            A set of filter expressions representing the search parameters for a
            query: eq=equals, ne=not equals, gt=greater than, lt = less than or
            equals, gt = greater than or equals, lt = less than or equals, sw =
            starts with, or cont = contains. Optional.
          in: query
          name: filter
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetRuleCollection'
            text/json:
              schema:
                $ref: '#/components/schemas/TargetRuleCollection'
            text/plain:
              schema:
                $ref: '#/components/schemas/TargetRuleCollection'
          description: Success
components:
  schemas:
    TargetRuleCollection:
      description: A collection of zones
      properties:
        items:
          items:
            $ref: '#/components/schemas/TargetRule'
          nullable: true
          type: array
        totalCount:
          format: int32
          type: integer
      type: object
    TargetRule:
      description: >-
        An object used to define a bool expression against a particular domain
        type
      properties:
        code:
          description: "The user defined code for this rule\r\n<remarks>must be unique</remarks>"
          nullable: true
          type: string
        description:
          description: The description of this rule
          nullable: true
          type: string
        domain:
          description: "The domain of this rule\r\n<value>Product</value><value>Order</value>"
          nullable: true
          type: string
        expression:
          description: the expression of this rule
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````