Upsert sale
Updates an existing sale matched by the `ticket_id` in the request body, or creates a new one if none exists.
bearerAuthAuthorizationBearer <token>API key sent as Authorization: Bearer <API_KEY>.
application/json- body
status?stringStatus of the sale.
ticket_id?stringID of the ticket related to the sale.
ticket_sale_id?stringOptional ID for ticket sale.
date_sale?stringOptional sale date.
datedate?stringOptional date of the sale record.
datetype?stringType of sale.
phone?stringPhone number associated with the sale.
name?stringOptional name associated with the sale.
product?stringOptional product related to the sale.
gov_id?stringOptional government ID associated with the sale.
user?stringID of the user responsible for the sale.
importation?stringOptional importation method.
Sale created or updated successfully
application/json- response
_id?stringUnique ID of the sale.
status?stringUpdated or created status of the sale.
date_sale?stringDate when the sale occurred.
datephone?stringPhone number associated with the sale.
name?stringName of the contact.
user?stringID of the user associated with the sale.
product?stringProduct related to the sale.
curl -X PUT 'https://api.getventia.com/api/v1.0/sales' \ -H 'Content-Type: application/json' \ -d '{ "status": "sold", "ticket_id": "123456", "date_sale": "2024-01-01", "phone": "+1234567890", "user": "60d0fe4f5311236168a109ca"}'{ "_id": "string", "status": "string", "date_sale": "2019-08-24", "phone": "string", "name": "string", "user": "string", "product": "string"}