Charity details

Charity details

This API returns, for a charity's unique reference, details relating to the charity. This allows a fundraiser to select a charity/charities to fundraise for when creating a page.

URL

Operation type: Get

Parameter Required Data type Description
charityResourceId True Varchar(36) This is the unique resource ID of the charity.
api_key True Varchar(24) This is your key that allows you access to the VMG APIs.

Response

OutcomeFurther information
Success

If the charity resource ID matches an entry in the database then the following is returned:

  • Status 200: OK

Charity details, in the following format:

  • Charity's name
  • Charity description
  • Charity registration number
  • Path to charity logo
  • Charity page URL i.e uk.virginmoneygiving.com/charities/{charity url}
Error

Sample error:

If no matching charity is found then the following is returned:

  • Error code: 001.01.002
  • Error message: No matching charity found for {charity resource ID}

Click here for a full list of API error codes.

Response description

Data itemData typeDescription
name Varchar(152) This is the full name of the charity.
registeredCharityNumber Varchar(45) This is the charity's registration number.
resourceId Varchar(45) This is the unique resource ID of the charity.
logoURL Varchar(100) This is the path to the charity's logo.
charityurl Varchar(100) This is the URL to the charity's home page on VMG.
description Varchar(1024) A description of the charity.

XML response example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<charityDetails>
    <name>Test Charity</name>
    <registeredCharityNumber>1234567</registeredCharityNumber>
    <resourceId>70329eb2-b702-11e2-aba0-00237d9ded4e</resourceId>
    <logoURL>http://uk.virginmoneygiving.com/resources/charity-logo/187x1671001106_47bbccfa-e806-4f2a-b544-442ed30bfcc0_2008_08_05.testimage.jpg</logoURL>
    <charityURL>http://uk.virginmoneygiving.com/charities/TestCharity</charityURL>
    <description>A description of Test Charity.</description>
</charityDetails>

JSON response example

{
    "name": "Test Charity",
    "registeredCharityNumber": "1234567",
    "resourceId": "70329eb2-b702-11e2-aba0-00237d9ded4e",
    "logoURL": "http://uk.virginmoneygiving.com/resources/charity-logo/187x1671001106_47bbccfa-e806-4f2a-b544-442ed30bfcc0_2008_08_05.testimage.jpg",
    "websiteURL": null,
    "charityURL": "http://uk.virginmoneygiving.com/charities/TestCharity",
    "description": "A description of Test Charity."
}