Creates a new sale transaction in the system.
This endpoint records all sale-related details including buyer information, ordered items, delivery addresses, discounts, taxes, and payment details.
It is typically used when an order is confirmed and ready to be processed.
| Field | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
(required) |
[string] Type of transaction
|
||||||||
|
(required) |
[string] Name of the department as specifed in Intend. | ||||||||
|
(optional) |
[string] Client reference. Leave empty if not available. | ||||||||
|
(optional) |
[string] Agent reference code. Leave empty if not available. | ||||||||
|
(optional) |
[string] Sidemark reference. Leave empty if not available. | ||||||||
|
(required) |
[string] Currency code for the transaction.
|
||||||||
|
(required) |
[float] Discount rate applied to the transaction (percentage). | ||||||||
|
(required) |
[float] Tax rate applied to the transaction (percentage). | ||||||||
source |
[string] Source of the order. Any of the below
|
||||||||
buyer |
[object] Buyer details including contact and address information (see "Buyer object" below). |
||||||||
items |
[array] List of items included in the order with product and delivery details (see "Items object" below). | ||||||||
payment_status |
[string] Status of payment. | ||||||||
payment_ref |
[object] Payment reference details (see "Payment ref" object below). |
| Field | Description |
|---|---|
client_id |
[integer] Client ID. |
agent_id |
[integer] Agent ID. |
title |
[string] Buyer's title. |
first_name |
[string] Buyer's first name. |
last_name |
[string] Buyer's last name. |
contact_name |
[string] Buyer's contact name. |
email |
[string] Buyer's email address. |
phone |
[string] Buyer's phone number. |
address_street_1 |
[string] Buyer's address. |
|
(optional) |
[string] Buyer's address. |
address_town |
[string] Buyer's town or city. |
address_country |
[string] Buyer's country or region. |
address_post_code |
[string] Buyer's postal code. |
address_country |
[string] Buyer's country. |
| Field | Description |
|---|---|
product_id |
[integer] Product ID. |
colourway_id |
[integer] Colourway ID. |
name |
[string] Name of the product. |
code |
[string] Product code. |
description |
[string] Description of the product. |
mode |
[string] Mode of sale. |
type |
[string] Type of unit. |
quantity |
[integer] Quantity ordered. |
marked_price |
[float] Price per unit before discounts. |
discount_rate |
[float] Discount rate applied to the item (percentage). |
tax_applicable |
[integer] Indicates if tax applies (1 = yes, 0 = no). |
|
(optional) |
[integer] Indicates if backorder is allowed. |
returnable |
[integer] Indicates if item is returnable (1 = yes, 0 = no). |
delivery |
[object] Delivery address and charges for the item (see "Items.Delivery address object" below). |
item_note |
[string] Notes for the item. |
| Field | Description |
|---|---|
title |
[string] Delivery contact title. |
first_name |
[string] First name of delivery contact. |
last_name |
[string] Last name of delivery contact. |
email |
[string] Delivery contact email address. |
phone |
[string] Delivery contact phone number. |
address_street_1 |
[string] Delivery Address. |
|
(optional) |
[string] Delivery Address. |
address_town |
[string] Delivery town or city. |
address_country |
[string] Delivery country or region. |
address_post_code |
[string] Delivery postal code. |
address_country |
[string] Delivery country. |
delivery_charge |
[float] Delivery charge amount. |
delivery_charge_tax |
[integer] Indicates if tax applies to delivery charge (1 = yes, 0 = no). |
postage charge |
[float] Additional postage charge. |
| Field | Description |
|---|---|
amount |
[string] Payment amout. |
method |
[string] Payment method. |
{
"type": "SALES ORDER",
"department": "RoW",
"client_reference": "",
"agent_reference": "",
"sidemark": "Something here",
"currency": "GBP",
"discount_rate": 10,
"tax_rate": 20,
"source": "web",
"buyer": {
"client_id": 30,
"agent_id": null,
"title": "Clark Kent",
"first_name": "",
"last_name": "",
"contact_name": "Clark Kent",
"email": "kent@intend.com",
"phone": "123-668-5490",
"address_street_1": "1159 North Greenfield Road",
"address_street_2": "",
"address_town": "Gilbert",
"address_county": "Buckinghamshire",
"address_post_code": "MK6 2BE",
"address_country": "United Kingdom"
},
"items": [
{
"product_id" : 1,
"colourway_id": 6,
"name": "Agusta - Duck Egg",
"code": "ABC0478",
"description": "",
"mode": "Product",
"type": "Unit",
"quantity": 12,
"marked_price": 125,
"discount_rate": 0,
"tax_applicable": 1,
"backorder": null,
"returnable" : 0,
"delivery": {
"title": "Clark Kent",
"first_name": "",
"last_name": "",
"email": "info@intend.com",
"phone": "123-668-5490",
"address_street_1": "1159 North Greenfield Road",
"address_street_2": "",
"address_town": "Gilbert",
"address_county": "Buckinghamshire",
"address_post_code": "MK6 2BE",
"address_country": "United Kingdom",
"delivery_charge": 25,
"delivery_charge_tax": 1,
"postage_charge": 0
},
"item_note": ""
}
],
"payment_status": "Completed",
"payment_ref": {
"amount": 1650,
"method": "Paypal"
}
}
A successful request returns HTTP 200 and includes the newly created sale's sale_id and sale_code reference.
| Field | Description |
|---|---|
status |
[integer] HTTP status code of the response. |
response |
[boolean] Indicates if the request was successful (true or false). |
data |
[object] Contains the sale details returned by the API (see "Data object" below). |
msg |
[string] Response message describing the result of the request. |
sale_id |
[integer] Sale ID. |
sale_code |
[string] Unique Sale code. |
{
"status": 200,
"response": true,
"data": {
"sale_id": 1306,
"sale_code": "001004"
},
"msg": "Request Successful"
}