Skip to content

Latest commit

 

History

History
5294 lines (3657 loc) · 61.4 KB

File metadata and controls

5294 lines (3657 loc) · 61.4 KB

Reference

Attributes

client.attributes.postAttribute({ ...params }) -> Sayari.AttributeResponse

📝 Description

Adds a new attribute to an entity in the project

🔌 Usage

await client.attributes.postAttribute({
    entity: "zq04axX2dLn9tE6W6Q8Qhg",
    type: "address",
    value: {
        street1: "1600 Pennsylvania Avenue NW",
        city: "Washington DC",
        state: "Washington DC",
        postalCode: "20500",
        country: "US",
    },
    toDate: "2024-04-30",
    fromDate: "2024-01-01",
    date: "2024-02-15",
});

⚙️ Parameters

request: Sayari.AddAttribute

requestOptions: Attributes.RequestOptions

client.attributes.patchAttribute(attributeId, { ...params }) -> Sayari.AttributeResponse

📝 Description

This endpoint is in beta and is subject to change. It is provided for early access and testing purposes only. Updates an existing Attribute

🔌 Usage

await client.attributes.patchAttribute(
    "enEwNGF4WDJkTG45dEU2VzZROFFoZ3xhZGRyZXNzfDBwbEVCMHxVNzhzN21yOUVFTThIZ3pwREM3UDFB",
    {
        value: {
            street1: "1600 Pennsylvania Avenue NW",
            city: "Washington DC",
            state: "Washington DC",
            postalCode: "20500",
            country: "US",
        },
        toDate: "2024-04-30",
        fromDate: "2024-01-01",
        date: "2024-02-15",
    },
);

⚙️ Parameters

attributeId: string

request: Sayari.UpdateAttribute

requestOptions: Attributes.RequestOptions

client.attributes.deleteAttribute(attributeId) -> Sayari.AttributeResponse

📝 Description

This endpoint is in beta and is subject to change. It is provided for early access and testing purposes only. Delete an existing Attribute

🔌 Usage

await client.attributes.deleteAttribute(
    "enEwNGF4WDJkTG45dEU2VzZROFFoZ3xhZGRyZXNzfDBwbEVCMHxVNzhzN21yOUVFTThIZ3pwREM3UDFB",
);

⚙️ Parameters

attributeId: string

requestOptions: Attributes.RequestOptions

Auth

client.auth.getToken({ ...params }) -> Sayari.AuthResponse

📝 Description

Hit the auth endpoint to get a bearer token

🔌 Usage

await client.auth.getToken({
    clientId: "your client_id here",
    clientSecret: "your client_secret here",
});

⚙️ Parameters

request: Sayari.GetToken

requestOptions: Auth.RequestOptions

Entity

client.entity.getEntity(id, { ...params }) -> Sayari.GetEntityResponse

📝 Description

To retrieve a L1 Due Dilligence PDF Report. Include 'Accept: application/pdf' in request headers. Retrieve an entity profile from the database based on the entity ID. This endpoint returns the full profile, entity_summary returns the same payload minus relationships.

🔌 Usage

await client.entity.getEntity("mGq1lpuqKssNWTjIokuPeA", {
    attributesNameLimit: 1,
    attributesAddressLimit: 1,
    attributesCountryLimit: 1,
    attributesAdditionalInformationLimit: 1,
    attributesBusinessPurposeLimit: 1,
    attributesCompanyTypeLimit: 1,
    attributesIdentifierLimit: 1,
    attributesStatusLimit: 1,
    relationshipsLimit: 1,
    possiblySameAsLimit: 1,
    referencedByLimit: 1,
});

⚙️ Parameters

id: string — Unique identifier of the entity

request: Sayari.GetEntity

requestOptions: Entity.RequestOptions

client.entity.entitySummary(id) -> Sayari.EntitySummaryResponse

📝 Description

The Entity Summary endpoint returns a similar payload, minus relationships.

🔌 Usage

await client.entity.entitySummary("mGq1lpuqKssNWTjIokuPeA");

⚙️ Parameters

id: string — Unique identifier of the entity

requestOptions: Entity.RequestOptions

Info

client.info.getUsage({ ...params }) -> Sayari.UsageResponse

📝 Description

The usage endpoint provides a simple interface to retrieve information on usage made by your API account. This includes both views per API path and credits consumed. The time period for the usage query is also specified in the response and whether or not this includes total usage.

🔌 Usage

await client.info.getUsage();

⚙️ Parameters

