Wish List API Documentation
Thinking of making a wish list application? Harness the existing Wishlings community to give your service a great start.
The Wishlings Wish List API allows you to do everything that is currently possible on Wishlings.com. You'll be able to create members, control a member's wish list, reserve and buy gifts and more.
If you're interested in using our API, please email us and we'll supply you with an API Key and all the support you need.
Note: We'll be adding the ability to make money using our wish list API very soon.
The Basics
-
Get an API Key
You'll need an API key to be able to use the Wishlings API. Please drop us an email requesting one and we'll get back to you within 24 hours.
-
API Call Structure
API calls to Wishlings are made using either POST or GET.
The URL of the page you are sending data to determines the action you would like to undertake.
Example call:
http://wishlings.com/api/wish/add/wish means we want to interact with wish functionality and /add means we want to add a wish. You can find a full list of allowed URLs in Wish List Actions and Member Actions chapters of this documentation.
-
Compulsory Options
The following options must be passed with every API request.
Option Required Details key_product Yes The API key we will supply for your product. Not got one yet? Request one. format Yes Your preferred response format. Supported formats are query_string and json. version Yes The API version you would like to use. The latest API version is 1.1. -
Response Format
All responses are url encoded. Our examples use the query_string format.
Example response when adding a new user:
success%5Busername%5D=keiron124559&success%5Bemail%5D=keirons9dsdds%40gmail.com&success%5Bpassword%5D=passwordAfter url decoding the result looks like this:
success[username]=test1&success[email]=team@wishlings.com&success[password]=passwordThe same data in an array for ease of reading:
Array ( [success] => Array ( [username] => test1 [email] => team@wishlings.com [password] => password ) )
There are two types of response - success and error.
A success response will either contain the requested content, or an output of relevant content used to perform the required action (e.g. if you are adding a new wish, the added wish data will be output in the success response).
-
Error Response
An error response is an array containing one or more errors encountered when handling your request.
The error response contains the name of the attribute causing the error, the problem with the attribute and a description of the error.
Example error when adding a new member:
Array ( [error] => Array ( [0] => Array ( [attribute] => username [problem] => validation_failed [description] => This username has already been taken :-( ) [1] => Array ( [attribute] => email [problem] => validation_failed [description] => A user with this email address already exists. ) ) )
Wish List Actions
-
Get a Member's Wish List
Use this request to fetch a member's wish list.
API call:
http://wishlings.com/api/wish/listData options:
Option Required Details username Yes The username of the person who's wish list you'd like to receive. -
Add or Modify a Wish
Add a new wish or modify an existing wish.
API call:
http://wishlings.com/api/wish/addData options:
Option Required Details key_member Yes The api product key for the person who's wish you'd like to add or modify. id No A wish id - for use when you'd like to modify an existing wish. If this is not passed you will create a new wish. url No A url to the wish. name Yes The name of the wish. description No A description of the wish. tags No A comma separated list of tags to associate with this wish. wish_image_url No A URL to an image of the wish. priority No A numerical priority setting. Options are 0, 1, 2, 3. The higher the value the higher the priority. -
Get Wish Information from a URL
This call allows you to fetch title, description, tags and images from a URL for use when adding a wish.
API call:
http://wishlings.com/api/wish/scrape_urlData options:
Option Required Details url Yes The URL to fetch wish information from. -
Delete a Wish
Delete an existing wish.
API call:
http://wishlings.com/api/wish/deleteData options:
Option Required Details id Yes The id of the wish you would like to delete. key_member Yes The api product key for the person that owns this wish. -
Reserve a Wish
Reserve a wish from somebody's wish list.
API call:
http://wishlings.com/api/wish/reservationData options:
Option Required Details id Yes The id of the wish you would like to reserve. key_member Yes The api product key for the person that is reserving the wish. -
Cancel a Wish Reservation
Cancel a wish reservation so that anyone can reserve the wish.
API call:
http://wishlings.com/api/wish/reservation_cancelData options:
Option Required Details id Yes The id of the wish you would like to cancel the reservation for. key_member Yes The api product key for the person wishing to cancel the reservation. -
Tell us You've Given a Wish
Tell Wishlings you've given a reserved wish to the recipient.
API call:
http://wishlings.com/api/wish/givenData options:
Option Required Details id Yes The id of the wish you would like to tell us you've given. key_member Yes The api product key for the person that has given this wish.
Member Actions
-
Login
Log a member in and obtain an api product key for them.
API call:
http://wishlings.com/api/member/loginData options:
Option Required Details username Yes The username of the member. password Yes The password of the member. -
Settings
Modify or just fetch a list of settings associated with a member.
API call:
http://wishlings.com/api/member/settingsData options:
Option Required Details key_member Yes The api product key for the person whose account this is. forename No Pass this in if you want to modify the member's forename. surname No Pass this in if you want to modify the member's surname. email_newsletter No Pass this in if you want to modify the member's subscription to our newsletter. Options are 0 for no and 1 for yes. avatar No POST us an image and we will update the member's avatar. Allowed image formats are gif, jpg, png. -
Friends
Get the friends of a particular member.
API call:
http://wishlings.com/api/member/friendsData options:
Option Required Details username Yes The username of the person that owns this wish. -
Create a Member
Create a new Wishlings member.
API call:
http://wishlings.com/api/member/createData options:
Option Required Details username Yes The new member's username. password Yes The new member's password. password_confirmation Yes A confirmation of the new member's password. email Yes The email address of the new member. email_newsletter No Whether or not the member would like to receive the infrequent newsletter. Options are 0 (no) or 1 (yes).
Need Help?
-
Send us an Email
If you need further help with the API, or you'd like new features added, please email us and we'll respond within 24 hours.
-
Get a Member's Wish List