Activations

To activate service for a new premium portfolio create an order of type ‘activation’ and pass the following fields:

  • model_id
  • name
  • budget
  • terms_approval
  • fiscal_code

Do it yourself

To create a do_it_yourself portfolio create an order of type ‘do_it_yourself’ and pass the following fields:

  • name
  • portfolio_type

Enablement

To enable a disabled portfolio create an order of type ‘enablement’ and pass the following fields: * portfolio_id

Renewals

To renew service for a premium portfolio create an order of type ‘renewal’ and pass the slug of the portfolio in the portfolio id field.

Upgrades

To upgrade service for a copied premium portfolio create an order of type ‘upgrade’ and pass the following fields:

  • budget
  • portfolio_id
  • terms_approval

One time

To buy a copy of a premium portfolio create an order of type ‘one_time’ and pass the following fields:

  • model_id
  • name
  • budget
  • terms_approval
  • fiscal_code

Risk analysis

To buy the risk analysis service for a portfolio create an order of type ‘risk_analysis’ and pass the following fields: * portfolio_id

Payed orders

Also see Payed orders.

Resource representations

{
  "kind": "order",
  "order_type": string,
  "payment": {
    "kind": "payment",
    "id": integer,
    "payed_at": datetime,
    "created_at": datetime,
    "updated_at": datetime,
    "paypal_payment": {
      "kind": "paypal_payment",
      "paykey": string,
      "payment_url": string
    }
  },
  "shipment": {
    "kind": "shipment",
    "id": integer,
    "created_at": datetime,
    "updated_at": datetime,
    "portfolio": portfolio,
    "service_activation": service_activation
  }
}

Methods


POST /orders
Create an order.

Create an order.

Params

Param Name Description
order
Required

Order data.


Value:

Must be a Hash

order[order_type]
Required

The type of order to create.


Value:

Must be one of: activation, do_it_yourself, enablement, one_time, renewal, risk_analysis, upgrade.

order[model_id]
Optional

The id of the model to create the order for.


Value:

Must be a number.

order[name]
Optional

The name of the new portfolio.


Value:

Must be String

order[portfolio_type]
Optional

The type of portfolio. Optional. The default is “quantity”.


Value:

Must be one of: quantity, weight.

order[budget]
Optional

The budget of the new portfolio.


Value:

Must be decimal.

order[terms_approval]
Optional

Acceptance of the terms of service.


Value:

Must be one of: true.

order[fiscal_code]
Optional

The fiscal code of the person that is buying the portfolio.


Value:

Must be String

order[portfolio_id]
Optional

The slug of the premium portfolio to renew.


Value:

Must be String


GET /me/orders
List the orders of the current user.

GET /orders
List the orders of the current user.

GET /users/:user_id/orders
List the orders of the current user.

List the orders of the current user.


GET /orders/:id
Get an order.

Get an order.

Params

Param Name Description
id
Required

The id of the order to get.


Value:

Must be String