request: Sayari.GetUsage

requestOptions: Info.RequestOptions

client.info.getHistory({ ...params }) -> Sayari.HistoryResponse

📝 Description

The history endpoint return a user's event history.

🔌 Usage

await client.info.getHistory();

⚙️ Parameters

request: Sayari.GetHistory

requestOptions: Info.RequestOptions

Metadata

client.metadata.metadata() -> Sayari.MetadataResponse

📝 Description

Get metadta about the api, both its versions, which releases are present, and the identity of the authenticated user.

🔌 Usage

await client.metadata.metadata();

⚙️ Parameters

requestOptions: Metadata.RequestOptions

NegativeNews

client.negativeNews.negativeNews({ ...params }) -> Sayari.NegativeNewsResponse

📝 Description

This endpoint is in beta and subject to change Screens entities against news articles and public records to identify risk-relevant content. Leverages machine learning to detect and classify risks across various domains. Provides detailed article metadata with risk assessments and direct source references.

🔌 Usage

await client.negativeNews.negativeNews({
    name: "Gazprom",
    topic: "sanctions_and_regulatory",
    until: "2024-10-01",
});

⚙️ Parameters

request: Sayari.NegativeNews

requestOptions: NegativeNews.RequestOptions

Notifications

client.notifications.projectNotifications(id, { ...params }) -> Sayari.ProjectNotificationsResponse

📝 Description

Legacy endpoint. New integrations should contact Sayari for best practices. The Project Notifications endpoint returns a list of notifications on all entities saved to a project.

🔌 Usage

await client.notifications.projectNotifications("0dLeO0", {
    limit: 20,
});

⚙️ Parameters

id: string — Unique identifier of the project

request: Sayari.ProjectNotifications

requestOptions: Notifications.RequestOptions

client.notifications.resourceNotifications(id, { ...params }) -> Sayari.ResourceNotificationsResponse

📝 Description

Legacy endpoint. New integrations should contact Sayari for best practices. The Resource Notifications endpoint returns a list of notifications for a saved entity.

🔌 Usage

await client.notifications.resourceNotifications("03ePyj", {
    limit: 20,
});

⚙️ Parameters

id: string — Unique identifier of the resource

request: Sayari.ResourceNotifications

requestOptions: Notifications.RequestOptions

client.notifications.deleteProjectNotifications(projectId) -> void

📝 Description

Legacy endpoint. New integrations should contact Sayari for best practices. Deletes all notifications from a project.

🔌 Usage

await client.notifications.deleteProjectNotifications("YWmNKV");

⚙️ Parameters

projectId: string

requestOptions: Notifications.RequestOptions

client.notifications.deleteEntityNotifications(entityId) -> void

📝 Description

Legacy endpoint. New integrations should contact Sayari for best practices. Deletes notifications for saved resources of an entity.

🔌 Usage

await client.notifications.deleteEntityNotifications("N0xLDy4wcud-M1ZtwdsvRA");

⚙️ Parameters

entityId: string

requestOptions: Notifications.RequestOptions

client.notifications.deleteResourceNotifications(resourceId) -> void

📝 Description

Legacy endpoint. New integrations should contact Sayari for best practices. Deletes notifications for a saved resource.

🔌 Usage

await client.notifications.deleteResourceNotifications("oGxxqG");

⚙️ Parameters

resourceId: string

requestOptions: Notifications.RequestOptions

Ontology

client.ontology.getOntology() -> Sayari.GetOntologyResponse

📝 Description

Get ontology data for all resource types.

🔌 Usage

await client.ontology.getOntology();

⚙️ Parameters

requestOptions: Ontology.RequestOptions

client.ontology.getAttributes({ ...params }) -> Sayari.GetOntologyAttributesResponse

📝 Description

Get attributes from ontology data.

🔌 Usage

await client.ontology.getAttributes({
    id: ["additional_information"],
});

⚙️ Parameters

request: Sayari.GetOntologyAttributesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getCountries({ ...params }) -> Sayari.GetOntologyCountriesResponse

📝 Description

Get countries from ontology data.

🔌 Usage

await client.ontology.getCountries({
    id: ["USA"],
});

⚙️ Parameters

request: Sayari.GetOntologyCountriesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getCurrencies({ ...params }) -> Sayari.GetOntologyCurrenciesResponse

📝 Description

Get currencies from ontology data.

🔌 Usage

await client.ontology.getCurrencies({
    id: ["USD"],
});

⚙️ Parameters

