Authorization
bearerAuth API key sent as Authorization: Bearer <API_KEY>.
In: header
Request Body
application/json
The status of the sale to match in system.
ID of the ticket.
ID of the ticket sale.
Sale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.
dateSale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd.
dateType of sale.
Customer's phone number.
Customer's name.
Customer's government ID.
ID of the user making the sale.
Response Body
application/json
application/json
application/json
application/json
application/json
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
}{
"error": "string",
"zError": {}
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}Transfer contact
Reassigns a contact to another agent (user). The contact's owner becomes the receiving agent, a transfer interaction is recorded in the contact's history, and the receiving agent is notified. Any pending reminder is cancelled and any archiving reason is cleared, so the contact becomes active again. If the contact is already assigned to the receiving agent, no transfer is made: a note is added instead and the request still succeeds.
Get sale by ID
Retrieves a specific sale by its unique ID.