From Plings Info
URL: http://feeds.plings.net/services/plings-in.php?APIKey=
(More about API Keys)
The Plings Input API - XML via HTTP POST is a method aimed primarily at submitting 'Activities' to Plings in large batches.
To update activities using this method, re-post the data with the updates. You can move the activity to another 'Venue' or 'Organisation' using this method, but you cannot update 'Venue' or 'Organisation' data in this way.
Schema
The required XML is composed of (up to) 6 of the following data entities.
- Activity (required) - which can contain any of the entities below
- Venue (required)
- Organisation (Activity Provider)
- Categories
- Keywords
- ECMCodes
- ActivityTypeCodes
Please Note:
- The XML must have an 'Activity' entity, which must contain a 'Venue' entitiy.
- Each 'Activity' must have an 'Organisation' associated with it. 'Organisation' can be explicitly specified, else it will be assigned to the organisation registered to the API key that submits the data.
- Categories, Keywords, and ECMCodes are optional.
- ActivityTypeCodes is a dormant entity and can be ignored for now.
Activity
| Field
| Type
| Required
| Description
|
| ActivitySourceID | string | yes | This is a unique id for this instance of the activity, supplied by you.(The source URI of the activity.) This will be different for each instance of these related activities
|
| Name | string | yes |
|
| Description | string | yes |
|
| Starts | datetime | yes | ISO 8601 date. This must be in the future. (Example datetime format: 2008-11-27T16:00:00)
|
| Ends | datetime | yes | ISO 8601 date. This must be the same or after the Starts field
|
VenueID | int | yes | This should be an ID of an already existing Venue (Place to go) in the Plings Places dataset. Use this field when you already know this value. If you do not know the VenueID, for example if you are submitting a new venue to the dataset, set this value to zero. e.g. <VenueID>0</VenueID> Legacy support for this tag is maintained, but you should move to the new method.
|
| Venue | Venue | yes | This should contain a 'venue entity', as described below, that is valid.
|
| ActivityProvider | Organisation | | If left not specified, left blank, or omitted, the ActivityProvider will be set to the owner of the API Key that supplies the data (the 'Data Provider').
|
| ContactName | string | yes | This is the name of the person who is directly associated with this particular activity.
|
| ContactNumber | string | yes | Only required if ContactEmail is not specified.
|
| ContactEmail | string | yes | Only required if ContactNumber is not specified.
|
| ContactAddress | string | |
|
| MinAge | int | |
|
| MaxAge | int | |
|
| Cost | double | |
|
| Categories | Categories | | (see below)
|
| Keywords | Keywords | | (see below)
|
| ECMCodes | ECMCodes | | (see below)
|
| ActivityTypeCodes | ActivityTypeCodes | | (see below)
|
| LinkWithActivity | int | | The ActivityID to link with using an internal plings ActivityID
|
| LinkWithActivitySourceID | string | | The field can be used to link a series of activities together. We recommend using the ActivitySourceID of the first in the series
|
|
Please Note: LinkWithActivity, LinkWithActivitySourceID
- These fields are for when you would like to relate two or more activities to each other,
- e.g. Dance takes place at the same time and same place each week, over a six week period.
- When we recall this data to show it to the public it allows us to also display related activities.
- If an activity is already known to Plings, then you can provide that ActivityID in the LinkWithActivity field, but we recommend that you use the LinkWithActivitySourceID field.
- Example: Example_Code_HTTP_POST#Grouped.2FLinked_Activities
Venue
Venue Notes
If this is the first time that you are telling us about a Venue from within the Activity schema, you will need to complete all the required fields.
The next time you need to tell us about that venue (even in the same batch of data), just send the 'ProviderVenueID' as shown below.
<Venue>
<ProviderVenueID>ABC123</ProviderVenueID>
</Venue>
| Field
| Type
| Required
| Description
|
| ProviderVenueID | 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 |
|
| ContactForename | string | yes |
|
| ContactSurname | string | yes |
|
| ContactEmail | string | yes | Only required if ContactPhone is not specified
|
| ContactPhone | string | yes | 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 | | | Description of the Venue, not to be confused with the description of the activity.
|
| Website | | |
|
| ParkingSpaces | int | | Number of parking spaces.
|
| CyclePark | string | | Must be either: No,Yes, or Secure
|
| DisabledFacilitiesNotes | string | |
|
|
Organisation
Also known as: ActivityProvider, DataProvider, Organisation
Organisation Notes
If this is the first time that you are telling us about an 'Organisation'/'ActivityProvider' from within the Activity schema, you will need to complete all the required fields. The next time you need to tell us about that 'Organisation'/'ActivityProvider' (even in the same batch of data), just send the 'DPProviderID' as shown below.
<ActivityProvider>
<DPProviderID>XYZ987</DPProviderID>
</ActivityProvider>
About Contact Details
An organisation may under certain circumstances not want to publish the main address of the contact person. Therefore only one of: email, address, or phone is required. To specify an address, we require 2 fields, 'BuildingNameNo' and 'Postcode'
| 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 | |
|
|
Categories
Updated 04/01/10 Categories can contain multiple Category elements
| Field
| Type
| Required
| Description
|
| Category | string | | Categories are predefined lists within the data set. These are:
-
Creative and Cultured
-
Entertain Me
-
Get Active
-
Get Involved
From 10/06/09 we will continue to accept the above category tags, but would prefer the following:
These are the default terms in the 'plings' taxonomy:
- Adventure
- Art
- Clubs and Games
- Entertainment
- Learning and Life Skills
- Music and Dance
- Sport
- Volunteering
More explanaition of these here
DSCF Taxonomy Terms - specify 'taxonomy=dscf'
- sports
- arts
- media
- youth club - organised
- youth club - drop in
- mobile
- education
- other
Updated (28/04/10) We have altered the category system to allow you to send data that conforms to the Parent Know How categories and the IPSV. We are now also able to accept category information against your own or established taxonomies - however, currently there are only SOAP methods to do this. See our announcement at: http://groups.google.co.uk/group/plings/browse_thread/thread/c9af897c26e6786f
Examples of use:
<Categories>
<category tax="dscf">mobile</category>
<category tax="plings">Art</category>
<category tax="myownmadeuptaxonomy">plaster of paris</category>
<category tax="IPSV" id="5340">Decathlon"</category>
<Categories>
|
|
'Please Note: To enter more than one value at a time, add each value as another instance of this field.
Example: Example_Code_HTTP_POST#No_value_for_VenueID
Keywords
| Field
| Type
| Required
| Description
|
| Keyword | string | |
|
|
Please Note: To enter more than one value at a time, add each value as another instance of this field.
Example: Example_Code_HTTP_POST#No_value_for_VenueID
ECMCodes
| Field
| Type
| Required
| Description
|
| ECMCode | int | | Every Child Matters Category as defined by the UK Government: http://www.everychildmatters.gov.uk/aims/
1=Being Healthy
2=Stay Safe
3=Enjoy and Achieve
4=Make a Positive Contribution
5=Achieve Economic Wellbeing
|
|
Please Note: To enter more than one value at a time (up to a maximun of 5), add each value as another instance of this field.
Example: Example_Code_HTTP_POST#No_value_for_VenueID
ActivityTypeCodes
| Field
| Type
| Required
| Description
|
| ActivityTypeID | int | | Not currently used.
|
|
Please Note: To enter more than one value at a time, add each value as another instance of this field.
Code Examples
Example Code for the HTTP POST method can be found at Example Code HTTP POST