request: Sayari.GetOntologyCurrenciesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getEntityTypes({ ...params }) -> Sayari.GetOntologyEntityTypesResponse

📝 Description

Get entity types from ontology data.

🔌 Usage

await client.ontology.getEntityTypes({
    id: ["aircraft"],
});

⚙️ Parameters

request: Sayari.GetOntologyEntityTypesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getEnums({ ...params }) -> Sayari.GetOntologyEnumsResponse

📝 Description

Get enums from ontology data.

🔌 Usage

await client.ontology.getEnums({
    id: ["address_type"],
});

⚙️ Parameters

request: Sayari.GetOntologyEnumsRequest

requestOptions: Ontology.RequestOptions

client.ontology.getHsCodes({ ...params }) -> Sayari.GetOntologyHsCodesResponse

📝 Description

Get HS codes from ontology data.

🔌 Usage

await client.ontology.getHsCodes({
    code: ["1503"],
});

⚙️ Parameters

request: Sayari.GetOntologyHsCodesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getIdentifiers({ ...params }) -> Sayari.GetOntologyIdentifiersResponse

📝 Description

Get identifiers from ontology data.

🔌 Usage

await client.ontology.getIdentifiers({
    id: ["aer_free_zone_license"],
});

⚙️ Parameters

request: Sayari.GetOntologyIdentifiersRequest

requestOptions: Ontology.RequestOptions

client.ontology.getLanguages({ ...params }) -> Sayari.GetOntologyLanguagesResponse

📝 Description

Get languages from ontology data.

🔌 Usage

await client.ontology.getLanguages({
    id: ["en"],
});

⚙️ Parameters

request: Sayari.GetOntologyLanguagesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getRegions({ ...params }) -> Sayari.GetOntologyRegionsResponse

📝 Description

Get regions from ontology data.

🔌 Usage

await client.ontology.getRegions({
    id: ["usa_&_canada"],
});

⚙️ Parameters

request: Sayari.GetOntologyRegionsRequest

requestOptions: Ontology.RequestOptions

client.ontology.getRelationships({ ...params }) -> Sayari.GetOntologyRelationshipsResponse

📝 Description

Get relationships from ontology data.

🔌 Usage

await client.ontology.getRelationships({
    id: ["auditor_of"],
});

⚙️ Parameters

request: Sayari.GetOntologyRelationshipsRequest

requestOptions: Ontology.RequestOptions

client.ontology.getRiskFactors({ ...params }) -> Sayari.GetOntologyRiskFactorsResponse

📝 Description

Get risk factors from ontology data.

🔌 Usage

await client.ontology.getRiskFactors({
    id: ["psa_owner_of_ofac_fto_sanctioned"],
    riskCategory: ["sanctions"],
    level: ["high"],
    riskType: ["network"],
    enabled: true,
    visible: true,
});

⚙️ Parameters

request: Sayari.GetOntologyRiskFactorsRequest

requestOptions: Ontology.RequestOptions

client.ontology.getSources({ ...params }) -> Sayari.GetOntologySourcesResponse

📝 Description

Get sources from ontology data.

🔌 Usage

await client.ontology.getSources({
    id: ["e85d865943ee6d8369307569d2ad9de0"],
    country: ["XXX"],
    sourceType: ["adverse_media_/_negative_news_data"],
});

⚙️ Parameters

request: Sayari.GetOntologySourcesRequest

requestOptions: Ontology.RequestOptions

client.ontology.getSourceTypes({ ...params }) -> Sayari.GetOntologySourceTypesResponse

📝 Description

Get source types from ontology data.

🔌 Usage

await client.ontology.getSourceTypes({
    id: ["adverse_media_/_negative_news_data"],
});

⚙️ Parameters

request: Sayari.GetOntologySourceTypesRequest

requestOptions: Ontology.RequestOptions

ProjectEntityAttributes

client.projectEntityAttributes.getProjectEntityAttributes(projectId, projectEntityId) -> Sayari.ProjectEntityAttributesResponse

📝 Description

Retrieves all attributes for a project entity.

🔌 Usage

await client.projectEntityAttributes.getProjectEntityAttributes("V03eYM", "BG72YW");

⚙️ Parameters

projectId: string

projectEntityId: string

requestOptions: ProjectEntityAttributes.RequestOptions

client.projectEntityAttributes.createProjectEntityAttribute(projectId, projectEntityId, { ...params }) -> Sayari.CreateProjectEntityAttributeResponse

📝 Description

Creates a new attribute for a project entity.

