letops
2/16/2018 - 5:34 PM

endpoints.md

MN

Points to consider

  • Requests by default will not carry any kind of extra information. They will just include the Django and HTML defaults, which include sessions, csrf_tokens, etc.
  • All dates are received and sent using the ISO-8601 format.
  • All data is already saved inside the database. The data fields that must be calculated or that the writers of this document were unable to find, have notes inside the same requests/responses of this document.
  • All POST requests will receive by default an empty response, and will only be taken into account the HTTP Status Code (which should follow the HTML Standards as close as possible).

Endpoints

Error Responses

In the case an error is found in the POST body, the response body should follow the next structure:

{
  errors: {
    field_1: 'error string',
    field_2: 'error string',
    field_3: 'error string',
  }
}

Gender Types

URL: Endpoint
Method: GET
Model: Gender

Response

[
  {
    id
    name
  }
  ...
]

Status Types

URL: Endpoint
Method: GET
Model: FundStatus

Response

[
  {
    id
    name
  }
  ...
]

Option Types

URL: Endpoint
Method: GET
Model: OptionType

Response

[
  {
    id
    name
  }
  ...
]

Currency Types

URL: Endpoint
Method: GET
Model: Currency

Response

[
  {
    id
    name
    code
  }
  ...
]

Fund Offices

URL: Endpoint
Method: GET
Model: FundOffice

Response

[
  {
    id,
    name,
    country,
  }
  ...
]

General Partners

URL: Endpoint
Method: GET
Model: GeneralPartner

Response

[
  {
    id
    name
    general_partner_jurisdiction
  }
  ...
]

Users

URL: Endpoint
Method: GET
Model: User
Reason: Used to get the users that might be used as MainContact, LegalCounsel and/or AuditService inside the Fund Creation

Response

[
  {
    id
    first_name
    last_name
  }
  ...
]

Limited Partners - Profile (General Information)

Design: Zeplin
URL: Endpoint
Method: GET
Model: Stockholder

Request

{
  slug
}

Response

{
  id
  slug
  net_worth (calculated field)
  user: {
    id
    first_name
    last_name
  }
  entity: {
    id
    rfc
    fiscal_id
    entity_type: {
      id
      name
    }
    nationality: {
      id
      name
    }
    creation_or_birth_place: {
      id
      name
    }
    creation_or_birth_date, (No field was found in the DB, please advice)
  }

  attachments (No field was found, please go to the design to know what we are talking about)
}

Limited Partners

Design: Zeplin
URL: Endpoint
Method: GET
Model: Stockholder

Response

[
  {
    id
    slug
    user: {
      id
      first_name
      last_name
    },
    entity: {
      id
      rfc
      fiscal_id
      entity_type: {
        id
        name
      }
      nationality: {
        id
        name
      }
    }
  }
  ...
]

Fund Profile (General Information and Closings)

Design: Zeplin - GI, Zeplin - Closings
URL: Endpoint
Method: GET
Model: Fund

Request

{
  slug
}

Response

{
  id
  slug
  name
  target_size
  vintage
  fund_type
  scope
  web_url
  investment_structure_description
  hurdle_rate
  management_fee_description
  management_fee_years
  carry_description
  carried_interest
  fund_term

  location_hq: {
    id
    name
    country
  }
  general_partner: {
    id
    name
  }
  status: {
    id
    name
  }
  currency: {
    id
    name
    code
  }

  history: [
    {
      closing
      closing_status
      closing_size
      closing_date
      investor_status
    }
    ...
  ]
}

Funds

Design: Zeplin
URL: Endpoint
Method: GET
Model: Fund

Response

[
  {
    id
    slug
    name
    target_size
    vintage
    fund_type
    scope
    web_url
    investment_structure_description, (is this Legal Structure Type?)

    location_hq: {
      id
      name
      country
    }
    general_partner: {
      id
      name
    }
    status: {
      id
      name
    },
    currency: {
      id
      name
      code
    }
    total_investments (calculated, the sum of investments related)
  }
  ...
]

Fund - Create Fund

Design: Zeplin
URL: Endpoint
Method: POST
Model: Fund

Request

