Sale GET
The Sale resource allows getting detailed info about Sale. This is how you call it:
·/Sale/E6E8163F-6911-40e9-B740-90E5A0A3A996 - returns details of a particular sale;
Also, this resource allows creating new Sale, by sending POST request.
The full range of URIs and HTTP Verbs supported are:
Operation | HTTP Action |
View any Sale | GET /Sale/{id} |
Create new Sale | POST /Sale |
Void Sale | DELETE /Sale{id} |
Available Fields for Sale:
Property | Type | Length | Required | Notes |
ID | Guid |
|
| Unique Cin7 Core Sale ID |
Customer | String | 256 | Yes* | Customer name. Required if CustomerID not provided |
CustomerID | Guid |
| Yes* | Customer identifier |
Contact | String | 256 |
| Customer Contact name |
Phone | String | 50 |
| Customer Contact phone |
String | 256 |
| Customer Contact email | |
DefaultAccount | String | 50 |
| Account code used by default for invoice lines when no revenue account is defined on Product. By default it is equal to Customer Sale account |
SkipQuote | Boolean | Yes |
| “True” if there is no quote in the sale |
BillingAddress | Structured |
|
| Sale Billing address, see below |
ShippingAddress | Structured |
|
| Sale Shipping address, see below |
BaseCurrency | String | 3 | Yes | 3 character currency code of Base Currency defined in General Settings on the moment when Sale was created. |
CustomerCurrency | String | 3 | Yes | 3 character currency code of customer Currency defined in Customer card at the moment when customer is selected for the Sale. |
TaxRule | String | 50 | Yes | Default Tax Rule name selected for Sale |
TaxCalculation | String |
| Yes | “Inclusive” or “Exclusive” |
Terms | String | 256 | Yes | Payment terms name |
PriceTier | String | 50 | Yes | Price Tier name selected for Sale |
ShipBy | Date |
|
| Date when shipment is due |
Location | String | 256 |
| Default location to pick stock from |
Created | Date |
|
| Date when task was created |
LastModifiedOn | DateTime |
|
| UTC Time |
Note | String | 1024 |
| Custom Sale note |
CustomerReference | String | 256 |
| Reference number used by customer to identify this sale. Could be a purchase order number generated by customer. |
COGSAmount | Money |
| Yes | COGS amount in base currency |
Status | String | 25 |
| Sale Status, see below for possible values |
CurrencyRate | Decimal | Up to 5 decimal places | Yes | Conversion Rate expressed as number of Base currency units for one Customer currency unit |
SalesRepresentative | String | 256 |
| Sales representative name |
ServiceOnly | Boolean |
| Yes | “true” when it is service-only sale |
Quote | Structured |
|
| Sale Quote, see below |
Order | Structured |
|
| Sale Order, see below |
Pick | Structured |
|
| Sale Pick, see below |
Pack | Structured |
|
| Sale Pack, see below |
Ship | Structured |
|
| Sale Ship, see below |
Invoice | Structured |
|
| Sale Invoice, see below |
CreditNote | Structured |
|
| Sale CreditNote, see below |
AdditionalTransactions | Structured |
|
| Sale Additional Transactions, see below |
AdditionalAttributes | Structured |
|
| Sale Additional Attributes, see below |
Available Sale Statuses:
Status | Description |
DRAFT | No data is added to sale details. Quote and order are empty and not authorized |
VOIDED | Task has been voided |
ESTIMATING | QuoteStatus = DRAFT, OrderStatus = NOT AVAILABLE |
ESTIMATED | QuoteStatus = AUTHORISED or Skip Quote=true, OrderStatus = NOT AVAILABLE |
ORDERING | OrderStatus = DRAFT |
ORDERED | OrderStatus = AUTHORISED, all products in sale order are in stock, no backordering. PickStatus = NOT AVAILABLE |
BACKORDERED | OrderStatus = AUTHORISED, at least one product in sale order has been backordered PickStatus = NOT AVAILABLE |
PICKING | PickStatus = DRAFT |
PICKED | PickStatus = AUTHORISED, PackStatus = NOT AVAILABLE |
PACKING | PackStatus = DRAFT |
PACKED | PackStatus = AUTHORISED, ShipStatus = NOT AVAILABLE |
SHIPPING | ShipStatus = DRAFT |
INVOICING | OrderStatus=AUTHORISED, ShipStatus=AUTHORISED, InvoiceStatus=DRAFT |
INVOICED | ShipStatus=AUTHORISED, InvoiceStatus = AUTHORISED or InvoiceStatus = PAID, TotalInvoice – TotalPaid <> 0 |
CREDITED | CreditNoteStatus = AUTHORISED, TotalInvoice – TotalPaid <> 0 |
COMPLETED | InvoiceStatus = PAID, ShipStatus=AUTHORISED, TotalInvoice – TotalPaid = 0 |
Available Fields for BillingAddress and ShippingAddress:
Property | Type | Length | Required | Notes |
DisplayAddressLine1 | String | 256 |
| Address Line 1 as displayed on Sale form. = Line1 + Line2 |
DisplayAddressLine2 | String | 256 |
| Address Line 2 as displayed on Sale form. = City + State/Region + Zip/Postcode + Country |
Line1 | String | 256 |
|
|
Line2 | String | 256 |
|
|
City | String | 256 |
|
|
State | String | 256 |
|
|
Postcode | String | 20 |
|
|
Country | String | 32 |
|
|
Available Fields for Quote:
Property | Type | Length | Required | Notes |
Memo | String | 1024 |
| Sale Quote memo |
Status | String | 20 | Yes | Sale Quote status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of QuoteLine |
|
| Quote Lines, see below |
AdditionalCharges | Array of QuoteAdditionalCharge |
|
| Quote Additional Charges, see below |
Prepayments | Array of Prepayment |
|
| Prepayments, see below |
TotalBeforeTax | Money |
| Yes | Quote Total before taxes in Customer Currency |
Tax | Money |
| Yes | Quote Total Tax in Customer Currency |
Total | Money |
| Yes | Quote Total (TotalBeforeTax + Tax) in Customer Currency |
Available Fields for Order:
Property | Type | Length | Required | Notes |
Memo | String | 1024 |
| Sale Order memo |
Status | String | 50 | Yes | Sale Order status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of OrderLine |
|
| Order Lines, see below |
TotalBeforeTax | Money |
| Yes | Order Total before taxes in Customer Currency |
Tax | Money |
| Yes | Order Total Tax in Customer Currency |
Total | Money |
| Yes | Order Total (TotalBeforeTax + Tax) in Customer Currency |
Available Fields for Pick:
Property | Type | Length | Required | Notes |
Status | String | 20 | Yes | Sale Pick status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of PickLine |
|
| Pick Lines, see below |
Available Fields for Pack:
Property | Type | Length | Required | Notes |
Status | String | 20 | Yes | Sale Pack status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of PackLine |
|
| Pack Lines, see below |
Available Fields for Ship:
Property | Type | Length | Required | Notes |
Status | String | 20 | Yes | Sale Ship status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of ShipLine |
|
| Ship Lines, see below |
Available Fields for Invoice:
Property | Type | Length | Required | Notes |
Memo | String | 1024 |
| Invoice memo |
Status | String | 20 | Yes | Invoice status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”, “PAID” |
InvoiceDate | Date |
|
| Date when invoice created. Default value is current date, used if not specified |
InvoiceDueDate | Date |
|
| Date until invoice is valid. If not specified, used default value from Terms |
Lines | Array of InvoiceLine |
|
| Invoice Lines, see below |
AdditionalCharges | Array of InvoiceAdditionalCharge |
|
| Invoice Additional Charges, see below |
Payments | Array of Payment |
|
| All invoice payments, see below |
TotalBeforeTax | Money |
| Yes | Invoice Total before taxes in Customer Currency |
Tax | Money |
| Yes | Invoice Total Tax in Customer Currency |
Total | Money |
| Yes | Invoice Total (TotalBeforeTax + Tax) in Customer Currency |
Paid | Money |
| Yes | Invoice Paid Total in Customer Currency |
Available Fields for CreditNote:
Property | Type | Length | Required | Notes |
Memo | String | 1024 |
| Credit Note memo |
Status | String | 20 | Yes | Credit Note status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
CreditNoteDate | Date |
|
|
|
Lines | Array of CreditNoteLine |
|
| Credit Note Lines, see below |
AdditionalCharges | Array of CreditAdditionalCharge |
|
| Credit Note Additional Charges, see below |
Refunds | Array of Refund |
|
| All credit note refunds, see below |
Restock | Array of RestockLine |
|
| Restocked products list, see below |
TotalBeforeTax | Money |
| Yes | Credit Note Total before taxes in Customer Currency |
Tax | Money |
| Yes | Credit Note Total Tax in Customer Currency |
Total | Money |
| Yes | Credit Note Total (TotalBeforeTax + Tax) in Customer Currency |
Refunded | Money |
| Yes | Credit Note refunded Total in Customer Currency |
Available Fields for QuoteLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Quote Line |
SKU | String | 50 | Yes | Product SKU referenced by this Quote Line |
Name | String | 256 | Yes | Product name referenced by this Quote Line |
Quantity | Decimal with up to 4 decimal places |
| Yes |
|
Price | Decimal with up to 4 decimal places |
| Yes | Price per unit in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Line Total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
AverageCost | Decimal with up to 5 decimal places |
|
| Current product Average Cost in base currency |
TaxRule | String | 50 | Yes | Line Tax Rule name |
Comment | String | 256 |
|
|
Available Fields for QuoteAdditionalCharge:
Property | Type | Length | Required | Notes |
Description | String | 256 | Yes | Additional charge description |
Amount | Decimal with up to 4 decimal places |
| Yes | Charge amount in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Additional Charge line total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
TaxRule | String | 50 | Yes | Additional Charge Tax Rule name |
Available Fields for Payment, Refund and Prepayment:
Property | Type | Length | Required | Notes |
Reference | String | 50 |
| Payment reference number |
Amount | Money |
| Yes | Payment amount in customer currency |
DatePaid | Date |
| Yes | Date when payment has been made |
Account | String | 50 | Yes | Account Code of the Bank account |
CurrencyRate | Decimal with up to 5 decimal places |
| Yes | Currency Conversion rate expressed as number of Base currency units for one Customer currency unit. Equals 1 when customer currency is the same as base currency. |
Available Fields for OrderLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
SKU | String | 50 | Yes | Product SKU referenced by this Line |
Name | String | 256 | Yes | Product name referenced by this Line |
Quantity | Decimal with up to 4 decimal places |
| Yes |
|
Price | Decimal with up to 4 decimal places |
| Yes | Price per unit in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Line Total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
AverageCost | Decimal with up to 5 decimal places |
|
| Current product Average Cost in base currency |
TaxRule | String | 50 | Yes | Line Tax Rule name |
Comment | String | 256 |
|
|
DropShip | Boolean |
| Yes | “True” if the line selected for drop-shipping |
Backorder | Boolean |
| Yes | “True” if the line has backordered product |
Available Fields for PickLine and RestockLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
SKU | String | 50 | Yes | Product SKU referenced by this Line |
Name | String | 256 | Yes | Product name referenced by this Line |
Location | String | 256 | Yes | Location to pick the product from |
Quantity | Decimal with up to 4 decimal places |
| Yes |
|
Batch | String | 50 |
| Batch or Serial Number picked |
ExpiryDate | Date |
|
| Date when selected Batch expires |
Available Fields for PackLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
SKU | String | 50 | Yes | Product SKU referenced by this Line |
Name | String | 256 | Yes | Product name referenced by this Line |
Location | String | 256 | Yes | Location to pick the product from |
Box | String | 256 | Yes | Box number/name /barcode used for package |
Quantity | Decimal with up to 4 decimal places |
| Yes | Quantity in the box |
Batch | String | 50 |
| Batch or Serial Number packed |
ExpiryDate | Date |
|
| Date when selected Batch expires |
WarrantyRegistrationNumber | String |
| No | Warranty number associated with packed goods |
Available Fields for ShipLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
ShipmentDate | Date |
|
| Date when Shipment was made |
Carrier | String | 256 | Yes | Carrier name doing shipment |
Boxes | String | 256 | Yes | Comma/delimited list of box numbers/names included in the shipment |
TrackingNumber | String | 256 |
| Tracking number for the shipment |
IsShipped | Boolean |
| Yes | “True” if this shipment has been shipped, “False” otherwise |
Available Fields for InvoiceLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
SKU | String | 50 | Yes | Product SKU referenced by this Line |
Name | String | 256 | Yes | Product name referenced by this Line |
Quantity | Decimal with up to 4 decimal places |
| Yes |
|
Price | Decimal with up to 4 decimal places |
| Yes | Price per unit in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Line Total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
AverageCost | Decimal with up to 5 decimal places |
|
| Current product Average Cost in base currency |
TaxRule | String | 50 | Yes | Line Tax Rule name |
Account | String | 50 | Yes | Revenue Account code |
Comment | String | 256 |
|
|
Available Fields for InvoiceAdditionalCharge and CreditNoteAdditionalCharge:
Property | Type | Length | Required | Notes |
Description | String | 256 | Yes | Additional charge description |
Amount | Decimal with up to 4 decimal places |
| Yes | Charge amount in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Additional Charge line total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
TaxRule | String | 50 | Yes | Additional Charge Tax Rule name |
Account | String | 50 | Yes | Revenue Account code |
Available Fields for CreditNoteLine:
Property | Type | Length | Required | Notes |
ProductID | Guid |
| Yes | Unique ID of the product referenced by this Line |
SKU | String | 50 | Yes | Product SKU referenced by this Line |
Name | String | 256 | Yes | Product name referenced by this Line |
Quantity | Decimal with up to 4 decimal places |
| Yes |
|
Price | Decimal with up to 4 decimal places |
| Yes | Price per unit in Customer currency |
Discount | Decimal with up to 2 decimal places |
| Yes | Discount. Value between 0 and 100. For free items discount is 100 |
Tax | Decimal with up to 4 decimal places |
| Yes | Calculated Tax value in Customer currency |
Total | Decimal with up to 2 decimal places |
| Yes | Line Total in Customer currency. Can include Tax if Tax Rule for Sale is Tax Inclusive |
TaxRule | String | 50 | Yes | Line Tax Rule name |
Account | String | 50 | Yes | Revenue Account code |
Comment | String | 256 |
|
|
Available Fields for AdditionalTransactions:
Property | Type | Length | Required | Notes |
Status | String | 20 | Yes | Additional transactions status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
Lines | Array of AdditionalTransactionLine |
|
| Additional Transaction Lines, see below |
Available Fields for AdditionalTransactionLine:
Property | Type | Length | Required | Notes |
Reference | String | 50 |
| Custom reference for the transaction |
Debit | String | 50 | Yes | Transaction Debit account code |
Credit | String | 50 | Yes | Transaction Credit account code |
Amount | Decimal with up to 2 decimal places |
| Yes | Value of the transaction in base currency |
Date | Date |
| Yes | Effective date of the transaction |
Available Fields for AdditionalAttributes:
Property | Type | Length | Required | Notes |
AdditionalAttribute1 | String | 256 |
| Additional Attribute 1 value |
AdditionalAttribute2 | String | 256 |
| Additional Attribute 2 value |
AdditionalAttribute3 | String | 256 |
| Additional Attribute 3 value |
AdditionalAttribute4 | String | 256 |
| Additional Attribute 4 value |
AdditionalAttribute5 | String | 256 |
| Additional Attribute 5 value |
AdditionalAttribute6 | String | 256 |
| Additional Attribute 6 value |
AdditionalAttribute7 | String | 256 |
| Additional Attribute 7 value |
AdditionalAttribute8 | String | 256 |
| Additional Attribute 8 value |
AdditionalAttribute9 | String | 256 |
| Additional Attribute 9 value |
AdditionalAttribute10 | String | 256 |
| Additional Attribute 10 value |
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip20 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB
- Publish to everyone.4.log-2010416261.zip30 KB