POST
/
orders
productId
string
required

The id of the product that will be purchased.

purchaseInfo
object
required

The purchase information. Will change depending on the product.

Take a good look on the example usage below

Example usage

To purchase a product with id 84f1b8f9-d4e2-4f3c-a73b-ef8b3453d1e7 and this purchaseFields:

"purchaseFields":[
    {
       "name":"vehicleMake",
       "variableType":"string",
       "required":true
    },
    {
       "name":"vehicleModel",
       "variableType":"string",
       "required":true
    },
    {
       "name":"vehicleYear",
       "variableType":"integer",
       "required":true
    },
    {
       "name":"driverLicenseNumber",
       "variableType":"string",
       "required":true
    }
 ]

You will send this in the on the Create order body:

{
  "productId": "84f1b8f9-d4e2-4f3c-a73b-ef8b3453d1e7",
  "purchasInfo": {
    "vehicleMake": "Toyota",
    "vehicleModel": "Corolla",
    "vehicleYear": 2019,
    "driverLicenseNumber": "123456789"
  }
}

Response

id
string
required

The id of the order.

numberIdentifier
number
required

The number identifier of the order.

productId
string
required

The id of the product.

companyId
string
required

The id of the company.

insuranceCompanyId
string
required

The id of the insurance company.

createdAt
string
required

The date and time when the order was created.

status
string
required

The status of the order. Possible values: CONFIRMED, CANCELED.

isSubscription
boolean
required

Indicates if the order is a subscription.

subscriptionRecurrency
string

The recurrency of the subscription.

Available recurrencies are: DAYLY, WEEKLY, MONTHLY, QUARTERLY, SEMIANNUALY,ANNUALY.

subscriptionDetails
object

The details of the subscription.

purchaseInfo
object
required

The purchase information. Will change depending on the product.

price
object

The price of the order.