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

# (AUS Only) Make an existing entity (otherId) a direct associated entity of a parent organisation (entityId), or update an existing association.

> Update an entity with the provided details, then associated it with a parent organisation, or update any existing association.

To use an existing entity, and not update it, either omit the entity field, use null, or just provide an entity object that
contains only the entity ID, which must match the one given in the request URL.

At least the entity name (family name for individuals, registered name for organisations) must be present in the entity after
any update.

The referenced parent entity must be of type ORGANISATION and an ownership query must have been previously completed.

At least one of role or percentage held must be in the request. If either is null or omitted, then any existing details will
be retained. If either detail is given, the it will be replaced, not merged.




## OpenAPI

````yaml POST /business/{entityId}/associateEntity/{otherId}
openapi: 3.0.0
info:
  description: >
    ------  

    This API allows developers to integrate the Frankie Financial Compliance
    Utility into their applications. The API allows:
      - Checking name, address, date of birth against national databases
      - Validating Australian driver's licences, passports, medicare, visas and other Australian national ID documents
      - Validating Australian electricity bills
      - Validating NZ driver's licences
      - Validating Chinese bank cards and national ID card
      - Validating International passports and national ID documents
      - PEP, Sanctions, Watchlist and adverse media checking
      - Australian visa checks 
      - Fraud list and fraud background checks
      - ID validation and selfie check comparisons.
      
    ------  
     
    KYB specific services

      - Query organisation ownership
      - Perform KYC & AML checks on shareholders, beneficial owners and office bearers.
      - Query credit score and credit reports
      - International company searches
      - International company profiles
      
    ------  

    The full version of this documentation along with supplemental articles can
    be found here:
      - https://docs.frankieone.com/

    ------

    Sandbox base URL is:
      - https://api.uat.frankie.one/compliance/v1.2
      
      - All calls are the same as production, only with test data. You can download the latest test data here: https://docs.frankieone.com/docs/test-data

      - Full Swagger definition, along with test data for playing in the sandbox can be obtained once initial commercial discussions have commenced.

      - Production and optional UAT access will be opened up only to those with a signed commercial contract.
      
    ------  

    Contact us at hello@frankiefinancial.com to speak with a sales rep about
    issuing a Customer ID and Sandbox api key.
  title: Frankie Financial API
  contact:
    email: help@frankieone.com
  version: 1.15.3
servers:
  - url: https://api.uat.frankie.one/compliance/v1.2
security:
  - api_key: []
tags:
  - description: >-
      Service status functions you can use to make sure things are up and
      running.
    name: Status
  - description: Operations on specific ID documents, specific to an entity (people).
    name: Document
  - description: Operations on specific entities (people / companies / etc)
    name: Entity
  - description: Operations on entities that are set to type ORGANISATION
    name: Business
  - description: >-
      These are callback/webhook functions. If you've requested a callback, this
      will be what is sent to you. You do not need to implement these as a
      client, but you do need to be able to accept them as a server.
    name: Push Notification
  - description: Functions used for retrieving past results
    name: Retrieve
  - description: Operations on entities to set specific flags and states.
    name: Flag
paths:
  /business/{entityId}/associateEntity/{otherId}:
    post:
      tags:
        - Business
      summary: >-
        (AUS Only) Make an existing entity (otherId) a direct associated entity
        of a parent organisation (entityId), or update an existing association.
      description: >
        Update an entity with the provided details, then associated it with a
        parent organisation, or update any existing association.


        To use an existing entity, and not update it, either omit the entity
        field, use null, or just provide an entity object that

        contains only the entity ID, which must match the one given in the
        request URL.


        At least the entity name (family name for individuals, registered name
        for organisations) must be present in the entity after

        any update.


        The referenced parent entity must be of type ORGANISATION and an
        ownership query must have been previously completed.


        At least one of role or percentage held must be in the request. If
        either is null or omitted, then any existing details will

        be retained. If either detail is given, the it will be replaced, not
        merged.
      operationId: UpdateAssociateEntity
      parameters:
        - description: >
            Customer ID issued by Frankie Financial. This will never change.
            Your API key, which is mapped to this identity, will change over
            time.
          name: X-Frankie-CustomerID
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - description: >
            If, as a Frankie Customer, you are acting on behalf of your own
            customers, then you can populate this field with a Frankie-assigned
            ID.


            Note: If using a CustomerChildID, you will also need a separate
            api_key for each child.


            Any documents, checks, entities that are created when this field has
            been populated will now be tied to this CustomerID + CustomerChildID
            combination. Just as Customers cannot see data created by other
            Customers, so too a Customer's Children will not be able to see each
            other's data.


            A Customer can see the documents/entities and checks of all their
            Children.
          name: X-Frankie-CustomerChildID
          in: header
          schema:
            type: string
            format: uuid
        - description: >
            Open string that can be used to define the "channel" the request
            comes in from.

            It can potentially be used in routing and risk calculations upon
            request.

            Default values that can be used are:
              - api
              - portal
              - smartui

            Any alphanumeric string is supported though. Anything over 64
            characters will be truncated.
          name: X-Frankie-Channel
          in: header
          schema:
            type: string
        - description: >-
            The entityId returned previously from an earlier call to /check or
            /entity
          name: entityId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: >-
            An entityId returned previously from an earlier call to /check or
            /entity. Used when an operation requires two entityIds
          name: otherId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StaticEntityAssociationRequest'
        description: >
          The role and optional updated entity details for the association to be
          created.
        required: true
      responses:
        '200':
          description: >-
            The request was valid and was successfully processed. The entity
            association has been updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticEntityAssociationResponse'
        '400':
          description: >-
            Bad request. One or more request fields is either missing or
            incorrect. Details are in the error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '401':
          description: >
            The request has failed an authorisation check. This can happen for a
            variety of reasons, such as an invalid or expired API key, or
            invalid Customer/CustomerChildIDs. 

            * NOTE: This does not include attempts to read/write data you don't
            have access to - that's a 404 error (as we don't want to leak
            information through guessing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '404':
          description: >-
            Cannot return response. In the case of a query, or reference to a
            specific entity/check/etc, it means that the requested item was not
            found, or you don't have access to it. Please check your query
            before trying again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '405':
          description: >-
            A request to POST an update to an object was not allowed due to it's
            state. This may indicate an already completed check, or a document
            that has been processed. You need to create a new document/check if
            you wish to update the object in question.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '429':
          description: >-
            The API client is making too many concurrent requests, and some are
            being throttled. Throttled requests can be retried after a short
            delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '500':
          description: Unexpected error. Something went wrong during the checking process.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '503':
          description: >-
            All of the ID sources configured by the customer are unavailable, or
            there is no available document processor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