🔌 Usage

await client.projectEntityAttributes.createProjectEntityAttribute("V03eYM", "BG72YW", {
    field: "custom_phone",
    value: "+1-555-123-4567",
    matchResolution: false,
});

⚙️ Parameters

projectId: string

projectEntityId: string

request: Sayari.CreateProjectEntityAttributeRequest

requestOptions: ProjectEntityAttributes.RequestOptions

client.projectEntityAttributes.updateProjectEntityAttribute(projectId, projectEntityId, attributeId, { ...params }) -> Sayari.UpdateProjectEntityAttributeResponse

📝 Description

Updates a specific attribute for a project entity.

🔌 Usage

await client.projectEntityAttributes.updateProjectEntityAttribute("V03eYM", "BG72YW", "xG8wYP", {
    field: "name",
    value: "updated name",
    matchResolution: true,
});

⚙️ Parameters

projectId: string

projectEntityId: string

attributeId: string

request: Sayari.UpdateProjectEntityAttributeRequest

requestOptions: ProjectEntityAttributes.RequestOptions

client.projectEntityAttributes.deleteProjectEntityAttribute(projectId, projectEntityId, attributeId) -> void

📝 Description

Deletes a specific attribute for a project entity.

🔌 Usage

await client.projectEntityAttributes.deleteProjectEntityAttribute("project_id", "project_entity_id", "attribute_id");

⚙️ Parameters

projectId: string

projectEntityId: string

attributeId: string

requestOptions: ProjectEntityAttributes.RequestOptions

ProjectEntitySupplyChainSnapshots

client.projectEntitySupplyChainSnapshots.getProjectEntitySupplyChainSnapshots(projectId, projectEntityId) -> Sayari.ProjectEntitySupplyChainSnapshotsResponse

📝 Description

Retrieves all supply chain snapshots for a project entity.

🔌 Usage

await client.projectEntitySupplyChainSnapshots.getProjectEntitySupplyChainSnapshots("V03eYM", "BG72YW");

⚙️ Parameters

projectId: string

projectEntityId: string

requestOptions: ProjectEntitySupplyChainSnapshots.RequestOptions

client.projectEntitySupplyChainSnapshots.getProjectEntitySupplyChainSnapshotById(projectId, projectEntityId, snapshotId) -> Sayari.ProjectEntitySupplyChainSnapshotByIdResponse

📝 Description

Retrieves a specific supply chain snapshot by ID for a project entity.

🔌 Usage

await client.projectEntitySupplyChainSnapshots.getProjectEntitySupplyChainSnapshotById("V03eYM", "BG72YW", "sN4p2K");

⚙️ Parameters

projectId: string

projectEntityId: string

snapshotId: string

requestOptions: ProjectEntitySupplyChainSnapshots.RequestOptions

client.projectEntitySupplyChainSnapshots.createProjectEntitySupplyChainSnapshot(projectId, projectEntityId, { ...params }) -> Sayari.CreateProjectEntitySupplyChainSnapshotResponse

📝 Description

Creates a new supply chain snapshot for a project entity.

🔌 Usage

await client.projectEntitySupplyChainSnapshots.createProjectEntitySupplyChainSnapshot("V03eYM", "BG72YW", {
    label: "Q1 2024 Supply Chain Analysis",
});

⚙️ Parameters

projectId: string

projectEntityId: string

request: Sayari.CreateProjectEntitySupplyChainSnapshotRequest

requestOptions: ProjectEntitySupplyChainSnapshots.RequestOptions

client.projectEntitySupplyChainSnapshots.deleteProjectEntitySupplyChainSnapshotById(projectId, projectEntityId, snapshotId) -> void

📝 Description

Deletes a specific supply chain snapshot by ID for a project entity.

🔌 Usage

await client.projectEntitySupplyChainSnapshots.deleteProjectEntitySupplyChainSnapshotById(
    "project_id",
    "project_entity_id",
    "snapshot_id",
);

⚙️ Parameters

projectId: string

projectEntityId: string

snapshotId: string

requestOptions: ProjectEntitySupplyChainSnapshots.RequestOptions

ProjectEntity

client.projectEntity.createProjectEntity(projectId, { ...params }) -> Sayari.SingleProjectEntityResponse

📝 Description

The resolution endpoints allow users to search for matching entities against a provided list of attributes. The endpoint is similar to the search endpoint, except it's tuned to only return the best match so the client doesn't need to do as much or any post-processing work to filter down results.

