Door deze website te bezoeken maak je automatisch gebruik van cookies.

Als de browser instellingen niet veranderd, dan maak je gebruik van de cookies. Lees meer

Sluiten

2BA Cookie informatie

Deze tekst is van toepassing op de 2BA sites "Homepage", "Unifeed" en "Bestand & Beheer".

Wat is een Cookie

Wij maken op deze website gebruik van cookies. Een cookie is een eenvoudig klein bestandje dat met pagina’s van deze website wordt meegestuurd en door uw browser op uw harde schrijf van uw computer wordt opgeslagen.

Soort cookies

Wij gebruiken cookies om het gebruik van onze site faciliteren, het inloggen te onthouden en t.b.v. snelheidsverbeteringen. Daarnaast gebruiken wij (anonieme) gegevens voor het opbouwen van site statistieken zoals het aantal keer dat de sites bezocht worden, met welke browser etc. De 2BA site kan niet zonder cookies werken. 

2BA maakt geen gebruik van tracking cookies t.b.v. advertenties.

 

 

Documentatie

API Version 1 OverviewThe 2BA Webservices are elementary, lightweight and fast services to allow your systems to integrate with the 2BA database. We offer services to search our database, retrieve product- or article details and services to, for example, download your selection profiles automatically. 

Techniek

We offer our services via JSON (Rest services) and SOAP (XML service). The advantages of JSON in comparison to SOAP are, among others, reduced overhead and simplicity. For both JSON and SOAP services, most development environments either offer libraries or have the support built-in.  

Access

An application (the client) wishing to communicate with the services requires a ClientId and accompanying ClientSecret. Each application requires its own ClientId. A ClientId can be requested by existing customers via Dit e-mailadres wordt beveiligd tegen spambots. JavaScript dient ingeschakeld te zijn om het te bekijken.. The ClientId and secret of the application are used in conjunction with the username and password during authentication.

An end user does not require a clientid/secret but only uses his username/password

Register with 2BA Are you a software developer and not yet registered with 2BA? Click the button on the right. After you register, we can send you a letter of intent, which, when signed and received by us, can be used to request a ClientId via Dit e-mailadres wordt beveiligd tegen spambots. JavaScript dient ingeschakeld te zijn om het te bekijken..

Security

To secure our Webservices, we use the open standard OAuth2. In a nutshell, this means that a previously acquired "accesstoken" is sent in an HTTP-header when invoking the service. The authentication can be built manually, but there are plenty of libraries available for this purpose.

View the code examples for authorizing and invoking the Webservices: Example 1: Resource Owner Password Credentials Grant and Example 2: Authorization Code

Structure

The structure of a service URL is: http(s)://api.2ba.nl/<major versionnumber>/<protocol>/<servicename>/<function>?<parameters>
Example: https://api.2ba.nl/1/json/Product/Search?query=kabelgoot

Versioning

The versioning is based on "semantic versioning". This means that there will be no breaking changes within each major version number; the endpoint remains the same. For more information, see the changelog

Example

To give you an impression of the API, we have provided a small C# code sample in which the function DetailsByGLNAndTradeItemId from the Product service is invoked via JSON.

var postData = string.Format("?gln={0}&tradeItemId={1}", item.SupplierGLN, item.SuppliersTradeItemId);
var requestUri =  "/json/Product/DetailsByGLNAndTradeItemId" + postData;
var request = (HttpWebRequest)WebRequest.Create(Settings.Default.ApiUrl + requestUri);

request.Method = "GET";
request.Headers.Add("Authorization", "Bearer " + AuthorisationService.CurrentAuthorisation.AccessToken);

var responseStream = request.GetResponse().GetResponseStream();
var reader = new StreamReader(responseStream);
var data = reader.ReadToEnd();

var jobj = JObject.Parse(data);
item.ManufacturerName = (string)jobj["Manufacture"];
item.ManufacturerTradeItemId = (string)jobj["Productcode"];// ...