---
title: "getDocument"
url: "https://developers.zinnia.com/apis/documents-0-3-0/versions/43d1ee7b-44e7-4303-b0cd-ca813c63b625/operations/getDocument"
---

> Full API specification: https://developers.zinnia.com/apis/documents-0-3-0/versions/43d1ee7b-44e7-4303-b0cd-ca813c63b625.md

# getDocument

`GET` `/document/v2/documents/{documentId}`

Operation ID: `getDocument`

this is an endpoint to get a specific documents metadata

## Path parameters

- `documentId` (string, required) - Unique number assigned to the document

## Query parameters

- `docType` (string, required) - Type of the document
- `source` (string, optional) - Source of the document
- `clientCode` (string, optional) - Carrier code of the document

## Header parameters

- `Authorization` (string, required) - This will be passed as Bearer plus "token" as generated by above token API.

## Responses

- `200` - OK
- `400` - Bad Request
- `401` - Unauthorized
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Enterprise Documents API
  version: 3.0.0
servers:
  - url: https://dev.api.zinnia.io
    description: Dev Environment
  - url: https://qa.api.zinnia.io
    description: QA Environment
  - url: https://uat.api.zinnia.io
    description: UAT Environment
  - url: https://api.zinnia.io
    description: PROD Environment
paths:
  /document/v2/documents/{documentId}:
    get:
      operationId: getDocument
      summary: ""
      description: this is an endpoint to get a specific documents metadata
      parameters:
        - name: Authorization
          required: true
          in: header
          schema:
            type: string
          description: This will be passed as Bearer plus "token" as generated by above
            token API.
          example: Bearer eykjsfjfjasdasdad
        - name: documentId
          required: true
          in: path
          schema:
            type: string
          description: Unique number assigned to the document
          example: "1234567890"
        - name: docType
          required: true
          in: query
          schema:
            type: string
          description: Type of the document
          example: NB Application
        - name: source
          required: false
          in: query
          schema:
            type: string
          description: Source of the document
          example: correspondence
        - name: clientCode
          required: false
          in: query
          schema:
            type: string
          description: Carrier code of the document
          example: EVGL
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Document"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InlineResponse400"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InlineResponse401"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InlineResponse404"
      tags:
        - Documents V2
      security:
        - Auth0: []
security:
  - Auth0: []
components:
  schemas:
    Document:
      type: object
      properties:
        clientInstitution:
          type: string
        lob:
          type: string
        contract:
          type: string
        agentNumber:
          type: string
        externalId:
          type: string
        documentNumber:
          type: string
        processCompanyCode:
          type: string
        contractStatusCode:
          type: string
        system:
          type: string
        productLine:
          type: string
        productName:
          type: string
        productCompanyCode:
          type: string
        ssNTaxId:
          type: string
        caseId:
          type: string
        batchId:
          type: string
        route:
          type: string
        source:
          type: string
        sysMailToAddress:
          type: string
        sysMailFromAddress:
          type: string
        dateReceived:
          type: string
        onBaseDt:
          type: string
        queueName:
          type: string
        transactionType:
          type: string
        sysDocumentHandle:
          type: string
        agentTaxId:
          type: string
        documentTypeGroup:
          type: string
        distributionChannel:
          type: string
        businessUnit:
          type: string
        productCategory:
          type: string
        deliveryMethod:
          type: string
          enum:
            - Email
            - Fax
            - Mail
      required:
        - clientInstitution
        - lob
        - contract
        - agentNumber
        - externalId
        - documentNumber
        - processCompanyCode
        - contractStatusCode
        - system
        - productLine
        - productName
        - productCompanyCode
        - ssNTaxId
        - caseId
        - batchId
        - route
        - source
        - sysMailToAddress
        - sysMailFromAddress
        - dateReceived
        - onBaseDt
        - queueName
        - transactionType
        - sysDocumentHandle
        - agentTaxId
        - documentTypeGroup
        - distributionChannel
        - businessUnit
        - productCategory
        - deliveryMethod
    InlineResponse400:
      type: object
      properties:
        xCorrelationId:
          type: string
        status:
          type: number
        errorDesc:
          type: string
        errorDetailedDesc:
          type: string
      required:
        - xCorrelationId
        - status
        - errorDesc
        - errorDetailedDesc
    InlineResponse401:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    InlineResponse404:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  securitySchemes:
    Auth0:
      type: openIdConnect
      openIdConnectUrl: https://login.zinnia.com/.well-known/openid-configuration
      x-kong-security-openid-connect:
        config:
          run_on_preflight: true
          scopes_claim:
            - https://api.zinnia.io/permissions
          audience_claim:
            - aud
          audience_required:
            - https://api.zinnia.io
          client_id:
            - bGOIRPRq2ZnjCujDXC7ikwR5ez7VH5GZ
          auth_methods:
            - bearer
          scopes: []
        enabled: true
        protocols:
          - grpc
          - grpcs
          - http
          - https
```
