Grandad, is that you?

Your browser is out of date and doesn't support all of the cool stuff we do on our website.

We like Google Chrome, but any modern browser will do.Update my browser now

×

Uploading Project Data to Crowdsurfer

The first step is to map your project fields onto our schema. Due to the large number and wide variety of platforms that we cover the list of possible project fields can look daunting, but only a subset of fields will be relevant to your platform. We do expect a certain minimum set of fields for each funding type, but more detail the better.

Initially all uploaded projects will be marked as 'test' and so will not show up in the main dashboard. We will remove these flags after performing an initial sanity check on the uploaded data.

Example 'Rewards' Project

It's easiest to describe by example, so here's an example of a typical 'Rewards' project:

{ "category": "technology", "currency": "EUR", "end_date": "2015-06-28T12:00Z", "funders": 85, "funding_type": "R", "goal": 10000, "language": "en", "location": { "address": "Cambridge, UK" }, "owner_details": { "full_name": "Postman Pat", "id": "12345" }, "project_id": 100212, "raised": 345, "rewards_list": [ { "description": "A warm fuzzy feeling", "num_backers": 5, "pledge": 10 }, { "description": "A cuddly toy", "num_backers": 2, "pledge": 20 } ], "start_date": "2015-01-10T12:00Z", "subtitle": "You too can own this very shiny thing", "tags": [ "technology", "wireless" ], "title": "Shiny Thing", "url": "http://www.dummysite.org/projects/new-shiny-project.html" }

In order to send us this project simply POST to the add / update project url:

:

Using the standard curl command:

curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token abcdef123456890" \ -d '{ "category": "technology", "currency": "EUR", "end_date": "2015-06-28T12:00Z", "funders": 85, "funding_type": "R", "goal": 10000, "language": "en", "location": { "address": "Cambridge, UK" }, "owner_details": { "full_name": "Postman Pat", "id": "12345" }, "project_id": 100212, "raised": 345, "rewards_list": [ { "description": "A warm fuzzy feeling", "num_backers": 5, "pledge": 10 }, { "description": "A cuddly toy", "num_backers": 2, "pledge": 20 } ], "start_date": "2015-01-10T12:00Z", "subtitle": "You too can own this very shiny thing", "tags": [ "technology", "wireless" ], "title": "Shiny Thing", "url": "http://www.dummysite.org/projects/new-shiny-project.html" }' \ https://crowdsurfer.com/api/1.0/project/

We depend on the very useful requests library.

import requests import json payload = { "category": "technology", "currency": "EUR", "end_date": "2015-06-28T12:00Z", "funders": 85, "funding_type": "R", "goal": 10000, "language": "en", "location": { "address": "Cambridge, UK" }, "owner_details": { "full_name": "Postman Pat", "id": "12345" }, "project_id": 100212, "raised": 345, "rewards_list": [ { "description": "A warm fuzzy feeling", "num_backers": 5, "pledge": 10 }, { "description": "A cuddly toy", "num_backers": 2, "pledge": 20 } ], "start_date": "2015-01-10T12:00Z", "subtitle": "You too can own this very shiny thing", "tags": [ "technology", "wireless" ], "title": "Shiny Thing", "url": "http://www.dummysite.org/projects/new-shiny-project.html" } r = requests.post('https://crowdsurfer.com/api/1.0/project/', headers={'Authorization': 'Token abcdef123456890', 'Content-Type': 'application/json'}, data = json.dumps(payload)) if r.status_code == 200: # We return the UUID field for successfully uploaded projects: print("UUID: %s" % r.json()['uuid']) else: print("Failed: errors = %r" % r.json()['detail'])

Assumes that Guzzle has been installed using Composer.

