new-vision/duedil

DueDil API 的 Swagger 生成的客户端。

1.0.0 2019-09-02 15:50 UTC

This package is not auto-updated.

Last update: 2024-09-22 07:49:29 UTC


README

Welcome to the DueDil API v4, which provides programmatic access to DueDil's comprehensive company data. It can be used to enhance a wide variety of business functions, from auto-populating website forms to verifying customer credentials. ### Getting started In order to make requests, you'll need to obtain an API key. Please visit https://www.duedil.com/api for more information. Once you have an API key, requests can be made using a UI such as Postman or via a terminal using curl. An example curl request should look as follows: curl -X GET --header 'Accept: application/json' --header 'X-AUTH-TOKEN: api_key' 'https://duedil.io/v4/company/gb/06999618.json' ### Generating clients This API has been authored using the OpenAPI (Swagger) specification. Being machine readable, it can be used to generate V4 API clients in a range of languages. To create a client: Open the Swagger Editor. Select 'File', 'Import URL' then enter https://duedil.io/v4/swagger.json * Select 'Generate Client' then choose from over 30 languages such as PHP, Python and Java. ### International data DueDil provides a wide range of data spanning across multiple geographic regions. Our international package currently includes company information from the following countries: | Country | | Country | | |----------------------|----|---------------|----| | Albania | AL | Jersey | JE | | Bahamas | BS | Latvia | LV | | Belgium | BE | Liechtenstein | LI | | Bermuda | BM | Luxembourg | LU | | Hong Kong, SAR China | HK | Malta | MT | | Cyprus | CY | Montenegro | ME | | Denmark | DK | Netherlands | NL | | Finland | FI | Norway | NO | | France | FR | Poland | PL | | Germany | DE | Romania | RO | | Greenland | GL | Slovakia | SK | | Guernsey | GG | Slovenia | SI | | Iceland | IS | Sweden | SE | | Isle of Man | IM | Switzerland | CH | | Israel | IL | | | Retrieving international data is simple. Construct your request with the corresponding country code. For the German company Daimler AG you should construct your request URI as follows: curl -X GET --header 'Accept: application/json' --header 'X-AUTH-TOKEN: api_key' 'https://duedil.io/v4/company/de/Stuttgart%20HRB%2019360.json' For Companies search, the country code should be included in the post body: { \"criteria\": { \"name\": \"Daimler AG\", \"countryCodes\": { \"values\": [\"DE\", \"FR\"] } } } Note: You will need to have international access added to your plan to search for and retrieve information for companies outside of the United Kingdom (GB) and Ireland (IE). #### Data coverage While 100% coverage is our goal, this is not feasible for every international country at present. If we cannot find the entity you are requesting, the API will return HTTP 404 with message “Resource not found”. Partial responses can include null fields where specific data is unavailable. ### Pagination All endpoints that return collections can be paginated in the same way through two optional parameters (limit and offset). The offset parameter determines the 0-based index of the first element of the collection to be returned, which defaults to 0. The limit parameter sets the maximum number of items from the collection to be returned, which defaults to 10. The maximum allowed limit parameter is 50. Note: API keys issued for evaluation purposes will have limited access to the first 10 search results only. Other non-search endpoints do not apply this constraint. Every response from a paginated endpoint contains a top-level property called pagination, which in turn contains the offset and limit values used in the API call, as well as the total number of items in the collection. For instance: \"pagination\": { \"offset\": 0, \"limit\": 10, \"total\": 12 } In the example above, an API call with offset = 10 and limit = 10 would return the 11th and 12th items in the collection, whereas an API call with offset = 20 and limit = 10 would return a successful response (200 HTTP code) with an empty collection. Calls with invalid offset/limit parameters, such as negative values, return an error (400 HTTP code).

此 PHP 包是由 Swagger Codegen 项目自动生成的

  • API 版本:4.5.6
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

要求

PHP 5.5 及以上版本

