The JSON approach is mainly intended for intranet integration, while the xml version is for machine to machine integration.



Similar documents
Programming Autodesk PLM 360 Using REST. Doug Redmond Software Engineer, Autodesk

HireDesk API V1.0 Developer s Guide

Using ilove SharePoint Web Services Workflow Action

AdFalcon Mobile Web API Integration Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

Merchant Returns Service International

07/04/2014 NOBIL API. Version 3.0. Skåland Webservice Side 1 / 16

vcloud Air Platform Programmer's Guide

IoT-Ticket.com. Your Ticket to the Internet of Things and beyond. IoT API

Capturx for SharePoint 2.0: Notification Workflows

Token Payment Web Services

Merchant Returns Service

Fairsail REST API: Guide for Developers

Spryng Making Business Mobile (0) Spryng Headquarters: Herengracht BW Amsterdam - The Netherlands

Spryng Making Business Mobile Mobile Terminated Premium SMS Gateway. Contents:

Ansible Tower API Guide

Single Sign-On Implementation Guide

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Recurring Payments Manual

Identity and Access Management (IdAM) Security Access Framework (SAF) for CDSS

Global Transport Secure ecommerce. Web Service Implementation Guide

Grandstream Networks, Inc.

Integration of Hotel Property Management Systems (HPMS) with Global Internet Reservation Systems

SVEA HOSTED SERVICE SPECIFICATION V1.13

THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY

Riverbed Cascade Shark Common REST API v1.0

Custom SIS Integration Type Development. Jim Riecken Blackboard Learn Product Development

Visualizing a Neo4j Graph Database with KeyLines

Analytics Configuration Reference

Cloud Elements ecommerce Hub Provisioning Guide API Version 2.0 BETA

Informatica Cloud Connector for SharePoint 2010/2013 User Guide

JASPERREPORTS SERVER WEB SERVICES GUIDE

Setup Guide for PrestaShop and BlueSnap

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

Issuetrak API 1.2 Documentation A Guide to the Issuetrak API, Version 1.2

e-filing Secure Web Service User Manual

BMC Track-It! Web. Web Services API Guide. Version 11.3

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

Oracle Application Express - Application Migration Workshop

Revision Action/Change Date. A Sentinel Cloud 3.0 Release December 2012 B Sentinel Cloud 3.1 Release April 2013 C

API documentation - 1 -

REST Webservices API Tutorial

ISL Online Integration Manual

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

How To Use Saml 2.0 Single Sign On With Qualysguard

An Introduction to Developing ez Publish Extensions

XML Processing and Web Services. Chapter 17

HP Project and Portfolio Management Center

Import Clients. Importing Clients Into STX

Documentation to use the Elia Infeed web services

Brainshark/Salesforce.com Integration Installation Procedures

MXSAVE XMLRPC Web Service Guide. Last Revision: 6/14/2012

Spectrum Technology Platform

Pervasive Data Integrator. Oracle CRM On Demand Connector Guide

Traitware Authentication Service Integration Document

CA Nimsoft Service Desk

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

An identity management solution. TELUS AD Sync

Safeguard Ecommerce Integration / API

SOPG (Service Oriented Prepaid Gateway - xml based protocol) Documentation. Version Date Description Author

Dragonframe License Manager User Guide Version 1.2.2

Service for checking whether an is operative or not. Validate ids in your databases.

DNS Update API November 15, 2006 Version 2.0.3

Technical Specification Premium SMS gateway

REST web services. Representational State Transfer Author: Nemanja Kojic

Installing and Sending with DocuSign for NetSuite v2.2

Address Phone & Fax Internet

API Reference Guide. API Version 1. Copyright Platfora 2016

Mobility Tool Guide for Beneficiaries of Leonardo da Vinci programme

Qlik REST Connector Installation and User Guide

Aliun Server Load Balancer API Reference Version

Axway API Gateway. Version 7.4.1

ivvy Events Software API

cielo24 Documentation

XEP-0043: Jabber Database Access

SPARROW Gateway. Developer Data Vault Payment Type API. Version 2.7 (6293)

Using Foundstone CookieDigger to Analyze Web Session Management

DocuSign Connect Guide

Secure XML API Integration Guide. (with FraudGuard add in)

Contents. 2 Alfresco API Version 1.0

Setting up single signon with Zendesk Remote Authentication

The HTTP Plug-in. Table of contents

Coveo Platform 7.0. Oracle Knowledge Connector Guide

DocuSign for SharePoint

PathwayLINK Recurring Billing Document Version 1.7 Published NOV 2011

