- Previous: Charity search
- Up: Introduction
- Next: Country code lookup
Validate URL
Page and account creation APIs are now unavailable so please consider your use of our APIs and how this affects you. All other APIs will be available until 18 February. If you have any questions please take a look at our Q&A.
Documentation
Validate URL
When creating a new fundraising account, a unique URL is required. A team-based fundraising page also requires a unique URL.
This API checks a URL to see if it's available to be used.
A fundraising account is accessed by the following URL:
http://uk.virginmoneygiving.com/{url}
Most fundraisers use their own name as the {url}. Their account URL will be the same for any event they take part in
A team fundraising page is accessed by the following URL:
http://uk.virginmoneygiving.com/team/{url}
Most teams choose their {url} based on their team name and perhaps the event e.g. SeabrookSealsChannelRelayTeam
If the URL is not unique, the API returns a list of alternatives in the message details.
URL
Operation type: GET
This validates a URL for a fundraising account:
https://api.virginmoneygiving.com/fundraisers/v1/urls/{url}.json?api_key={your API key}
This validates a URL for a team page:
https://api.virginmoneygiving.com/fundraisers/v1/urls/teams/{url}.json?api_key={your API key}
Parameters
Parameter | Required | Data type | Description |
---|---|---|---|
url | True | Varchar(45) | This is the URL you want to validate. |
api_key | True | Varchar(24) | This is your key that allows you access to the VMG APIs. |
Response
Outcome | Further information |
---|---|
Success |
If the URL is available a status 200 is returned:
|
Error |
Sample error: If the URL is in use then the following is returned:
Click here for a full list of API error codes. |
XML response examples
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <urlCheck> <requestedUrl>mytesturl</requestedUrl> <urlType>fundraiser</urlType> <available>true</available> </urlCheck>
<connectErrors> <error> <errorCode>001.00.010</errorCode> <errorMessage>This URL is unavailable. Please select an alternative URL.</errorMessage> <messageDetails>mytesturl2</messageDetails> <messageDetails>mytesturl3</messageDetails> <messageDetails>mytesturl4</messageDetails> <messageDetails>mytesturl5</messageDetails> <messageDetails>mytesturl6</messageDetails> </error> </connectErrors>
JSON response examples
{ "requestedUrl": "mytesturl", "urlType": "fundraiser", "available": true, "message": null, "alternateUrlList": [] }
{ "errors": [ { "responseCode": null, "errorCode": "001.00.010", "errorMessage": "This URL is unavailable. Please select an alternative URL.", "messageDetails": [ "mytesturl2", "mytesturl3", "mytesturl4", "mytesturl5", "mytesturl6" ], "inputDetails": null } ] }
- Previous: Charity search
- Up: Introduction
- Next: Country code lookup
Docs Navigation
- Introduction
- Getting started
- Fundraiser search
- Fundraiser details
- Fundraiser details V2
- Fundraising page details
- Fundraising page details V2
- Charity search
- Validate URL
- Country code lookup
- Address lookup
- Account Exists
- Create fundraiser account
- Activity lookup
- Event search
- Create fundraiser page
- Event summary
- Event fundraisers
- Event Fundraisers V2
- Event fundraisers 2
- Event fundraisers 2 V2
- Charity fundraisers
- Charity fundraisers V2
- Charity details
- Authentication
- Useful information
- Error codes
- Glossary
- Software development kit