🔌 Usage

await client.projectEntity.createProjectEntity("YVB88Y", {
    body: {
        name: ["VTB Bank"],
        country: ["RUS"],
        address: ["Moscow"],
        identifier: ["253400V1H6ART1UQ0N98"],
        profile: "corporate",
    },
});

⚙️ Parameters

projectId: string

request: Sayari.CreateResolvedProjectEntityRequestWrapper

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.getProjectEntities(projectId, { ...params }) -> Sayari.ProjectEntitiesResponse

📝 Description

Retrieves a list of entities for a specific project with pagination support.

Response Formats:

  • JSON (default): Returns structured data with nested objects
  • CSV: Returns tabular data with dynamic columns for attributes and risk categories

CSV Format: The CSV response includes dynamic columns based on the data:

  • attribute_{field_name}: Dynamic columns for each attribute field found in the data
  • risk_category_{category_id}: Dynamic columns for each risk category found in the data
  • Standard columns: project_id, project_entity_id, label, project_entity_url, upload_ids, strength, countries, tags, case_status, created_at, match_count, upstream_products, upstream_risk_factors, upstream_countries

Use the Accept: text/csv header to request CSV format.

🔌 Usage

await client.projectEntity.getProjectEntities("YVB88Y");

⚙️ Parameters

projectId: string

request: Sayari.GetProjectEntitiesRequest

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.getProjectEntity(projectId, projectEntityId) -> Sayari.SingleProjectEntityResponse

📝 Description

Retrieves a specific entity in a project.

🔌 Usage

await client.projectEntity.getProjectEntity("project_id", "project_entity_id");

⚙️ Parameters

projectId: string

projectEntityId: string

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.deleteProjectEntity(projectId, projectEntityId) -> void

📝 Description

Deletes a project entity.

🔌 Usage

await client.projectEntity.deleteProjectEntity("project_id", "project_entity_id");

⚙️ Parameters

projectId: string

projectEntityId: string

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.deleteProjectEntityMatch(projectId, projectEntityId, matchId) -> void

📝 Description

Deletes a specific project entity match.

🔌 Usage

await client.projectEntity.deleteProjectEntityMatch("project_id", "project_entity_id", "match_id");

⚙️ Parameters

projectId: string

projectEntityId: string

matchId: string

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.projectEntityExists(projectId, { ...params }) -> Sayari.ProjectEntityIdResponse

📝 Description

Checks if a project entity with the given attributes already exists.

🔌 Usage

await client.projectEntity.projectEntityExists("YVB88Y", {
    name: ["Example Company"],
    country: ["USA"],
});

⚙️ Parameters

projectId: string

request: Sayari.ResolutionAttributes

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.saveProjectEntity(projectId, { ...params }) -> Sayari.ProjectEntityIdResponse

📝 Description

Stores a project entity given entity IDs and a list of attributes.

🔌 Usage

await client.projectEntity.saveProjectEntity("YVB88Y", {
    entityIds: ["entity_id_1", "entity_id_2"],
    attributes: {
        name: ["Example Company"],
        country: ["USA"],
    },
    profile: "corporate",
});

⚙️ Parameters

projectId: string

request: Sayari.SaveProjectEntityBody

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.getProjectRiskChanges(projectId, { ...params }) -> Sayari.ProjectRiskChangesResponse

📝 Description

Retrieves the risk changes for all project entities in a project.

🔌 Usage

await client.projectEntity.getProjectRiskChanges("YVB88Y");

⚙️ Parameters

projectId: string

request: Sayari.GetProjectRiskChangesRequest

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.getProjectEntityRiskChanges(projectId, projectEntityId, { ...params }) -> Sayari.ProjectEntityRiskChangesResponse

📝 Description

Retrieves the risk changes for a single project entity.

🔌 Usage

await client.projectEntity.getProjectEntityRiskChanges("YVB88Y", "52z4Wa");

⚙️ Parameters

projectId: string

projectEntityId: string

request: Sayari.GetProjectEntityRiskChangesRequest

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.deleteProjectRiskChanges(projectId) -> void

📝 Description

Dismiss risk changes for all project entities in a project.

🔌 Usage

await client.projectEntity.deleteProjectRiskChanges("project_id");

⚙️ Parameters

projectId: string

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.deleteProjectEntityRiskChanges(projectId, projectEntityId) -> void

📝 Description

Dismiss risk changes for a single project entity.

🔌 Usage

await client.projectEntity.deleteProjectEntityRiskChanges("project_id", "project_entity_id");

