NAV Navbar
Shell HTTP JavaScript
  • MiiMOSA API v1
  • Pagination
  • Authentication
  • Leads
  • Projects
  • Project
  • Pledges
  • Wallet
  • MiiMOSA API v1

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    MiiMOSA API strives to stick to the REST convention: we use HTTP verbs such as GET, POST, PATCH and DELETE and return appropriate HTTP response codes (2xx for success, 4xx for client errors and 5xx for server errors).

    We use JSON to encode all resources

    Pagination

    We paginate in our headers, not in our response body. This follows the proposed RFC-5988 standard for Web linking.

    Base URLs:

    Authentication

    Leads

    post__leads

    Code samples

    curl --request POST \
      --url https://api.miimosa.com/leads \
      --header 'authorization: string' \
      --header 'content-type: application/json' \
      --data '{"email":"string","firstname":"string","lastname":"string","phone":"string","collect_type":"string","project_description":"string","project_total_budget":"string","publication_timeframe":"string","birthdate":"string","siret":"string","post_code":"string","city":"string","project_name":"string","social_link":"string","project_crowdfunding_budget":"string","project_loan_budget":"string","project_input_budget":"string","department":"string","category":"string","turnover":"string","lead_source":"string","campaign_id":"string"}'
    
    var data = JSON.stringify({
      "email": "string",
      "firstname": "string",
      "lastname": "string",
      "phone": "string",
      "collect_type": "string",
      "project_description": "string",
      "project_total_budget": "string",
      "publication_timeframe": "string",
      "birthdate": "string",
      "siret": "string",
      "post_code": "string",
      "city": "string",
      "project_name": "string",
      "social_link": "string",
      "project_crowdfunding_budget": "string",
      "project_loan_budget": "string",
      "project_input_budget": "string",
      "department": "string",
      "category": "string",
      "turnover": "string",
      "lead_source": "string",
      "campaign_id": "string"
    });
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === this.DONE) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("POST", "https://api.miimosa.com/leads");
    xhr.setRequestHeader("content-type", "application/json");
    xhr.setRequestHeader("authorization", "string");
    
    xhr.send(data);
    

    POST /leads

    Creates a lead

    Body parameter

    {
      "email": "string",
      "firstname": "string",
      "lastname": "string",
      "phone": "string",
      "collect_type": "string",
      "project_description": "string",
      "project_total_budget": "string",
      "publication_timeframe": "string",
      "birthdate": "string",
      "siret": "string",
      "post_code": "string",
      "city": "string",
      "project_name": "string",
      "social_link": "string",
      "project_crowdfunding_budget": "string",
      "project_loan_budget": "string",
      "project_input_budget": "string",
      "department": "string",
      "category": "string",
      "turnover": "string",
      "lead_source": "string",
      "campaign_id": "string"
    }
    

    Parameters

    Name In Type Required Description
    Authorization header string true Client API key
    body body object false none
    » email body string true Email address.
    » firstname body string true First name.
    » lastname body string true Last name.
    » phone body string true Phone number.
    » collect_type body string true Collect type. Must be donation or lending.
    » project_description body string true Description of the project.
    » project_total_budget body string true Total budget of the project.
    » publication_timeframe body string true Publication timeframe. Must be within_month, next_months or another_quarter.
    » birthdate body string false Birthdate. No specific format.
    » siret body string false Siret.
    » post_code body string false Zip code.
    » city body string false City.
    » project_name body string false Project name.
    » social_link body string false Social link like facebook, twitter and so on.
    » project_crowdfunding_budget body string false none
    » project_loan_budget body string false none
    » project_input_budget body string false none
    » department body string false Department code
    » category body string false Category. Must be on of the following categories: apiculture aquaculture alcool soft elevage sale sucre horticulture innovation nature lait viticulture.
    » turnover body string false Turnover.
    » lead_source body string false The source of the lead.
    » campaign_id body string false Id of the campaign linked to this lead

    Responses

    Status Meaning Description Schema
    200 OK lead created None
    400 Bad Request invalid record None

    Projects

    get__projects

    Code samples

    curl --request GET \
      --url https://api.miimosa.com/projects \
      --header 'authorization: string'
    
    var data = null;
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === this.DONE) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://api.miimosa.com/projects");
    xhr.setRequestHeader("authorization", "string");
    
    xhr.send(data);
    

    GET /projects

    List all published projects

    Parameters

    Name In Type Required Description
    order query string false Filter projects by order type. Must be one of the order types below.
    category query string false Category. Must be one of the categories below.
    type query string false Type of collect for the project. Must be one of the types below.
    region query string false Find a project by its region code. You can find codes here: link.
    keyword query string false Search a project by keyword.
    Authorization header string true Client API key

    Enumerated Values

    Parameter Value
    order populars
    order in_progress
    order recent
    category apiculture
    category alcool
    category aquaculture
    category soft
    category elevage
    category sale
    category sucre
    category horticulture
    category innovation
    category nature
    category lait
    category viticulture
    type donation
    type lending

    Responses

    Status Meaning Description Schema
    200 OK projects listed None

    Project

    get_projects{id}

    Code samples

    curl --request GET \
      --url https://api.miimosa.com/projects/0 \
      --header 'authorization: string'
    
    var data = null;
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === this.DONE) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://api.miimosa.com/projects/0");
    xhr.setRequestHeader("authorization", "string");
    
    xhr.send(data);
    

    GET /projects/{id}

    Retrieve a project

    Parameters

    Name In Type Required Description
    id path integer true Id of the project
    Authorization header string true Client API key

    Responses

    Status Meaning Description Schema
    200 OK project retrieved None
    404 Not Found project not found None

    Pledges

    get__user_pledges

    Code samples

    curl --request GET \
      --url 'https://api.miimosa.com/user/pledges?user_birthdate=string&user_email=string' \
      --header 'authorization: string'
    
    var data = null;
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === this.DONE) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://api.miimosa.com/user/pledges?user_birthdate=string&user_email=string");
    xhr.setRequestHeader("authorization", "string");
    
    xhr.send(data);
    

    GET /user/pledges

    List all valid lending pledges

    Parameters

    Name In Type Required Description
    user_email query string true Search pledges by the user's email.
    user_birthdate query string true Use to verify that we know the user.
    Authorization header string true Client API key

    Responses

    Status Meaning Description Schema
    200 OK pledges listed None
    403 Forbidden birthdate does not match None
    404 Not Found email not found None

    Wallet

    get__user_wallet

    Code samples

    curl --request GET \
      --url 'https://api.miimosa.com/user/wallet?user_birthdate=string&user_email=string' \
      --header 'authorization: string'
    
    var data = null;
    
    var xhr = new XMLHttpRequest();
    xhr.withCredentials = true;
    
    xhr.addEventListener("readystatechange", function () {
      if (this.readyState === this.DONE) {
        console.log(this.responseText);
      }
    });
    
    xhr.open("GET", "https://api.miimosa.com/user/wallet?user_birthdate=string&user_email=string");
    xhr.setRequestHeader("authorization", "string");
    
    xhr.send(data);
    

    GET /user/wallet

    Retrieve a user's wallet thanks to his email

    Parameters

    Name In Type Required Description
    user_email query string true Search a wallet by the user's email.
    user_birthdate query string true Use to verify that we know the user.
    Authorization header string true Client API key

    Responses

    Status Meaning Description Schema
    200 OK wallet retrieved None
    403 Forbidden birthdate does not match None
    404 Not Found no wallet found None