Integrationv. 2.3.2

Bancomail Web API - Integration Guide

Integrate Bancomail’s B2B database directly into your application or website. Access real-time segmentation, automate list purchases, and activate outbound campaigns faster with structured, GDPR-compliant data.

Real-time segmentationFilter by industry, geography, and company size parameters to identify the right audience.
GDPR-compliant dataStructured B2B data ready for outbound campaigns and direct activation.
Partner API accessStandard REST interface with token-based authentication and test environment.

Setup

To activate the integration and start using Bancomail datasets within your platform:

  • Join the Bancomail Partner Program
  • Provide the authorized IP addresses for API calls
  • Request your access credentials from our team

Authentication

Authentication is handled through an access token.

To obtain the access token, provide username:password in the request headers, encoded in Base64. Example: Authorization: Basic dGVzdDpibWwyYVRwRg==.

The access token must be included in the headers of all subsequent calls using Authorization: Bearer {{token}}. The token remains valid until logout or for 15 minutes after the last request in which it was included. While the token is valid, every request that uses it resets the session timeout counter.

HTTP MethodPOST
Test URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS_TEST/sessions
Production URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS/sessions
HTTP Headers Content-Type: application/json
cache-control: no-cache
Authorization: Basic dGVzdDpibWwyYVRwRg==
Body{}
ResponseThe access token, the current layout, and an error code of 0.
{
  "response": {
    "token": "536076f226e28b2a2bd0e4bbc3de6add6927e778a8819882628"
  },
  "messages": [
    {
      "code": "0",
      "message": "OK"
    }
  ]
}

Reference Layout

Dedicated layouts have been created to define search parameters and provide the nomenclatures needed to populate dropdown menus or search interfaces.

LayoutDescriptionTotal Records
countryList of countries242
admin1_geoList of 1st-level administrative divisions3,967
admin2_geoList of 2nd-level administrative divisions45,430
macrocategorieList of macro categories293
microcategorieList of micro categories1,891
fatturatoRevenue ranges in millions of euros8
dipendentiEmployee-count ranges6
forma_giuridicaList of legal forms split by country_code

Fields

LayoutFields
countrycountry_code
country_name_IT
country_name_EN
admin1_geoID
admin1_name
admin1_name_ascii
country_code
admin2_geoID
admin2_name
admin2_name_ascii
country_code
id_admin1
LayoutFields
macrocategorieID
macro_name_IT
macro_name_EN
microcategorieID
micro_name_IT
micro_name_EN
id_macro
fatturatofatturato
dipendentidipendenti
forma_giuridicaID
forma_giuridica
country_code

If you need to query one of these layouts and return more than 100 records, such as retrieving the full list of macro categories, you must set the limit parameter to the maximum number of records available in that layout.

HTTP MethodPOST
Test URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS_TEST/layouts/nome_layout/_find
Production URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS/layouts/nome_layout/_find
HTTP Headers Content-Type: application/json
cache-control: no-cache
Authorization: Bearer {{token}}
Body
{
  "query": [
    {"id": ">0"}
  ],
  "limit": "300"
}
Response All macro categories (nome_layout = macrocategorie).

Purchases

To complete a purchase, the order information must be inserted into the acquisti layout.

The required information is listed below:

FieldDescription
userUser name = [test]
order_user_idID assigned by you to the order
queryFinal search query
numero_anagraficheSearch result count
est_garanziaCustomer data required for warranty extension (company name, city, province/state, country)
HTTP MethodPOST
Test URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS_TEST/layouts/acquisti/records
Production URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS/layouts/acquisti/records
HTTP Headers Content-Type: application/json
cache-control: no-cache
Authorization: Bearer {{token}}
{
  "fieldData": {
    "query": "{\"country_code\":\"AL\",\"macro_id\":\"180\"},{\"admin1_code\":\"IT.02\",\"country_code\":\"IT\",\"macro_id\":\"180\"},{\"admin2_code\":\"DE.02.094\",\"admin1_code\":\"DE.02\",\"country_code\":\"DE\",\"macro_id\":\"180\"},{\"admin2_code\":\"IT.01.AQ\",\"admin1_code\":\"IT.01\",\"country_code\":\"IT\",\"macro_id\":\"180\"}",
    "numero_anagrafiche": "51",
    "user": "test",
    "order_user_id": "FD459",
    "est_garanzia": "Bancomail S.p.A., Genova, GE, Italia"
  },
  "script": "notifica_ordine"
}

Once the order has been registered and completed, the databases will be made available via FTP within a maximum of 3 working days.

Check Purchase Status

You can query the same layout to verify the purchase status using the following parameters:

FieldDescription
order_user_idID assigned by you to the order
data_ordineOrder completion date in MM/DD/YYYY format
statusaccepted / processing / fulfilled / cancelled
data_evasioneFTP upload date
HTTP MethodPOST
Test URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS_TEST/layouts/acquisti/_find
Production URLhttps://api.neosoft.it/fmi/data/v1/databases/BM_WS/layouts/acquisti/_find
HTTP Headers Content-Type: application/json
cache-control: no-cache
Authorization: Bearer {{token}}
Body
{
  "query": [
    {"order_user_id": "FD459"}
  ]
}

Retrieve Purchased Packages via FTP

After the order is completed, the Database department will prepare the requested databases and make them available for download. The partner must retrieve the data through an FTP connection.

  • Host name: takoaka.com (standard port)
  • Access credentials are communicated to the partner when the service is enabled.
  • For each order, within 3 working days, the partner will find a ZIP file, typically named user_orderid.zip.
  • The ZIP file contains two files with the same filename, in .xlsx and .csv format.
  • As soon as the package is available, the order status is updated to fulfilled.
Order monitoring is not active for orders originating from the test environment. For testing or development needs, monitoring can be requested by emailing [email protected].

Credits

The payment model for orders placed through the Bancomail Web Service is based on purchasing credits in advance. Credit top-ups are handled through an external Bancomail procedure that is communicated to each service user.

To verify the available credit balance, query the credits layout using the parameter name (user name).

Returned FieldDescription
crediti_acquistatiTotal credits purchased
crediti_utilizzatiTotal credits used
crediti_residuiRemaining credit balance

The remaining credit balance is not updated in real time because it depends on an administrative check. Updates may take from one hour up to one working day. Orders are still recorded immediately, and the related credits are deducted during the update process.

Examples

Using cURL

curl \
-X <HTTP METHOD> \
-H 'authorization: Bearer <TOKEN>' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '<BODY>' \
<URL>

Example Search Call via cURL

curl \
-H 'authorization: Bearer 536076f226e28b2a2bd0e4bbc3de6add6927e778a8819882628' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
  "query": [
    {"macro_id": "40", "country_code":"IT"}
  ],
  "limit":"1"
}' \
https://api.neosoft.it/fmi/data/v1/databases/BM_WS_TEST/layouts/result/_find

Example Query Collections

Postman documentation links:

Recommended next steps

Functional definition

Align on the integration use cases (search, purchase, delivery), the pricing logic, and how Bancomail data will be used within the platform.

Technical setup and access

Configure API access, share the authorized IP addresses, and manage the authentication flow, ensuring the integration is correctly orchestrated within the partner's infrastructure.

Partner application

Integration is available to Bancomail partners. Apply to the Partner Program and activate your setup with direct support from our team.