⚙️ Parameters

projectId: string

projectEntityId: string

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.projectEntitySupplyChain(projectId, projectEntityId, { ...params }) -> Sayari.UpstreamTradeTraversalResponse

📝 Description

Execute a traversal of the upstream trade network (supply chain) for all matched entities of a project entity, returning a set of entities and edges between them.

🔌 Usage

await client.projectEntity.projectEntitySupplyChain("0n4473", "yebNPJ", {
    product: ["6004"],
    limit: 1,
});

⚙️ Parameters

projectId: string — The project Identifier

projectEntityId: string — The project entity Identifier

request: Sayari.ProjectEntitySupplyChainRequest

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.getProjectEntityRiskSummary(projectId, projectEntityId, { ...params }) -> Sayari.ProjectEntityRiskSummaryResponse

📝 Description

Retrieves a risk summary for a specific project entity, including risk factors with network paths and risk intelligence data.

Response includes:

  • Risk factors with their levels (elevated, high, critical)
  • Network paths showing relationships between entities
  • Risk intelligence scores and metadata
  • Risk categories and source entity information

🔌 Usage

await client.projectEntity.getProjectEntityRiskSummary("YVB88Y", "52z4Wa", {
    filter: {
        riskFactor: ["sanctioned", "regulatory_action"],
        riskCategory: ["sanctions", "export_controls"],
    },
});

⚙️ Parameters

projectId: string

projectEntityId: string

request: Sayari.GetProjectEntityRiskSummaryRequest

requestOptions: ProjectEntity.RequestOptions

client.projectEntity.projectEntitySupplyChainSummary(projectId, projectEntityId, { ...params }) -> Sayari.ProjectEntitySupplyChainSummaryResponse

📝 Description

Execute a traversal of the upstream trade network (supply chain) for all matched entities of a project entity, returning a summary of countries, risks, and components.

🔌 Usage

await client.projectEntity.projectEntitySupplyChainSummary("0n4473", "yebNPJ", {
    maxDepth: 4,
});

⚙️ Parameters

projectId: string — The project Identifier

projectEntityId: string — The project entity Identifier

request: Sayari.ProjectEntitySupplyChainSummaryRequest

requestOptions: ProjectEntity.RequestOptions

Project

client.project.createProject({ ...params }) -> Sayari.CreateProjectResponse

📝 Description

Create a new project.

🔌 Usage

await client.project.createProject({
    label: "My First Project",
    share: {
        org: "admin",
    },
});

⚙️ Parameters

request: Sayari.CreateProjectRequest

requestOptions: Project.RequestOptions

client.project.getProjects({ ...params }) -> Sayari.GetProjectsResponse

📝 Description

Retrieve a list of projects including upload progress info.

🔌 Usage

await client.project.getProjects({
    archived: false,
    limit: 8,
});

⚙️ Parameters

request: Sayari.GetProjects

requestOptions: Project.RequestOptions

client.project.deleteProject(projectId) -> Sayari.DeleteProjectResponse

📝 Description

Deletes an existing project.

🔌 Usage

await client.project.deleteProject("Gam5qG");

⚙️ Parameters

projectId: string

requestOptions: Project.RequestOptions

Record

client.record.getRecord(id, { ...params }) -> Sayari.GetRecordResponse

📝 Description

Retrieve a record from the database based on the ID

🔌 Usage

await client.record.getRecord("74cf0fc2a62f9c8f4e88f8a0b3ffcca4%2FF0000110%2F1682970471254");

⚙️ Parameters

id: string — The unique identifier for a record in the database

request: Sayari.GetRecord

requestOptions: Record_.RequestOptions

Resolution

client.resolution.resolution({ ...params }) -> Sayari.ResolutionResponse

📝 Description

The resolution endpoints allow users to search for matching entities against a provided list of attributes. The endpoint is similar to the search endpoint, except it's tuned to only return the best match so the client doesn't need to do as much or any post-processing work to filter down results.

🔌 Usage

await client.resolution.resolution({
    name: "Thomas Bangalter",
    address: "8 AVENUE RACHEL",
    country: "FRA",
});

⚙️ Parameters

request: Sayari.Resolution

requestOptions: Resolution.RequestOptions

client.resolution.resolutionPost({ ...params }) -> Sayari.ResolutionResponse

📝 Description

The resolution endpoints allow users to search for matching entities against a provided list of attributes. The endpoint is similar to the search endpoint, except it's tuned to only return the best match so the client doesn't need to do as much or any post-processing work to filter down results.

