# Create an identity document

Creates a new identity document.

Endpoint: POST /v1alpha/documents
Version: v1alpha
Security: oauth2_client_credentials, oauth2_authorization_code

## Query parameters:

  - `documentId` (string)
    Optional. The ID to use for the document, which will become the final
 component of the document's resource name. This value should be 4-63
 characters, and valid characters are /a-z-/.

## Request fields (application/json):

  - `body` (au_medicare_card (object) or birth_certificate (object) or drivers_licence (object) or passport (object) or visa (object)) — one of:
    - au_medicare_card:
      - `name` (string)
        (IDENTIFIER) The resource name of the document.
 Format: documents/{document}
      - `type` (string, required)
        Enum: "DOCUMENT_TYPE_UNSPECIFIED", "DRIVERS_LICENCE", "PASSPORT", "AU_MEDICARE_CARD", "VISA", "BIRTH_CERTIFICATE"
      - `entity` (string)
        (OPTIONAL) Optional. The entity this document belongs to.
 Format: entities/{entity}
      - `auMedicareCard` (object, required)
      - `auMedicareCard.cardNumber` (string, required)
        The number shown on the Medicare card.
      - `auMedicareCard.individualReferenceNumber` (integer)
        (OPTIONAL) The individual's reference number on the card (1–4).
      - `auMedicareCard.birthDate` (object)
        (OPTIONAL) The individual's date of birth.
      - `auMedicareCard.birthDate.year` (integer)
        Year of the date. Must be from 1 to 9999, or 0 to specify a date without
 a year.
      - `auMedicareCard.birthDate.month` (integer)
        Month of a year. Must be from 1 to 12, or 0 to specify a year without a
 month and day.
      - `auMedicareCard.birthDate.day` (integer)
        Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
 to specify a year by itself or a year and month where the day isn't
 significant.
      - `auMedicareCard.cardType` (string)
        (OPTIONAL) The type of Medicare card (e.g. green, blue, or yellow).
        Enum: "CARD_TYPE_UNSPECIFIED", "GREEN", "BLUE", "YELLOW"
      - `auMedicareCard.fullName1` (string)
        (OPTIONAL) Full name of the primary cardholder (line 1).
      - `auMedicareCard.fullName2` (string)
        (OPTIONAL) Optional. Full name of the second cardholder (line 2).
      - `auMedicareCard.fullName3` (string)
        (OPTIONAL) Optional. Full name of the third cardholder (line 3).
      - `auMedicareCard.fullName4` (string)
        (OPTIONAL) Optional. Full name of the fourth cardholder (line 4).
      - `auMedicareCard.expiryDate` (object)
        (OPTIONAL) The expiry date of the Medicare card.
      - `auMedicareCard.cardExpiry` (object)
        (OPTIONAL) Deprecated: Use expiry_date for consistency with other document types.
 The expiry date of the Medicare card.
    - birth_certificate:
      - `name` (string)
        (IDENTIFIER) The resource name of the document.
 Format: documents/{document}
      - `type` (string, required)
        Enum: same as `type` in "au_medicare_card" (6 values)
      - `entity` (string)
        (OPTIONAL) Optional. The entity this document belongs to.
 Format: entities/{entity}
      - `birthCertificate` (object, required)
        birth_certificate.has_registration_date_or_year // a registration date or registration year must be provided
