Where to find the data and documents

This page shows where each KYB data point sits in the JSON the API returns, how to walk a company’s ownership structure down to the individuals behind it, and how to download the company’s filing documents. It follows on from the Quickstart: once a case is ready, this is how you read it.

About the examples

Every example is a real response from Mexican cases on the production Asia stack, shown as an excerpt: fields that are not relevant here are left out. The people and companies are anonymised: names, dates of birth, registration numbers and registration dates are placeholders, used consistently in the text and in the JSON. Values are otherwise as returned; decimals are shown in short form, for example 30.0 where the API returns 30.0000000000. The sandbox returns the same response shapes, so you can try every call below for free against https://api.knowyourcustomer.dev.

The calls

Six calls cover everything on this page.

CallReturns
GET /v2/Companies/{caseCommonId}The company itself: name, type, status, registration date and number, address.
GET /v2/Companies/{caseCommonId}/membersFlat lists of directors and officers, shareholders, and ultimate beneficial owners.
GET /v2/Companies/{caseCommonId}/org-chartThe same parties as a nested ownership tree, across all levels.
GET /v2/Companies/{caseCommonId}/documentsThe company’s filing documents, and those of every party in its structure.
GET /v2/Documents/{documentId}Downloads one document, for example a PDF filing.
GET /v2/Individuals/{caseCommonId}One person’s own case: name, nationality, date of birth, address.

The key idea: every company and every person in a structure is its own case with its own caseCommonId. A shareholder that is a company appears as a reference to another company case, and you fetch its details and its own shareholders with the same calls, using that case ID.

Authentication is the same OAuth2 client-credentials flow as in the Quickstart. The hosts are:

EnvironmentTokenAPI
Sandbox (free)https://api.knowyourcustomer.dev/connect/tokenhttps://api.knowyourcustomer.dev
Production, Asiahttps://sharedaccountshk.knowyourcustomer.com/connect/tokenhttps://api-asia.knowyourcustomer.com
Production, Europehttps://sharedaccounts.knowyourcustomer.com/connect/tokenhttps://api.knowyourcustomer.com

To list your cases, for example all Mexican ones, use GET /v2/Companies?countryCodeIso31662=MX&pageSize=100&pageNumber=1. Each row carries the caseCommonId you use in the calls below. The examples use these cases:

Case IDCompanyUsed to show
4504INDUSTRIAS EJEMPLO DEL NORTE, S.A. DE C.V.Entity data; individual shareholders and UBOs.
4388TECNOLOGIA FICTICIA DEL PACIFICO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLEDirectors with date of birth (case 4504 has no directors recorded).
4382COMERCIAL MUESTRA DEL SUR, SOCIEDAD DE RESPONSABILIDAD LIMITADA DE CAPITAL VARIABLEA company owned partly by another company.
4443MEDIOS DE PRUEBA DEL CENTRO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLEThat corporate shareholder, fetched as its own case.

Quick reference

Data pointCallJSON path
Entity
Name/Companies/{id}caseDetail.details.company.entityName
Incorporation date/Companies/{id}caseDetail.details.company.properties["Registration Date"]
Company type/Companies/{id}caseDetail.details.company.type
Status/Companies/{id}caseDetail.details.company.properties["Company Status"]
Registration number/Companies/{id}caseDetail.details.company.properties["Registration Number"]
Address/Companies/{id}caseDetail.details.caseAddress.address
Directors and officers
List/Companies/{id}/memberscontrollingEntitiesAndIndividuals[]
Name, role/Companies/{id}/members[].member.rawName, [].role
Date of birth/Companies/{id}/members[].member.properties["Birth Date"]
Nationality/Companies/{id}/members[].member.nationality
Address/Companies/{id}/members[].member.address.address
Shareholders and owners
Shareholders/Companies/{id}/membersshareholdersAndBeneficialOwners[]
Ownership %/Companies/{id}/membersshareholdersAndBeneficialOwners[].percentage
UBOs/Companies/{id}/membersultimateBeneficialOwners[]
Person or company/Companies/{id}/members[].memberType = "Individual" or "Company"
Case ID to drill into/Companies/{id}/members[].member.caseCommonId
Filing documents
List/Companies/{id}/documentsdocuments["<group>"][]
Name, download link/Companies/{id}/documents[].name, [].link
Download/Documents/{documentId}The file content (PDF)

