GithubHelp home page GithubHelp logo

cyborgfinance / fcaregisterlaravel Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 17 KB

Financial Conduct Authority (FCA) API Client Library wrapper for Laravel.

License: MIT License

PHP 100.00%
laravel fca api-wrapper api-service laravel-package

fcaregisterlaravel's Introduction

Financial Conduct Authority (FCA) API Client Library wrapper for Laravel.

Latest Version on Packagist Total Downloads

Financial Conduct Authority (FCA) API Client Library wrapper for Laravel.

The Financial Services Register

The online Financial Services Register (FS Register) is a public record of financial services firms, individuals and other bodies regulated by the FCA.

The online FS Register provides an online search for firms that are or have been regulated by the FCA. It also allows users to search for businesses that are or have been registered with the FCA under the FSMA, the Money Laundering Regulations 2007, the Payment Services Regulations 2009, and the Electronic Money Regulations 2011. Access to the online FS Register is free; it is suitable for ad-hoc searches for authorised and registered firms and individuals.

The Financial Services Register API Service

The FCA API is a new service offered by the Financial Conduct Authority, its in early stages with limited data points. You will first need to Register an Account to get an API Key.

It is a RESTful API based on HTTPS requests and JSON responses, requiring an API username and key for authentication.

The FS Register API currently sets a maximum limit of 10 requests per 10 seconds, which is periodically subject to change.

Installation

You can install the package via composer:

composer require cyborgfinance/fcaregisterlaravel

You can publish the config file with:

php artisan vendor:publish --provider="Cyborgfinance\Fcaregisterlaravel\FcaregisterlaravelServiceProvider" --tag="fcaapi-config"

This is the contents of the published config file:

return [
  'email' => '[email protected]', // FCA API Email Address
  'key' => 'SOMEAPIKEYPASSWORD', // FCA API KEY
  'api_version' => '0.1', // FCA API VERSION
  'api_url' => 'https://register.fca.org.uk/services/', // FCA API URL
  'api_timeout' => 5, // FCA API TIMEOUT in seconds
];

Usage

namespace App\Http\Controllers;
use Cyborgfinance\Fcaregisterlaravel\Fcaapi;

class Testing extends Controller {

    public function __invoke(Request $request){

      $fcaFrnNumber = 919921; //FCA Firm Reference Number (FRN)

      $fcaApi = new Fcaapi();
      $result = $fcaApi->firmDetails($fcaFrnNumber)->json(); //Queries FCA Register

      dd($result); // Outputs Array

    }
}

or

namespace App\Http\Controllers;
use Cyborgfinance\Fcaregisterlaravel\Fcaapi;

class Testing extends Controller {

    public function __invoke(Request $request){

      $fcaFrnNumber = 919921; //FCA Firm Reference Number (FRN)

      $result = Fcaapi::firmDetails($fcaFrnNumber)->json(); //Queries FCA Register

      dd($result); // Outputs Array

    }
}

Both of these examples will output:

array:4 [▼
  "Status" => "FSR-API-02-01-00"
  "ResultInfo" => array:3 [▼
    "page" => "1"
    "per_page" => "1"
    "total_count" => "1"
  ]
  "Message" => "Ok. Firm Found"
  "Data" => array:1 [▼
    0 => array:21 [▼
      "Name" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Names"
      "Individuals" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Individuals"
      "Requirements" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Requirements"
      "Permission" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Permissions"
      "Passport" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Passports"
      "Regulators" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Regulators"
      "Appointed Representative" => "https://register.fca.org.uk/services/V0.1/Firm/919921/AR"
      "Address" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Address"
      "Waivers" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Waivers"
      "Exclusions" => "https://register.fca.org.uk/services/V0.1/Firm/919921/Exclusions"
      "DisciplinaryHistory" => "https://register.fca.org.uk/services/V0.1/Firm/919921/DisciplinaryHistory"
      "System Timestamp" => "10/04/2021 15:49"
      "Exceptional Info Title" => ""
      "Exceptional Info Body" => ""
      "Status Effective Date" => "24/04/2020"
      "PSD Agent Status" => ""
      "PSD / EMD Status" => ""
      "Status" => "Authorised"
      "Business Type" => "Regulated"
      "Organisation Name" => "CYBORG FINANCE LIMITED"
      "FRN" => "919921"
    ]
  ]
]

FCA Register Lookup Methods

Company Records

//Get information about a specific firm using its Firm Reference Number
$request = Fcaapi::firmDetails($fcaFrnNumber);
//Get information about the Individuals associated with a firm using its Firm Reference Number
$request = Fcaapi::firmIndividuals($fcaFrnNumber);
//Get information about the other names used by the firms using its Firm Reference Number
$request = Fcaapi::firmName($fcaFrnNumber);
//Get information about the requirements associated with a specific firm using its Firm Reference Number
$request = Fcaapi::firmRequirements($fcaFrnNumber);
//Get information about the activities and permissions associated with a specific firm using its Firm Reference Number
$request = Fcaapi::firmPermissions($fcaFrnNumber);
//Get information about a passport details by using its Firm Reference Number
$request = Fcaapi::firmPassports($fcaFrnNumber);
//Get information about a passport permission by using its Firm Reference Number and Country
$request = Fcaapi::firmPassportCountry($fcaFrnNumber, $country);
//Get information about a regulator on a firm using its Firm Reference Number
$request = Fcaapi::firmRegulators($fcaFrnNumber);
//Get information about the Appointed Representatives associated with a firm using its Firm Reference Number
$request = Fcaapi::firmAppointedRepresentatives($fcaFrnNumber);
//Get information about a specific firm using its Firm Reference Number
$request = Fcaapi::firmAddress($fcaFrnNumber);
//Get information about a Waiver on a firm using it's Firm Reference Number
$request = Fcaapi::firmWaivers($fcaFrnNumber);
//Get information about an Exclusion on a firm using it's Firm Reference Number
$request = Fcaapi::firmExclusions($fcaFrnNumber);
//Get information about a DisciplinaryHistory on a firm using it's Firm Reference Number
$request = Fcaapi::firmDisciplinaryHistory($fcaFrnNumber);

Individual Records

//Get information about the Individuals associated with its Individual Reference Number
$request = Fcaapi::individualDetails($fcaIrnNumber);
//Get information about all the firms, the Individual has a control function using their Individual Reference Number
$request = Fcaapi::individualFunctions($fcaIrnNumber);

Search Records

//Search the FS register using this API
$request = Fcaapi::search($search);
//Search the FS register using this API
$request = Fcaapi::searchRm();

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

TODO

[] Fix Config Publish

fcaregisterlaravel's People

Contributors

ahosker avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

quickcarfinance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.