EngineRoom Documentation
  • Documentation
    • EngineRoom Documentation
  • EngineRoom Pixel
    • Setup
      • Webflow
      • WordPress
      • Shopify
      • Google Tag Manager
    • UTM Parameters
  • Conversion AI
    • How we use AI for Conversions
    • Quality scores
    • Session engagement scores
  • WildJar
    • Setup
  • API
    • Overview
    • Quick Start
    • Authentication
    • API Reference
      • Leads
      • Sales
      • Webhooks
      • Users
    • Rate Limits
  • Prompt Engine
    • Overview
  • AI Copilot
    • Overview
Powered by GitBook
On this page
  1. API
  2. API Reference

Sales

Use the REST API to interact with Sales/Invoices

PreviousLeadsNextWebhooks

Last updated 9 months ago

Create a new sale/invoice

post

Create a new sale/invoice

Authorizations
Query parameters
datestringRequired

Date the sale was made

Example: 2023-01-01
total_amountstringRequired

Total sale amount

Example: 2023-01-01
contact_namestringRequired

Contact Name

Example: John Smith
contact_emailstringOptional

Contact Email Address

Example: johnsmith@emails.xyz
contact_phonestringOptional

Lead Phone Number

Example: 03 1234 5678
contact_mobilestringOptional

Lead Mobile Number

Example: 0411 111 111
segmentstringOptional

Business Segment

Example: New Customers
line_itemsarrayOptional

Line Items (JSON String)

Header parameters
AcceptstringRequired

Setting to application/json is recommended

Example: application/json
Responses
201
Sale created successfully
application/json
400
Invalid input
post
POST /public/sales HTTP/1.1
Host: api2.engineroom.com.au
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/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"
    }
  }
}