Company data

Call GET /v2/Companies/4504. The company sits under caseDetail.details.company; its registry attributes are in the properties object, keyed by readable names.

Excerpt: GET /v2/Companies/4504

{
  "caseDetail": {
    "details": {
      "allUbosIdentified": "No",
      "company": {
        "caseCommonId": 4504,
        "entityName": "INDUSTRIAS EJEMPLO DEL NORTE, S.A. DE C.V.",
        "type": "Joint Stock Entity",
        "countryCodeISO31662": "MX",
        "properties": {
          "Company Status": "Active",
          "Company Type": "Joint Stock Entity",
          "Registration Date": "15/05/2009",
          "Registration Number": "10001"
        }
      },
      "common": {
        "caseCommonId": 4504,
        "status": "Open",
        "statusId": 3,
        "statusName": "Ready"
      },
      "caseAddress": {
        "city": "Saltillo",
        "country": "Mexico",
        "countryCodeISO31662": "MX",
        "address": "Saltillo, Mexico"
      }
    }
  }
}
Data pointFieldValue in case 4504
Namecompany.entityNameINDUSTRIAS EJEMPLO DEL NORTE, S.A. DE C.V.
Incorporation datecompany.properties["Registration Date"]15/05/2009 (DD/MM/YYYY)
Company typecompany.typeJoint Stock Entity
Statuscompany.properties["Company Status"]Active
Registration numbercompany.properties["Registration Number"]10001
AddresscaseAddress.addressSaltillo, Mexico
  • Company status versus case status. company.properties["Company Status"] is the company’s status at the registry ("Active"). common.status and common.statusName describe our case workflow, not the company. common.statusId 3 means the case build has completed, while common.status still says "Open". Also confirm that /members or /org-chart is populated before reading.
  • Registration Date is the date the registry records for the company, which we map to the incorporation date. It can differ from the date of the incorporation deed.
  • Dates in properties are strings in DD/MM/YYYY format.
  • properties also holds "Activity Type", the company’s registered business purpose as free text (left out above for length). The set of keys can differ by jurisdiction, so read them by name and allow for a key to be missing.

Directors, officers and legal representatives

Call GET /v2/Companies/{caseCommonId}/members. Directors, officers and legal representatives are in controllingEntitiesAndIndividuals. In case 4388 there are two: DIEGO PLACEHOLDER (Administrator) and GUADALUPE REPLACED (Legal Representative).

Excerpt: GET /v2/Companies/4388/members, first entry

{
  "controllingEntitiesAndIndividuals": [
    {
      "memberType": "Individual",
      "role": "Administrator",
      "member": {
        "firstName": "Diego",
        "lastName": "Placeholder",
        "rawName": "DIEGO PLACEHOLDER",
        "caseCommonId": 4438,
        "codeISO31662": "MX",
        "nationality": "Mexican",
        "properties": {
          "Birth Date": "15/03/1980"
        },
        "address": {
          "address": "Unknown"
        }
      },
      "isKYCed": true
    }
  ]
}
Data pointFieldValue
Namemember.rawName (also firstName, lastName)DIEGO PLACEHOLDER
RoleroleAdministrator
Date of birthmember.properties["Birth Date"]15/03/1980
Nationalitymember.nationalityMexican
Addressmember.address.addressUnknown
Their own casemember.caseCommonId4438
  • Fields that are not available come back as "Unknown" (nationality, address) or are simply absent (date of birth). Treat both as “not available”.
  • Role values are returned as English text, for example "Administrator", "Legal Representative" or "General Manager", also for Mexican companies. "Commissioner" typically corresponds to the comisario (statutory examiner) and "Attorney" to the apoderado (attorney-in-fact). Values can vary in case and can be compound (for example "Administrator; Attorney"), so match case-insensitively, split on ;, and do not rely on a fixed list.
  • The same person can appear in several lists: here Diego Placeholder is both Administrator and a 50% shareholder. Use member.caseCommonId to recognise the same person across lists.
  • The org-chart also lists directors and officers, under officers (see the whole tree in one call).

