Sale

Create Sale Request

POST /v1/sales/request

Body Parameters

The request has the following parameters in body:

ParameterDescription
quote_idThe ID of the quoteRequired
{
  "quote_id": "string"
}
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Sale Request
{
  "id": "string"
}

Create Sale

POST /v1/sales

Body Parameters

The request has the following parameters in body:

ParameterDescription
sale_request_idThe ID of the sale requestRequired
installment_idThe ID of the installment chosenRequired
payment_methodThe payment method chosenRequired
complementThe complement for dataOptional

The complement parameter from Create Sale can vary depending on which type of insurance product your are selling. See our guides to understand the possible values for each product.

{
  "sale_request_id": "string",
  "installment_id": "string",
  "payment_method": "string",
  "complement": {}
}
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Sale
statusThe status of sale
The sale status can be:
StatusName
1Started
2Pending
3Failed
4Finished
5Canceled
{
  "id": "string",
  "status": 0
}

Detail Sale

GET /v1/sales/{sale_id}

URL Parameters
ParameterDescription
sale_idThe ID of sale to detail
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Sale
statusThe status of sale
The sale status can be:
StatusName
1Started
2Pending
3Failed
4Finished
5Canceled
{
  "id": "string",
  "status": 0
}

Timeline

GET /v1/consultant/timeline/{sale_id}

URL Parameters
ParameterDescription
sale_idThe ID of sale to retrieve the timeline
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Timeline
last_updateThe date Timeline was updated
eventsThe list of events associated with the Sale
events.dateEvent date
events.policyPolicy event for this sale, has a complete policy object
events.policy.document_urlPolicy document URL
{
  "id": "string",
  "last_update": "string",
  "events": [
    {
      "date": "string",
      "policy": {
        "document_url": "string"
      }
    }
  ]
}