Documentation

SearchCompanies extends RNEClient
in package
implements SearchCompaniesInterface

Class SearchCompanies

Table of Contents

Interfaces

SearchCompaniesInterface

Constants

BASE_URI  = 'https://registre-national-entreprises.inpi.fr/'
DEFAULT_PAGE_SIZE  = 20
VALID_ACTIVITY_SECTORS  = ['AGENT_COMMERCIAL', 'AGRICOLE_NON_ACTIF', 'ACTIF_AGRICOLE', 'ARTISANALE', 'ARTISANALE_REGLEMENTEE', 'COMMERCIALE', 'LIBERALE_REGLEMENTEE', 'LIBERALE_NON_REGLEMENTEE', 'GESTION_DE_BIENS', 'SANS_ACTIVITE']

Properties

$client  : Client
$token  : string|null

Methods

__construct()  : mixed
RNEClient constructor.
authenticate()  : void
Authentify the user and store the token in the client
getToken()  : string
Get the token
searchByActivitySector()  : array<string|int, mixed>
Search companies by its activity sector
searchByCategoryCode()  : array<string|int, mixed>
Search companies by its category code
searchByMultipleSiren()  : array<string|int, mixed>
Search companies by multiple siren numbers Exact search only
searchByName()  : array<string|int, mixed>
Search companies by their name Contains type search (starts with, contains, ends with)
searchByNationalDepositNumber()  : array<string|int, mixed>
Search a single company by its national deposit number
searchBySiren()  : array<string|int, mixed>
Search a company by its siren number Exact search only
searchBySubmissionDate()  : array<string|int, mixed>
Search a company by its submission dates submissionDateFrom (included) and submissionDateTo (not included), at least from is required
searchByZipCode()  : array<string|int, mixed>
Search companies by its zip codes INPI DOCUMENTATION AMBIGUITY WARNING - Seems to be a array of only one zip code (issue with the INPI API) If multiple zip codes are provided to the API, results are not correct
searchOldStateBySiren()  : array<string|int, mixed>
Search a single company old state by its siren and date
addPageSizeToUrl()  : string
Add the page size parameter to the url
addPageToUrl()  : string
Add the page parameter to the url
catchResponseErrors()  : void
Catch the response errors
decorateResponse()  : array<string|int, mixed>
add a decoration to the response resultsCount, hasMoreResults, nextPageUrl
getAuthorizationHeaderArray()  : array<string|int, mixed>
Get the authorization header array
requestApi()  : array<string|int, mixed>
Request the API

Constants

BASE_URI

public mixed BASE_URI = 'https://registre-national-entreprises.inpi.fr/'

DEFAULT_PAGE_SIZE

public mixed DEFAULT_PAGE_SIZE = 20

VALID_ACTIVITY_SECTORS

public mixed VALID_ACTIVITY_SECTORS = ['AGENT_COMMERCIAL', 'AGRICOLE_NON_ACTIF', 'ACTIF_AGRICOLE', 'ARTISANALE', 'ARTISANALE_REGLEMENTEE', 'COMMERCIALE', 'LIBERALE_REGLEMENTEE', 'LIBERALE_NON_REGLEMENTEE', 'GESTION_DE_BIENS', 'SANS_ACTIVITE']

Properties

Methods

__construct()

RNEClient constructor.

public __construct([string|null $token = null ][, Client|null $client = null ]) : mixed

If a token is provided, it will be used for the requests Otherwise, the user will have to authenticate first

Parameters
$token : string|null = null
$client : Client|null = null

authenticate()

Authentify the user and store the token in the client

public authenticate(string $username, string $password) : void
Parameters
$username : string
$password : string
Tags
throws
GuzzleException

getToken()

Get the token

public getToken() : string
Return values
string

searchByActivitySector()

Search companies by its activity sector

public searchByActivitySector(string $activitySector[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$activitySector : string
$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchByCategoryCode()

Search companies by its category code

public searchByCategoryCode(string $categoryCode[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$categoryCode : string
$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchByMultipleSiren()

Search companies by multiple siren numbers Exact search only

public searchByMultipleSiren(array<string|int, mixed> $sirens[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$sirens : array<string|int, mixed>
$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchByName()

Search companies by their name Contains type search (starts with, contains, ends with)

public searchByName(string $name[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$name : string
$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchByNationalDepositNumber()

Search a single company by its national deposit number

public searchByNationalDepositNumber(string $nationalDepositNumber) : array<string|int, mixed>
Parameters
$nationalDepositNumber : string
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchBySiren()

Search a company by its siren number Exact search only

public searchBySiren(string $siren) : array<string|int, mixed>
Parameters
$siren : string
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchBySubmissionDate()

Search a company by its submission dates submissionDateFrom (included) and submissionDateTo (not included), at least from is required

public searchBySubmissionDate(string $submissionDateFrom, string|null $submissionDateTo[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$submissionDateFrom : string

(YYYY-MM-DD format) - included

$submissionDateTo : string|null

(YYYY-MM-DD format) - not included

$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchByZipCode()

Search companies by its zip codes INPI DOCUMENTATION AMBIGUITY WARNING - Seems to be a array of only one zip code (issue with the INPI API) If multiple zip codes are provided to the API, results are not correct

public searchByZipCode(string $zipCode[, int $pageSize = self::DEFAULT_PAGE_SIZE ][, int $page = 1 ]) : array<string|int, mixed>

You can specify page size and page number iterate over the pages to get all the results

Parameters
$zipCode : string
$pageSize : int = self::DEFAULT_PAGE_SIZE
$page : int = 1
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

searchOldStateBySiren()

Search a single company old state by its siren and date

public searchOldStateBySiren(string $siren, string $date) : array<string|int, mixed>
Parameters
$siren : string
$date : string

(YYYY-MM-DD format)

Tags
throws
GuzzleException
Return values
array<string|int, mixed>

addPageSizeToUrl()

Add the page size parameter to the url

protected addPageSizeToUrl(string $url, int $pageSize) : string
Parameters
$url : string
$pageSize : int
Tags
throws
Exception
Return values
string

addPageToUrl()

Add the page parameter to the url

protected addPageToUrl(string $url, int $page) : string
Parameters
$url : string
$page : int
Tags
throws
Exception
Return values
string

catchResponseErrors()

Catch the response errors

protected catchResponseErrors(GuzzleException $e) : void
Parameters
$e : GuzzleException
Tags
throws
Exception

decorateResponse()

add a decoration to the response resultsCount, hasMoreResults, nextPageUrl

protected decorateResponse(array<string|int, mixed> $data[, int $pageSize = self::DEFAULT_PAGE_SIZE ]) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
$pageSize : int = self::DEFAULT_PAGE_SIZE
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

getAuthorizationHeaderArray()

Get the authorization header array

protected getAuthorizationHeaderArray() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

requestApi()

Request the API

protected requestApi(string $method, string $url[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$method : string
$url : string
$options : array<string|int, mixed> = []
Tags
throws
GuzzleException
Return values
array<string|int, mixed>

        
On this page

Search results