Company lookup .NET

Method company_lookup is used for searching companies Maventa knows.

Return value(s)

This method returns an array of CompanyLookupOut hash tables.

Authentication

This method requires that you have registered to Maventa and received the API key.

Arguments

  1. api_keys (required)
  2. Search string (required)

Example code

 1 require 'soap/wsdlDriver'
 2 
 3 serv = SOAP::WSDLDriverFactory.new("https://secure.maventa.com/api_net/wsdl").create_rpc_driver
 4 
 5 begin 
 6   api_keys = Hash.new
 7   api_keys[:vendor_api_key] = "" # If you are software vendor, you shall put here API-key for this application
 8   api_keys[:user_api_key] = "" # Put here your API key
 9 
10   # Search companies
11   results = serv.company_lookup(api_keys, "Search string")
12 
13   # Iterate through result set
14   # There's always at least one result which contains the status
15   if results[0].status == "OK" 
16     results.each do |result|
17       # Name
18       puts result.name
19       # Maventa ID
20       puts result.maventa_id
21       # Business ID, VAT
22       puts result.bid
23       # Address line 1
24       puts result.address1
25       # Address line 2
26       puts result.address2
27       # Post code
28       puts result.post_code
29       # Post office
30       puts result.post_office
31       # State
32       puts result.state
33       # Country
34       puts result.country
35       # EDI-code (OVT)
36       puts result.ovt
37     end
38   end
39 end

Also available in: HTML TXT