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

# get case by externalCode



## OpenAPI

````yaml https://integration.teceo.co/aos get /v1/cases/by/externalCode/{externalCode}
openapi: 3.0.0
info:
  title: teceo brand integrator API
  description: integrate your brand with teceo
  version: '1.0'
  contact: {}
servers:
  - url: /
security: []
tags: []
paths:
  /v1/cases/by/externalCode/{externalCode}:
    get:
      tags:
        - 'Cases:'
      summary: get case by externalCode
      operationId: CaseController_getCase_v1
      parameters:
        - name: externalCode
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: get case by externalCode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseDTO'
        '400':
          description: >-
            response status code indicates that the server cannot or will not
            process the request due to something that is perceived to be a
            client error
        '403':
          description: >-
            client error status response code indicates that the server
            understood the request but refuses to authorize it
        '404':
          description: >-
            client error response code indicates that the server can't find the
            requested resource
      security:
        - ApiKey: []
components:
  schemas:
    CaseDTO:
      type: object
      properties:
        id:
          type: string
        externalCode:
          type: string
        typeCode:
          type: number
        author:
          $ref: '#/components/schemas/CaseAuthorDTO'
        customerId:
          type: string
        customerCpfCnpj:
          type: string
        subject:
          type: string
        description:
          type: string
        customData:
          $ref: '#/components/schemas/CaseCustomDataDTO'
        caseType:
          $ref: '#/components/schemas/CaseTypeDTO'
        status:
          type: string
        history:
          type: array
          items:
            $ref: '#/components/schemas/CaseHistoryItemDTO'
      required:
        - id
        - externalCode
        - typeCode
        - author
        - customerId
        - customerCpfCnpj
        - subject
        - description
        - customData
        - caseType
        - status
        - history
    CaseAuthorDTO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        surname:
          type: string
        email:
          type: string
      required:
        - id
        - name
        - surname
        - email
    CaseCustomDataDTO:
      type: object
      properties:
        caseDevolution:
          $ref: '#/components/schemas/CaseDevolutionDTO'
        caseProducts:
          type: array
          items:
            $ref: '#/components/schemas/CaseProductDTO'
      required:
        - caseDevolution
        - caseProducts
    CaseTypeDTO:
      type: object
      properties:
        code:
          type: number
        name:
          type: string
      required:
        - code
        - name
    CaseHistoryItemDTO:
      type: object
      properties:
        statusBase:
          type: string
          enum:
            - new
            - open
            - pending
            - closed
        status:
          type: string
        createdAt:
          format: date-time
          type: string
        user:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CaseHistoryUserDTO'
      required:
        - statusBase
        - status
        - createdAt
        - user
    CaseDevolutionDTO:
      type: object
      properties:
        devolutionInvoiceNumber:
          type: string
        trackingCode:
          type: string
        caseDevolutionInvoices:
          type: array
          items:
            $ref: '#/components/schemas/CaseDevolutionInvoiceDTO'
        customData:
          type: object
          additionalProperties: true
      required:
        - devolutionInvoiceNumber
        - trackingCode
        - customData
    CaseProductDTO:
      type: object
      properties:
        id:
          type: string
        devolutionInfo:
          $ref: '#/components/schemas/CaseProductDevolutionDTO'
        unitValue:
          type: number
        quantity:
          type: number
        productCode:
          type: string
        productColorCode:
          type: string
        productSize:
          type: string
        productPhotos:
          type: array
          items:
            $ref: '#/components/schemas/CaseProductPhotoDTO'
        customData:
          type: object
          additionalProperties: true
          description: the values of this field change according to the brand case config
      required:
        - id
        - devolutionInfo
        - unitValue
        - quantity
        - productCode
        - productColorCode
        - productSize
        - customData
    CaseHistoryUserDTO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
      required:
        - id
        - name
        - email
    CaseDevolutionInvoiceDTO:
      type: object
      properties:
        id:
          type: string
        fileUrl:
          type: string
      required:
        - id
        - fileUrl
    CaseProductDevolutionDTO:
      type: object
      properties:
        defectCode:
          type: number
        reasonCode:
          type: number
        invoiceNumber:
          type: string
        invoiceEmissionDate:
          format: date-time
          type: string
        soldToConsumer:
          type: boolean
        consumerSale:
          $ref: '#/components/schemas/CaseProductConsumerSaleDTO'
      required:
        - defectCode
        - reasonCode
        - invoiceNumber
        - invoiceEmissionDate
        - soldToConsumer
        - consumerSale
    CaseProductPhotoDTO:
      type: object
      properties:
        id:
          type: string
        imageUrl:
          type: string
        type:
          type: string
          enum:
            - IMAGE
            - VIDEO
            - PDF
            - FILE
          example: IMAGE | VIDEO
      required:
        - id
        - imageUrl
        - type
    CaseProductConsumerSaleDTO:
      type: object
      properties:
        customerName:
          type: string
        cpf:
          type: string
        purchaseDate:
          format: date-time
          type: string
        orderNumber:
          type: string
      required:
        - customerName
        - cpf
        - purchaseDate
        - orderNumber
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: unique identifier access key. each brand has it own unique key.

````

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