Shareholders and beneficial owners

Where they appear

The same /members call returns two lists:

  • shareholdersAndBeneficialOwners: the direct shareholders, with percentage. For case 4504: RICARDO SAMPLEMAN 20%; EMILIO RANDOMPERSON 30%; RODRIGO RANDOMPERSON 30%; SERGIO SAMPLEMAN 20%.
  • ultimateBeneficialOwners: the natural persons identified as ultimate beneficial owners, with sharesPercentage. For case 4504: EMILIO RANDOMPERSON (30%) and RODRIGO RANDOMPERSON (30%). The two 20% holders are shareholders but not UBOs.

Excerpt: GET /v2/Companies/4504/members, Emilio Randomperson in both lists

{
  "shareholdersAndBeneficialOwners": [
    {
      "memberType": "Individual",
      "role": "Shareholder",
      "member": {
        "firstName": "Emilio",
        "lastName": "Randomperson",
        "rawName": "EMILIO RANDOMPERSON",
        "caseCommonId": 4522,
        "nationality": "Mexican",
        "address": {
          "address": "Unknown"
        }
      },
      "percentage": 30.0,
      "isDeactivated": false
    }
  ],
  "ultimateBeneficialOwners": [
    {
      "memberType": "Individual",
      "member": {
        "rawName": "EMILIO RANDOMPERSON",
        "caseCommonId": 4522,
        "nationality": "Mexican"
      },
      "sharesPercentage": 30.0,
      "isKYCed": true
    }
  ]
}

isDeactivated: true on a shareholder means that party does not need full verification on this case, for example a holding below the threshold. They have still been screened. allUbosIdentified is a case-level flag ("No" here even though two UBOs are listed), so read the ultimateBeneficialOwners list itself rather than relying on the flag alone.

Is a shareholder a person or a company?

Read memberType on each entry. Case 4382 is owned 50% by a person and 50% by a company, so it shows both side by side:

Excerpt: GET /v2/Companies/4382/members, shareholdersAndBeneficialOwners

{
  "shareholdersAndBeneficialOwners": [
    {
      "memberType": "Individual",
      "role": "Shareholder",
      "member": {
        "firstName": "Mariana",
        "lastName": "Notreal",
        "rawName": "MARIANA NOTREAL",
        "caseCommonId": 4442,
        "nationality": "Unknown",
        "caseType": 2
      },
      "percentage": 50.0
    },
    {
      "memberType": "Company",
      "role": "Shareholder",
      "member": {
        "entityName": "MEDIOS DE PRUEBA DEL CENTRO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLE",
        "type": "Joint Stock Entity",
        "caseCommonId": 4443,
        "codeISO31662": "MX",
        "address": {
          "address": "CIUDAD DE MÉXICO, Mexico"
        },
        "properties": {
          "Company Status": "Active",
          "Registration Date": "03/03/2022",
          "Registration Number": "N-2022000001"
        },
        "caseType": 1
      },
      "percentage": 50.0
    }
  ]
}
PersonCompany
memberType"Individual""Company"
member.caseType21
Name fieldmember.rawName, firstName, lastNamemember.entityName
Other fieldsmember.nationality, properties["Birth Date"]member.type, properties (status, registration date and number)
Next call with member.caseCommonIdGET /v2/Individuals/{id}GET /v2/Companies/{id} and /members

Unravelling a corporate shareholder

