Query Sale

get
/api/transactions/sale

Retrives sale transaction details. You can fetch a specific sale by its sale_id and optionally filter by client_id to get sales related to a particular client.

Request

Field Description

sale_id

(required)

[integer] Unique identifier of the sale to retrieve.

client_id

(optional)

[integer] If provided, limits results to sales belonging to the specified client.

 

 


GET /api/transactions/sale?sale_id=21666 HTTP/1.1
Host: yourcompany.intend.com
api-key: your_api_key_here

Response

A successful request returns HTTP 200 and  provides comprehensive details of a specific sale or order, including order information, payment details, buyer information, itemized product details, delivery information, taxes, discounts, and related invoice data. It is typically returned after querying a sale by its unique ID or code.

Field Description
id [integer] Sale ID.
code [string] Order code or reference number.
order_date [string] Date and time the order was created.
expiry_date [string] Expiry date of the order
type [string] Type of order (e.g., "PROFORMA ORDER").
department [string] Department associated with the sale.
client_reference [string] Client reference.
agent_reference [string] Agent reference.
sidemark [string] Sidemark reference.
currency [string] Currency code used for the sale.
measurement [string] Measurement system used (e.g., Metric).
fx_rate [integer] Foreign exchange rate applied.
sub_total [integer] Total amount before discounts and taxes.
discount [integer] Discount amount applied.
discount_rate [integer] Discount rate (%) applied.
net_total [integer] Total net price.
tax_amount [integer] Total after discount, before tax and delivery.
tax_rate [integer] Tax rate applied (%)
tax_ref [object] Tax reference with code and value (see "Tax ref object" below).
delivery_amount [integer] Delivery charge for the sale.
delivery_tax [integer] Tax applied on delivery charges.
total_amount [integer] Total payable amount including tax and delivery.
commission_amount [integer] Commission charged on the sale.
commission_rate [integer] Commission rate (%) applied.
payment_status [string] Payment status (e.g., "Completed", "Pending", etc.).
payment_completed_on [string] Datetime when payment was completed.
payment_request_type [string] Type of payment requested (e.g., full, partial).
amount_to_pay [integer] Remaining amount to pay.
payment_due [integer] Amount due for payment.
paid_amount [integer] Amount already paid.
refunded_amount [integer] Amount refunded to the client.
credited_amount [integer] Amount credited to client account.
source [string] Source of the sale (e.g., web, POS).
source_status [string] Status of the source (e.g., "D" for Draft).
created_on [string] Timestamp when the order was created.
invoice [object] Invoice details (see "Invoice object" below).
buyer [object] Buyer detail information (see "Buyer object" below).
items [object] Items details (see "Items object" below).
cancel_status [boolean] 0 = Not cancelled, 1 = Cancelled.
cancelled_on [string] Datetime of cancellation.
cancelled_reason [string] Reason for cancellation.

Tax ref object

Field Description
code [string] Tax code.
value [integer] Tax percentage value.

Items object

Field Description
id [integer] Unique ID of the invoice.
code [string] Invoice code/reference.
type [string] Type of invoice (e.g., "VAT Invoice").
invoice_date [string] Date and time when the invoice was created.

Buyer object

Field Description
client_id [integer] Unique ID of the client.
client_account [string] Account code of the client.
agent_id [integer] Unique ID of the associated agent.
agent_account [string] Account code of the agent.
title [string] Title of the client (e.g., Mr., Ms.).
first_name [string] First name of the client.
last_name [string] Last name of the client.
contact_name [string] Name to be used for contact purposes.
email [string] Email address of the client.
phone [string] Phone number of the client.
address_street_1 [string] Primary street address.
address_street_2 [string] Secondary street address.
address_town [string] Town or city of the client.
address_county [string] County or state of the client.
address_post_code [string] Postal code.
address_country [string] Country name.

Items object