birth_certificate.require_au_fields_for_au // AU specific fields must be provided only for AU-issued document
        - `registrationNumber` (string, required)
          The registration number shown on the birth certificate.
        - `givenName` (string)
          (OPTIONAL) The individual's given name as it appears on the certificate.
        - `middleName` (string)
          (OPTIONAL) Optional. The individual's middle name as it appears on the certificate.
        - `familyName` (string)
          (OPTIONAL) The individual's family name as it appears on the certificate.
        - `birthDate` (object)
          (OPTIONAL) The individual's date of birth.
        - `birthDate.year` (integer)
          Year of the date. Must be from 1 to 9999, or 0 to specify a date without
 a year.
        - `birthDate.month` (integer)
          Month of a year. Must be from 1 to 12, or 0 to specify a year without a
 month and day.
        - `birthDate.day` (integer)
          Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
 to specify a year by itself or a year and month where the day isn't
 significant.
        - `issuingCountry` (string, required)
          ISO 3166-1 alpha-2 country code of the issuing authority.
        - `registrationDate` (object)
          (OPTIONAL) Optional. The date the birth was registered.
 Must be provided if registration year is not provided.
        - `registrationYear` (integer)
          (OPTIONAL) Optional. The year the birth was registered (e.g. 1985). Provided when
 only the year is known rather than the full registration date.
 Must be provided if full registration date is not provided.
        - `auBirthCertificate` (object, required)
        - `auBirthCertificate.issuingState` (string)
          (OPTIONAL) State or territory code of the issuing authority (e.g. "NSW").
        - `auBirthCertificate.certificateNumber` (string)
          (OPTIONAL) Optional. The certificate number (distinct from the registration number).
    - drivers_licence:
      - `name` (string)
        (IDENTIFIER) The resource name of the document.
 Format: documents/{document}
      - `type` (string, required)
        Enum: same as `type` in "au_medicare_card" (6 values)
      - `entity` (string)
        (OPTIONAL) Optional. The entity this document belongs to.
 Format: entities/{entity}
      - `driversLicence` (object, required)
        drivers_licence.require_au_fields_for_au // AU specific fields must be provided only for AU-issued document
        - `licenceNumber` (string, required)
          The number shown on the licence.
        - `givenName` (string)
          (OPTIONAL) The individual's given name as it appears on the licence.
        - `middleName` (string)
          (OPTIONAL) Optional. The individual's middle name as it appears on the licence.
        - `familyName` (string)
          (OPTIONAL) The individual's family name as it appears on the licence.
        - `birthDate` (object)
          (OPTIONAL) The individual's date of birth.
        - `birthDate.year` (integer)
          Year of the date. Must be from 1 to 9999, or 0 to specify a date without
 a year.
        - `birthDate.month` (integer)
          Month of a year. Must be from 1 to 12, or 0 to specify a year without a
 month and day.
        - `birthDate.day` (integer)
          Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
 to specify a year by itself or a year and month where the day isn't
 significant.
        - `issuingCountry` (string, required)
          ISO 3166-1 alpha-2 country code of the issuing authority.
        - `issuedDate` (object)
          (OPTIONAL) The date the licence was issued.
        - `expiryDate` (object)
          (OPTIONAL) The expiry date of the licence.
        - `auDriversLicence` (object, required)
        - `auDriversLicence.cardNumber` (string)
          (OPTIONAL) The card number printed on the licence
 (typically on the back) - distinct from the licence number.
        - `auDriversLicence.issuingState` (string)
          (OPTIONAL) State, province, territory, or other subdivision code of the
 issuing authority (e.g. "NSW").
    - passport:
      - `name` (string)
        (IDENTIFIER) The resource name of the document.
 Format: documents/{document}
      - `type` (string, required)
        Enum: same as `type` in "au_medicare_card" (6 values)
      - `entity` (string)
        (OPTIONAL) Optional. The entity this document belongs to.
 Format: entities/{entity}
      - `passport` (object, required)
      - `passport.passportNumber` (string, required)
        The number shown on the passport.
      - `passport.givenName` (string)
        (OPTIONAL) The individual's given name as it appears on the passport.
      - `passport.middleName` (string)
        (OPTIONAL) Optional. The individual's middle name as it appears on the passport.
      - `passport.familyName` (string)
        (OPTIONAL) The individual's family name as it appears on the passport.
      - `passport.gender` (string)
        (OPTIONAL) The gender of the passport holder, as a single character "M", "F", or "X".
      - `passport.birthDate` (object)
        (OPTIONAL) The individual's date of birth.
      - `passport.birthDate.year` (integer)
        Year of the date. Must be from 1 to 9999, or 0 to specify a date without
 a year.
      - `passport.birthDate.month` (integer)
        Month of a year. Must be from 1 to 12, or 0 to specify a year without a
 month and day.
      - `passport.birthDate.day` (integer)
        Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
 to specify a year by itself or a year and month where the day isn't
 significant.
      - `passport.expiryDate` (object)
        (OPTIONAL) The expiry date of the passport.
      - `passport.issuingCountry` (string, required)
        ISO 3166-1 alpha-2 country code of the issuing authority.
      - `passport.issuedDate` (object)
        (OPTIONAL) The date the passport was issued.
      - `passport.birthPlace` (string)
        (OPTIONAL) Optional. The place of birth of the passport holder.
    - visa:
      - `name` (string)
        (IDENTIFIER) The resource name of the document.
 Format: documents/{document}
      - `type` (string, required)
        Enum: same as `type` in "au_medicare_card" (6 values)
      - `entity` (string)
        (OPTIONAL) Optional. The entity this document belongs to.
 Format: entities/{entity}
      - `visa` (object, required)
        visa.require_au_fields_for_au // AU specific fields must be provided only for AU-issued document
        - `visaNumber` (string, required)
          The number shown on the visa.
        - `givenName` (string)
          (OPTIONAL) The individual's given name as it appears on the visa.
        - `middleName` (string)
          (OPTIONAL) Optional. The individual's middle name as it appears on the visa.
        - `familyName` (string)
          (OPTIONAL) The individual's family name as it appears on the visa.
        - `birthDate` (object)
          (OPTIONAL) The individual's date of birth.
        - `birthDate.year` (integer)
          Year of the date. Must be from 1 to 9999, or 0 to specify a date without
 a year.
        - `birthDate.month` (integer)
          Month of a year. Must be from 1 to 12, or 0 to specify a year without a
 month and day.
        - `birthDate.day` (integer)
          Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
 to specify a year by itself or a year and month where the day isn't
 significant.
        - `gender` (string)
          (OPTIONAL) The gender of the passport holder, as a single character "M", "F", or "X".
        - `issuingCountry` (string, required)
          ISO 3166-1 alpha-2 country code of the authority issuing the visa.
        - `expiryDate` (object)
          (OPTIONAL) The expiry date of the visa.
        - `auVisa` (object, required)
        - `auVisa.passportNumber` (string)
          (OPTIONAL) The passport number associated with the visa.
        - `auVisa.passportIssuingCountry` (string)
          (OPTIONAL) ISO 3166-1 alpha-2 country code of the passport used to obtain
 this visa.