安装与使用

Composer

要通过 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com//.git"
    }
  ],
  "require": {
    "/": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请按照 安装过程 进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: UserSecurity
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');

$apiInstance = new Swagger\Client\Api\ComplianceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$format = "format_example"; // string | Response format. Currently, only supported option is json.
$callcredit_identity_check = new \Swagger\Client\Model\CallcreditIdentityCheckInput(); // \Swagger\Client\Model\CallcreditIdentityCheckInput | Details about an individual and their address to conduct an identity check.

try {
    $result = $apiInstance->callcreditIdentityCheckFormatPost($format, $callcredit_identity_check);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ComplianceApi->callcreditIdentityCheckFormatPost: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

所有 URI 都相对于 https://duedil.io/v4

方法HTTP 请求描述
ComplianceApicallcreditIdentityCheckFormatPostPOST /callcredit/identity-check.{format}身份验证
ComplianceApiduedilCompanyCheckFormatPostPOST /duedil/company-check.{format}公司检查
CreditReportApicompanyCountryCodeCompanyIdCreditReportFormatGetGET /company/{countryCode}/{companyId}/credit-report.{format}信用报告
EssentialsApicharityCountryCodeCharityIdAreasOfActivityFormatGetGET /charity/{countryCode}/{charityId}/areas-of-activity.{format}慈善活动领域
EssentialsApicharityCountryCodeCharityIdClassifiersFormatGetGET /charity/{countryCode}/{charityId}/classifiers.{format}慈善分类
EssentialsApicharityCountryCodeCharityIdFormatGetGET /charity/{countryCode}/{charityId}.{format}慈善概况
EssentialsApicharityCountryCodeCharityIdRegisteredNamesFormatGetGET /charity/{countryCode}/{charityId}/registered-names.{format}慈善注册名称
EssentialsApicharityCountryCodeCharityIdStatusHistoryFormatGetGET /charity/{countryCode}/{charityId}/status-history.{format}慈善状态历史
EssentialsApicharityCountryCodeCharityIdTrusteesFormatGetGET /charity/{countryCode}/{charityId}/trustees.{format}慈善受托人
EssentialsApicompanyCountryCodeCompanyIdAddressesFormatGetGET /company/{countryCode}/{companyId}/addresses.{format}公司地址
EssentialsApicompanyCountryCodeCompanyIdCharitableIdentitiesFormatGetGET /company/{countryCode}/{companyId}/charitable-identities.{format}公司慈善身份
EssentialsApicompanyCountryCodeCompanyIdDescriptionsFormatGetGET /company/{countryCode}/{companyId}/descriptions.{format}公司描述
EssentialsApicompanyCountryCodeCompanyIdFormatGetGET /company/{countryCode}/{companyId}.{format}公司概况
EssentialsApicompanyCountryCodeCompanyIdHmrcImportsExportsFormatGetGET /company/{countryCode}/{companyId}/hmrc-imports-exports.{format}公司 HMRC 进出口
EssentialsApicompanyCountryCodeCompanyIdIndustriesFormatGetGET /company/{countryCode}/{companyId}/industries.{format}公司行业
EssentialsApicompanyCountryCodeCompanyIdKeywordsFormatGetGET /company/{countryCode}/{companyId}/keywords.{format}公司关键词
EssentialsApicompanyCountryCodeCompanyIdOfficersFormatGetGET /company/{countryCode}/{companyId}/officers.{format}公司官员
EssentialsApicompanyCountryCodeCompanyIdRegisteredNamesFormatGetGET /company/{countryCode}/{companyId}/registered-names.{format}公司注册名称
EssentialsApicompanyCountryCodeCompanyIdRelatedNamesFormatGetGET /company/{countryCode}/{companyId}/related-names.{format}公司相关名称
EssentialsApicompanyCountryCodeCompanyIdSocialMediaProfilesFormatGetGET /company/{countryCode}/{companyId}/social-media-profiles.{format}公司社交媒体档案
EssentialsApi公司国家代码公司ID电话号码格式获取GET /company/{countryCode}/{companyId}/telephone-numbers.{format}公司电话号码
EssentialsApi公司国家代码公司ID网站格式获取GET /company/{countryCode}/{companyId}/websites.{format}公司网站
EssentialsApi官员官员ID公司格式获取GET /officer/{officerId}/companies.{format}官员任命
EssentialsApi官员官员ID格式获取GET /officer/{officerId}.{format}官员详细信息
财务信息API慈善国家代码慈善ID财务信息格式获取GET /charity/{countryCode}/{charityId}/financials.{format}慈善财务信息
财务信息API公司国家代码公司ID财务信息格式获取GET /company/{countryCode}/{companyId}/financials.{format}公司财务信息
所有权API慈善国家代码慈善ID子公司格式获取GET /charity/{countryCode}/{charityId}/subsidiaries.{format}慈善子公司
所有权API公司国家代码公司ID银行账户格式获取GET /company/{countryCode}/{companyId}/bank-accounts.{format}公司银行账户
所有权API公司国家代码公司ID费用格式获取GET /company/{countryCode}/{companyId}/charges.{format}公司费用
所有权API公司国家代码公司IDFCA授权格式获取GET /company/{countryCode}/{companyId}/fca-authorisations.{format}公司FCA授权
所有权API公司国家代码公司ID提交格式获取GET /company/{countryCode}/{companyId}/filings.{format}公司提交
所有权API公司国家代码公司ID公告通知格式获取GET /company/{countryCode}/{companyId}/gazette-notices.{format}公司公告通知
所有权API公司国家代码公司ID集团父格式获取GET /company/{countryCode}/{companyId}/group-parents.{format}公司集团父
所有权API公司国家代码公司ID集团子公司格式获取GET /company/{countryCode}/{companyId}/group-subsidiaries.{format}公司集团子公司
所有权API公司国家代码公司ID重大控制人格式获取GET /company/{countryCode}/{companyId}/persons-significant-control.{format}公司重大控制人
所有权API公司国家代码公司ID投资组合公司格式获取GET /company/{countryCode}/{companyId}/portfolio-companies.{format}公司投资组合公司
所有权API公司国家代码公司ID相关公司格式获取GET /company/{countryCode}/{companyId}/related-companies.{format}公司相关公司
所有权API公司国家代码公司ID股东格式获取GET /company/{countryCode}/{companyId}/shareholders.{format}公司股东
PEPs和制裁APIpepsSanctionsBusinessLookupIdFormatGetGET /peps-sanctions/business/{lookupId}.{format}PEPs和制裁业务查找
PEPs和制裁APIpepsSanctionsIndividualLookupIdFormatGetGET /peps-sanctions/individual/{lookupId}.{format}PEPs和制裁个人查找
PEPs和制裁APIpepsSanctionsSearchBusinessesFormatPostPOST /peps-sanctions/search/businesses.{format}PEPs和制裁业务搜索
PEPs和制裁APIpepsSanctionsSearchIndividualsFormatPostPOST /peps-sanctions/search/individuals.{format}PEPs和制裁个人搜索
搜索APIsearchCharitiesFormatPostPOST /search/charities.{format}查找慈善机构
搜索APIsearchCompaniesFormatPostPOST /search/companies.{format}查找公司
搜索APIsearchKeywordsFormatPostPOST /search/keywords.{format}查找关键词(用于公司/官员搜索过滤器)
搜索APIsearchOfficersFormatPostPOST /search/officers.{format}查找官员
搜索APIsearchRegionsFormatPostPOST /search/regions.{format}查找地区(用于公司/官员搜索过滤器)

模型文档

授权文件

用户安全

  • 类型:API密钥
  • API密钥参数名称:X-AUTH-TOKEN
  • 位置:HTTP头

作者