SmarterMeasure Inbound Single Sign On (SSO) Version 1.3 Copyright 2010 SmarterServices, LLC / SmarterServices.com PO Box , Deatsville, AL 36022

Alfresco Share SAML. 2. Assert user is an IDP user (solution for the Security concern mentioned in v1.0)

D&B Direct+ API Documentation for IP Address Detail Lookup. Version 1, REST Interface. Intended for Early Adopter Program Participants

A How To guide for integrating your application to the CRM Hub

Xerox Standard Accounting Import/Export User Information Customer Tip

REST Webservices API Reference Manual

Database Migration : An In Depth look!!

SYSPRO App Store: Registration Guide

Configuring CQ Security

Designing RESTful Web Applications

1. Change Log Introduction Flow summary Flow Overview Premium SMS flow Pin Flow Redirect Flow...

Merchant Web Services API

SalesJunction.com. Sales Force Automation & CRM. SJAPI Guide

Title page. Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7

Transcription:

1881 Partner Search API The Partner Search API is a RESTFull service that utilizes the HTTP/GET verb. Parameters are passed in the querystring of the HTTP request. The service can produce both xml and JSON formatted data. The JSON approach is mainly intended for intranet integration, while the xml version is for machine to machine integration. Search: Parameter name Mandatory Description username Yes The user name assigned to the customer by 1881. password Yes The password assigned to the customer by 1881. msisdn Yes The a-number of the end-user performing the search. query No The search query. Should be url encoded. format No Set to json for JSON formatted data. Remove this parameter or set to xml for XML formatted data. level No Defines the amount of data to return. level=0;minimum amount of data level=1;includes address information level=2;additional company/person information (lower performance) catalogueids No Catalogueid=0; public person listings Catalogueid=1; public company listings Catalogueid=5; internal catalogue If this is empty, all available catalogues is included the list of id s is separated by. pagesize No Number of hits to return. Maximum value allowed is 300. page No The page to return in the result set. If empty the first page will be shown. geocodes No Geo code pairs separated with. Pair is presented in the following way: Latitude:Longitude Lat/long is encoded like 62.7836 62.7836:7.367456 62.7346: 5.4736 Invalid formatted geocodes will be ignored. xmlns No Namespace is by default included in xml format. To exclude set xmlns=0. Extended parameters for advanced search: firstname No FirstName. Should be url encoded. lastname No LastName/CompanyName. Should be url encoded. phone No Phone, mobile, fax. Should be url encoded. street No Street. Should be url encoded. postalcode No PostalCode. Should be url encoded. postalarea No PostalArea. Should be url encoded. region No Region: Østlandet,Vestlandet,Nord-Norge,Midt-Norge,

Sørlandet. Should be url encoded. municipality No Municipality. Should be url encoded. /search?username=<username>&msisdn=<msisdn>&password=<password>&query=<query>&le vel=0&format=json Example advanced search: /search?username=<username>&msisdn=<msisdn>&password=<password>&firstname=<firstna me>&lastname=<lastname>&postalcode=<postalcode>&level=0&format=json Details: If you want to receive a specific resultitem and get more details you can use this one: Parameter name Mandatory Description username Yes The user name assigned to the customer by 1881. password Yes The password assigned to the customer by 1881. msisdn Yes The a-number of the end-user performing the search. itemid Yes The result itemid. From resultlist: Results.ResultItem. ItemId format No Set to json for JSON formatted data. Remove this parameter or set to xml for XML formatted data. xmlns No Namespace is by default included in xml format. To exclude set xmlns=0. /search/details?username=<username>&msisdn=<msisdn>&password=<password>&itemid=<it emid>&format=json GetCatalogues: If you want to receive the catalogues connected to the user you can use this one: Parameter name Mandatory Description username Yes The user name assigned to the customer by 1881. password Yes The password assigned to the customer by 1881. msisdn Yes The a-number of the end-user performing the search. format No Set to json for JSON formatted data. Remove this parameter or set to xml for XML formatted data. xmlns No Namespace is by default included in xml format. To exclude set xmlns=0. /search/getcatalogues?username=<username>&msisdn=<msisdn>&password=<password>&for mat=json

Search result Field name Description StatusMessage Contains an error message if the search fails, otherwise empty TotalNumberOfResults The number of hits Results The actual hits

