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

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

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, one_time, renewal, 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[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