🔌 Usage

await client.resolution.resolutionPost({
    limit: 1,
    body: {
        name: ["Thomas Bangalter"],
        address: ["8 AVENUE RACHEL"],
        country: ["FRA"],
    },
});

⚙️ Parameters

request: Sayari.ResolutionPost

requestOptions: Resolution.RequestOptions

client.resolution.resolutionPersisted(projectId, { ...params }) -> Sayari.ResolutionPersistedResponse

📝 Description

This endpoint is deprecated. The persisted resolution endpoints allow users to search for matching entities against a provided list of attributes. The endpoint is similar to the resolution endpoint, except it also stores matched entities into user's project.

🔌 Usage

await client.resolution.resolutionPersisted("V03eYM", {
    limit: 1,
    body: {
        name: ["victoria beckham limited"],
    },
});

⚙️ Parameters

projectId: string — Unique identifier of the project

request: Sayari.ResolutionPersisted

requestOptions: Resolution.RequestOptions

client.resolution.resolutionUpload(projectId, { ...params }) -> Sayari.ResolutionUploadResponse

📝 Description

This endpoint is deprecated. This endpoint allows you to upload entities in bulk.

🔌 Usage

await client.resolution.resolutionUpload("V03eYM", {
    filename: "vbeck.json",
    data: [
        {
            name: ["victoria beckham limited"],
            tags: ["spice girls"],
        },
    ],
});

⚙️ Parameters

projectId: string — Unique identifier of the project

request: Sayari.ResolutionUploadBody

requestOptions: Resolution.RequestOptions

Resource

client.resource.saveEntity({ ...params }) -> Sayari.SaveEntityResponse

📝 Description

Save an entity to a project.

🔌 Usage

await client.resource.saveEntity({
    type: "entity",
    project: "GNJbkG",
    entityId: "Zk0qOaM2SSYg_ZhsljykMQ",
    customFields: {
        properties: {
            custom_name: "Victoria Beckham",
        },
    },
});

⚙️ Parameters

request: Sayari.SaveEntityRequest

requestOptions: Resource.RequestOptions

client.resource.deleteResource(type_, resourceId) -> Sayari.DeleteResourceResponse

📝 Description

Deletes an existing saved resource from a project.

🔌 Usage

await client.resource.deleteResource("entity", "YWmNKV");

⚙️ Parameters

type_: Sayari.ResourceType

resourceId: string

requestOptions: Resource.RequestOptions

Search

client.search.searchEntity({ ...params }) -> Sayari.EntitySearchResponse

📝 Description

Search for an entity. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.search.searchEntity({
    limit: 1,
    q: "victoria beckham limited",
});

⚙️ Parameters

request: Sayari.SearchEntity

requestOptions: Search.RequestOptions

client.search.searchEntityGet({ ...params }) -> Sayari.EntitySearchResponse

📝 Description

Search for an entity. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.search.searchEntityGet({
    limit: 1,
    q: "victoria beckham limited",
});

⚙️ Parameters

request: Sayari.SearchEntityGet

requestOptions: Search.RequestOptions

client.search.searchRecord({ ...params }) -> Sayari.RecordSearchResponse

📝 Description

Search for a record. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.search.searchRecord({
    limit: 1,
    q: "victoria beckham limited",
});

⚙️ Parameters

request: Sayari.SearchRecord

requestOptions: Search.RequestOptions

client.search.searchRecordGet({ ...params }) -> Sayari.RecordSearchResponse

📝 Description

Search for a record. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.search.searchRecordGet({
    q: "victoria beckham limited",
    limit: 1,
});

⚙️ Parameters

request: Sayari.SearchRecordGet

requestOptions: Search.RequestOptions

SupplyChain

client.supplyChain.upstreamTradeTraversal(id, { ...params }) -> Sayari.UpstreamTradeTraversalResponse

📝 Description

Execute a traversal of the upstream trade network (supply chain) of an entity, returning a set of entities and edges between them.

🔌 Usage

await client.supplyChain.upstreamTradeTraversal("ESkH7J-UCRfY5t0_JXIH3w", {
    minDate: "2023-03-15",
    product: ["3204"],
    risk: ["forced_labor_xinjiang_origin_subtier"],
});

⚙️ Parameters

id: string — The root entity identifier.

request: Sayari.UpstreamTradeTraversalRequest

requestOptions: SupplyChain.RequestOptions

Trade

