Sales
Modify sale by ID
Updates fields of an existing sale by its unique ID.
PATCH
bearerAuthheader
AuthorizationBearer <token>API key sent as Authorization: Bearer <API_KEY>.
id*stringThe unique ID of the sale to be updated.
application/json- body
status?stringStatus of the sale.
date_sale?stringDate when the sale occurred.
Format
dateuser?stringID of the user associated with the sale.
Sale updated successfully
application/json- response
_id?stringUnique ID of the sale.
user?stringID of the user associated with the sale.
user_string?stringName and lastname of the user.
status?stringStatus of the sale.
date_sale?stringSale date.
Format
datesold?booleanIndicates if the sale status is sold.
curl -X PATCH 'https://api.getventia.com/api/v1.0/sales/string' \ -H 'Content-Type: application/json' \ -d '{ "status": "sold", "date_sale": "2024-01-01", "user": "60d0fe4f5311236168a109ca"}'{ "_id": "string", "user": "string", "user_string": "string", "status": "string", "date_sale": "2019-08-24", "sold": true}