components:
  schemas:
    StaticEntityAssociationRequest:
      description: >
        A request to create or update an association between an entity and a
        parent organisation.
      type: object
      properties:
        addedBy:
          description: >
            Identity of the party that requested this association. For requests
            via the Frankie portal this

            will default to the portal username. Otherwise, if not given, this
            will be your company name.
          type: string
        entity:
          $ref: '#/components/schemas/EntityObject'
        percentageHeld:
          description: >
            The details of the entity's ownership of the organisation.


            The percentage held is optional, but at least one of role and
            percentage held must be included. If the percentage held

            is null or omitted, then any existing ownership for the entity will
            be retained. If the percentage held is given, then

            the percentage held for the entity will be replaced, not merged.


            The currently assigned ownership percentages can be found in the
            business ownership query results, in the ownership details for the
            organisation, in the

            staticBeneficialOwners array.
          type: object
          properties:
            beneficially:
              type: number
            jointly:
              type: number
            nonBeneficially:
              type: number
        roles:
          description: >
            The roles are optional in an association request, but at least one
            of roles and percentage held must be included. If the roles object
            is omitted, then

            any existing roles for the entity will be retained. To delete all
            roles for the entity use an empty roles array ([]). When updating
            roles, all the current

            roles for the entity must be included. They can be obtained from the
            business ownership query results, by going through the officers
            array in the ownership

            details for the organisation and extracting records with the ID of
            the entity and a non-blank 'addedBy' field.
          type: array
          items:
            $ref: '#/components/schemas/StaticEntityAssociationRole'
          x-omitempty: false
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: StaticEntityAssociationRequest
    StaticEntityAssociationResponse:
      description: |
        The positive result of an entity association change request.
      type: object
      properties:
        entity:
          $ref: '#/components/schemas/EntityObject'
        percentageHeld:
          $ref: '#/components/schemas/BeneficialOwnerObjectPercentageHeld'
        requestId:
          $ref: '#/components/schemas/RequestIDObject'
        roles:
          description: The current entity association roles.
          type: array
          items:
            $ref: '#/components/schemas/StaticEntityAssociationRole'
          x-omitempty: true
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: StaticEntityAssociationResponse
    ErrorObject:
      type: object
      required:
        - requestId
        - errorCode
        - errorMsg
      properties:
        commit:
          description: Server version indication
          type: string
          example: 2af478ed
        errorCode:
          description: Frankie error code
          type: string
          example: CORE-5990
        errorMsg:
          description: Will describe the error
          type: string
          example: Everything went kaflooey. Stay clam.
        httpStatusCode:
          description: |
            Deprecated:
            HTTP status code. Same as that which is passed back in the header.
          type: integer
          example: 501
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObjectIssues'
          x-omitempty: true
        requestId:
          $ref: '#/components/schemas/RequestIDObject'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: ErrorObject
    EntityObject:
      description: |
        Describes all of the data being used to verify an entity.
      type: object
      properties:
        addresses:
          description: Collection of address objects.
          type: array
          items:
            $ref: '#/components/schemas/AddressObject'
          x-omitempty: true
        dateOfBirth:
          $ref: '#/components/schemas/DOBObject'
        entityId:
          description: >
            When an entity is first created, it is assigned an ID. When updating
            an entity, make sure you set the entityId

            One exception to this is when an entity is created from a document
            object. It is expected that this object would be passed into a
            /check or /entity call to set it.
          type: string
          format: uuid
          example: 84a9a860-68ae-4d7d-9a53-54a1116d5051
        entityProfile:
          description: >
            If the entity is using the new profiles feature, then their profile
            name will be found here.


            Note: If setting a profile, you must ensure that the profile matches
            a known configuration.


            See here for valid values:
              https://docs.frankieone.com/docs/test-entity-verification
          type: string
          x-omitempty: true
        entityType:
          $ref: '#/components/schemas/enumEntityType'
        extraData:
          description: >
            Set of key-value pairs that provide arbitrary additional
            type-specific data. You can use these fields to store external IDs,
            or other non-identity related items if you need to.

            If updating an existing entity, then existing values with the same
            name will be overwritten. New values will be added.


            See here for more information about possible values you can use:
              https://docs.frankieone.com/docs/key-value-pairs
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePairObject'
          x-omitempty: true
        flags:
          description: >
            Used to set additional information flags with regards to this entity
            and for ongoing processing.


            Flags might include having the entity (not) participate in regular
            pep/sanctions screening

            Others will follow over time.
          type: array
          items:
            $ref: '#/components/schemas/EntityFlagObject'
          x-omitempty: true
        gender:
          $ref: '#/components/schemas/enumGender'
        identityDocs:
          description: Collection of identity documents (photos, scans, selfies, etc)
          type: array
          items:
            $ref: '#/components/schemas/IdentityDocumentObject'
          x-omitempty: true
        name:
          $ref: '#/components/schemas/PersonalNameObject'
        organisationData:
          $ref: '#/components/schemas/OrganisationDataObject'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EntityObject
    StaticEntityAssociationRole:
      description: >
        A role describing the association between an entity and a parent
        organisation
      type: object
      properties:
        type:
          description: >
            A short type codes for the role, f.ex "DR" (Director), "SR"
            (Secretary), "OTH" (Other).

            There can only be one association role of each type for each
            associated entity in an organisation. The types must be between from
            two to four uppercase letters and digits.

            Note that some types (including "DR" and "SR") have special meanings
            when it comes to reporting, identity checks and risk calculations,
            so use them with caution.
          type: string
        typeDescription:
          description: >
            A description of the type of association between the entity and the
            organisation. The description must not be blank. The description for
            each type can include multiple titles if required.


            "roles": [
                {
                    "type": "DR",
                    "description": "CEO & CFO"
                },
                    "type": "OTH",
                    "description": "Wunderkind"
                }
            ]
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: StaticEntityAssociationRole
    BeneficialOwnerObjectPercentageHeld:
      type: object
      properties:
        beneficially:
          type: number
        isBeneficialNearZero:
          description: Indicates if the beneficially held percentage is negligible.
          type: boolean
        isContainingJointOwnership:
          description: |
            Indicates if the percentage held contains a jointly held percentage.
          type: boolean
        isNonBeneficialNearZero:
          description: Indicates if the non-beneficially held percentage is negligible.
          type: boolean
        isTotalNearZero:
          description: Indicates if the total percentage is negligible.
          type: boolean
        jointly:
          type: number
        nonBeneficially:
          type: number
        total:
          type: number
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: BeneficialOwnerObjectPercentageHeld
    RequestIDObject:
      description: >
        Unique identifier for every request. Can be used for tracking down
        answers with technical support. 


        Uses the ULID format (a time-based, sortable UUID)


        Note: this will be different for every request.
      type: string
      format: ulid
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: RequestIDObject
      example: 01BFJA617JMJXEW6G7TDDXNSHX
    ErrorObjectIssues:
      type: object
      required:
        - issueLocation
      properties:
        issue:
          description: Description of the problem
          type: string
          example: Invalid format. Must be YYYY-MM-DD
        issueLocation:
          description: Will describe the field or data location of the issue
          type: string
          example: dateOfBirth
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: ErrorObjectIssues
    AddressObject:
      type: object
      required:
        - country
      properties:
        addressId:
          description: >
            As addresses are added to an entity, they're assigned an id to
            assist with tracking. 


            If you're adjusting an address, you will need to include the
            addressId so as to be able to reference it correctly in the list.
          type: string
          format: uuid
          example: 86932629-bdb4-158f-e670-741e89ff78ba
        addressType:
          $ref: '#/components/schemas/enumAddressType'
        buildingName:
          description: The name of the building, apartment block, condo, etc
          type: string
          example: Highland Tower
        careOf:
          description: >
            Individual or business name at this address if not the same as the
            name of the entity to which this address belongs.
          type: string
        country:
          description: >
            The ISO-3166-1 country. You must use the alpha3 country code (e.g.
            AUS, USA, IDR, KOR, etc) We'll convert as needed. 


            See: https://en.wikipedia.org/wiki/ISO_3166-1
          type: string
          example: AUS
        endDate:
          description: >
            The date this address was no longer used (if available). Used mostly
            with business addresses.
          type: string
          format: date
          example: '0001-01-01'
        extraData:
          description: >
            Set of key-value pairs that provide arbitrary additional
            type-specific data. This data will typically not be visible in the
            Frankie Portal.

            If updating an existing address, then existing values with the same
            name will be overwritten. New values will be added.


            See here for more information about possible values you can use:
              https://docs.frankieone.com/docs/key-value-pairs
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePairObject'
          x-omitempty: true
        longForm:
          description: >
            In some cases, the address will need to be supplied in "long form",
            such as when it is determined from a document scan, or is
            un-parsable in some way.

            The service will attempt to convert it to it's constituent parts
            where possible.


            WARNING: Use of longForm is not guaranteed to produce perfect
            results, due to the variety of potential formats. You've been
            warned. 

            Failure to break down or disambiguate the address will result in an
            error.
          type: string
          example: 42a Test Eagle Road, Testville, TST 123-TST, Testalia
        postalCode:
          description: The post code of the address.
          type: string
          example: '3000'
        region:
          description: The county, province, cantonment
          type: string
          example: MELBOURNE
        startDate:
          description: >
            The date this address first because active. Used mostly with
            business addresses.
          type: string
          format: date
          example: '2023-03-10'
        state:
          description: The state. Use local abbreviations, such as VIC(toria) or TX (Texas)
          type: string
          example: VIC
        streetName:
          description: >
            The name of the street


            This field can in fact be a bit flexible, potentially containing the
            streetNumber and streetType as well. Most services in use can work
            it out.


            If this field has been auto-populated by Google (see writeup here:


            https://docs.frankieone.com/docs/working-with-addresses

            then the bulk of the address will be in this field.


            If you can avoid it though, please try and keep things separate.
          type: string
          example: 9 ROYCE AVENUE
        streetNumber:
          description: >
            The number on the street. Generally a number, but can also be
            alphanumeric (e.g. 3A)
          type: string
          example: FLAT 27
        streetType:
          description: The street "type" - e.g. Road, St, Ave, Circuit, etc
          type: string
          example: Road
        suburb:
          description: >-
            The suburb in the town/city. Only use this if you require a suburb
            AND a town/city, otherwise, just use the "town" parameter.
          type: string
          example: Testburb
        town:
          description: The town/village/suburb/city
          type: string
          example: MELBOURNE
        unitNumber:
          description: Unit/Apartment/Flat/Suite/etc number
          type: string
          example: FLAT 27
        unstructuredLongForm:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: AddressObject
    DOBObject:
      type: object
      properties:
        country:
          description: >
            ISO-3166-1 code for the country of birth. You must use the alpha3
            country code (e.g. AUS, USA, IDR, KOR, etc) We'll convert as needed.


            See https://en.wikipedia.org/wiki/ISO_3166-1
          type: string
          example: AUS
        dateOfBirth:
          description: Date of Birth in YYYY-MM-DD format
          type: string
          format: date
          example: '1978-11-12'
        locality:
          description: >
            Place of birth other than country If locality is given, then country
            must also be provided.
          type: string
          example: Brisbane
        unstructuredDateOfBirth:
          type: string
        yearOfBirth:
          description: >-
            Year of birth or "unknown". This will be autoextracted if
            dateOfBirth is supplied.
          type: string
          example: '1978'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: DOBObject
    enumEntityType:
      description: |
        Indicates the type of an entity.
        - "INDIVIDUAL": An individual.
        - "TRUST": A trust.
        - "ORGANISATION": An organisation.
      type: string
      enum:
        - INDIVIDUAL
        - TRUST
        - ORGANISATION
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumEntityType
      example: ORGANISATION
    KeyValuePairObject:
      description: Individual key-value pair
      type: object
      properties:
        kvpKey:
          description: Name of the data
          type: string
          example: ACN
        kvpType:
          $ref: '#/components/schemas/enumKVPType'
        kvpValue:
          description: Value of the data
          type: string
          example: '406655338'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: KeyValuePairObject
    EntityFlagObject:
      description: >
        Similar to a KVP, the flag has a key (the flag you're indicating) and an
        integer value.


        Values are tied to the specific flag (see table below). Generally
        they're true (1)/false(0) indicators.

            | flag | values | Description |
            | ------- | -------- | -------- |
            | ongoing_pep | 0, 1, 2 | 0 = no, 1 = pep/sanctions, 2 = 1+media |
            |  |  |  |
      type: object
      properties:
        flag:
          description: Name of the flag
          type: string
        value:
          description: flag value.
          type: integer
          x-omitempty: false
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EntityFlagObject
    enumGender:
      description: |
        Used to indicate of the entity in question is:
        - "M"ale 
        - "F"emale
        - "U"nspecified
        - "O"ther (for want of a better option)
      type: string
      enum:
        - U
        - F
        - M
        - O
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumGender
      example: F
    IdentityDocumentObject:
      type: object
      required:
        - idType
        - country
      properties:
        country:
          description: >
            The ISO-3166-alpha3 country code of the issuing national. Once set,
            this cannot be changed.


            See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes for
            more
          type: string
          example: AUS
        createdFromScan:
          description: >
            This document's data was initially created from scanned and
            processed images. The value cannot be set manually and any attempt
            to do so will just be ignored.
          type: boolean
          readOnly: true
          example: true
        docScan:
          description: >
            Collection of one or more objects that describe scan(s) that need to
            be put through OCR or facial recognition. These should all be from
            the one ID document, such as front/back, or page 1, 2, 3, etc. You
            can upload multiple scans in a single call, or in multiple calls. 

              Note: if you do upload over multiple calls, make sure you include the documentId (see above), and indicate that this is happening with a "more_data" checkAction
          type: array
          items:
            $ref: '#/components/schemas/ScannedDocumentObject'
          x-omitempty: true
        documentId:
          description: >
            When an ID document is created/uploaded, it is assigned a
            documentId. You'll see this in a successful response or successfully
            accepted response. This can then be referenced in subsequent calls
            if you're uploading more/updated data.
          type: string
          format: uuid
          example: 84a9a860-68ae-4d7d-9a53-54a1116d5051
        documentStatus:
          $ref: '#/components/schemas/enumDocumentStatus'
        extraData:
          description: >
            Set of key-value pairs that provide ID type-specific data. If
            updating an existing document, then existing values with the same
            name will be overwritten. New values will be added.


            If this document is scanned through OCR or similar processes, then
            extracted data will be found here (Some may be used to populate
            other fields like idNumber and idExpiry as well)
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePairObject'
          x-omitempty: true
        idExpiry:
          description: The expiry date of the document (if known) in YYYY-MM-DD format.
          type: string
          format: date
          example: '2020-02-01'
        idIssued:
          description: The issued date of the document (if known) in YYYY-MM-DD format.
          type: string
          format: date
          example: '1972-11-04'
        idNumber:
          description: The ID number of the document (if known).
          type: string
          example: '123456789'
        idSubType:
          description: The sub-type of identity document. Very document specific.
          type: string
        idType:
          $ref: '#/components/schemas/enumIdType'
        manuallyModified:
          description: >
            If this document was originally populated from scanned data, then
            manually adjusted (e.g. if the scan's results weren't 100% correct
            or data was missing), then this will be set to true. The value
            cannot be set manually and any attempt to do so will just be
            ignored.
          type: boolean
          readOnly: true
          example: 'false'
        region:
          description: |
            Regional variant of the ID (e.g. VIC drivers licence)

            You should always use the local abbreviation for this.
            E.g.
              - VIC for The Australian state of Victoria
              - MA for the US state of Massachusetts
              - etc
          type: string
          example: VIC
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: IdentityDocumentObject
    PersonalNameObject:
      type: object
      required:
        - familyName
      properties:
        displayName:
          description: >
            In some cases, the name will need to be supplied in "long form",
            such as when it is determined from a document scan, or is
            un-parsable in some way.

            The service will attempt to convert it to it's constituent parts
            where possible.
          type: string
          example: Jane Cecily Smith
        familyName:
          description: Family name / Surname of the individual.
          type: string
          example: Smith
        givenName:
          description: First / Given name
          type: string
          example: Jane
        honourific:
          description: Mr/Ms/Dr/Dame/Dato/etc.
          type: string
          example: Duchess
        middleName:
          description: Middle name(s) / Initials
          type: string
          example: Cecily
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: PersonalNameObject
    OrganisationDataObject:
      description: |
        Organisation details for entities. Returned from an ASIC report.
      type: object
      properties:
        adverseCreditDataPresent:
          type: boolean
        aliases:
          type: array
          items:
            type: string
          x-omitempty: true
        class:
          $ref: '#/components/schemas/CodeDescription'
        contactDetails:
          $ref: '#/components/schemas/OrganisationDataObjectContactDetails'
        disclosingEntityIndicator:
          type: boolean
        extractedDate:
          type: string
          format: date
          nullable: true
        includesNonBeneficiallyHeld:
          type: boolean
        industryCodes:
          type: array
          items:
            $ref: '#/components/schemas/IndustryCodesObject'
          x-omitempty: true
        industryDeclarations:
          type: array
          items:
            $ref: '#/components/schemas/IndustryDeclarationsObject'
          x-omitempty: true
        kycCustomerType:
          type: string
        lastCheckDate:
          type: string
          format: date
        legalFormDetails:
          $ref: '#/components/schemas/OrganisationDataObjectLegalFormDetails'
        normalisedLegalStatus:
          type: string
        ownershipResolved:
          type: boolean
        registeredName:
          type: string
        registration:
          $ref: '#/components/schemas/OrganisationDataObjectRegistration'
        registries:
          $ref: '#/components/schemas/Registries'
        reviewDate:
          type: string
          format: date
          nullable: true
        shareStructure:
          type: array
          items:
            $ref: '#/components/schemas/ShareStructureObject'
          x-omitempty: true
        startDate:
          type: string
          format: date
        status:
          $ref: '#/components/schemas/CodeDescription'
        subType:
          $ref: '#/components/schemas/CodeDescription'
        subclass:
          $ref: '#/components/schemas/CodeDescription'
        type:
          $ref: '#/components/schemas/CodeDescription'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: OrganisationDataObject
    enumAddressType:
      description: >
        Used to indicate what sort address this is, such as residential,
        business, postal, etc.


        RESIDENTIAL1-4 can be used to indicate the reverse chronological order
        of addresses. 

        RESIDENTIAL or RESIDENTIAL1 is the current address

        RESIDENTIAL2 is the previous address, and so on.


        For Individual postal/mailing addresses, use POSTAL.

        For Businesses, use OFFICIAL_CORRESPONDANCE
      type: string
      enum:
        - OTHER
        - RESIDENTIAL
        - RESIDENTIAL1
        - RESIDENTIAL2
        - RESIDENTIAL3
        - RESIDENTIAL4
        - BUSINESS
        - POSTAL
        - REGISTERED_OFFICE
        - PLACE_OF_BUSINESS
        - OFFICIAL_CORRESPONDANCE
        - PLACE_OF_BIRTH
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumAddressType
      example: REGISTERED_OFFICE
    enumKVPType:
      description: >
        Used to describe the contents of the KVP data. 


        The general.* and raw.* types are pretty much what they say on the tin. 


        All raw.* fields will be base64 encoded so as to not interfere with JSON
        structuring. These are useful for returning/storing large quantities of
        data that doesn't necessarily require processing now, or may be useful
        to a calling client.


        The id.* and pii.* are used to indicate that this is data that can be
        used to create new document objects, or entities. They should also be
        treated with the utmost care and attention when it comes to securing
        them too.


        id.external can be used to capture an object's ID on an external
        service, and can potentially be searchable in the index 

        Note - This is different from a result.id.


        defunct is used to mark an existing KVP deleted when the value must be
        retained, for example for audit purposes.


        result.* are used to capture response codes and transaction IDs from
        external services


        error.* types can be used when processing a document that returns an
        error, but doesn't necessarily require a full blown error response.
      type: string
      enum:
        - defunct
        - general.string
        - general.integer
        - general.float
        - general.bool
        - general.date
        - general.datetime
        - raw.json.base64
        - raw.xml.base64
        - raw.base64
        - error.code
        - error.message
        - result.code
        - result.id
        - id.external
        - id.number.primary
        - id.number.additional
        - id.msisdn
        - id.email
        - id.device
        - pii.name.full
        - pii.name.familyname
        - pii.name.givenname
        - pii.name.middlename
        - pii.gender
        - pii.address.longform
        - pii.address.shortform
        - pii.address.street1
        - pii.address.street2
        - pii.address.postalcode
        - pii.address.town
        - pii.address.suburb
        - pii.address.region
        - pii.address.state
        - pii.address.country
        - pii.dob
        - transient.string
      example: id.external
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumKVPType
    ScannedDocumentObject:
      description: the document to be attached and optionally scanned (if supported)
      type: object
      properties:
        ScanDelete:
          description: >
            Used as a way of indicating to the service that the original scanned
            document is not to be kept after it has been processed. We will
            retain any metadata and the results of processing (where required by
            regulation or the customer), but the original file uploaded will
            eventually be remnoved once processing is complete. 


            If ScanDelete is set to true, any call with /full at the end will
            still not return the file contents, regardless of whether the file
            has been deleted yet (the deletion process is a background task that
            can take a few minutes to occur)
          type: boolean
        scanCreated:
          description: >
            The date and time the scan was created. Not the date of the scanned
            document, which should be in the idIssued attribute of the document
            that owns this scan.
          type: string
          format: date-time
          example: '2020-06-02'
        scanData:
          description: >
            Base64 encoded string of a photo or scan of an ID document to be
            verified. If supplied and of a supported type, the Frankie service
            will attempt to use OCR tech to extract the data from the scanned
            doc/image.


            In a result message, this field will be left blank, unless the
            "full" action is requested.
          type: string
          format: byte
          example: >-
            VGhpcyBpcyBzb21lIGV4YW1wbGUgZGF0YS4gV29vLCBJIGJldCB5b3UgcmVncmV0IHRoZSB0aW1lIHlvdSB3YXN0ZWQgZGVjb2RpbmcgdGhpcywgaHVoPw==
        scanDataRetrievalState:
          $ref: '#/components/schemas/enumScanDataRetrievalState'
        scanDocId:
          description: >
            When an document scan is created/uploaded, it is assigned a
            scanDocId. You'll see this in a successful response or successfully
            accepted response. This can then be referenced in subsequent calls
            if you're uploading more/updated data.
          type: string
          format: uuid
          example: 84a9a860-68ae-4d7d-9a53-54a1116d5051
        scanFilename:
          description: >
            If you're uploading a file where it's important to keep the original
            filename, then you can provide that here. Otherwise the Frankie
            service will assign an arbitrary name based on the scanDocIdand an
            extension based on the MIME type
          type: string
          example: Important Document - ID1234567.pdf
        scanMIME:
          $ref: '#/components/schemas/enumMIMEType'
        scanPageNum:
          description: >
            If uploading multiple pages - it's handy to keep a track of these.
            There is no enforcement of these numbers at all. You can have 10
            page 1's and a page 29 if you wish.
          type: integer
          minimum: 0
          example: 1
        scanSide:
          $ref: '#/components/schemas/enumScanSide'
        scanType:
          $ref: '#/components/schemas/enumScanType'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: ScannedDocumentObject
    enumDocumentStatus:
      description: >
        Current status of a document.

        - "INITIALISING": the state whilst you're uploading and updating

        - "SCAN_IN_PROGRESS": the state whilst it's being scanned. 

        - "DOC_SCANNED": the document has been scanned and data extracted as
        best as possible. It's still possible to update the details and add more
        scans if you wish.

        - "DOC_CHECKED": the document has been used as part of a check that has
        been finalised in some way. You can no longer update this document and
        any attempt will generate an error.
      type: string
      enum:
        - INITIALISING
        - SCAN_IN_PROGRESS
        - DOC_SCANNED
        - DOC_CHECKED
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumDocumentStatus
      example: DOC_SCANNED
    enumIdType:
      description: |
        Valid ID types
          - "OTHER": Generic document type. Unspecified.
          - "DRIVERS_LICENCE": Driver's licence.
          - "PASSPORT": Passport
          - "VISA": Visa document (not Visa payment card)
          - "IMMIGRATION": Immigration card
          - "NATIONAL_ID": Any national ID card
          - "TAX_ID": Any national tax identifier
          - "NATIONAL_HEALTH_ID": Any national health program ID card (e.g. Medicare, NHS)
          - "CONCESSION": State issued concession card
          - "HEALTH_CONCESSION": State issued health specific concession card
          - "SENIORS_HEALTH_CONCESSION": State issued health specific concession card for seniors
          - "PENSION": State issued pension ID
          - "MILITARY_ID": Military ID
          - "BIRTH_CERT": Birth certificate
          - "CITIZENSHIP": Citizenship certificate
          - "MARRIAGE_CERT": Marriage certificate
          - "DEATH_CERT": Death certificate
          - "NAME_CHANGE": Name chage confirmation
          - "UTILITY_BILL": Regulated utility bill, such as electricity, gas, etc
          - "BANK_STATEMENT": Bank/card statement
          - "BANK_ACCOUNT": Bank account
          - "INTENT_PROOF": A proof of intent. Generally a photo/video, or a scanned letter
          - "ATTESTATION": A document of attestation (e.g. Statutory Declaration). NOTE: these cannot be used as a supporting document
          - "SELF_IMAGE": A "selfie" used for comparisions
          - "EMAIL_ADDRESS": An email address
          - "MSISDN": A mobile phone number
          - "DEVICE": A device ID
          - "VEHICLE_REGISTRATION": Vehicle registration number
          - "PROOF_OF_ADDRESS": Can be any type of document that provides a proof of address
          - "HOUSE_REGISTRATION": House registration document
          - "YELLOW_HOUSE_REGISTRATION": Yellow House Registration Thor Ror 13
          - "WORK_PERMIT": Work permit
          - "EMPLOYMENT_CERTIFICATE": Certificate of employment
          - "NOTARY_PUBLIC_ID": Notary Public Identification
          - "AVIATION_SECURITY_ID": Aviation Security Identification
          - "MARITIME_SECURITY_ID": Maritime Security Identification
        Business related documentation
          - "EXTERNAL_ADMIN": Details of appointed administrator.
          - "CHARGES": Details of any charges that have been laid against a company or director
          - "PRE_ASIC": Any documents that are Pre-ASIC
          - "ANNUAL_RETURN": Details of a company's annual return
          - "REPORT": Frankie generated report.
          - "TRUST_DEED": Corporate trust deed
          - "PARTNERSHIP_AGREEMENT": Partnership agreement documents
          - "ADMIN_CHANGE": Change of Administrator
          - "COMPANY_REPORT": ASIC filed company reports
        Special document types
          - "CHECK_RESULTS": A special document type for specifying results of checks completed other than through Frankie.
      type: string
      enum:
        - OTHER
        - DRIVERS_LICENCE
        - PASSPORT
        - VISA
        - IMMIGRATION
        - NATIONAL_ID
        - TAX_ID
        - NATIONAL_HEALTH_ID
        - CONCESSION
        - HEALTH_CONCESSION
        - SENIORS_HEALTH_CONCESSION
        - PENSION
        - MILITARY_ID
        - BIRTH_CERT
        - CITIZENSHIP
        - MARRIAGE_CERT
        - DEATH_CERT
        - NAME_CHANGE
        - MOBILE_PHONE
        - UTILITY_BILL
        - BANK_STATEMENT
        - BANK_ACCOUNT
        - INTENT_PROOF
        - ATTESTATION
        - SELF_IMAGE
        - EMAIL_ADDRESS
        - MSISDN
        - DEVICE
        - VEHICLE_REGISTRATION
        - PROOF_OF_ADDRESS
        - HOUSE_REGISTRATION
        - YELLOW_HOUSE_REGISTRATION
        - WORK_PERMIT
        - EMPLOYMENT_CERTIFICATE
        - NOTARY_PUBLIC_ID
        - AVIATION_SECURITY_ID
        - MARITIME_SECURITY_ID
        - EXTERNAL_ADMIN
        - CHARGES
        - PRE_ASIC
        - ANNUAL_RETURN
        - REPORT
        - TRUST_DEED
        - PARTNERSHIP_AGREEMENT
        - ADMIN_CHANGE
        - COMPANY_REPORT
        - CHECK_RESULTS
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumIdType
      example: DRIVERS_LICENCE
    CodeDescription:
      description: A common pairing of a short code and a long description.
      type: object
      properties:
        code:
          type: string
        description:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: CodeDescription
    OrganisationDataObjectContactDetails:
      type: object
      properties:
        email:
          type: string
        faxNumber:
          type: string
        telephoneNumber:
          type: string
        websiteURL:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: OrganisationDataObjectContactDetails
    IndustryCodesObject:
      type: object
      properties:
        code:
          type: string
        description:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: IndustryCodesObject
    IndustryDeclarationsObject:
      type: object
      properties:
        description:
          type: string
        language:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: IndustryDeclarationsObject
    OrganisationDataObjectLegalFormDetails:
      type: object
      properties:
        basis:
          type: string
        capital:
          type: string
        comments:
          type: string
        control:
          type: string
        incorp:
          type: string
        partner:
          type: string
        responsibility:
          type: string
        stocks:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: OrganisationDataObjectLegalFormDetails
    OrganisationDataObjectRegistration:
      type: object
      properties:
        countryIso:
          type: string
        date:
          type: string
          format: date
        number:
          type: string
        previousNumber:
          type: string
        registryCode:
          type: string
        registryDescription:
          type: string
        state:
          type: string
        unstructuredDate:
          type: string
        unstructuredFoundationDate:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: OrganisationDataObjectRegistration
    Registries:
      type: object
      properties:
        abr:
          $ref: '#/components/schemas/Abr'
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: Registries
    ShareStructureObject:
      description: >
        Describes a collection of shares of a particular type and their
        attributes,

        One or more ShareStructures make up a company's shares that are then
        parcelled out as shareholdings.
      type: object
      properties:
        amountDue:
          type: number
        amountPaid:
          type: number
        classCode:
          type: string
        classTitle:
          type: string
        docNumber:
          type: string
        docNumberQualifier:
          type: string
        sharesIssued:
          type: integer
        status:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: ShareStructureObject
    enumScanDataRetrievalState:
      description: >
        The reason why the scanData in a response is missing.

        - "NORMAL": The scanData was retrieved and is included. If it is empty
        then it was never provided or was provided empty.

        - "EXCLUDED": The retrieval request was not for 'full' data, or the
        object has 'ScanDelete' set so the scanData is not included

        - "FAILED": The scanData could not be retrieved from the secure document
        store.


        The enumScanDataRetrievalState will not usually be set in a request. If
        a ScannedDocumentObject in a response has a 'FAILED' retrieval state
        then that object should not be sent back in a future possible update. It
        should either be omitted or the original data should be resent if it is
        available from another source. However it is safe to send the object in
        an update with the state received in a response. Any state other than
        'NORMAL' (or '') will cause the blank scanData to be ignored, but other
        fields in the object will be updated if needed.
      type: string
      enum:
        - NORMAL
        - EXCLUDED
        - FAILED
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumScanDataRetrievalState
      example: NORMAL
    enumMIMEType:
      description: >-
        The standard MIME type of the file being uploaded. We'll double-check to
        be certain, but this can help speed things up
      type: string
      enum:
        - image/jpeg
        - image/avif
        - image/png
        - image/gif
        - image/webp
        - image/tiff
        - image/bmp
        - image/heic
        - image/heif
        - application/zip
        - application/x-zip
        - application/x-zip-compressed
        - application/x-tar
        - application/x-rar-compressed
        - application/x-gzip
        - application/gzip
        - application/x-bzip2
        - application/x-7z-compressed
        - application/pdf
        - application/rtf
        - application/postscript
        - application/json
        - audio/mpeg
        - audio/m4a
        - audio/x-wav
        - audio/amr
        - text/plain
        - text/rtf
        - application/msword
        - >-
          application/vnd.openxmlformats-officedocument.wordprocessingml.document
        - application/vnd.ms-excel
        - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
        - application/vnd.ms-outlook
        - application/vnd.ms-powerpoint
        - application/vnd.oasis.opendocument.text
        - >-
          application/vnd.openxmlformats-officedocument.presentationml.presentation
        - video/avi
        - video/x-m4a
        - video/mp4
        - video/webm
        - video/quicktime
        - video/msvideo
        - video/x-msvideo
        - video/x-ms-wmv
        - video/mpeg
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumMIMEType
      example: image/png
    enumScanSide:
      description: >-
        Describes if a scan is of the "F"ront or "B"ack of an ID. If not
        supplied, Front is always assumed.
      type: string
      enum:
        - F
        - B
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumScanSide
      example: F
    enumScanType:
      description: |
        Valid ID document scan general types.
        - "PHOTO": Any photo
        - "VIDEO": Any video
        - "AUDIO": Any audio
        - "PDF":   PDF or PS (may contain text, images or both)
        - "DOC":   Word doc, RTF, etc
        - "ZIP":   Any compressed file(s)
      type: string
      enum:
        - PHOTO
        - VIDEO
        - AUDIO
        - PDF
        - DOC
        - ZIP
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: EnumScanType
      example: PDF
    Abr:
      type: object
      properties:
        abn:
          type: string
        acn:
          type: string
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/MainBusinessPhysicalAddress'
        businessNames:
          type: array
          items:
            $ref: '#/components/schemas/BusinessName'
        charityEndorsements:
          type: array
          items:
            $ref: '#/components/schemas/CharityEndorsement'
        charityTypes:
          type: array
          items:
            $ref: '#/components/schemas/CharityType'
        description:
          type: string
        dgrEndorsements:
          type: array
          items:
            $ref: '#/components/schemas/DgrEndorsement'
        gst:
          type: array
          items:
            $ref: '#/components/schemas/GoodsAndServicesTax'
        historicalChanges:
          type: array
          items:
            $ref: '#/components/schemas/HistoricalChange'
        lastUpdated:
          type: string
          format: date-time
        name:
          type: string
        registeredDate:
          type: string
          format: date-time
        status:
          type: string
        statusEffectiveFrom:
          type: string
        type:
          type: string
        typeCode:
          type: string
        updatedDate:
          type: string
          format: date-time
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: Abr
    MainBusinessPhysicalAddress:
      type: object
      properties:
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          type: string
          format: date-time
        postcode:
          type: string
        stateCode:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: MainBusinessPhysicalAddress
    BusinessName:
      type: object
      properties:
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          type: string
          format: date-time
        name:
          type: string
        type:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: BusinessName
    CharityEndorsement:
      type: object
      properties:
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          type: string
          format: date-time
        type:
          type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: CharityEndorsement
    CharityType:
      type: object
      properties:
        description:
          type: string
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          type: string
          format: date-time
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: CharityType
    DgrEndorsement:
      type: object
      properties:
        endorsedFrom:
          type: string
          format: date-time
        endorsedTo:
          type: string
          format: date-time
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: DgrEndorsement
    GoodsAndServicesTax:
      type: object
      properties:
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          type: string
          format: date-time
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: GoodsAndServicesTax
    HistoricalChange:
      type: object
      properties:
        businessName:
          type: array
          items:
            type: string
        date:
          type: string
          format: date-time
        entityStatus:
          type: array
          items:
            type: string
        goodsAndServicesTax:
          type: array
          items:
            type: string
        mainBusinessPhysicalAddress:
          type: array
          items:
            type: string
        mainName:
          type: array
          items:
            type: string
        mainTradingName:
          type: array
          items:
            type: string
      x-go-type:
        import:
          alias: models_common
          package: bitbucket.org/ff_common/models/common
        type: HistoricalChange
  securitySchemes:
    api_key:
      description: API key issued by Frankie Financial. This will rotate regularly.
      type: apiKey
      name: api_key
      in: header

````