A corporate shareholder is a reference to another company case. In case 4382, MEDIOS DE PRUEBA DEL CENTRO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLE is case 4443. To see who owns it, call the same endpoints with that ID:

# company details
GET https://api-asia.knowyourcustomer.com/v2/Companies/4443

# its directors, shareholders and UBOs
GET https://api-asia.knowyourcustomer.com/v2/Companies/4443/members

Excerpt: GET /v2/Companies/4443/members

{
  "shareholdersAndBeneficialOwners": [
    {
      "memberType": "Individual",
      "role": "Shareholder",
      "member": {
        "rawName": "JAVIER EXAMPLETON",
        "caseCommonId": 4447,
        "nationality": "Mexican",
        "caseType": 2
      },
      "percentage": 50.0
    },
    {
      "memberType": "Individual",
      "role": "Shareholder",
      "member": {
        "rawName": "ARTURO DUMMYSON",
        "caseCommonId": 4446,
        "nationality": "Mexican",
        "caseType": 2
      },
      "percentage": 50.0
    }
  ],
  "controllingEntitiesAndIndividuals": [
    {
      "memberType": "Individual",
      "role": "Administrator",
      "member": {
        "rawName": "ARTURO DUMMYSON",
        "caseCommonId": 4446
      }
    },
    {
      "memberType": "Individual",
      "role": "Legal Representative",
      "member": {
        "rawName": "MARIANA NOTREAL",
        "caseCommonId": 4442
      }
    }
  ]
}

Both shareholders of the sub-case are individuals, so the structure ends here. If one were a company, you would repeat the step with its caseCommonId until every branch ends in a person. If common.hasMoreLayers on a case is true, the structure continues beyond what has been built so far. In outline:

def unravel(case_id, seen=None):
    seen = seen or set()
    if case_id in seen:           # guard against circular ownership
        return
    seen.add(case_id)
    members = get(f"/v2/Companies/{case_id}/members")
    for sh in members["shareholdersAndBeneficialOwners"]:
        sub_id = sh["member"]["caseCommonId"]
        if sh["memberType"] == "Company":
            company = get(f"/v2/Companies/{sub_id}")
            unravel(sub_id, seen)
        else:
            person = get(f"/v2/Individuals/{sub_id}")

If you only need the ultimate beneficial owners, you do not have to walk the structure: the parent case’s ultimateBeneficialOwners list already includes indirect owners. For case 4382 it lists MARIANA NOTREAL, JAVIER EXAMPLETON and ARTURO DUMMYSON; the last two hold their 25% through MEDIOS DE PRUEBA DEL CENTRO. Walk the structure when you need the intermediate companies and their officers.

The whole tree in one call: org-chart

GET /v2/Companies/{caseCommonId}/org-chart returns the full structure in one response, with corporate shareholders’ own shareholders and officers nested inside them, and the UBOs under others (role "UltimateBeneficialOwner"). It is the quickest way to draw the structure; use /members on each case for the detailed fields.

Excerpt: GET /v2/Companies/4382/org-chart

