Instant ======= The API provides the ability to purchase instant reports (a.k.a. instants) which contain basic information about companies in the Netherlands. There is also a short version available. Purchase an instant ------------------- To purchase an instant report, make a POST request to the https://inquiry.creditandcollection.nl/api/instants endpoint. HTTP Request ~~~~~~~~~~~~ ``POST https://inquiry.creditandcollection.nl/api/instants`` Request Body ~~~~~~~~~~~~ A description of the available attributes. .. _instant-attr-regnumber: reg_number ++++++++++ :type: string :required: yes :note: Must consist of 8 digits. product +++++++ :type: enum :required: no :options: D44CI701, D44CI704 :note: Use this attribute to request a specific report. short +++++ :type: boolean :required: no :default: false :note: Use this attribute to request a short version. Ignored if **product** attribute is used. Example ~~~~~~~ .. code-block:: sh curl \ --user username:password \ --request POST \ --header 'Content-Type: application/json' \ --data '{"reg_number":"28092355"}' \ 'https://inquiry.creditandcollection.nl/api/instants' Response ~~~~~~~~ Contains a json report. See :ref:`instant-content` for more information about the contents of this report type. .. note:: The response includes an **X-Instant-ID** header which contains the ID of the instant report. You could extract this ID and use it to fetch the PDF version. Browse instants --------------- To browse instants, make a GET request to the https://inquiry.creditandcollection.nl/api/instants endpoint. HTTP Request ~~~~~~~~~~~~ ``GET https://inquiry.creditandcollection.nl/api/instants`` Query Parameters ~~~~~~~~~~~~~~~~ ============== ======= Parameter Default ============== ======= year month day page 1 ============== ======= The items are sorted by **created_at** in descending order. Example ~~~~~~~ .. code-block:: sh curl \ --user username:password \ --get \ --data-urlencode 'year=2019' \ --data-urlencode 'month=1' \ 'https://inquiry.creditandcollection.nl/api/instants' Response ~~~~~~~~ See :ref:`instant-schema-instantlistresponse` schema for more information about the response format. .. code-block:: json { "list": [ { "id": 1, "reg_number": "28092355", "short": false, "created_at": "2019-01-01T12:00:00Z", "refs": { "self": "\/api\/instants\/1", } }, { "id": 2, "reg_number": "28092355", "product": "D44CI701", "created_at": "2019-01-01T12:00:00Z", "refs": { "self": "\/api\/instants\/2", } } ], "meta": { "items": 2, "current_page": 1, "more_items": false } } Fetch instant ------------- To fetch an instant, make a GET request to the https://inquiry.creditandcollection.nl/api/instants/:instant_id endpoint. HTTP Request ~~~~~~~~~~~~ ``GET https://inquiry.creditandcollection.nl/api/instants/1`` Example ~~~~~~~ .. code-block:: sh curl \ --user username:password \ 'https://inquiry.creditandcollection.nl/api/instants/1' Response ~~~~~~~~ Contains a json report. See :ref:`instant-content` for more information about the contents of this report type. Fetch a PDF report ------------------ To fetch a PDF report, make a GET request to the https://inquiry.creditandcollection.nl/api/instants/:instant_id endpoint with the query parameter *format* set to *PDF*. HTTP Request ~~~~~~~~~~~~ ``GET https://inquiry.creditandcollection.nl/api/instants/:instant_id?format=PDF`` Example ~~~~~~~ .. code-block:: sh curl \ --user username:password \ 'https://inquiry.creditandcollection.nl/api/instants/1?format=PDF' > report.pdf Response ~~~~~~~~ The body contains the contents of a PDF and the content-type header is set to *application/octet-stream*. .. _instant-content: Content ------- Beneath a list of the available attributes. See :ref:`report-schema-reportresponse` for more information. Default version ~~~~~~~~~~~~~~~ | ▸ review | ▸ turnover_code | ▸ credit_flag | ▸ insolvencies | ▸ is_insolvent | ▸ contact_info | ▸ name | ▸ tradenames | ▸ address_office | ▸ address_postal | ▸ previous_address_office | ▸ previous_address_postal | ▸ tel_number | ▸ fax_number | ▸ mob_number | ▸ mail | ▸ website | ▸ nmi | ▸ registration | ▸ reg_type | ▸ reg_number | ▸ branch_number | ▸ vat_number | ▸ vat_number_eu | ▸ legal_current | ▸ statutory_seat | ▸ active | ▸ dates | ▸ creditdevice_id | ▸ activities | ▸ sbi | ▸ import | ▸ export | ▸ economically_active | ▸ relations | ▸ shareholders | ▸ ultimate_mother | ▸ branches | ▸ management | ▸ first_manager | ▸ employees | ▸ items | Short version ~~~~~~~~~~~~~ | ▸ review | ▸ turnover_code | ▸ insolvencies | ▸ is_insolvent | ▸ contact_info | ▸ name | ▸ tradenames | ▸ address_office | ▸ address_postal | ▸ tel_number | ▸ fax_number | ▸ mob_number | ▸ mail | ▸ website | ▸ nmi | ▸ registration | ▸ reg_type | ▸ reg_number | ▸ branch_number | ▸ vat_number | ▸ vat_number_eu | ▸ legal_current | ▸ active | ▸ dates | ▸ creditdevice_id | ▸ activities | ▸ sbi | ▸ economically_active | ▸ management | ▸ first_manager | ▸ employees | ▸ items | .. note:: All attributes are optional. Schemas ------- The following schemas represent the formats of the HTTP responses, returned by the API, which are described on this page. .. _instant-schema-instant: Instant ~~~~~~~ | ▸ **id** *(integer)* | Instant ID | ▸ **reg_number** *(string)* | Registration number | ▸ **product** *(string)* | Report type. | Only available if specific product is ordered. | ▸ **short** *(boolean)* | Short instant report or not. | Not available if specific product is ordered. | ▸ **created_at** *(string)* | Entity created at | ▸ **refs** *(object)* | ▸ **self** *(string)* | URI to itself | .. _instant-schema-instantlistresponse: InstantListResponse ~~~~~~~~~~~~~~~~~~~ | ▸ **list** (:ref:`Instant[] `) | ▸ **meta** *(object)* | ▸ **items** *(integer)* | Number of items in list | ▸ **current_page** *(integer)* | Current page | ▸ **more_items** *(boolean)* | More items available |