client.trade.searchShipments({ ...params }) -> Sayari.ShipmentSearchResponse

📝 Description

Search for a shipment. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.trade.searchShipments({
    limit: 1,
    filter: {
        departureCountry: ["DEU"],
        arrivalCountry: ["RUS"],
        hsCode: ["854231"],
        arrivalDate: "2024-01|2024-10",
    },
});

⚙️ Parameters

request: Sayari.SearchShipments

requestOptions: Trade.RequestOptions

client.trade.searchSuppliers({ ...params }) -> Sayari.SupplierSearchResponse

📝 Description

Search for a supplier. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.trade.searchSuppliers({
    limit: 1,
    filter: {
        departureCountry: ["DEU"],
        arrivalCountry: ["RUS"],
        hsCode: ["854231"],
        arrivalDate: "2024-01|2024-10",
    },
});

⚙️ Parameters

request: Sayari.SearchSuppliers

requestOptions: Trade.RequestOptions

client.trade.searchBuyers({ ...params }) -> Sayari.BuyerSearchResponse

📝 Description

Search for a buyer. Please note, searches are limited to a maximum of 10,000 results.

🔌 Usage

await client.trade.searchBuyers({
    limit: 1,
    filter: {
        departureCountry: ["DEU"],
        arrivalCountry: ["RUS"],
        hsCode: ["854231"],
        arrivalDate: "2024-01|2024-10",
    },
});

⚙️ Parameters

request: Sayari.SearchBuyers

requestOptions: Trade.RequestOptions

Traversal

client.traversal.traversal(id, { ...params }) -> Sayari.TraversalResponse

📝 Description

The Traversal endpoint returns paths from a single target entity to up to 50 directly or indirectly-related entities. Each path includes information on the 0 to 10 intermediary entities, as well as their connecting relationships. The response's explored_count field indicates the size of the graph subset the application searched. Running a traversal on a highly connected entity with a restrictive set of argument filters and a high max depth will require the application to explore a higher number of traversal paths, which may affect performance. In cases where a traversal searches over a very large, highly-connected subgraph, a partial result set may be returned containing only the most relevant results. This will be indicated in the response by the partial_results field.

🔌 Usage

await client.traversal.traversal("mGq1lpuqKssNWTjIokuPeA", {
    limit: 1,
});

⚙️ Parameters

id: string — Unique identifier of the entity

request: Sayari.Traversal

requestOptions: Traversal.RequestOptions

client.traversal.ubo(id, { ...params }) -> Sayari.TraversalResponse

📝 Description

The UBO endpoint returns paths from a single target entity to up to 50 beneficial owners. The endpoint is a shorthand for the equivalent traversal query.

🔌 Usage

await client.traversal.ubo("mGq1lpuqKssNWTjIokuPeA", {
    limit: 1,
});

⚙️ Parameters

id: string — Unique identifier of the entity

request: Sayari.Ubo

requestOptions: Traversal.RequestOptions

client.traversal.ownership(id, { ...params }) -> Sayari.TraversalResponse

📝 Description

The Ownership endpoint returns paths from a single target entity to up to 50 entities directly or indirectly owned by that entity. The endpoint is a shorthand for the equivalent traversal query.

🔌 Usage

await client.traversal.ownership("mGq1lpuqKssNWTjIokuPeA", {
    limit: 1,
});

⚙️ Parameters

id: string — Unique identifier of the entity

request: Sayari.Ownership

requestOptions: Traversal.RequestOptions

client.traversal.watchlist(id, { ...params }) -> Sayari.TraversalResponse

📝 Description

The Watchlist endpoint returns paths from a single target entity to up to 50 other entities that appear on a watchlist. The endpoint is a shorthand for the equivalent traversal query.

🔌 Usage

await client.traversal.watchlist("mGq1lpuqKssNWTjIokuPeA", {
    limit: 1,
});

⚙️ Parameters

id: string — Unique identifier of the entity

request: Sayari.Watchlist

requestOptions: Traversal.RequestOptions

client.traversal.shortestPath({ ...params }) -> Sayari.ShortestPathResponse

📝 Description

The Shortest Path endpoint returns a response identifying the shortest traversal path connecting each pair of entities.

🔌 Usage

await client.traversal.shortestPath({
    entities: "H1y25N5ymnFyZ-q9Lpwm_g&entities=xthsA_jQuKn3GW8-9ILQqg",
});

⚙️ Parameters

request: Sayari.ShortestPath

requestOptions: Traversal.RequestOptions