{
  "name": "COMERCIAL MUESTRA DEL SUR, SOCIEDAD DE RESPONSABILIDAD LIMITADA DE CAPITAL VARIABLE",
  "caseCommonId": 4382,
  "shareholders": [
    {
      "role": "Shareholder",
      "name": "MEDIOS DE PRUEBA DEL CENTRO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLE",
      "caseCommonId": 4443,
      "caseLinkId": 5299,
      "shares": 50.0,
      "effectivePercentage": 50.0,
      "jurisdictionId": 139,
      "nationalityId": null,
      "shareholders": [
        {
          "role": "Shareholder",
          "name": "Javier Exampleton",
          "caseCommonId": 4447,
          "caseLinkId": 5309,
          "shares": 50.0,
          "effectivePercentage": 25.0,
          "jurisdictionId": null,
          "nationalityId": 139
        },
        {
          "role": "Shareholder",
          "name": "Arturo Dummyson",
          "caseCommonId": 4446,
          "caseLinkId": 5310,
          "shares": 50.0,
          "effectivePercentage": 25.0,
          "jurisdictionId": null,
          "nationalityId": 139
        }
      ],
      "officers": [
        {
          "role": "Administrator",
          "name": "Arturo Dummyson",
          "caseCommonId": 4446
        },
        {
          "role": "Legal Representative",
          "name": "Mariana Notreal",
          "caseCommonId": 4442
        }
      ]
    },
    {
      "role": "Shareholder",
      "name": "Mariana Notreal",
      "caseCommonId": 4442,
      "caseLinkId": 5298,
      "shares": 50.0,
      "effectivePercentage": 50.0,
      "jurisdictionId": null,
      "nationalityId": 0
    }
  ]
}
  • effectivePercentage is the indirect holding in the company you started from: Javier Exampleton holds 50% of MEDIOS DE PRUEBA DEL CENTRO, which holds 50% of COMERCIAL MUESTRA DEL SUR, so 25%. shares is the holding in the immediate parent. effectivePercentage can be null (it is on officer nodes), and shares is absent where it does not apply.
  • Org-chart nodes do not carry memberType. In these responses a company node has jurisdictionId set and nationalityId null, and a person has jurisdictionId null. Use memberType from /members as the reliable test.
  • Ignore the role value on the top (root) node; it is the company being checked, not a party to it.
  • The org-chart can list the same link more than once (same caseLinkId); de-duplicate on caseLinkId and role. The excerpt above is de-duplicated.

Company filing documents

Call GET /v2/Companies/{caseCommonId}/documents. The company’s documents are under documents, grouped by heading; each entry has a name and a link to download it. Case 4504 has 9 documents, all under "Company Identity Documents": the incorporation filing ("Incorporation") and the registered shareholders’ meeting filings, with the meeting date in the name.

Excerpt: GET /v2/Companies/4504/documents (first 3 of 9 documents, first shareholder)

{
  "caseCommonId": 4504,
  "name": "INDUSTRIAS EJEMPLO DEL NORTE, S.A. DE C.V.",
  "documents": {
    "Company Identity Documents": [
      {
        "link": "https://api-asia.knowyourcustomer.com/v2/documents/9643",
        "category": "custom_1791814096453",
        "name": "Incorporation",
        "dataSource": ""
      },
      {
        "link": "https://api-asia.knowyourcustomer.com/v2/documents/9644",
        "category": "custom_1791814097149",
        "name": "M2 - Assembly <16/02/2021>",
        "dataSource": ""
      },
      {
        "link": "https://api-asia.knowyourcustomer.com/v2/documents/9645",
        "category": "custom_1791814098469",
        "name": "M2 - Assembly <28/09/2021>",
        "dataSource": ""
      }
    ]
  },
  "shareholdersAndBeneficialOwners": [
    {
      "caseCommonId": 4522,
      "name": "Emilio Randomperson",
      "documents": {}
    }
  ]
}
Data pointFieldValue in case 4504
Document groupdocuments (object key)Company Identity Documents
Document namedocuments[...][].nameIncorporation
Download linkdocuments[...][].linkhttps://api-asia.knowyourcustomer.com/v2/documents/9643
Document IDLast part of link9643

To download a document, call GET /v2/Documents/{documentId}, or call the link as given. The response is the file itself, here a PDF, with its file name in the Content-Disposition header ("Incorporation.pdf"). Add the header File-Transfer-Encoding: base64 to receive the file as a Base64 string instead.

curl https://api-asia.knowyourcustomer.com/v2/Documents/9643 \
  -H "Authorization: Bearer ACCESS_TOKEN" -o Incorporation.pdf

# the same file as a Base64 string
curl https://api-asia.knowyourcustomer.com/v2/Documents/9643 \
  -H "Authorization: Bearer ACCESS_TOKEN" -H "File-Transfer-Encoding: base64"