.net proxy 1881 has developed a proxy for the service with strong typed message classes. The latest proxy can be downloaded from http://api.1881bedrift.no/download/proxy. const string ApiUrl = "http://test.1881bedrift.pragma.no/api/"; //GetResult - list var qlist = new SearchQuery Msisdn = "########", Password = "******", UserName = "########", QueryLevel = QueryLevels.Medium, Query = "opplysningen", PageSize = "5", Page = "1", IncludedCatalogues = new List<string>() "0","1" ; using (var target = new SearchProxy()) var result = target.getresult(new Uri(ApiUrl), qlist); //TODO: do something with the result //GetResult - listitem var qlistitem = new SearchQuery Msisdn = "########", Password = "******", UserName = "########", ItemId = "200190583S1" ; using (var target = new SearchProxy()) var result = target.getresult(new Uri(ApiUrl), qlistitem); //TODO: do something with the result //GetCatalogues var qcatalogues = new SearchCataloguesRequest Msisdn = "########", Password = "******", UserName = "########" ; using (var target = new SearchProxy()) var result = target.getsearchcatalogues(new Uri(ApiUrl), qcatalogues); JQuery sample: <script type="text/javascript" language="javascript"> var username = "########"; var msisdn = "########"; var password = "*****"; $(document).ready(function () //need to user charset=iso-8859-1 in order to get Norwegian characters correct to the search service. $("#QueryBox").autocomplete(

source: function (request, response) $.ajax( contenttype: "application/x-www-form-urlencoded;charset=iso-8859-1", url: GetSearchUrl(), type: "GET", datatype: "json", success: function (data) response($.map(data.results, function (item) return label: GetName(item) + "(" + GetPhone(item) + ")", value: GetName(item), code: GetPhone(item) ; )), error: function (data) $("#Phone")[0].innerText = "an error occurred while reading search service"; ), select: function (data) $("#Code").value = data.item; $("#Phone").val(data.item);, minlength: 1 ) ); function GetName(item) if (item.companyname!= null) return item.companyname; return item.firstname + " " + item.lastname; function GetSearchUrl() var data = "/search?username=" + username + "&msisdn=" + msisdn + "&password=" + password + "&query=" + $.URLEncode($("#QueryBox").val()) + "&level=0&format=json"; $("#SearchUrl")[0].innerText = data; return data; function GetPhone(item) if (item.contactpoints == null) return ""; for (var i = 0; i < item.contactpoints.length; i++) if (item.contactpoints[i].contactpointtype == 2) return item.contactpoints[i].address; return ""; $("#QueryBox").bind("autocompleteselect", function (event, ui) $("#Code").val(ui.item.label); $("#Phone")[0].innerText = ui.item.code; ); $.extend( URLEncode: function (c) var o = ''; var x = 0; c = c.tostring(); var r = /(^[a-za-z0-9_.]*)/; while (x < c.length) var m = r.exec(c.substr(x)); if (m!= null && m.length > 1 && m[1]!= '') o += m[1]; x += m[1].length; else if (c[x] == ' ') o += '+'; else var d = c.charcodeat(x); var h = d.tostring(16); o += '%' + (h.length < 2? '0' : '') + h.touppercase(); x++;

return o;, URLDecode: function (s) var o = s; var binval, t; var r = /(%[^%]2)/; while ((m = r.exec(o))!= null && m.length > 1 && m[1]!= '') b = parseint(m[1].substr(1), 16); t = String.fromCharCode(b); o = o.replace(m[1], t); return o; ); </script> Example result set: <?xml version="1.0"?> <SearchResponse xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://1881.no/api/partnersearch"> <Results> <ResultItem> <Addresses /> <BirthDate xsi:nil="true" /> <Collection>B2B</Collection> <ContactPoints> <Address>93257288</Address> <ContactPointType>Landline</ContactPointType> <Address>jonas.syrstad@pragma.no</Address> <ContactPointType>Email</ContactPointType> <Address>98855641</Address> <ContactPointType>Mobile</ContactPointType> <Address>www.pragma.no</Address> <ContactPointType>HomePage</ContactPointType> </ContactPoints> <FirstName>Jonas</FirstName> <Gender>Unknown</Gender> <ItemId>b2b 5 103272 110781</ItemId> <LastName>Syrstad</LastName> <ResultType>Person</ResultType> </ResultItem> </Results> <TotalNumberOfResults>1</TotalNumberOfResults> </SearchResponse> ResultItem enum fields Field name Addresses.Address_Search.AddressType ContactPoints.ContactPoint_Search. ContactPointType Values Visiting, Postal, Billing HomePage,

ContactPoints.ContactPoint_Search.IsMain Email, Mobile, Landline, Fax True, False Collection Contacts, B2B Contacts: collection from 1881.no - Person /1881.no - Company B2B: collection from catalogues defined in B2B (employee/internal catalogues) ResultType Person, Company