Plings Input API - SOAP

From Plings Info

Jump to: navigation, search

You can browse the methods at: http://feeds.plings.net/services/activities.php
The WSDL for the SOAP service can be found at: http://feeds.plings.net/services/activities.php?wsdl


  • New: 06/08/09 New methods addActivityCategoryOfTaxonomy (and corresponding remove method) to allow submission of Categories in line with existing well defined taxonomies e.g.IPSV
  • New: 28/04/09 New field added to SimpleActivity to prepare the SOAP service to accept data on behalf of other organisations/activity providers. The wsdl has the new addOrganisation method, which is now (20/05/09) documented here. Some SOAP clients will need to adapt to the new DPProviderID field in a SimpleActivity object.

Contents

ASP.NET developers

On your SOAP client you must enable cookies. Set serviceName.CookieContainer to a new instance of System.Net.CookieContainer. See Developer_FAQ#ASP.NET_service_has_trouble_connecting_to_Plings

Methods

boolean register( string Key )

This method should be called once, straight after web service is initialised. The string passed should be the API Key registered to the Organisation/Account that is publishing the activity.
Please Note: 1=true,0=false on all boolean methods where applicable


integer publishSimpleActivity( SimpleActivity Activity )

Passing an object of type “SimpleActivity” to this method will create a single occurrence of the activity. To add an activity that occurs on different days over a period of time, multiple calls to this method should be made, providing the specific dates and times of the activities occurrence.
Returns the ID of the activity created.


string updateSimpleActivity( integer ActivityID, SimpleActivity Activity )

When passed an ID of an activity and a “SimpleActivity” object, this method will update any details on that activity. This method will only update a single activity at a time.
Returns true (1) on success. This call acts like a boolean method, but returns the result in a string.
There is an additional method available on updateSimpleActivity - UpdateFuture: xsd:int - by supplying '1', you update all future activities linked to the one supplied.


string deleteActivity( integer ActivityID )

This will completely remove data held on the activity of the ID passed to this method.
Returns true (1) on success. This call acts like a boolean method, but returns the result in a string.
There is an additional method available on deleteActivity - DeleteFuture: xsd:int - by supplying '1', you delete all future activities linked to the one supplied.


boolean addActivityCategory( integer ActivityID, string Category )

To add a category to an activity, you should call this method passing the ID of the activity and the category string. see Plings_Input_API_-_XML_via_HTTP_POST#Categories for more information about the categories in use.
Returns true (1) on success.


(new 06/08/09) boolean addActivityCategoryOfTaxonomy( integer ActivityID, string Category, string Taxonomy)

This functions is the same as addActivityCategory, however, it adds a first parameter 'Taxonomy'. This should be specified as taxonomy[:taxonomyId]. e.g. plings or ipsv:5569, etc. It can be a self defined taxonomy of your own making or it can be in line with local/national taxonomies. We do not perform any checking or look ups on this submitted data, so you need to be accurate.
Example_Code_SOAP#Adding_Category_and_Taxonomy.28s.29
Returns true (1) on success.


boolean removeActivityCategory( integer ActivityID, string Category )

Removes a category string from the activity defined by the ID passed.
Returns true (1) on success.


(new 06/08/09) boolean removeActivityCategoryOfTaxonomy(integer ActivityID, string Category, string Taxonomy)

Removes a category and taxonomy string from the activity defined by the ID passed.
Example_Code_SOAP#Removing_a_Category_supplied_with_a_Taxonomy
Returns true (1) on success.


boolean addActivityKeyword( integer ActivityID, string Keyword )

To add a keyword to an activity, you should call this method passing the ID of the activity and the keyword to add. Keywords are a 'free tagging' facility. see Example_Code_SOAP#Adding_Keyword(s)
Returns true (1) on success.


boolean removeActivityKeyword( integer ActivityID, string Keyword )

Removes a keyword from the activity defined by the ID passed.
Returns true (1) on success.


boolean addActivityECMCategory( integer ActivityID, integer ECMID )

To associate an Every Child Matters category to an activity, you should call this method passing the ID of the activity and the ID of the ECM Category you are wanting to associate.
Returns true (1) on success.


boolean removeActivityECMCategory( integer ActivityID, integer ECMID )

Removes the association with an Every Child Matters category from the activity defined by the ID passed.
Returns true (1) on success.


boolean addActivityActivityTypeCode( integer ActivityID, integer ActivityTypeCode )

To associate a Activity Type Code to an activity, you should call this method passing the ID of the activity and the ID of the Activity Type Code you are wanting to associate.
Returns true (1) on success.
Please Note: This method is not really used at the moment. A full taxonomy of Activity Types is being developed for future use. You may investigate the activities method from: https://sprs.substance.coop/services/lookups.php?wsdl which is simply a collection of tags that have been gathered from various places.


boolean removeActivityActivityTypeCode( integer ActivityID, integer ActivityTypeID )

Removes the association with an Activity Type Code from the activity defined by the ID passed.
Returns true (1) on success.