Field Description
id [integer] Unique ID of the item.
name [string] Name of the item/product.
code [string] Item code or SKU.
description [string] Item description.
selling_unit [string] Unit of sale (e.g., Metre, Piece).
selling_unit_sm [string] Short form of the selling unit (e.g., m, pc).
mode [string] Mode of item (e.g., Product, Service).
type [string] Type of item (e.g., Unit, Bulk).
quantity [number] Quantity ordered.
marked_price [number] Original marked price per unit.
discount_rate [number] Discount rate applied to the item.
selling_price [number] Selling price per unit after discount.
tax_applicable [number] Flag indicating if tax is applicable (1 = yes, 0 = no).
sold_in_group [number] Flag indicating if sold in a group (1 = yes, 0 = no).
group_label [string] Label for the group if applicable.
group_quantity [number] Quantity within the group.
backorder [string] Backorder status, if any.
dispatch_quantity [number] Quantity dispatched so far.
dispatch_status [string] Current dispatch status (e.g., pending, dispatched).
dispatch_status_changed_on [string] Timestamp when dispatch status was last updated.
returnable [number] Flag if item is returnable (1 = yes, 0 = no).
return_status [string] Return status of the item (e.g., none, requested).
return_quantity [number] Quantity returned, if any.
delivery [object] Delivery details for the item (see "Delivery object").

Delivery object

Field Description
title [string] Name/title of the recipient.
first_name [string] First name of the recipient.
last_name [string] Last name of the recipient.
email [string] Email of the recipient.
phone [string] Phone number of the recipient.
address_street_1 [string] Primary street address for delivery.
address_street_2 [string] Secondary street address.
address_town [string] Town/city for delivery.
address_county [string] County/state for delivery.
address_post_code [string] Postal code for delivery.
address_country [string] Country for delivery.
delivery_charge [integer] Delivery charge for this item.
delivery_charge_tax [integer] Tax applied on delivery charge.
postage_charge [integer] Postage cost.
shipping_category [string] Shipping category.

 


{
   "status": 200,
   "response": true,
   "data": {
       "id": 1313,
       "code": "001011",
       "order_date": "2025-08-14T16:03:29.000000Z",
       "expiry_date": "2025-08-28 16:03:29",
       "type": "PROFORMA ORDER",
       "department": "RoW",
       "client_reference": "",
       "agent_reference": "",
       "sidemark": "Something here",
       "currency": "GBP",
       "measurement": "Metric",
       "fx_rate": 1,
       "sub_total": 1500,
       "discount": 150,
       "discount_rate": 10,
       "net_total": 1350,
       "tax_amount": 270,
       "tax_rate": 20,
       "tax_ref": {
           "code": "T1",
           "value": 20
       },
       "delivery_amount": 25,
       "delivery_tax": 5,
       "total_amount": 1650,
       "commission_amount": 0,
       "commission_rate": 0,
       "payment_status": "Completed",
       "payment_completed_on": "2025-08-14T00:00:00.000000Z",
       "payment_request_type": "full",
       "amount_to_pay": 0,
       "payment_due": 0,
       "paid_amount": 1650,
       "refunded_amount": 0,
       "credited_amount": 0,
       "source": "web",
       "source_status": "D",
       "created_on": "2025-08-14T16:03:29.000000Z",
       "invoice": {
           "id": 664,
           "code": "000664",
           "type": "VAT Invoice",
           "invoice_date": "2025-08-14T16:03:29.000000Z"
       },
       "buyer": {
           "client_id": 30,
           "client_account": "INTEND01",
           "agent_id": null,
           "agent_account": 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": [
           {
               "id": 2897,
               "name": "Agusta - Duck Egg",
               "code": "ABC0478",
               "description": "",
               "selling_unit": " Metre",
               "selling_unit_sm": "m",
               "mode": "Product",
               "type": "Unit",
               "quantity": 12,
               "marked_price": 125,
               "discount_rate": 0,
               "selling_price": 125,
               "tax_applicable": 1,
               "sold_in_group": 0,
               "group_label": "",
               "group_quantity": 0,
               "backorder": null,
               "dispatch_quantity": 0,
               "dispatch_status": "pending",
               "dispatch_status_changed_on": null,
               "returnable": 0,
               "return_status": "none",
               "return_quantity": 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,
                   "shipping_category": ""
               }
           }
       ],
       "cancel_status": 0,
       "cancelled_on": "1000-01-01T00:00:00.000000Z",
       "cancelled_reason": "0"
   },
   "msg": "Request Successful"
}