require 'vendor/autoload.php'; use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; $client = new GuzzleHttp\Client(); try { $response = $client->post('https://crowdsurfer.com/api/1.0/project/', [ "headers" => [ "Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => "Token abcdef123456890" ], "json" => [ "start_date" => "2015-01-10T12:00Z", "tags" => ["technology", "wireless"], "subtitle" => "You too can own this very shiny thing", "raised" => 345, "title" => "Shiny Thing", "location" => ["address" => "Cambridge, UK"], "url" => "http://www.dummysite.org/projects/new-shiny-project.html", "category" => "technology", "end_date" => "2015-06-28T12:00Z", "rewards_list" => [["pledge" => 10, "description" => "A warm fuzzy feeling", "num_backers" => 5], ["pledge" => 20, "description" => "A cuddly toy", "num_backers" => 2]], "goal" => 10000, "owner_details" => ["id" => "12345", "full_name" => "Postman Pat"], "funders" => 85, "project_id" => 100212, "language" => "en", "funding_type" => "R", "currency" => "EUR" ] ]); $json = $response->json(); /* We return the UUID field for successfully uploaded projects: */ $uuid = $json["uuid"]; var_dump($uuid); } catch (ClientException $e) { /* Failed uploads should return a "detail" dictionary describing the invalid fields: */ $errors = $json["detail"]; var_dump($errors); }

A successful POST will return a globally unique identifier (the UUID) which you can use to retrieve the project using the get single project by UUID method.

e.g:

:

Using the standard curl command:

curl -X GET \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token abcdef123456890" \ https://crowdsurfer.com/api/1.0/project/443-567e4a7ad49f7abd02d78e2c71e8a4e8/

We depend on the very useful requests library.

import requests import json r = requests.get('https://crowdsurfer.com/api/1.0/project/443-567e4a7ad49f7abd02d78e2c71e8a4e8/', headers={'Authorization': 'Token abcdef123456890', 'Content-Type': 'application/json'}) print(r.json()) else: print("Failed: errors = %r" % r.json()['detail'])

Assumes that Guzzle has been installed using Composer.

require 'vendor/autoload.php'; use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; $client = new GuzzleHttp\Client(); try { $response = $client->get('https://crowdsurfer.com/api/1.0/project/443-567e4a7ad49f7abd02d78e2c71e8a4e8/', [ "headers" => [ "Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => "Token abcdef123456890" ] ]); $json = $response->json(); var_dump($json); } catch (ClientException $e) { /* Failed uploads should return a "detail" dictionary describing the invalid fields: */ $errors = $json["detail"]; var_dump($errors); }

We identify existing projects by the project_id field. If no project is found with a matching id we will create a new one. We will overwrite an existing project with the new fields, although we do keep a historical record of project updates for all numeric and status fields.

When you're happy with your uploaded project you should process to upload all your projects and project transactions (including projects that have ended or expired), as that will enable us to resolve any clashes with any existing data we may hold for your platform. Subsequent updates need only include ongoing or recently ended projects.

Viewing your uploads

Until we have verified your uploads your projects will remain invisible in the dashboard. However you can use the API console to view your uploaded data alongside the resultant project stored in our database. In addition you can switch to using your uploaded project in the main dashboard by selecting the Private projects switch in the project Search tools dropdown.

In summary:

  1. Perform an initial post of all your projects.
  2. Check that the data uploaded successfully with the get single project by UUID method.
  3. Email us at nick@crowdsurfer.com when you're happy with your initial import.
  4. We'll check the projects are valid and patch up any clashing UUIDs. We will then remove the invalid flags and grant full dashboard access.
  5. You'll need to ensure that projects are posted periodically to ensure continued dashboard access. Projects should ideally be posted once a day.

Required Fields

This page shows you the minimum set of fields that you should supply to ensure inclusion in our database:

Field type Description
project id Platform-specific project identifier.
funding type Crowdsurfer funding type code.
title Short (preferably single-line) project description.
description A more detailed project description.
currency Project currency.
goal Project goal (which may be the loan amount for a loan-type project).
raised Amount raised to date, where appropriate.
project location Project location.
start date Start date of the project.
end date End date of the project (if not open-ended).

Loan projects

Loan projects should additionally specify these fields:

loan type An indication as to whether a loan is for an individual or a business
loan security An indication as to whether a loan is secured or unsecured
interest rate The rate offered by the loan

Transactions

As well as the project definition we are also interested in all transactions that relate to each project:

transaction id A platform-specific identifier for this transaction.
datetime The timestamp for this transaction.
funder id Some kind of unique user identifier within your platform. This could be a user id, username, or any other user identifier.
amount offered The amount offered in this transaction, in the project currency.
funder location The location of the funder, at the postcode level or above.
funder type An indication as to whether this is an individual investor or an institutional investor.