WeCan.Fund API (v1) 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. But it is still a working document that will change until the first release of the API.
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.
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.
API Endpoint
https://api.wecan.fund/
Schemes: https
Version: v1
Authentication
WeCan.Fund SSO
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",
"owner": "string",
"url": "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)
{
"key": "string",
"disabled": "boolean",
"linkable_types": "string",
"title": "string",
"type": "string",
"id": "integer",
"description": "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.
- metadata: string
-
Additional information stored in JSON.
- title: string
-
The name of the document type
- description: string
-
The description of the document type
Request Example
{
"key": "string",
"metadata": "string",
"title": "string",
"description": "string"
}
Returns the document type just created.
Response Example (201 Created)
{
"key": "string",
"disabled": "boolean",
"title": "string",
"type": "string",
"metadata": "string",
"id": "integer",
"description": "string"
}
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.
- metadata: string
-
Additional information stored in JSON.
- title: string
-
The name of the document type
- description: string
-
The description of the document type
(no description)
Request Example
{
"key": "string",
"metadata": "string",
"title": "string",
"description": "string"
}
Returns the document type just edited.
Response Example (200 OK)
{
"key": "string",
"disabled": "boolean",
"title": "string",
"type": "string",
"metadata": "string",
"id": "integer",
"description": "string"
}
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)
{
"linked_type": "string",
"filename": "string",
"type": "string",
"creation_date": "string",
"id": "integer",
"type_id": "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)
{
"linked_type": "string",
"filename": "string",
"type": "string",
"creation_date": "string",
"id": "integer",
"type_id": "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)
{
"key": "string",
"public": "boolean",
"seen": "boolean",
"seen_date": "string",
"creation_date": "string",
"destination_link": "string",
"metadata": "string",
"id": "integer",
"brand": "string",
"species": "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)
{
"display_name": "string",
"started_date": "string",
"ended_date": "string",
"current_step": "string",
"status_display": "string",
"status": "string",
"id": "integer"
}
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)
{
"display_name": "string",
"started_date": "string",
"ended_date": "string",
"current_step": "string",
"status_display": "string",
"status": "string",
"steps": [
"string"
],
"id": "integer"
}
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 all public projects (Optional)
If set to 'true', lists also disabled projects (Optional)
A page number within the paginated result set.
Returns the projects.
Response Example (200 OK)
{
"owner": "string",
"short_project_description": "string",
"id": "integer",
"title": "string",
"card_picture": "string"
}
Create a new project
Create a new project
- currency: string
-
default: CHF
- direct_url: string
- amount_min: number
-
The minimal amount to succeed the project. (default: 0)
- location: string
-
The location of the project, as a place name.
- title: string
-
Max 60 char.
- user_wallet: string
-
ID of the project owner's wallet.
- 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.
- commission: number
-
Fees of the brand, taken on the collected funds if the project succeeds. This is expressed as a percentage. Default: 0
- public: boolean
-
Set to True to allow aggregators to view this project.
- short_project_description: string
- project_contact_email: string
- facebook: string
- linkedin: string
- twitter: string
- owner: string
-
The owner of the project, who receives the money if it succeeds. It can be a user or a company.
- 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.
- 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}
- campaign_end_date: string
-
Date at which the project automatically closes and switches to success or failure, depending on the amount collected.
- rate_interest: number
-
Expressed in percent. Only applicable in the case of a LENDING project. Default: 0
- project_description: string
-
Expected format is HTML, ideally domain independant in terms of styles and media.
- minimum_loan_amount: number
- website: string
- request_type: string
-
FUNDING (default option): Crowdfunding (in kind rewards), LENDING: Crowdlending (refund and interests), DONATION: Donation (no direct rewards)
- 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)
- 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.
- 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
- maximum_loan_amount: number
Request Example
{
"currency": "string",
"direct_url": "string",
"amount_min": "number",
"location": "string",
"title": "string",
"user_wallet": "string",
"amount": "number",
"commission": "number",
"public": "boolean",
"short_project_description": "string",
"project_contact_email": "string",
"facebook": "string",
"linkedin": "string",
"twitter": "string",
"owner": "string",
"tags": [
"string"
],
"card_picture": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"rate_interest": "number",
"project_description": "string",
"minimum_loan_amount": "number",
"website": "string",
"request_type": "string",
"principal_activity_sector": "integer",
"reimbursement": "string",
"duration": "integer",
"maximum_loan_amount": "number"
}
Returns the project just created.
Response Example (201 Created)
{
"currency": "string",
"direct_url": "string",
"short_project_description": "string",
"location": "string",
"title": "string",
"user_wallet": "string",
"amount": "number",
"request_type": "string",
"brand": "string",
"linkedin": "string",
"public": "boolean",
"project_contact_email": "string",
"num_vote_up": "integer",
"contribution_sum": "string",
"facebook": "string",
"commission": "number",
"twitter": "string",
"tags": [
"string"
],
"owner": "string",
"wallet": "string",
"amount_min": "number",
"card_picture": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"rate_interest": "number",
"id": "integer",
"project_description": "string",
"disabled": "boolean",
"num_vote_down": "integer",
"minimum_loan_amount": "number",
"website": "string",
"process_id": "string",
"principal_activity_sector": "integer",
"vote_score": "integer",
"reimbursement": "string",
"duration": "integer",
"maximum_loan_amount": "number"
}
Get a project
Get a project
(no description)
Returns the project.
Response Example (200 OK)
{
"currency": "string",
"direct_url": "string",
"short_project_description": "string",
"location": "string",
"title": "string",
"user_wallet": "string",
"amount": "number",
"request_type": "string",
"brand": "string",
"linkedin": "string",
"public": "boolean",
"project_contact_email": "string",
"num_vote_up": "integer",
"contribution_sum": "string",
"facebook": "string",
"commission": "number",
"twitter": "string",
"tags": [
"string"
],
"owner": "string",
"wallet": "string",
"amount_min": "number",
"card_picture": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"rate_interest": "number",
"id": "integer",
"project_description": "string",
"disabled": "boolean",
"num_vote_down": "integer",
"minimum_loan_amount": "number",
"website": "string",
"process_id": "string",
"principal_activity_sector": "integer",
"vote_score": "integer",
"reimbursement": "string",
"duration": "integer",
"maximum_loan_amount": "number"
}
Update a project
Update a project
- currency: string
-
default: CHF
- direct_url: string
- amount_min: number
-
The minimal amount to succeed the project. (default: 0)
- location: string
-
The location of the project, as a place name.
- title: string
-
Max 60 char.
- user_wallet: string
-
ID of the project owner's wallet.
- 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.
- commission: number
-
Fees of the brand, taken on the collected funds if the project succeeds. This is expressed as a percentage. Default: 0
- public: boolean
-
Set to True to allow aggregators to view this project.
- short_project_description: string
- project_contact_email: string
- facebook: string
- linkedin: string
- twitter: string
- owner: string
-
The owner of the project, who receives the money if it succeeds. It can be a user or a company.
- 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.
- 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}
- campaign_end_date: string
-
Date at which the project automatically closes and switches to success or failure, depending on the amount collected.
- rate_interest: number
-
Expressed in percent. Only applicable in the case of a LENDING project. Default: 0
- project_description: string
-
Expected format is HTML, ideally domain independant in terms of styles and media.
- minimum_loan_amount: number
- website: string
- request_type: string
-
FUNDING (default option): Crowdfunding (in kind rewards), LENDING: Crowdlending (refund and interests), DONATION: Donation (no direct rewards)
- 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)
- 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.
- 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
- maximum_loan_amount: number
(no description)
Request Example
{
"currency": "string",
"direct_url": "string",
"amount_min": "number",
"location": "string",
"title": "string",
"user_wallet": "string",
"amount": "number",
"commission": "number",
"public": "boolean",
"short_project_description": "string",
"project_contact_email": "string",
"facebook": "string",
"linkedin": "string",
"twitter": "string",
"owner": "string",
"tags": [
"string"
],
"card_picture": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"rate_interest": "number",
"project_description": "string",
"minimum_loan_amount": "number",
"website": "string",
"request_type": "string",
"principal_activity_sector": "integer",
"reimbursement": "string",
"duration": "integer",
"maximum_loan_amount": "number"
}
Returns the project just edited.
Response Example (200 OK)
{
"currency": "string",
"direct_url": "string",
"short_project_description": "string",
"location": "string",
"title": "string",
"user_wallet": "string",
"amount": "number",
"request_type": "string",
"brand": "string",
"linkedin": "string",
"public": "boolean",
"project_contact_email": "string",
"num_vote_up": "integer",
"contribution_sum": "string",
"facebook": "string",
"commission": "number",
"twitter": "string",
"tags": [
"string"
],
"owner": "string",
"wallet": "string",
"amount_min": "number",
"card_picture": "string",
"location_coordinates": "string",
"campaign_end_date": "string",
"rate_interest": "number",
"id": "integer",
"project_description": "string",
"disabled": "boolean",
"num_vote_down": "integer",
"minimum_loan_amount": "number",
"website": "string",
"process_id": "string",
"principal_activity_sector": "integer",
"vote_score": "integer",
"reimbursement": "string",
"duration": "integer",
"maximum_loan_amount": "number"
}
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)
{
"currency": "string",
"disabled": "boolean",
"user": "string",
"transaction": "string",
"user_wallet": "string",
"amount": "number",
"project": "string",
"rewards": [
"string"
],
"id": "integer",
"submit_date": "string"
}
Create a new contribution
Create a new contribution for the given project.
- currency: string
-
Default: CHF
- 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.
- amount: number
- rewards: string[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
- user_wallet: string
-
The ID of the wallet providing the money.
(no description)
Request Example
{
"currency": "string",
"disabled": "boolean",
"amount": "number",
"rewards": [
"string"
],
"user_wallet": "string"
}
Returns the contribution just created.
Response Example (201 Created)
{
"currency": "string",
"disabled": "boolean",
"user": "string",
"transaction": "string",
"user_wallet": "string",
"amount": "number",
"project": "string",
"rewards": [
"string"
],
"id": "integer",
"submit_date": "string"
}
Get a contribution
Get a contribution
(no description)
(no description)
Returns the contribution.
Response Example (200 OK)
{
"currency": "string",
"disabled": "boolean",
"user": "string",
"transaction": "string",
"user_wallet": "string",
"amount": "number",
"project": "string",
"rewards": [
"string"
],
"id": "integer",
"submit_date": "string"
}
Update a contribution
Update a contribution
- currency: string
-
Default: CHF
- 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.
- amount: number
- rewards: string[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
- user_wallet: string
-
The ID of the wallet providing the money.
(no description)
(no description)
Request Example
{
"currency": "string",
"disabled": "boolean",
"amount": "number",
"rewards": [
"string"
],
"user_wallet": "string"
}
Returns the contribution just edited.
Response Example (200 OK)
{
"currency": "string",
"disabled": "boolean",
"user": "string",
"transaction": "string",
"user_wallet": "string",
"amount": "number",
"project": "string",
"rewards": [
"string"
],
"id": "integer",
"submit_date": "string"
}
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)
{
"currency": "string",
"method": "string",
"process": "integer",
"amount": "number",
"id": "integer",
"extra_info": "string",
"create_timestamp": "string",
"debited_wallet": "string",
"user": "string",
"credited_wallet": "string",
"scheduled_execution_date": "string",
"backend_fees": "number",
"reason": "string",
"last_edit_timestamp": "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 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)
{
"disabled": "boolean",
"number_max": "integer",
"project": "string",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"id": "integer",
"create_timestamp": "string",
"amount_max": "number",
"number_claimed": "string",
"last_edit_timestamp": "string",
"name": "string",
"description": "string"
}
Create a new reward
Create a new reward for the given project.
- amount_max: number
-
In the case the maximum is not defined, there is no upper limit.
- number_max: integer
-
Default: 999
- available_to: string
-
Date and time after which this reward cannot be claimed.
- available_from: string
-
Date and time before which this reward cannot be claimed.
- amount_min: number
- name: string
- description: string
-
Summarize the reward for this stage. (max. 280 char.)
(no description)
Request Example
{
"amount_max": "number",
"number_max": "integer",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"name": "string",
"description": "string"
}
Returns the reward just created.
Response Example (201 Created)
{
"disabled": "boolean",
"number_max": "integer",
"project": "string",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"id": "integer",
"create_timestamp": "string",
"amount_max": "number",
"number_claimed": "string",
"last_edit_timestamp": "string",
"name": "string",
"description": "string"
}
Get a reward
Get a reward
(no description)
(no description)
Returns the reward.
Response Example (200 OK)
{
"disabled": "boolean",
"number_max": "integer",
"project": "string",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"id": "integer",
"create_timestamp": "string",
"amount_max": "number",
"number_claimed": "string",
"last_edit_timestamp": "string",
"name": "string",
"description": "string"
}
Update a reward
Update a reward
- amount_max: number
-
In the case the maximum is not defined, there is no upper limit.
- number_max: integer
-
Default: 999
- available_to: string
-
Date and time after which this reward cannot be claimed.
- available_from: string
-
Date and time before which this reward cannot be claimed.
- amount_min: number
- name: string
- description: string
-
Summarize the reward for this stage. (max. 280 char.)
(no description)
(no description)
Request Example
{
"amount_max": "number",
"number_max": "integer",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"name": "string",
"description": "string"
}
Returns the reward just edited.
Response Example (200 OK)
{
"disabled": "boolean",
"number_max": "integer",
"project": "string",
"available_to": "string",
"available_from": "string",
"amount_min": "number",
"id": "integer",
"create_timestamp": "string",
"amount_max": "number",
"number_claimed": "string",
"last_edit_timestamp": "string",
"name": "string",
"description": "string"
}
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 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)
{
"first_name": "string",
"email": "string",
"last_name": "string",
"id": "integer",
"picture": "string"
}
Get the current user profile
Get the current user profile
Returns the current user's profile.
Response Example (200 OK)
{
"address_extra": "string",
"street": "string",
"mobile_number": "string",
"nationality": [
"string"
],
"civility": "string",
"process_id": "string",
"user_type": "string",
"last_name": "string",
"id": "integer",
"picture": "string",
"zip_code": "string",
"kyc_status": "string",
"city": "string",
"gender": "string",
"occupation": "string",
"email": "string",
"country": "string",
"first_name": "string",
"date_of_birth": "string",
"metadata": "string",
"street_number": "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.
- street: string
- date_of_birth: string
-
Format YYYY-MM-dd (e.g.: 1985-12-31)
- nationality: string[]
- civility: string
-
The title MASTER [Maître], is used in French within the scope of some legal professions.
- last_name: string
-
This can include the middle name or multiple last names.
- country: string
-
The domiciliation country, corresponding to the address
- mobile_number: string
-
In international format with country code, starting with "+". It can be used for authorizing payments via SMS.
- 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,
" - zip_code: string
- city: string
-
The city corresponding to the ZIP code.
- gender: string
-
H: male, F: female, U: undefined
- occupation: string
- email: string
-
For companies, this must be the company contact e-mail, not a personal one.
- first_name: string
- address_extra: string
-
for example the building floor or PO Box
- street_number: string
Request Example
{
"street": "string",
"date_of_birth": "string",
"nationality": [
"string"
],
"civility": "string",
"last_name": "string",
"country": "string",
"mobile_number": "string",
"picture": "string",
"zip_code": "string",
"city": "string",
"gender": "string",
"occupation": "string",
"email": "string",
"first_name": "string",
"address_extra": "string",
"street_number": "string"
}
Returns the current user's profile. If the user is a company, the model may vary.
Response Example (200 OK)
{
"address_extra": "string",
"street": "string",
"mobile_number": "string",
"nationality": [
"string"
],
"civility": "string",
"process_id": "string",
"user_type": "string",
"last_name": "string",
"id": "integer",
"picture": "string",
"zip_code": "string",
"kyc_status": "string",
"city": "string",
"gender": "string",
"occupation": "string",
"email": "string",
"country": "string",
"first_name": "string",
"date_of_birth": "string",
"metadata": "string",
"street_number": "string"
}
Get a user profile
Get a user profile
(no description)
Returns the user's profile.
Response Example (200 OK)
{
"address_extra": "string",
"street": "string",
"mobile_number": "string",
"nationality": [
"string"
],
"civility": "string",
"process_id": "string",
"user_type": "string",
"last_name": "string",
"id": "integer",
"picture": "string",
"zip_code": "string",
"kyc_status": "string",
"city": "string",
"gender": "string",
"occupation": "string",
"email": "string",
"country": "string",
"first_name": "string",
"date_of_birth": "string",
"metadata": "string",
"street_number": "string"
}
Update the metadata of a user
Update the metadata of a user
- example_data: string
(no description)
Request Example
{
"example_data": "string"
}
Returns the user's profile with the metadata.
Response Example (200 OK)
{
"address_extra": "string",
"street": "string",
"mobile_number": "string",
"nationality": [
"string"
],
"civility": "string",
"process_id": "string",
"user_type": "string",
"last_name": "string",
"id": "integer",
"picture": "string",
"zip_code": "string",
"kyc_status": "string",
"city": "string",
"gender": "string",
"occupation": "string",
"email": "string",
"country": "string",
"first_name": "string",
"date_of_birth": "string",
"metadata": "string",
"street_number": "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 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)
{
"currency": "string",
"method": "string",
"process": "integer",
"amount": "number",
"id": "integer",
"extra_info": "string",
"create_timestamp": "string",
"debited_wallet": "string",
"user": "string",
"credited_wallet": "string",
"scheduled_execution_date": "string",
"backend_fees": "number",
"reason": "string",
"last_edit_timestamp": "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.
- extra_info: string
-
Depending on the method, this field may be needed. For example money out with bank wire needs an IBAN here.
- method: integer
-
0: direct, 1: SOFORT, 102: Bank wire
- amount: number
(no description)
Request Example
{
"extra_info": "string",
"method": "integer",
"amount": "number"
}
Returns the transaction details of the loading process.
Response Example (201 Created)
{
"currency": "string",
"method": "string",
"process": "integer",
"amount": "number",
"id": "integer",
"extra_info": "string",
"create_timestamp": "string",
"debited_wallet": "string",
"user": "string",
"credited_wallet": "string",
"scheduled_execution_date": "string",
"backend_fees": "number",
"reason": "string",
"last_edit_timestamp": "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.
- extra_info: string
-
Depending on the method, this field may be needed. For example money out with bank wire needs an IBAN here.
- method: integer
-
0: direct, 1: SOFORT, 102: Bank wire
- amount: number
(no description)
Request Example
{
"extra_info": "string",
"method": "integer",
"amount": "number"
}
Returns the transaction details of the withdrawing process.
Response Example (201 Created)
{
"currency": "string",
"method": "string",
"process": "integer",
"amount": "number",
"id": "integer",
"extra_info": "string",
"create_timestamp": "string",
"debited_wallet": "string",
"user": "string",
"credited_wallet": "string",
"scheduled_execution_date": "string",
"backend_fees": "number",
"reason": "string",
"last_edit_timestamp": "string"
}
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.
Example
{
"name": "string",
"owner": "integer",
"url": "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 , x ∈ { 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 , x ∈ { 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[]
- 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]
- 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",
"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 , x ∈ { SA , SARL , ONG }
-
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]
- 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",
"metadata": "string",
"process_id": "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 , x ∈ { CHF , EUR , USD }
-
Wallet's currency: It is not possible currently to convert currencies and transfer money between wallets of different currencies.
- is_tech_wallet: string , x ∈ { 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.
- process_id: string
-
Lemonway KYC process id: The id of the process reflecting the Lemonway wallet's KYC
- load_infos: 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",
"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
- create_timestamp: string (date-time)
-
Date and time when the wallet was created.
- backend: string
-
The wallet backend.
- load_infos: object[]
- currency: string , x ∈ { CHF , EUR , USD }
-
Wallet's currency: It is not possible currently to convert currencies and transfer money between wallets of different currencies.
- is_tech_wallet: string , x ∈ { 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",
"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 , x ∈ { CHF , EUR , USD }
-
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)
-
Scheduled date of execution
- create_timestamp: string (date-time)
-
Creation date and time
- last_edit_timestamp: string (date-time)
-
Last edited date and time
- method: string , x ∈ { 0 , 1 , 2 , 102 }
-
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 , x ∈ { 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)",
"create_timestamp": "string (date-time)",
"last_edit_timestamp": "string (date-time)",
"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.
- 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
-
Project title: Max 60 char.
- request_type: string , x ∈ { 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 , x ∈ { CHF , EUR , USD }
-
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 , x ∈ { 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.
- short_project_description: string
-
Brief description of the project (max. 280 char.)
- project_description: string
-
Description of the project: Expected format is HTML, ideally domain independant in terms of styles and media.
- 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",
"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)",
"short_project_description": "string",
"project_description": "string",
"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. 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
- amount: number (float)
-
Amount contributed
- currency: string , x ∈ { CHF , EUR , USD }
-
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.
- user: integer
-
ID of the user contributing.
- project: integer
-
ID of the project receiving the money.
- user_wallet: integer
-
The ID of the wallet providing the money.
- transaction: integer
-
The ID of the transaction.
- rewards: integer[]
-
The list (with no repetitions) of ID of rewards claimed for this contribution.
Example
{
"id": "integer",
"amount": "number (float)",
"currency": "string",
"submit_date": "string (date-time)",
"disabled": "boolean",
"user": "integer",
"project": "integer",
"user_wallet": "integer",
"transaction": "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. 20 char.
- description: string
-
Reward description: Summarize the reward for this stage. (max. 280 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 , x ∈ { 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.
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.
- 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 , x ∈ { 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.
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"
}
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"
}