Ventia
Sales

Create a new sale

Creates a new sale record in the system.

POST
/sales

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key sent as Authorization: Bearer <API_KEY>.

Request Body

application/json
  1. body
status*string

The status of the sale to match in system.

ticket_id*string

ID of the ticket.

ticket_sale_id?string

ID of the ticket sale.

date_sale?string

Sale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.

Formatdate
date?string

Sale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.

Formatdate
type?string

Type of sale.

phone*string

Customer's phone number.

name?string

Customer's name.

gov_id?string

Customer's government ID.

user*string

ID of the user making the sale.

Response Body

Sale created successfully

application/json
  1. response
ticket_id?string

ID of the ticket.

ticket_sale_id?string

ID of the ticket sale.

date?string

Transaction date.

Formatdate-time
date_sale?string

Sale date.

Formatdate-time
name?string

Customer's name.

phone?string

Customer's phone number.

secondary_phones?array<string>

List of secondary phone numbers.

gov_id?string

Customer's government ID.

status?string

The status of the sale.

status_lock?boolean

Indicates if the status is locked.

sold?boolean

Indicates if the sale is completed.

cancel?boolean

Indicates if the sale is canceled.

lock?boolean

Indicates if the sale is locked.

user?string

ID of the user making the sale.

user_string?string

User's full name.

user_lock?boolean

Indicates if the user is locked.

user_edit?boolean

Indicates if the user can edit the sale.

company?string

ID of the company.

importation?string

Importation method.

value?number

Value of the sale.

remove_from_goal?boolean

Indicates if the sale is removed from the goal.

comissions?array<>
_id?string

ID of the sale.

createdAt?string

Creation timestamp.

Formatdate-time
updatedAt?string

Update timestamp.

Formatdate-time
__v?integer

Version key.

curl -X POST 'https://api.getventia.com/api/v1.0/sales' \  -H 'Content-Type: application/json' \  -d '{  "status": "SOLD",  "ticket_id": "ticket-5678",  "phone": "+12345678900",  "user": "abcd1234efgh5678ijkl9012"}'
{  "ticket_id": "ticket-5678",  "ticket_sale_id": "sale-5678",  "date": "2024-02-24T15:00:00.000Z",  "date_sale": "2024-02-24T15:00:00.000Z",  "name": "John Doe",  "phone": "+12345678900",  "secondary_phones": [],  "gov_id": "12345678",  "status": "SOLD",  "status_lock": false,  "sold": true,  "cancel": false,  "lock": false,  "user": "abcd1234efgh5678ijkl9012",  "user_string": "John Doe",  "user_lock": false,  "user_edit": false,  "company": "abcd1234efgh5678ijkl9012",  "importation": "Public API",  "value": 0,  "remove_from_goal": false,  "comissions": [    {}  ],  "_id": "abcd1234efgh5678ijkl9012",  "createdAt": "2024-10-23T20:02:13.887Z",  "updatedAt": "2024-10-23T20:02:13.887Z",  "__v": 0}