Create an order for a project for the current user

POST /users/{user_id}/projects/{project_id}/orders

Create an order for a project for the current user. In order to create an order the current user needs to be approved and the investment terms accepted. An order can only be created for a live project. A live project has its start_date before now and its end_date after. A user is approved automatically when they go through a successful video identification session. When a user is approved the approved_at is set to a non-null value and the approved attribute is set to true. The investment terms are accepted by user for a project by successfully creating terms through the investment_terms endpoint. The order amount must be greater than the project minimum required investment amount.

Path parameters

  • user_id string Required

    User id

  • project_id string Required

    Project id

Body Required

Order information

  • order object
    Hide order attributes Show order attributes object
    • amount string Required
    • currency string Required
    • sender_iban string
    • disposable_capital boolean
    • suitable_income boolean
    • external_metadata object(json)

Responses

  • 405

    Method not allowd if project is not on sale or if the volume limit was reached

  • 422

    Request body has errors or invalid.

  • 401

    Authorization information is missing or invalid.

  • 201

    Order created and returned

    Hide response attributes Show response attributes object
    • id string(uuid)
    • amount number(float)
    • cancelled_at string(datetime) | null
    • currency string
    • sender_iban string | null
    • user_id string(uuid)
    • created_at string(datetime)
    • updated_at string(datetime)
    • project_code string
    • disposable_capital boolean | null
    • suitable_income boolean | null
    • order_code string
    • status object
      Hide status attributes Show status attributes object
      • id string(uuid)
      • order_id string(uuid)
      • title string
      • reason string | null
    • payment_details object
      Hide payment_details attributes Show payment_details attributes object
      • account_name string
      • bank_name string
      • bic string
      • iban string
      • reference_code string
    • wallet_address string | null
    • external_metadata object(json)
  • 400

    Server cannot or will not process the request if user is not approved

POST /users/{user_id}/projects/{project_id}/orders
curl \
 -X POST https://client-subdomain.bitbond.net/api/v1/users/{user_id}/projects/{project_id}/orders \
 -H "Content-Type: application/json" \
 -d '{"order":{"amount":"string","currency":"string","sender_iban":"string","disposable_capital":true,"suitable_income":true,"external_metadata":{}}}'
Request example
{
  "order": {
    "amount": "string",
    "currency": "string",
    "sender_iban": "string",
    "disposable_capital": true,
    "suitable_income": true,
    "external_metadata": {}
  }
}
Request examples
{
  "order": {
    "amount": "string",
    "currency": "string",
    "sender_iban": "string",
    "disposable_capital": true,
    "suitable_income": true,
    "external_metadata": {}
  }
}
Response examples (201)
{
  "id": "string",
  "amount": 42.0,
  "cancelled_at": "string",
  "currency": "string",
  "sender_iban": "string",
  "user_id": "string",
  "created_at": "string",
  "updated_at": "string",
  "project_code": "string",
  "disposable_capital": true,
  "suitable_income": true,
  "order_code": "string",
  "status": {
    "id": "string",
    "order_id": "string",
    "title": "string",
    "reason": "string"
  },
  "payment_details": {
    "account_name": "string",
    "bank_name": "string",
    "bic": "string",
    "iban": "string",
    "reference_code": "string"
  },
  "wallet_address": "string",
  "external_metadata": {}
}
Response examples (201)
{
  "id": "string",
  "amount": 42.0,
  "cancelled_at": "string",
  "currency": "string",
  "sender_iban": "string",
  "user_id": "string",
  "created_at": "string",
  "updated_at": "string",
  "project_code": "string",
  "disposable_capital": true,
  "suitable_income": true,
  "order_code": "string",
  "status": {
    "id": "string",
    "order_id": "string",
    "title": "string",
    "reason": "string"
  },
  "payment_details": {
    "account_name": "string",
    "bank_name": "string",
    "bic": "string",
    "iban": "string",
    "reference_code": "string"
  },
  "wallet_address": "string",
  "external_metadata": {}
}