WeCan.Fund API (v1.1) API Reference
Introduction
This document is for consultation only. It provides the necessary information to implement a front-end based on the WeCan.Fund API. It will be updated at each release of the API. To always point to the latest, you can use the version "beta".
Changelog
v1 (22.08.2017)
- Adding the read-only "contribution_sum" attribute to project details.
- Adding "direct_url" attribute to project details for direct links from external aggregators.
v1.1 (30.12.2017)
- Changing the return type of "transaction" in the Contribution model to a complete Transaction object instead of just the ID.
- Adding the repayments endpoints for LENDING projects. (also backported to v1)
- In the POST /contribution endpoint, the user_wallet is not anymore mandatory to support direct paiment methods
- Adding Saferpay Wallets, which are not really wallets, but an abstraction for the transactions. They expose the same fields as Dummy Wallets. No interraction should happen with them through the API, therefore they are not documented here.
- Adding the write-only "extra_info" attribute to contribution POST for extra transaction information.
- (02.04.2018) Adding more fine-grained scopes. Retro-compatibility is kept by matching all scopes with 'default'.
- (01.07.2019) Adding multilanguage support for projects and rewards. (also backported to v1)
- (01.07.2019) Adding a 'preferred_language' field to the retreived brand JSON.
Requests and Responses
The API follows the typical RESTful design, using the HTTP verbs GET, POST, PUT and DELETE. All connections to the API are done in standard HTTPS with TLS. The content-type must be application/json, except for uploading files where it is multipart/form-data. The response codes follows the HTTP standard. In case of an error, an Error object is returned, explaining the cause of the problem.
Scopes
When requesting for an access token, you have to specify the scopes of this token. The user will be presented with the detailled authorizations linked to these scopes (like permissions on mobile app). So the rule of thumb is: don't ask for scopes you don't need. The scopes you are then granted can limit you to the use of a subset of the endpoints:
- default: Kept for retro-compatibility reasons, it allows access to all endpoints. It can also be used in implementations which requires more than two of the other scopes. This is currently the only way to get access to the "processes" endpoints as those can be related to various objects (documents, projects, ...)
- document: Allow access to all the endpoints in the the "documents" section.
- project: Allow access to all the endpoints in the "projects" section.
- profile: Allow access to all the endpoints in the "users" and "notifications" sections.
- wallet: Allow access to all the endpoints in the "wallets" section.
Formats
The date format is the following YYYY-MM-dd (e.g.: 1985-12-31) and the date and time format is YYYY-MM-dd HH:mm:ss (e.g.: 1985-12-31 11:45:33). The monetary amounts are backed with a decimal(9,2) representation, avoiding rounding issue of floating point numbers. For all requests and responses, the encoding is utf-8.
Multilanguage support
This API can handle translations on project and reward text fields. To add multilanguage support to an application, use the 'Accept-Language' header when querying, and handle 'Content-Language' header responses.
When posting a new project/reward, it will be created with the default brand language, whatever the 'Accept-Language' header contains. However, when 'putting' an existing project or reward, you can add or update a translation by setting this header to a language code (like 'en' or 'fr'). When getting a project or a reward, you can also request a specific language by setting this header. Note that the 'Content-Language' always matches the current object language: when you're asking to retrieve a language which does not currently exist for an object, the language will falls back to the default brand language, and the 'Content-Language' will correspondingly show that.
API Endpoint
https://api.dev.wecan.fund/
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: v1.1
Authentication
WeCan.Fund SSO
Access and manage your wallets and transactions.
profileAccess and manage your profile information.
documentAccess and manage your uploaded documents.
defaultAccess and manage all of your account's data, wallets, transactions and documents.
projectAccess and manage your campaigns, contributions and rewards.
brands
Get current brand
Get current brand . Returns detailled information about the currently authenticated brand
Returns the information about the current brand
Response Example (200 OK)
{
"name": "string",
"url": "string",
"preferred_language": "string",
"owner": "string"
}
documents
List document types
List document types . Return the list of all document types (internal + custom).
If set to 'true', include disabled types (Optional).
Returns the document types (custom types have an additional metadata field).
Response Example (200 OK)
{
"title": "string",
"disabled": "boolean",
"id": "integer",
"description": "string",
"linkable_types": "string",
"key": "string",
"type": "string"
}
Create a new document type
Create a new document type
- key: string
-
A unique to the brand key for refering to this document type.
- title: string
-
The name of the document type
- metadata: string
-
Additional information stored in JSON.
- description: string
-
The description of the document type
Request Content-Types: application/json
Request Example
{
"key": "string",
"title": "string",
"metadata": "string",
"description": "string"
}
Returns the document type just created.
Response Example (201 Created)
{
"title": "string",
"disabled": "boolean",
"type": "string",
"metadata": "string",
"description": "string",
"key": "string",
"id": "integer"
}
Update a document type
Update a document type . Only custom document type of the current brand can be edited.
- key: string
-
A unique to the brand key for refering to this document type.
- title: string
-
The name of the document type
- metadata: string
-
Additional information stored in JSON.
- description: string
-
The description of the document type
(no description)
Request Content-Types: application/json
Request Example
{
"key": "string",
"title": "string",
"metadata": "string",
"description": "string"
}
Returns the document type just edited.
Response Example (200 OK)
{
"title": "string",
"disabled": "boolean",
"type": "string",
"metadata": "string",
"description": "string",
"key": "string",
"id": "integer"
}
Disable a document type
Disable a document type . Only custom document type of the current brand can be disabled. Disabled document types cannot be re-enabled, but are still visible in the list with the "all" option.
(no description)
The document type has been correctly disabled.
List documents
List documents for a specific object type and primary key (pk). For example, if you want to get the list of documents for a user with id 42, use /user/42 The results are paginated and wrapped in a JSON object with 'count' and 'results' properties. The page length is 25.
(no description)
(no description)
Id of a document type. If specified, only documents of this type will be returned (Optional).
A page number within the paginated result set.
Returns the list of documents details.
Response Example (200 OK)
{
"filename": "string",
"id": "integer",
"linked_type": "string",
"type_id": "string",
"creation_date": "string",
"type": "string"
}
Upload a document
Upload a document for a specific type and pk. See "List documents" for an example usage of linked_type and type_id.
(no description)
(no description)
Id of document type. Mandatory.
(no description)
The file has been correctly uploaded.
Response Example (201 Created)
{
"filename": "string",
"id": "integer",
"linked_type": "string",
"type_id": "string",
"creation_date": "string",
"type": "string"
}
Download a document
Download a document . See "List documents" for an example usage of linked_type and type_id. Id is the document id, returned in the upload response or while listing documents.
(no description)
(no description)
(no description)
Returns the document content as an attachement.
Delete a document
Delete a document . This action is permanent. See "List documents" for an example usage of linked_type and type_id. Id is the document id, returned in the upload response or while listing documents.
(no description)
(no description)
(no description)
The document has been correctly deleted.
miscellaneous
Test connectivity
Test connectivity to the backend. It also retrieves the basic authentification infos.
Returns the connection information.
notifications
List notifications
List notifications . By default, returns only unseen notification. The results are paginated and wrapped in a JSON object with 'count' and 'results' properties. The page length is 25.
If equal to 'all', will return all notifications (Optional).
A page number within the paginated result set.
Returns the list of notifications.
Response Example (200 OK)
{
"messages": "string",
"key": "string",
"id": "integer",
"seen_date": "string",
"subject": "string",
"destination_link": "string",
"seen": "boolean",
"button_text": "string",
"title": "string",
"metadata": "string",
"public": "boolean",
"subtitle": "string",
"species": "string",
"short_message": "string",
"creation_date": "string",
"brand": "string"
}
Create a new notification
Create a new notification
- messages: string
-
The main message of the e-mail. Can contain line-feeds.
- subject: string
-
The subject of the e-mail
- title: string
-
The title of the e-mail.
- button_text: string
-
The text of the button link in the e-mail, if any.
- public: boolean
-
Indicate that all brands have access to the notification
- subtitle: string
-
The subtitle of the e-mail.
- destination_link: string
-
A link to the object or event log that caused the notification.
- key: string
-
A key for classifying notifications that are about the same kind of event.
- short_message: string
-
The short message shown in the notification on My.WeCan.Fund.
Request Content-Types: application/json
Request Example
{
"messages": "string",
"subject": "string",
"title": "string",
"button_text": "string",
"public": "boolean",
"subtitle": "string",
"destination_link": "string",
"key": "string",
"short_message": "string"
}
Returns the notification just created.
Response Example (201 Created)
{
"messages": "string",
"key": "string",
"id": "integer",
"seen_date": "string",
"subject": "string",
"destination_link": "string",
"seen": "boolean",
"button_text": "string",
"title": "string",
"metadata": "string",
"public": "boolean",
"subtitle": "string",
"species": "string",
"short_message": "string",
"creation_date": "string",
"brand": "string"
}
Mark a notification as read
Mark a notification as read
(no description)
Set this to 'ignored' if the user want to mark the notification as read, but ignored it (Optional).
The notification has been marked as read.
processes
List processes
List processes that are currently in progress for the curent user.
Returns the processes. The actual structure depends on the process type.
Response Example (200 OK)
{
"started_date": "string",
"id": "integer",
"status_display": "string",
"ended_date": "string",
"display_name": "string",
"status": "string",
"current_step": "string"
}
Get a process
Get a process with detailled information about its steps.
(no description)
Returns the process and steps. The actual structure depends on the process type.
Response Example (200 OK)
{
"started_date": "string",
"steps": [
"string"
],
"id": "integer",
"status_display": "string",
"ended_date": "string",
"display_name": "string",
"status": "string",
"current_step": "string"
}
projects
List projects
List projects that are managed by the current user (or also the public ones). The results are paginated and wrapped in a JSON object with 'count' and 'results' properties. The page length is 25.
If set to 'true', lists also disabled projects (Optional)
If set to 'true', lists all public projects (Optional)
A page number within the paginated result set.
Returns the projects.
Response Example (200 OK)
{
"short_project_description": "string",
"card_picture": "string",
"id": "integer",
"owner": "string",
"title": "string"
}
Create a new project
Create a new project
- amount_min: number
-
The minimal amount to succeed the project. (default: 0)
- reimbursement: string
-
How should the loan (and interests) be reimbursed: do nothing, all at the end, or split in equal parts monthly (duration must be a multiple of 30) or every three months (duration must be a multiple of 90). The default option is to do nothing, it must then be triggered through the dedicated API calls. Only used in the case of a LENDING project.
- tags: string[]
-
List of tags for this project. You can use any string for this and you can use the List tags endpoint if you want to provide some autofill to the user, based on the previously seen tags for this brand. You can also choose to restrict the tags to your own list.
-
string - website: string
- twitter: string
- short_project_description: string
-
Brief description of the project (max. 280 char.)
- commission: number
-
Fees of the brand, taken on the collected funds if the project succeeds. This is expressed as a percentage. Default: 0
- rate_interest: number
-
Expressed in percent. Only applicable in the case of a LENDING project. Default: 0
- currency: string
-
default: CHF
- request_type: string
-
FUNDING (default option): Crowdfunding (in kind rewards), LENDING: Crowdlending (refund and interests), DONATION: Donation (no direct rewards)
- title: string
-
Max 60 char.
- public: boolean
-
Set to True to allow aggregators to view this project.
- project_contact_email: string
- location: string
-
The location of the project, as a place name.
- project_description: string
-
Expected format is HTML, ideally domain independant in terms of styles and media.
- location_coordinates: string
-
The location of the project, as geographic coordinates. E.g.: {"longitude": 6.565554141998291, "latitude"=46.52027836093017}
- campaign_end_date: string
-
Date at which the project automatically closes and switches to success or failure, depending on the amount collected.
- principal_activity_sector: integer
-
According to the European RAMON database level 1 or 2 ( http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL_LINEAR&StrNom=NACE_REV2&StrLanguageCode=EN)
- maximum_loan_amount: number
- card_picture: string
-
The picture for the project. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
". Minimum size 560x420px, but it can be any size larger than this as long as the ratio is preserved. Images with another ratio may be crop when displayed on aggregators. - facebook: string
- user_wallet: string
-
ID of the project owner's wallet.
- direct_url: string
- duration: integer
-
Number of days from the closing of the project until full refund of the lenders. This only applies to LENDING projects. Default: 90
- owner: string
-
The owner of the project, who receives the money if it succeeds. It can be a user or a company.
- amount: number
-
The target of the fundraising (minimum and default: 30'000). In the case of a crowdlending, this is also the maximum amount that can be collected.
- minimum_loan_amount: number
- linkedin: string
Request Content-Types: application/json
Request Example
{
"amount_min": "number",
"reimbursement": "string",
"tags": [
"string"
],
"website": "string",
"twitter": "string",
"short_project_description": "string",
"commission": "number",
"rate_interest": "number",
"currency": "string",
"request_type": "string",
"title": "string",
"public": "boolean",
"project_contact_email": "string",
"location": "string",
"project_description": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"principal_activity_sector": "integer",
"maximum_loan_amount": "number",
"card_picture": "string",
"facebook": "string",
"user_wallet": "string",
"direct_url": "string",
"duration": "integer",
"owner": "string",
"amount": "number",
"minimum_loan_amount": "number",
"linkedin": "string"
}
Returns the project just created.
Response Example (201 Created)
{
"amount_min": "number",
"short_project_description": "string",
"id": "integer",
"tags": [
"string"
],
"website": "string",
"twitter": "string",
"reimbursement": "string",
"commission": "number",
"rate_interest": "number",
"location_coordinates": "string",
"request_type": "string",
"vote_score": "integer",
"title": "string",
"public": "boolean",
"location": "string",
"num_vote_down": "integer",
"project_description": "string",
"process_id": "string",
"contribution_sum": "string",
"currency": "string",
"campaign_end_date": "string",
"disabled": "boolean",
"principal_activity_sector": "integer",
"duration": "integer",
"maximum_loan_amount": "number",
"card_picture": "string",
"facebook": "string",
"user_wallet": "string",
"direct_url": "string",
"project_contact_email": "string",
"brand": "string",
"owner": "string",
"amount": "number",
"wallet": "string",
"minimum_loan_amount": "number",
"num_vote_up": "integer",
"linkedin": "string"
}
Get a project
Get a project
(no description)
Returns the project.
Response Example (200 OK)
{
"amount_min": "number",
"short_project_description": "string",
"id": "integer",
"tags": [
"string"
],
"website": "string",
"twitter": "string",
"reimbursement": "string",
"commission": "number",
"rate_interest": "number",
"location_coordinates": "string",
"request_type": "string",
"vote_score": "integer",
"title": "string",
"public": "boolean",
"location": "string",
"num_vote_down": "integer",
"project_description": "string",
"process_id": "string",
"contribution_sum": "string",
"currency": "string",
"campaign_end_date": "string",
"disabled": "boolean",
"principal_activity_sector": "integer",
"duration": "integer",
"maximum_loan_amount": "number",
"card_picture": "string",
"facebook": "string",
"user_wallet": "string",
"direct_url": "string",
"project_contact_email": "string",
"brand": "string",
"owner": "string",
"amount": "number",
"wallet": "string",
"minimum_loan_amount": "number",
"num_vote_up": "integer",
"linkedin": "string"
}
Update a project
Update a project
- amount_min: number
-
The minimal amount to succeed the project. (default: 0)
- reimbursement: string
-
How should the loan (and interests) be reimbursed: do nothing, all at the end, or split in equal parts monthly (duration must be a multiple of 30) or every three months (duration must be a multiple of 90). The default option is to do nothing, it must then be triggered through the dedicated API calls. Only used in the case of a LENDING project.
- tags: string[]
-
List of tags for this project. You can use any string for this and you can use the List tags endpoint if you want to provide some autofill to the user, based on the previously seen tags for this brand. You can also choose to restrict the tags to your own list.
-
string - website: string
- twitter: string
- short_project_description: string
-
Brief description of the project (max. 280 char.)
- commission: number
-
Fees of the brand, taken on the collected funds if the project succeeds. This is expressed as a percentage. Default: 0
- rate_interest: number
-
Expressed in percent. Only applicable in the case of a LENDING project. Default: 0
- currency: string
-
default: CHF
- request_type: string
-
FUNDING (default option): Crowdfunding (in kind rewards), LENDING: Crowdlending (refund and interests), DONATION: Donation (no direct rewards)
- title: string
-
Max 60 char.
- public: boolean
-
Set to True to allow aggregators to view this project.
- project_contact_email: string
- location: string
-
The location of the project, as a place name.
- project_description: string
-
Expected format is HTML, ideally domain independant in terms of styles and media.
- location_coordinates: string
-
The location of the project, as geographic coordinates. E.g.: {"longitude": 6.565554141998291, "latitude"=46.52027836093017}
- campaign_end_date: string
-
Date at which the project automatically closes and switches to success or failure, depending on the amount collected.
- principal_activity_sector: integer
-
According to the European RAMON database level 1 or 2 ( http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL_LINEAR&StrNom=NACE_REV2&StrLanguageCode=EN)
- maximum_loan_amount: number
- card_picture: string
-
The picture for the project. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
". Minimum size 560x420px, but it can be any size larger than this as long as the ratio is preserved. Images with another ratio may be crop when displayed on aggregators. - facebook: string
- user_wallet: string
-
ID of the project owner's wallet.
- direct_url: string
- duration: integer
-
Number of days from the closing of the project until full refund of the lenders. This only applies to LENDING projects. Default: 90
- owner: string
-
The owner of the project, who receives the money if it succeeds. It can be a user or a company.
- amount: number
-
The target of the fundraising (minimum and default: 30'000). In the case of a crowdlending, this is also the maximum amount that can be collected.
- minimum_loan_amount: number
- linkedin: string
(no description)
Request Content-Types: application/json
Request Example
{
"amount_min": "number",
"reimbursement": "string",
"tags": [
"string"
],
"website": "string",
"twitter": "string",
"short_project_description": "string",
"commission": "number",
"rate_interest": "number",
"currency": "string",
"request_type": "string",
"title": "string",
"public": "boolean",
"project_contact_email": "string",
"location": "string",
"project_description": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"principal_activity_sector": "integer",
"maximum_loan_amount": "number",
"card_picture": "string",
"facebook": "string",
"user_wallet": "string",
"direct_url": "string",
"duration": "integer",
"owner": "string",
"amount": "number",
"minimum_loan_amount": "number",
"linkedin": "string"
}
Returns the project just edited.
Response Example (200 OK)
{
"amount_min": "number",
"short_project_description": "string",
"id": "integer",
"tags": [
"string"
],
"website": "string",
"twitter": "string",
"reimbursement": "string",
"commission": "number",
"rate_interest": "number",
"location_coordinates": "string",
"request_type": "string",
"vote_score": "integer",
"title": "string",
"public": "boolean",
"location": "string",
"num_vote_down": "integer",
"project_description": "string",
"process_id": "string",
"contribution_sum": "string",
"currency": "string",
"campaign_end_date": "string",
"disabled": "boolean",
"principal_activity_sector": "integer",
"duration": "integer",
"maximum_loan_amount": "number",
"card_picture": "string",
"facebook": "string",
"user_wallet": "string",
"direct_url": "string",
"project_contact_email": "string",
"brand": "string",
"owner": "string",
"amount": "number",
"wallet": "string",
"minimum_loan_amount": "number",
"num_vote_up": "integer",
"linkedin": "string"
}
Disable a project
Disable a project
(no description)
The project has been correctly disabled.
Close a project
Close a project when all the contract are signed or the needed administrative tasks performed.
(no description)
List contributions
List contributions of the given project. The results are paginated and wrapped in a JSON object with 'count' and 'results' properties. The page length is 25.
(no description)
A page number within the paginated result set.
Returns the contributions.
Response Example (200 OK)
{
"transaction": "object",
"currency": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"id": "integer",
"project": "string",
"extra_info": "string",
"submit_date": "string",
"user_wallet": "string",
"user": "string",
"amount": "number"
}
Create a new contribution
Create a new contribution for the given project.
- currency: string
-
Default: CHF
- user_wallet: string
-
The ID of the wallet providing the money.
- rewards: string[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
-
string - disabled: boolean
-
Set to True if the contribution has been cancelled. The only possible cause is a failure of the transaction. The claimed rewards are not deducted for cancelled contributions.
- extra_info: string
-
Some additional information for the transaction. For transactions that require a redirection, this is the return URL.
- amount: number
- user: string
(no description)
Request Content-Types: application/json
Request Example
{
"currency": "string",
"user_wallet": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"extra_info": "string",
"amount": "number",
"user": "string"
}
Returns the contribution just created.
Response Example (201 Created)
{
"transaction": "object",
"currency": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"id": "integer",
"project": "string",
"extra_info": "string",
"submit_date": "string",
"user_wallet": "string",
"user": "string",
"amount": "number"
}
Get a contribution
Get a contribution
(no description)
(no description)
Returns the contribution.
Response Example (200 OK)
{
"transaction": "object",
"currency": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"id": "integer",
"project": "string",
"extra_info": "string",
"submit_date": "string",
"user_wallet": "string",
"user": "string",
"amount": "number"
}
Update a contribution
Update a contribution
- currency: string
-
Default: CHF
- user_wallet: string
-
The ID of the wallet providing the money.
- rewards: string[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
-
string - disabled: boolean
-
Set to True if the contribution has been cancelled. The only possible cause is a failure of the transaction. The claimed rewards are not deducted for cancelled contributions.
- extra_info: string
-
Some additional information for the transaction. For transactions that require a redirection, this is the return URL.
- amount: number
- user: string
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"currency": "string",
"user_wallet": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"extra_info": "string",
"amount": "number",
"user": "string"
}
Returns the contribution just edited.
Response Example (200 OK)
{
"transaction": "object",
"currency": "string",
"rewards": [
"string"
],
"disabled": "boolean",
"id": "integer",
"project": "string",
"extra_info": "string",
"submit_date": "string",
"user_wallet": "string",
"user": "string",
"amount": "number"
}
Validate a project
Validate a project when the user has provided all the information and has a KYC2 wallet.
(no description)
Start a campaign
Start a campaign on an initialized project, when the project wallet is in KYC2 status too.
(no description)
Get repayment status
Get repayment status
(no description)
Returns the list of transactions for repayment of this project. Only available for LENDING projects.
Response Example (200 OK)
{
"backend_fees": "number",
"create_timestamp": "string",
"id": "integer",
"scheduled_execution_date": "string",
"process": "integer",
"extra_info": "string",
"debited_wallet": "string",
"currency": "string",
"method": "string",
"last_edit_timestamp": "string",
"wcf_redirect_url": "string",
"external_ref": "string",
"amount": "number",
"reason": "string",
"user": "string",
"credited_wallet": "string"
}
Repay lending
Repay lending to all lenders, if the amount is enough in the project owner's wallet. Only available for LENDING projects.
- amount: number
-
Total amount that will be taken from the project owner and distributed proportionally to the lenders.
(no description)
Request Content-Types: application/json
Request Example
{
"amount": "number"
}
List the rewards
List the rewards of the given project.
(no description)
If set to 'true', lists also disabled rewards (Optional).
Returns the rewards.
Response Example (200 OK)
{
"available_from": "string",
"number_claimed": "string",
"amount_min": "number",
"disabled": "boolean",
"id": "integer",
"description": "string",
"name": "string",
"available_to": "string",
"last_edit_timestamp": "string",
"project": "string",
"number_max": "integer",
"create_timestamp": "string",
"amount_max": "number"
}
Create a new reward
Create a new reward for the given project.
- available_from: string
-
Date and time before which this reward cannot be claimed.
- number_max: integer
-
Default: 999
- amount_min: number
- description: string
-
Summarize the reward for this stage. (max. 1000 char.)
- name: string
-
Reward name, max. 50 char.
- amount_max: number
-
In the case the maximum is not defined, there is no upper limit.
- available_to: string
-
Date and time after which this reward cannot be claimed.
(no description)
Request Content-Types: application/json
Request Example
{
"available_from": "string",
"number_max": "integer",
"amount_min": "number",
"description": "string",
"name": "string",
"amount_max": "number",
"available_to": "string"
}
Returns the reward just created.
Response Example (201 Created)
{
"available_from": "string",
"number_claimed": "string",
"amount_min": "number",
"disabled": "boolean",
"id": "integer",
"description": "string",
"name": "string",
"available_to": "string",
"last_edit_timestamp": "string",
"project": "string",
"number_max": "integer",
"create_timestamp": "string",
"amount_max": "number"
}
Get a reward
Get a reward
(no description)
(no description)
Returns the reward.
Response Example (200 OK)
{
"available_from": "string",
"number_claimed": "string",
"amount_min": "number",
"disabled": "boolean",
"id": "integer",
"description": "string",
"name": "string",
"available_to": "string",
"last_edit_timestamp": "string",
"project": "string",
"number_max": "integer",
"create_timestamp": "string",
"amount_max": "number"
}
Update a reward
Update a reward
- available_from: string
-
Date and time before which this reward cannot be claimed.
- number_max: integer
-
Default: 999
- amount_min: number
- description: string
-
Summarize the reward for this stage. (max. 1000 char.)
- name: string
-
Reward name, max. 50 char.
- amount_max: number
-
In the case the maximum is not defined, there is no upper limit.
- available_to: string
-
Date and time after which this reward cannot be claimed.
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"available_from": "string",
"number_max": "integer",
"amount_min": "number",
"description": "string",
"name": "string",
"amount_max": "number",
"available_to": "string"
}
Returns the reward just edited.
Response Example (200 OK)
{
"available_from": "string",
"number_claimed": "string",
"amount_min": "number",
"disabled": "boolean",
"id": "integer",
"description": "string",
"name": "string",
"available_to": "string",
"last_edit_timestamp": "string",
"project": "string",
"number_max": "integer",
"create_timestamp": "string",
"amount_max": "number"
}
Disable a reward
Disable a reward
(no description)
(no description)
The reward has been correctly disabled.
Terminate a campaign
Terminate a campaign when the deadline is passed or prematurely.
(no description)
Add a vote to a project for the current user.
Add a vote to a project for the current user. Each user can only vote once per project.
- vote: string
(no description)
Request Content-Types: application/json
Request Example
{
"vote": "string"
}
Returns the project just voted.
Remove a vote from a project for the current user.
Remove a vote from a project for the current user.
(no description)
The project without the user's vote.
users
List users
List users that have allowed the current brand to access their profile. It can contain users and companies (in the latter case, the first name and last name are the company name). The results are paginated and wrapped in a JSON object with 'count' and 'results' properties. The page length is 25.
A page number within the paginated result set.
Returns the users.
Response Example (200 OK)
{
"last_name": "string",
"first_name": "string",
"picture": "string",
"id": "integer",
"email": "string"
}
Get the current user profile
Get the current user profile
Returns the current user's profile.
Response Example (200 OK)
{
"nationality": [
"string"
],
"street": "string",
"email": "string",
"zip_code": "string",
"picture": "string",
"last_name": "string",
"mobile_number": "string",
"lang": "string",
"civility": "string",
"user_type": "string",
"gender": "string",
"date_of_birth": "string",
"country": "string",
"street_number": "string",
"occupation": "string",
"id": "integer",
"process_id": "string",
"first_name": "string",
"city": "string",
"kyc_status": "string",
"metadata": "string",
"address_extra": "string"
}
Update the current user profile
Update the current user profile . If the user is a company, the model may vary. If the user has already a verified profile, certain fields will be readonly.
- nationality: string[]
-
string - last_name: string
-
This can include the middle name or multiple last names.
- email: string
-
For companies, this must be the company contact e-mail, not a personal one.
- zip_code: string
- date_of_birth: string
-
Format YYYY-MM-dd (e.g.: 1985-12-31)
- picture: string
-
The profile picture. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
" - street: string
- mobile_number: string
-
In international format with country code, starting with "+". It can be used for authorizing payments via SMS.
- occupation: string
- lang: string
- city: string
-
The city corresponding to the ZIP code.
- gender: string
-
H: male, F: female, U: undefined
- civility: string
-
The title MASTER [Maître], is used in French within the scope of some legal professions.
- country: string
-
The domiciliation country, corresponding to the address
- street_number: string
- address_extra: string
-
for example the building floor or PO Box
- first_name: string
Request Content-Types: application/json
Request Example
{
"nationality": [
"string"
],
"last_name": "string",
"email": "string",
"zip_code": "string",
"date_of_birth": "string",
"picture": "string",
"street": "string",
"mobile_number": "string",
"occupation": "string",
"lang": "string",
"city": "string",
"gender": "string",
"civility": "string",
"country": "string",
"street_number": "string",
"address_extra": "string",
"first_name": "string"
}
Returns the current user's profile. If the user is a company, the model may vary.
Response Example (200 OK)
{
"nationality": [
"string"
],
"street": "string",
"email": "string",
"zip_code": "string",
"picture": "string",
"last_name": "string",
"mobile_number": "string",
"lang": "string",
"civility": "string",
"user_type": "string",
"gender": "string",
"date_of_birth": "string",
"country": "string",
"street_number": "string",
"occupation": "string",
"id": "integer",
"process_id": "string",
"first_name": "string",
"city": "string",
"kyc_status": "string",
"metadata": "string",
"address_extra": "string"
}
Creates a temporary user
Creates a temporary user . Once created the API returns the user id and a activation token that can be given to the user to enable the account in a later stage. It is not possible to retrieve the list of temporary users and those may be deleted after some time (TBD). The temporary user id can be used for example for creating contributions.
- street: string
- city: string
-
The city corresponding to the ZIP code.
- email: string
- zip_code: string
- civility: string
-
The title MASTER [Maître], is used in French within the scope of some legal professions.
- country: string
-
The domiciliation country, corresponding to the address
- street_number: string
- last_name: string
-
This can include the middle name or multiple last names.
- address_extra: string
-
for example the building floor or PO Box
- first_name: string
Request Content-Types: application/json
Request Example
{
"street": "string",
"city": "string",
"email": "string",
"zip_code": "string",
"civility": "string",
"country": "string",
"street_number": "string",
"last_name": "string",
"address_extra": "string",
"first_name": "string"
}
Returns the created user's profile with its id and the activation token.
Response Example (201 Created)
{
"last_name": "string",
"email": "string",
"zip_code": "string",
"street": "string",
"city": "string",
"civility": "string",
"country": "string",
"street_number": "string",
"address_extra": "string",
"first_name": "string",
"id": "integer",
"activation_token": "string"
}
Get a user profile
Get a user profile
(no description)
Returns the user's profile.
Response Example (200 OK)
{
"nationality": [
"string"
],
"street": "string",
"email": "string",
"zip_code": "string",
"picture": "string",
"last_name": "string",
"mobile_number": "string",
"lang": "string",
"civility": "string",
"user_type": "string",
"gender": "string",
"date_of_birth": "string",
"country": "string",
"street_number": "string",
"occupation": "string",
"id": "integer",
"process_id": "string",
"first_name": "string",
"city": "string",
"kyc_status": "string",
"metadata": "string",
"address_extra": "string"
}
Update the metadata of a user
Update the metadata of a user
- example_data: string
(no description)
Request Content-Types: application/json
Request Example
{
"example_data": "string"
}
Returns the user's profile with the metadata.
Response Example (200 OK)
{
"nationality": [
"string"
],
"street": "string",
"email": "string",
"zip_code": "string",
"picture": "string",
"last_name": "string",
"mobile_number": "string",
"lang": "string",
"civility": "string",
"user_type": "string",
"gender": "string",
"date_of_birth": "string",
"country": "string",
"street_number": "string",
"occupation": "string",
"id": "integer",
"process_id": "string",
"first_name": "string",
"city": "string",
"kyc_status": "string",
"metadata": "string",
"address_extra": "string"
}
wallets
List the wallets
List the wallets of the curent user.
Filter only wallets of a given kind (Optional). Possible values depend on your contract.
Returns the wallets.
Response Example (200 OK)
{
"data": "string"
}
Creates a new wallet
Creates a new wallet for the current user.
- currency: string
Defines the kind of wallet to create. Possible values depend on your contract.
Request Content-Types: application/json
Request Example
{
"currency": "string"
}
Returns the wallet just created.
Response Example (201 Created)
{
"data": "string"
}
List transactions
List transactions where the debited or credited wallet belongs to the current user.
Get a transaction
Get a transaction for the current user.
(no description)
Returns the transaction.
Response Example (200 OK)
{
"backend_fees": "number",
"create_timestamp": "string",
"id": "integer",
"scheduled_execution_date": "string",
"process": "integer",
"extra_info": "string",
"debited_wallet": "string",
"currency": "string",
"method": "string",
"last_edit_timestamp": "string",
"wcf_redirect_url": "string",
"external_ref": "string",
"amount": "number",
"reason": "string",
"user": "string",
"credited_wallet": "string"
}
Get a wallet
Get a wallet for the current user.
(no description)
Returns the wallet.
Response Example (200 OK)
{
"data": "string"
}
Load a wallet
Load a wallet . Initiate a loading process for the given walet. This may not be applicable to all kind of wallets.
- amount: number
- method: integer
-
0: direct, 1: SOFORT, 102: Bank wire
- extra_info: string
-
Depending on the method, this field may be needed. For example money out with bank wire needs an IBAN here.
(no description)
Request Content-Types: application/json
Request Example
{
"amount": "number",
"method": "integer",
"extra_info": "string"
}
Returns the transaction details of the loading process.
Response Example (201 Created)
{
"backend_fees": "number",
"create_timestamp": "string",
"id": "integer",
"scheduled_execution_date": "string",
"process": "integer",
"extra_info": "string",
"debited_wallet": "string",
"currency": "string",
"method": "string",
"last_edit_timestamp": "string",
"wcf_redirect_url": "string",
"external_ref": "string",
"amount": "number",
"reason": "string",
"user": "string",
"credited_wallet": "string"
}
Withdraw from a wallet
Withdraw from a wallet . Initiate the withdrawing process from the given walet. This may not be applicable to all kind of wallets.
- amount: number
- method: integer
-
0: direct, 1: SOFORT, 102: Bank wire
- extra_info: string
-
Depending on the method, this field may be needed. For example money out with bank wire needs an IBAN here.
(no description)
Request Content-Types: application/json
Request Example
{
"amount": "number",
"method": "integer",
"extra_info": "string"
}
Returns the transaction details of the withdrawing process.
Response Example (201 Created)
{
"backend_fees": "number",
"create_timestamp": "string",
"id": "integer",
"scheduled_execution_date": "string",
"process": "integer",
"extra_info": "string",
"debited_wallet": "string",
"currency": "string",
"method": "string",
"last_edit_timestamp": "string",
"wcf_redirect_url": "string",
"external_ref": "string",
"amount": "number",
"reason": "string",
"user": "string",
"credited_wallet": "string"
}
Start the upgrade of a wallet
Start the upgrade of a wallet . This is only applicable for certain wallet backends. In the case of LemonWay, will upload the documents for verification.
(no description)
Schema Definitions
Brand: object
A brand is a product of a user or a company that implements a front-end to the WeCan.Fund API. It is typically a web site, but could also be a mobile application or a desktop one.
- name: string
-
The name of the brand
- owner: integer
-
The ID of the user or company that can manage the brand.
- url: string
-
The URL of the home page of the front-end of the brand.
- preferred_language: string en, fr
-
Language
Example
{
"name": "string",
"owner": "integer",
"url": "string",
"preferred_language": "string"
}
User: object
Represents a physical user.
- id: integer
-
ID
- first_name: string
-
First Name
- last_name: string
-
Last Name: This can include the middle name or multiple last names.
- email: string
-
Email address: For companies, this must be the company contact e-mail, not a personal one.
- civility: string MR, MLLE, MM, PROF, DR, MASTER
-
Title: The title MASTER [Maître], is used in French within the scope of some legal professions.
- gender: string H, F, U
-
H: male, F: female, U: undefined
- street: string
-
Street name
- street_number: string
- address_extra: string
-
Address line 2: for example the building floor or PO Box
- zip_code: string
-
ZIP Code
- city: string
-
The city corresponding to the ZIP code.
- country: string
-
The domiciliation country, corresponding to the address
- nationality: string[]
-
string - occupation: string
-
Profession
- picture: string
-
The profile picture. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
" - date_of_birth: string (date)
-
Birthdate: Format YYYY-MM-dd (e.g.: 1985-12-31)
- mobile_number: string
-
In international format with country code, starting with "+". It can be used for authorizing payments via SMS.
- user_type: string
-
The type of user: can be empty for normal users, brandadmin for the owner of the current brand, wcfadm for the WeCan.Fund staff
- kyc_status: string
-
KYC status: (Know Your Customer), possible values are Registered [the user just registered to the platform], WCFValidated [the user validated its e-mail/mobile phone number], WCFKYC1 [the user provided enough information to create a wallet]
- lang: string en, fr
-
Language
- metadata: string
-
MetaData: You can use this field to store any metadata you want about this user, in the JSON format. Your metadata is only accessible by your brand. To edit this data, you have to use the dedicated API endpoint.
- process_id: string
-
KYC process id: The id of the process reflecting the user's KYC
Example
{
"id": "integer",
"first_name": "string",
"last_name": "string",
"email": "string",
"civility": "string",
"gender": "string",
"street": "string",
"street_number": "string",
"address_extra": "string",
"zip_code": "string",
"city": "string",
"country": "string",
"nationality": [
"string"
],
"occupation": "string",
"picture": "string",
"date_of_birth": "string (date)",
"mobile_number": "string",
"user_type": "string",
"kyc_status": "string",
"lang": "string",
"metadata": "string",
"process_id": "string"
}
Company: object
Represents a company or organisation. They can act interchangeably like normal users, login and have their own wallets. A company has a list of managers who are physical users that can act on behalf of the company, but this is managed by the backend.
- id: integer
-
ID
- email: string
-
Email address: For companies, this must be the company contact e-mail, not a personal one.
- company_name: string
-
Name of the company
- subsidiary_name: string
-
Subsidiary name: (when applicable)
- company_identification_number: string
-
Company identification number (Companies House)
- street: string
-
Street name
- street_number: string
- address_extra: string
-
Address line 2: for example the building floor or PO Box
- zip_code: string
-
ZIP Code
- city: string
-
The city corresponding to the ZIP code.
- country: string
-
The domiciliation country, corresponding to the address
- company_description: string
-
Description of the goals and activities of the company.
- principal_activity_sector: integer
-
According to the European RAMON database level 1 or 2 ( http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL_LINEAR&StrNom=NACE_REV2&StrLanguageCode=EN)
- company_website: string
-
Web site's URL
- company_creation_date: string (date)
-
Format YYYY-MM-dd (e.g.: 1985-12-31)
- legal_status: string SA, SARL, ONG, IND, ASSO, FOUND, COOP
-
SA: Incorporation, SARL: Limited liability company, ONG: Non-governmental organization
- representatives: string
-
Representative person(s): Comma-separated list of the names of the company representatives, not to be confused with the managers who can actually login on behalf of the company.
- picture: string
-
The profile picture. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
" - user_type: string
-
The type of user: can be empty for normal users, brandadmin for the owner of the current brand, wcfadm for the WeCan.Fund staff
- kyc_status: string
-
KYC status of the company: (Know Your Customer), possible values are Registered [the company just registered to the platform], WCFValidated [the company validated its e-mail/mobile phone number], WCFKYC1 [the company provided enough information to create a wallet]
- lang: string en, fr
-
Language
- metadata: string
-
MetaData: You can use this field to store any metadata you want about this user, in the JSON format. Your metadata is only accessible by your brand. To edit this data, you have to use the dedicated API endpoint.
- process_id: string
-
KYC process id: The id of the process reflecting the company's KYC
Example
{
"id": "integer",
"email": "string",
"company_name": "string",
"subsidiary_name": "string",
"company_identification_number": "string",
"street": "string",
"street_number": "string",
"address_extra": "string",
"zip_code": "string",
"city": "string",
"country": "string",
"company_description": "string",
"principal_activity_sector": "integer",
"company_website": "string",
"company_creation_date": "string (date)",
"legal_status": "string",
"representatives": "string",
"picture": "string",
"user_type": "string",
"kyc_status": "string",
"lang": "string",
"metadata": "string",
"process_id": "string"
}
Temporary user: object
Represents a temporary user, which is created through the API. This is a disabled user account that can be activated by the user by accessing the registration page with the given activation token in the GET parameter "token".
- id: integer
-
ID
- first_name: string
-
First Name
- last_name: string
-
Last Name: This can include the middle name or multiple last names.
- email: string
-
E-mail
- civility: string MR, MLLE, MM, PROF, DR, MASTER
-
Title: The title MASTER [Maître], is used in French within the scope of some legal professions.
- street: string
-
Street name
- street_number: string
- address_extra: string
-
Address line 2: for example the building floor or PO Box
- zip_code: string
-
ZIP Code
- city: string
-
The city corresponding to the ZIP code.
- country: string AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, CV, KH, CM, CA, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, KP, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, UM, US, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW
-
The domiciliation country, corresponding to the address
- activation_token: string
-
Temporary user activation token
Example
{
"id": "integer",
"first_name": "string",
"last_name": "string",
"email": "string",
"civility": "string",
"street": "string",
"street_number": "string",
"address_extra": "string",
"zip_code": "string",
"city": "string",
"country": "string",
"activation_token": "string"
}
LemonWay Wallet: object
Represents a wallet hosted by LemonWay. Once the wallet is created, none of its fields can be changed.
- id: integer
-
ID
- wallet_uid: string
-
Unique wallet identifier: This identifies uniquely the wallet in the LemonWay backend.
- creator: integer
-
Wallet's creator and owner
- create_timestamp: string (date-time)
-
Date and time when the wallet was created. Format YYYY-MM-dd (e.g.: 1985-12-31)
- currency: string CHF, EUR, USD, GBP, AUD, CAD
-
Wallet's currency: It is not possible currently to convert currencies and transfer money between wallets of different currencies.
- is_tech_wallet: string 1, 0
-
This wallet is a technical wallet: Technical wallets are used as escrow account only, during a funding campaign.
- backend: string
-
The wallet backend.
- kind: string
-
The kind of wallet backend, that can be used for filtering.
- process_id: string
-
Lemonway KYC process id: The id of the process reflecting the Lemonway wallet's KYC
- load_infos: object[]
-
object - amount: string
-
The current balance
Example
{
"id": "integer",
"wallet_uid": "string",
"creator": "integer",
"create_timestamp": "string (date-time)",
"currency": "string",
"is_tech_wallet": "string",
"backend": "string",
"kind": "string",
"process_id": "string",
"load_infos": [
"object"
],
"amount": "string"
}
Dummy Wallet: object
This is a wallet based on a dummy backend, for testing purpose only. It doesn't reflect any real money! It may be reset at any time.
- id: integer
-
ID
- kind: string
-
The kind of wallet backend, that can be used for filtering.
- create_timestamp: string (date-time)
-
Date and time when the wallet was created.
- backend: string
-
The wallet backend.
- load_infos: object[]
-
object - currency: string CHF, EUR, USD, GBP, AUD, CAD
-
Wallet's currency: It is not possible currently to convert currencies and transfer money between wallets of different currencies.
- is_tech_wallet: string 1, 0
-
This wallet is a technical wallet: Technical wallets are used as escrow account only, during a funding campaign.
- amount: number (float)
-
Amount in the wallet
- creator: integer
-
Wallet's creator and owner
Example
{
"id": "integer",
"kind": "string",
"create_timestamp": "string (date-time)",
"backend": "string",
"load_infos": [
"object"
],
"currency": "string",
"is_tech_wallet": "string",
"amount": "number (float)",
"creator": "integer"
}
Transaction: object
Represents a transaction from and/or to a wallet. A transaction cannot be edited.
- id: integer
-
ID
- process: integer
-
The ID of the process corresponding to this transaction.
- amount: number (float)
-
Amount of the transaction
- currency: string CHF, EUR, USD, GBP, AUD, CAD
-
Currency of the transaction
- backend_fees: number (float)
-
Fees: Fees are defined per brand and specified in your contract. This field aggregates all fees applied to this transaction. They are expressed in the same currency as the transaction.
- scheduled_execution_date: string (date-time)
-
Scheduled date of execution
- create_timestamp: string (date-time)
-
Creation date and time
- last_edit_timestamp: string (date-time)
-
Last edited date and time
- external_ref: string
-
Backend specific reference
- wcf_redirect_url: string
-
Redirect url in case of an interactive transaction
- method: string 0, 1, 2, 3, 4, 5, 102, 201, 103, 202, 203, 104, 105, 106, 107, 204, 205, 206, 207, 208, 108, 999, 209, 210
-
Transfer method: Currently supported methods are 0: Wallet to wallet transfer (on the same backend), 1: SOFORT Banking for money in, 102: Bank wire transfer.
- extra_info: string
-
Additional information about the transfer
- reason: string MONEY_IN, MONEY_OUT, CONTRIBUTION, REIMBURSEMENT, FEES, RELEASE, REPAYEMENT
-
Reason for the transaction
- debited_wallet: integer
-
ID of the wallet debited, leave empty for money in.
- credited_wallet: integer
-
ID of the wallet credited, leave empty for money out.
- user: integer
-
The user who triggered the transaction.
Example
{
"id": "integer",
"process": "integer",
"amount": "number (float)",
"currency": "string",
"backend_fees": "number (float)",
"scheduled_execution_date": "string (date-time)",
"create_timestamp": "string (date-time)",
"last_edit_timestamp": "string (date-time)",
"external_ref": "string",
"wcf_redirect_url": "string",
"method": "string",
"extra_info": "string",
"reason": "string",
"debited_wallet": "integer",
"credited_wallet": "integer",
"user": "integer"
}
Project: object
A project represents a fundraising campaign. Project can collect votes. Each user as a single vote per project. You can choose to also use the downvoting system.
- id: integer
-
ID
- tags: string[]
-
List of tags for this project. You can use any string for this and you can use the List tags endpoint if you want to provide some autofill to the user, based on the previously seen tags for this brand. You can also choose to restrict the tags to your own list.
-
string - vote_score: integer
-
Total number of votes for this project (up votes - down votes).
- num_vote_up: integer
-
Number of up votes for this project.
- num_vote_down: integer
-
Number of down votes for this project.
- card_picture: string
-
The picture for the project. For reading, it returns the url. For writing you need to provide the image base64 encoded, like "data:image/jpg;base64,
". Minimum size 560x420px, but it can be any size larger than this as long as the ratio is preserved. Images with another ratio may be crop when displayed on aggregators. - location_coordinates: string
-
The location of the project, as geographic coordinates. E.g.: {"longitude": 6.565554141998291, "latitude"=46.52027836093017}
- process_id: string
-
Project process id: The id of the process reflecting the state of the project.
- contribution_sum: string
- title: string
-
Max 60 char.
- short_project_description: string
-
Brief description of the project (max. 280 char.)
- project_description: string
-
Expected format is HTML, ideally domain independant in terms of styles and media.
- request_type: string FUNDING, LENDING, DONATION
-
Type of request: FUNDING (default option): Crowdfunding (in kind rewards), LENDING: Crowdlending (refund and interests), DONATION: Donation (no direct rewards)
- amount: number (float)
-
The target of the fundraising (minimum and default: 30'000). In the case of a crowdlending, this is also the maximum amount that can be collected.
- amount_min: number (float)
-
Minimal amount: The minimal amount to succeed the project. (default: 0)
- minimum_loan_amount: number (float)
-
Minimum amount per contribution transaction
- maximum_loan_amount: number (float)
-
Maximum amount per contribution transaction
- currency: string CHF, EUR, USD, GBP, AUD, CAD
-
default: CHF
- rate_interest: number (float)
-
Annual interest rate: Expressed in percent. Only applicable in the case of a LENDING project. Default: 0
- reimbursement: string MONTHLY, QUARTERLY, ONCE, MANUALLY
-
Reimburse strategy: How should the loan (and interests) be reimbursed: do nothing, all at the end, or split in equal parts monthly (duration must be a multiple of 30) or every three months (duration must be a multiple of 90). The default option is to do nothing, it must then be triggered through the dedicated API calls. Only used in the case of a LENDING project.
- commission: number (float)
-
Fees: Fees of the brand, taken on the collected funds if the project succeeds. This is expressed as a percentage. Default: 0
- duration: integer
-
Duration of the loan: Number of days from the closing of the project until full refund of the lenders. This only applies to LENDING projects. Default: 90
- campaign_end_date: string (date-time)
-
Deadline for the fundraising: Date at which the project automatically closes and switches to success or failure, depending on the amount collected.
- website: string
-
Project's website
- linkedin: string
-
Project's LinkedIn profile
- facebook: string
-
Project's Facebook page
- twitter: string
-
Project's Twitter page
- project_contact_email: string
-
Contact e-mail address for this project.
- disabled: boolean
-
Set to True if a project is deleted. It is not possible to un-delete, but a deleted project can still be retrieved for information.
- public: boolean
-
Set to True to allow aggregators to view this project.
- direct_url: string
-
Direct URL of this project
- location: string
-
The location of the project, as a place name.
- principal_activity_sector: integer
-
According to the European RAMON database level 1 or 2 ( http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL_LINEAR&StrNom=NACE_REV2&StrLanguageCode=EN)
- owner: integer
-
The owner of the project, who receives the money if it succeeds. It can be a user or a company.
- wallet: integer
-
ID of the technical wallet linked to this project.
- user_wallet: integer
-
ID of the project owner's wallet.
- brand: integer
-
ID of the brand which created this project.
Example
{
"id": "integer",
"tags": [
"string"
],
"vote_score": "integer",
"num_vote_up": "integer",
"num_vote_down": "integer",
"card_picture": "string",
"location_coordinates": "string",
"process_id": "string",
"contribution_sum": "string",
"title": "string",
"short_project_description": "string",
"project_description": "string",
"request_type": "string",
"amount": "number (float)",
"amount_min": "number (float)",
"minimum_loan_amount": "number (float)",
"maximum_loan_amount": "number (float)",
"currency": "string",
"rate_interest": "number (float)",
"reimbursement": "string",
"commission": "number (float)",
"duration": "integer",
"campaign_end_date": "string (date-time)",
"website": "string",
"linkedin": "string",
"facebook": "string",
"twitter": "string",
"project_contact_email": "string",
"disabled": "boolean",
"public": "boolean",
"direct_url": "string",
"location": "string",
"principal_activity_sector": "integer",
"owner": "integer",
"wallet": "integer",
"user_wallet": "integer",
"brand": "integer"
}
Contribution: object
A contribution is characterized by a user participating in a project's campaign with a certain amount of money. A transaction from a user's (or company's) wallet to the technical wallet of the project is initiated. If the user_wallet is not specified (depending on the backend), a money-in transaction is initiated, this typically implies an extra action of the user, like a redirection to a payment page. A list of rewards can be associated (rewards cannot be repeated). When a reward is specified in the submission of the contribution, it is first validated against its constraints (amount, quantity, timeframe). Once submitted a contribution cannot be edited.
- id: integer
-
ID
- user: integer
- transaction: object
- extra_info: string
-
Some additional information for the transaction. For transactions that require a redirection, this is the return URL.
- amount: number (float)
-
Amount contributed
- currency: string CHF, EUR, USD, GBP, AUD, CAD
-
Default: CHF
- submit_date: string (date-time)
-
Date and time at which the contribution has been received and the transaction started.
- disabled: boolean
-
Set to True if the contribution has been cancelled. The only possible cause is a failure of the transaction. The claimed rewards are not deducted for cancelled contributions.
- project: integer
-
ID of the project receiving the money.
- user_wallet: integer
-
The ID of the wallet providing the money.
- rewards: integer[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
-
integer
Example
{
"id": "integer",
"user": "integer",
"transaction": "object",
"extra_info": "string",
"amount": "number (float)",
"currency": "string",
"submit_date": "string (date-time)",
"disabled": "boolean",
"project": "integer",
"user_wallet": "integer",
"rewards": [
"integer"
]
}
Reward: object
A reward is characterized by the project it is linked to and the minimum (potentially also maximum) amount contributed required to claim it. It has also some additional constraints that are checked when a user claims a reward, such as the quantity and the timespan.
- id: integer
-
ID
- project: integer
-
ID of the project.
- amount_min: number (float)
-
Minimum Amount
- amount_max: number (float)
-
Maximum Amount: In the case the maximum is not defined, there is no upper limit.
- name: string
-
Reward name, max. 50 char.
- description: string
-
Summarize the reward for this stage. (max. 1000 char.)
- available_from: string (date-time)
-
Date and time before which this reward cannot be claimed.
- available_to: string (date-time)
-
Date and time after which this reward cannot be claimed.
- number_max: integer
-
Maximum quantity available: Default: 999
- create_timestamp: string (date-time)
-
Date and time when the reward was created.
- last_edit_timestamp: string (date-time)
-
Date and time when the reward was edited.
- disabled: boolean
-
Set to True if a reward is deleted. It is not possible to un-delete, but a deleted reward can still be retrieved for information. Only un-claimed rewards can be deleted.
- number_claimed: string
Example
{
"id": "integer",
"project": "integer",
"amount_min": "number (float)",
"amount_max": "number (float)",
"name": "string",
"description": "string",
"available_from": "string (date-time)",
"available_to": "string (date-time)",
"number_max": "integer",
"create_timestamp": "string (date-time)",
"last_edit_timestamp": "string (date-time)",
"disabled": "boolean",
"number_claimed": "string"
}
Process: object
The actual fields depend on the specific process. Below are the common ones.
- id: integer
-
ID
- display_name: string
-
The name of the process.
- status: string waiting, inprogress, done, deleted
-
The status of the process.
- status_display: string
-
The verbose status of the process.
- started_date: string (date-time)
-
The date and time when the process was started.
- ended_date: string (date-time)
-
The date and time when the process was finished.
- current_step: string
-
The key of the current step.
- steps: object[]
-
The list of steps of this project, see the Process step object for more details.
-
object
Example
{
"id": "integer",
"display_name": "string",
"status": "string",
"status_display": "string",
"started_date": "string (date-time)",
"ended_date": "string (date-time)",
"current_step": "string",
"steps": [
"object"
]
}
Process step: object
A step of a process. The actual fields depend on the specific process and steps. Below are the common ones.
- id: integer
-
ID
- key: string
-
The key of this step. Keys are unique per process.
- next_steps: string[]
-
The list of keys of the steps following this one.
-
string - details: string
-
Detailled description of the step.
- ended_date: string (date-time)
-
The date and time when the step was left.
- started_date: string (date-time)
-
The date and time when the step was entered.
- status: string waiting, inprogress, done, deleted
-
The status of the step.
- status_display: string
-
The verbose status of the step.
Example
{
"id": "integer",
"key": "string",
"next_steps": [
"string"
],
"details": "string",
"ended_date": "string (date-time)",
"started_date": "string (date-time)",
"status": "string",
"status_display": "string"
}
Notification: object
The notifications are messages created by the backend when a certain event happens that would require the users' attention. The brands cannot create directly notifications, but they are generated indirectly through their interractions with the backend.
- id: integer
-
ID
- key: string
-
A key for classifying notifications that are about the same kind of event.
- species: string
-
Species are a way to group notifications that need the same treatment, like the same display template.
- creation_date: string (date-time)
-
The date and time when the notification was created.
- seen_date: string (date-time)
-
The date and time when the notification was actually seen.
- seen: boolean
-
If the notification is marked as read. It is still possible that it hasn't been actually read by the user, but just muted.
- destination_link: string
-
A link to the object or event log that caused the notification.
- brand: integer
-
The brand that generated the notification.
- public: boolean
-
Indicate that all brands have access to the notification
- metadata: string
-
Additional information stored in JSON.
- title: string
-
The title of the e-mail.
- subtitle: string
-
The subtitle of the e-mail.
- messages: string
-
The main message of the e-mail. Can contain line-feeds.
- short_message: string
-
The short message shown in the notification on My.WeCan.Fund.
- button_text: string
-
The text of the button link in the e-mail, if any.
- subject: string
-
The subject of the e-mail
Example
{
"id": "integer",
"key": "string",
"species": "string",
"creation_date": "string (date-time)",
"seen_date": "string (date-time)",
"seen": "boolean",
"destination_link": "string",
"brand": "integer",
"public": "boolean",
"metadata": "string",
"title": "string",
"subtitle": "string",
"messages": "string",
"short_message": "string",
"button_text": "string",
"subject": "string"
}
Document: object
A document corresponds to a single file linked to a user or a project. The different types of document are detailled below.
- id: integer
-
ID
- type: integer
-
The ID of the document type. It can be an internal type or a custom one.
- filename: string
-
The name of the file as it was when uploaded.
- creation_date: string (date-time)
-
The date and time when the file was uploaded.
- linked_type: string
-
The type of object linked to this document: (currently limited to user or project)
- type_id: string
-
The id of object linked to this document
Example
{
"id": "integer",
"type": "integer",
"filename": "string",
"creation_date": "string (date-time)",
"linked_type": "string",
"type_id": "string"
}
Internal document type: object
These types of document are predefined and correspond, among others, to administrative documents needed for the KYC process of the users.
- id: integer
-
ID
- title: string
-
The name of the document type
- description: string
-
The description of the document type
- disabled: boolean
-
Set to True for disabling a document type, so that it cannot be used for future document uploads.
- key: string
-
A unique key for refering to this document type.
- type: string
-
Always equals to 'internal'
- linkable_types: string
-
The list of object types that can be linked to this document. For example 'user' or 'project'.
Example
{
"id": "integer",
"title": "string",
"description": "string",
"disabled": "boolean",
"key": "string",
"type": "string",
"linkable_types": "string"
}
Custom document type: object
These types of documents are defined by the brand for its own needs, typically they can be extra documents about the user, or about a project. They allow the brands to delegate the storage of documents to the WeCan.Fund backend and for the user to see all his documents centrally.
- id: integer
-
ID
- disabled: boolean
-
Set to True for disabling a document type, so that it cannot be used for future document uploads.
- title: string
-
The name of the document type
- description: string
-
The description of the document type
- key: string
-
A unique to the brand key for refering to this document type.
- metadata: string
-
Additional information stored in JSON.
- type: string
-
Always equals to 'custom'
Example
{
"id": "integer",
"disabled": "boolean",
"title": "string",
"description": "string",
"key": "string",
"metadata": "string",
"type": "string"
}
Error: object
This object is returned in case of a server error with your request. If the error is due to a malformed request content, for example missing a required field, the details may contain a JSON object detailling the input validation results.
- status_code: string
-
The HTTP error code
- details: string
-
The detailled error message or a JSON object. For example when submitting an object, it can detail for each field if there was an error.
Example
{
"status_code": "string",
"details": "string"
}