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

# Get Attachments



## OpenAPI

````yaml Commerce get /attachments
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /attachments:
    parameters:
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    get:
      summary: Get Attachments
      operationId: get-attachments-list
      parameters:
        - schema:
            type: string
          in: query
          name: sort
          description: >-
            Pass the name of a top-level field to sort by that field in
            ascending order. Prefix the name of the field with a minus symbol
            ("-") to sort in descending order.
        - schema:
            type: number
          in: query
          name: limit
          description: Limit number of results, default 10
        - schema:
            $ref: '#/components/schemas/WhereAttachment'
          in: query
          name: where
          description: >-
            Search for results fitting criteria, uses qs library for query
            string parsing
      responses:
        '200':
          description: Attachments Found
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Attachment'
                      success:
                        type: boolean
                  - $ref: '#/components/schemas/ListModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    WhereAttachment:
      type: object
      properties:
        and:
          type: array
          items:
            $ref: '#/components/schemas/WhereAttachment'
        or:
          type: array
          items:
            $ref: '#/components/schemas/WhereAttachment'
        id:
          type: object
          properties:
            equals:
              type: string
              description: The value must be exactly equal.
            not_equals:
              type: string
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        data:
          type: object
          properties:
            equals:
              type: object
              description: The value must be exactly equal.
            not_equals:
              type: object
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        type:
          type: object
          properties:
            equals:
              type: string
              description: The value must be exactly equal.
            not_equals:
              type: string
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        name:
          type: object
          properties:
            equals:
              type: string
              description: The value must be exactly equal.
            not_equals:
              type: string
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
    Attachment:
      $id: Attachment
      required:
        - id
        - data
        - type
        - name
      title: Attachment
      type: object
      properties:
        id:
          type: string
          description: Attachment is uniquely identified by id
        data:
          type: object
          description: Attachment has Data
        type:
          type: string
          minLength: 1
          description: Attachment has Attachment Type
        name:
          type: string
          description: Attachment has Name
    ListModel:
      properties:
        page:
          type: number
          description: Current page number
          examples:
            - 2
        nextPage:
          type: number
          nullable: true
          description: '`number` of next page, `null` if it doesn''t exist'
          examples:
            - 3
        prevPage:
          type: number
          nullable: true
          description: '`number` of previous page, `null` if it doesn''t exist'
          examples:
            - 1
        totalPages:
          type: number
          description: Total pages available, based upon the `limit`
          examples:
            - 3
        totalCount:
          type: number
          description: Total available records within the database
          examples:
            - 25
        limit:
          type: number
          description: Limit query parameter, defaults to `10`
          examples:
            - 10
        pagingCounter:
          type: number
          description: '`number` of the first record on the current page'
          examples:
            - 11
        hasPrevPage:
          type: boolean
          description: '`true/false` if previous page exists'
          examples:
            - true
        hasNextPage:
          type: boolean
          description: '`true/false` if next page exists'
          examples:
            - true
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean

````