{
  name
  target_size
  vintage
  fund_type
  scope
  web_url
  investment_structure_description
  hurdle_rate
  management_fee_description
  management_fee_years
  carry_description
  carried_interest
  fund_term

  status_id
  location_hq_id
  general_partner_id
  currency_id

  main_contact_user_id
  legal_counsel_user_id
  audit_services_user_id
},

Companies - Opportunities

Design: Zeplin
URL: Endpoint
Method: GET
Model: Opportunity

Response:

[
  {
    id
    deal_size
    overview
    contact: {
      id
      first_name
      last_name
    }
    funding_round: {
      id
      name
    }
    company: {
      id
      name
    }
  }
  ...
]

Companies - Create company as opportunity

Design: Zeplin
URL: Endpoint Method: POST
Model: Opportunity

Request

{
  company_id
  company_name
  meeting_date
  overview
  expected_investment_date
  last_contact

  specific_source
  deal_size
  premoney_cap

  contact_user_id
  source_type_id
  funding_round_id
  investment_structure_id

},

Company Profile - Investment - Tab 1, 2 & 3

Design: Zeplin
URL: Endpoint Method: GET
Model: Company

Response

{
  name
  short_name
  description

  headquarters
  year_founded
  date_added

  primary_industry: {
    id
    name
  }

  class: [
    {
      id
      slug
      series_name
      seniority
      shares_authorized

      class_type: {
        id
        name
      }
    }
    ...
  ]

  opportunity: {
    last_contact
    deal_size
    specific_source
    premoney_cap
    funding_round: {
      id
      name
    }
    source_type: {
      id
      name
    }
    investment_structure: {
      id
      name
    }
  }

  company_contact_data: [
    {
      id
      contactdata: {
        id
        contact_name
        phone
        email
        slug
        contact_data_type: {
          id
          name
        }
      }
    }
    ...
  ]

  stockgranted: [
    id
    price_per_share
    shares
    class: {
      id
      slug
    }
    beneficiary: {
      id
      slug
      user: {
        id
        first_name
        last_name
      }
    }
    ...      
  ]

  investment: [
    {
      id
      investment_details
      round_date
      pre_money_valuation
      bussiness_model_type: {
        id
        name
      }
      reporting_currency: {
        id
        name
        code
      }          
      fund: {
        id
        name
        status: {
          id
          name
        }
      }
      analyst: {
        id
        first_name
        last_name
      }
    }
    ...
  ]

}

Wizard - Grant options

Design: Zeplin
URL: Endpoint Method: POST
Model: Opportunity

Request

{
  grant_date
  option_grant_date
  shares
  vesting_start_date
  cliff
  expiration_period
  excercise_price
  vesting_period
  vest_after_cliff

  beneficiary_id
  option_type_id
}

Wizard - Create option plan

Design: Zeplin
URL: Endpoint Method: POST
Model: Option Plan

Request

{
  board_approval_date
  plan_name
  shares_allocated

  underlying_security_id
}

Wizard - Add convertible instrument

Design: Zeplin
URL: Endpoint Method: POST
Model: Convertible Instrument

Request

{
  issue_date
  name
  email
  principal
  maturity_date
  interest_rate
  qualified_financing_amount
  conversion_discount
  valuation_cap
  early_exit_multiple

  beneficiary_id
  note_type_id
  accrual_frequency_id
  converts_to_id
}

Wizard - Gran stock

Design: Zeplin
URL: Endpoint Method: POST
Model: Stock Granted

Request

{
  issue_date
  certificate_name
  shares
  acquisition_date
  price_per_share
  class_id
  beneficiary_id
  vesting_shedule
  vesting_period
  cliff
  vest_after_cliff
  vesting_start_date
}

Wizard - Create new investment round

Design: Zeplin
URL: Endpoint Method: POST
Model: Class

Request

{
  board_approval_date
  shares_authorized
  share_type_id
  seniority
  interest
  class_type_id
  series_name
}

Wizard - Create as investment

Design: Zeplin
URL: Endpoint Method: POST
Model: Investment

Request

{
  reporting_currency_id
  round_date
  funding_round_id
  investment_details
  business_model_type_id
  pre_money_valuation
  analyst_id
  bank_account_id
}