Documents across the structure. The same response also lists the parties in the structure, grouped much as in /members (controllingEntitiesAndIndividuals, shareholdersAndBeneficialOwners, and UltimateBeneficialOwnersScaffolds for the UBOs), each with its own documents. A corporate shareholder appears with its own filings and its own parties nested inside it:

Excerpt: GET /v2/Companies/4382/documents, shareholders branch

{
  "caseCommonId": 4382,
  "name": "COMERCIAL MUESTRA DEL SUR, SOCIEDAD DE RESPONSABILIDAD LIMITADA DE CAPITAL VARIABLE",
  "documents": {
    "Company Identity Documents": [
      {
        "link": "https://api-asia.knowyourcustomer.com/v2/documents/9417",
        "category": "custom_1790869539914",
        "name": "Incorporation",
        "dataSource": ""
      }
    ]
  },
  "shareholdersAndBeneficialOwners": [
    {
      "caseCommonId": 4442,
      "name": "Mariana Notreal",
      "documents": {}
    },
    {
      "caseCommonId": 4443,
      "name": "MEDIOS DE PRUEBA DEL CENTRO, SOCIEDAD ANÓNIMA DE CAPITAL VARIABLE",
      "documents": {
        "Company Identity Documents": [
          {
            "link": "https://api-asia.knowyourcustomer.com/v2/documents/9419",
            "category": "custom_1790872855013",
            "name": "Incorporation",
            "dataSource": ""
          }
        ]
      },
      "shareholdersAndBeneficialOwners": [
        {
          "caseCommonId": 4447,
          "name": "Javier Exampleton",
          "documents": {}
        },
        {
          "caseCommonId": 4446,
          "name": "Arturo Dummyson",
          "documents": {}
        }
      ]
    }
  ]
}
  • Not every party is listed here. A group with no parties is left out, and shareholders marked isDeactivated: true in /members are not included (in case 4504, the two 20% holders). Read the group keys that are present rather than assuming a fixed set, and take the full list of parties from /members. For a party that is missing here, call the documents endpoint on its own case (GET /v2/Individuals/{caseCommonId}/documents or GET /v2/Companies/{caseCommonId}/documents).
  • Read documents by name, not by category: category is an internal code (for example "custom_1791814096453"). Names can vary slightly between cases; "M2 - Assembly <date>" and "M2 Assembly <date>" both occur.
  • Which filings exist depends on the registry and the company. Each of the 30 most recent Mexican cases we checked has an "Incorporation" document, and many also have shareholders’ meeting filings.
  • In these cases the individuals’ documents are empty. Identity documents for people are collected separately: uploaded, or requested from the person through the API.
  • In the sandbox, synthetic cases can also return party groups that are empty. Code that reads the keys present and skips empty lists works against both.

Individual cases

Each person also has their own case. GET /v2/Individuals/{caseCommonId} returns their details, including date of birth and nationality where available. This is also the case you attach identity documents to.

Excerpt: GET /v2/Individuals/4438

{
  "caseDetail": {
    "details": {
      "individual": {
        "caseCommonId": 4438,
        "firstName": "Diego",
        "lastName": "Placeholder",
        "rawName": "DIEGO PLACEHOLDER",
        "nationalityCountry": "Mexico",
        "nationalityCountryCodeISO31662": "MX",
        "properties": {
          "Birth Date": "15/03/1980"
        }
      },
      "caseAddress": {
        "address": "Unknown"
      },
      "isCaseAMLPositive": false
    }
  }
}

Points to build in

  • Treat every field as optional. What a registry provides differs by jurisdiction and by company; "Unknown", null and missing keys all mean “not available”.
  • allUbosIdentified is the text "Yes" or "No", not a boolean.
  • Each entry in /members has a dataSource list showing where each field came from and when it was collected. Keep it if you need an audit trail.
  • The case report as a PDF is available at GET /v2/Companies/{caseCommonId}/report.

What next