Use the REST API to interact with Sales/Invoices
Last updated 3 months ago
Create a new sale/invoice
Sale created successfully
"Sale created successfully."
const response = await fetch('https://api2.engineroom.com.au/public/sales?date=2023-01-01&total_amount=2023-01-01&contact_name=John+Smith', { method: 'POST', headers: { "Authorization": "Bearer <token>", "Accept": "application/json" }, }); const data = await response.json();
{ "message": "Sale created successfully.", "data": { "id": "b0a00e1a-7748-4c68-acd1-36bc74ec0b7b", "date": "2023-01-30", "total_amount": 1000, "segment": "New Customers", "contact": { "id": "cb50eb42-22b3-4df4-bbcd-efcd9694f3f8", "name": "Bob Smith", "email": "bob@emails.com", "mobile": "0412123123" }, "business": { "id": "cb50eb42-22b3-4df4-bbcd-efcd9694f3f8", "name": "Acme Co" } } }