int addVenue( SimpleVenue Venue )

This method creates a new Venue within the system. Should the venue already exist, the ProvideVenueID (an ID that you supply from your own records) is applied to the existing venue.
Returns a Plings VenueID on success (> 0)
Error codes:
  • -1 = No ProviderVenueID given
  • -2 = Unable to locate postcode
Please Note: This function is a duplication of the addVenue method found in the Venue API Documentation, however, documentation for this group of web services has yet to be published.


string addOrganisation (New method added 18/4/09, documentation 20/5/09)

This method creates a new Organisation within the system. The combination of your API key and the unique id by which you reference this organisation locally, provides a unique record in our system. Organisations that you submit become 'child' organisations of you as a data provider.
Returns a Plings OrganisationID on success (> 0)

Data Type Definitions

SimpleActivity

Please Note: a SimpleActivity cannot be created without a valid VenueID.

The SOAP service acts in a 'programmatic' way, dealing with each request in turn. Therefore 'venues' MUST be added BEFORE 'activities' can be added.
VenueID's can be generated by using the SimpleVenue method (below), where we try to match submitted data to the existing dataset. If a venue already exists we return the existing VenueID, if this is a new Venue to us, we issue a new VenueID.
Field Type Required Description
Name string yes
Description string yes
Starts datetime yes This must be in the future. (Example datetime format: 2008-11-27T16:00:00)
Ends datetime yes Usually, this would be after the time set in the Starts field. For 'All Day' events, set the Start time as Midnight of the Start Day and use EXACTLY the same time for the End field. (e.g. 2008-11-27T00:00:00 entered in both the Start and End fields would indicate a n activity taking place throughout the 27th Nov. 2008.
VenueID int yes This should be an ID of an already existing Venue (Place to go) in the Plings dataset. You can find this value by performing a manual search at http://places.plings.net . It may be more convenient to submit your venue using the SimpleVenue method (see below). Using this method we return a VenueID for you to use for that venue
ContactName string yes
ContactNumber string may be required Only required if ContactEmail is not specified.
ContactEmail string may be required Only required if ContactNumber is not specified.
MinAge int
MaxAge int
Cost double
ContactAddress string
LinkWithActivity int
ActivitySource string
DPProviderID string New: 28/04/09 This a string unique to you to identify this activity with another organistaion/data provider for whom you submit activity data. Typically you may supply data on behalf of many organisations. Methods are coming to allow you to assign an activity to those organisations directly. This string is your unique identifier for those organisations. Submit '0' (zero) if your client requires you to submit this field, and you want the activity assigned to the organisation associated with your API key.

SimpleVenue

Field Type Required Description
ProviderVenueID ProviderID string yes This is the information you use in your dataset to identify this venue for yourself. It can be anything you want (letters and numbers only), but must be unique to you. We will either match this to an existing venue, or create a new record. We will use this field to match our records so that we both know which venue we are talking about.
Name string yes Name of the place
BuildingNameNo string yes The building name and/or number
Postcode string yes We use the postcode to generate the rest of the address detail
ContactForename string yes
ContactSurname string yes
ContactEmail string may be required Only required if ContactPhone is not specified.
ContactPhone string may be required Only required if ContactEmail is not specified.
ContactFax string
GeoCoordSystem string WGS84DD is the only value supported currently. (i.e decimal latitude and longitude co-ordinates) If not specified, then the Postcode will be used to get geographical coordinates for the venue.
GeoCoordX double e.g. 53.462299
GeoCoordY double e.g. -2.237951
Description string
Website string
ParkingSpaces int Number of parking spaces.
CyclePark string Must be either: No,Yes, or Secure
DisabledFacilitiesNotes string

SimpleOrganisation

(New method added 18/4/09, documentation 20/5/09)

Field Type Required Description
DPProviderID string yes This is the unique id you use in your dataset to identify this organisation for yourself. It can be anything you want (letters and numbers only), but must be unique to you. We will either match this to an existing organisation, or create a new record. We will use this field to match our records so that we both know which venue we are talking about.
Name string yes Name of the organisation
ProjectDepartment string The Organisations sub-project or department
BuildingNameNo string yes The building name and/or number. Only required if Postcode is specified
Street string
Town string
PostTown string
County string
Postcode string yes Only required if both ContactPhone and ContactEmail are blank
ContactForename string yes
ContactSurname string yes
ContactEmail string yes Only required if both ContactPhone and Postcode are not specified
ContactPhone string yes Only required if both ContactEmail and Postcode are not specified
ContactFax string
Description string Description of the organisation.
MinAge int This the minimum age that this organisation is generally in contact with or targets. Specifying 0 denotes that there is no minimum age. If this field is blank or omitted, it will be recorded that there is no minimum age.
MaxAge int This the maximum age that this organisation is generally in contact with or targets. Specifying 0 denotes that there is no maximum age. If this field is blank or omitted, it will be recorded that there is no maximum age.
Website string

Code Examples

Example Code for the SOAP methods can be found at Example Code SOAP

Personal tools