Create a new sale
Creates a new sale record in the system.
bearerAuthAuthorizationBearer <token>API key sent as Authorization: Bearer <API_KEY>.
application/json- body
status*stringThe status of the sale to match in system.
ticket_id*stringID of the ticket.
ticket_sale_id?stringID of the ticket sale.
date_sale?stringSale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.
datedate?stringSale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.
datetype?stringType of sale.
phone*stringCustomer's phone number.
name?stringCustomer's name.
gov_id?stringCustomer's government ID.
user*stringID of the user making the sale.
Sale created successfully
application/json- response
ticket_id?stringID of the ticket.
ticket_sale_id?stringID of the ticket sale.
date?stringTransaction date.
date-timedate_sale?stringSale date.
date-timename?stringCustomer's name.
phone?stringCustomer's phone number.
secondary_phones?array<string>List of secondary phone numbers.
gov_id?stringCustomer's government ID.
status?stringThe status of the sale.
status_lock?booleanIndicates if the status is locked.
sold?booleanIndicates if the sale is completed.
cancel?booleanIndicates if the sale is canceled.
lock?booleanIndicates if the sale is locked.
user?stringID of the user making the sale.
user_string?stringUser's full name.
user_lock?booleanIndicates if the user is locked.
user_edit?booleanIndicates if the user can edit the sale.
company?stringID of the company.
importation?stringImportation method.
value?numberValue of the sale.
remove_from_goal?booleanIndicates if the sale is removed from the goal.
comissions?array<>_id?stringID of the sale.
createdAt?stringCreation timestamp.
date-timeupdatedAt?stringUpdate timestamp.
date-time__v?integerVersion 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}