logo

ID: 6741
Updated 1/26/2017 3:38:28 AM

  • Contents

Documentation - Orders

API Lite has been superseded by API v1 - this information is for legacy users only.

 

Get Orders


Retrieve orders. Returns blank if no records were found.

Action

GetOrders

Url format

GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=GetOrders&fields={feilds}&where={where}&orderby={orderby}

 

Response Fields

Field Description
OrderId The unique cin7 order id.
OrderSessionId Order Session Id
OrderRef A unique order reference (Example: Ref123)
CreatedDate Created Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
ModifiedDate Modified Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
Active Order active status: 1 active Sales Order, 11 active Quote, 0 disabled (Example: 1)
TransactionType The transaction type: Adjustment, Batch or Split Invoice, Bin Location Transfer, BOM Master, Branch Transfer, Consignment, Credit, Credit Note, Expenses, Layby, Location Transfer, Order, Pre-order, Production Job, Project, Purchase Agreement, Purchase Order, Purchase Quote, Quote (Example: Order)
MemberId The unique cin7 member id.
MemberEmail The unique cin7 member email.
MemberCostCenter Member Cost Center
MemberSessionId Member Session Id
SalesPersonId The unique cin7 member id of the sales person.
SalesPersonEmail The unique cin7 member email of the sales person.
ProductTotal Product Total (Example: 123.00)
FreightTotal Freight Total (Example: 10.50)
FreightDescription Freight Description (Example: Local delivery)
DiscountTotal Discount Total (Example: 2.00)
DiscountDescription Discount Description (Example: 10% off all shirts)
Total Order total includes Product Total, Freight Total, Discount Total and Tax
CurrencyRate The conversion rate to apply to displayed currency values (Example: 1.0)
CurrencyName The 3 letter currency name (Example NZD)
CurrencySymbol The currency symbol (Example: $)
TaxStatus Tax Status: Incl, Excl, Exempt (Example: Incl)
TaxRate Tax Rate (Example: 0.15)
FirstName First Name
LastName Last Name
Company Company
Phone Phone
Mobile Mobile
Email Email
DeliveryFirstName Delivery First Name
DeliveryLastName Delivery Last Name
DeliveryCompany Delivery Company
DeliveryAddress Delivery Address
DeliverySuburb Delivery Suburb
DeliveryCity Delivery City
DeliveryPostalCode Delivery Postal Code
DeliveryState Delivery State
DeliveryCountry Delivery Country
BillingFirstName Billing First Name
BillingLastName Billing Last Name
BillingCompany Billing Company
BillingAddress Billing Address
BillingSuburb Billing Suburb
BillingCity Billing City
BillingPostalCode Billing Postal Code
BillingState Billing State
BillingCountry Billing Country
Comments Special order/delivery comments (Example: Leave at the door if not home)
VoucherCode Voucher Code (Example: CIN7123456789)
BranchId The unique cin7 member id of the branch.
BranchEmail The unique cin7 member email of the branch.
Stage Stage (Awaiting Payment, Declined, Dispatched, New, Processing, On Hold)
CostCenter Cost Center (Alternative Gl Account)
TrackingCode Tracking Code (Example: ABC123456789)
PaymentTerms Payment Terms (Example: Cash)

Get active orders created after 2013-01-31 UTC ordered by CreatedDate

Request

Fields: CreatedDate,OrderRef,Company,FirstName,LastName,Total
Where: Active = 1 AND CreatedDate > DATETIME('2013-01-31 00:00:00')
OrderBy: CreatedDate GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=GetOrders&fields=CreatedDate%2COrderRef%2CCompany%2CFirstName%2CLastName%2CTotal&where=Active%20%3D%201%20AND%20CreatedDate%20%3E%20DATETIME('2013-01-31%2000%3A00%3A00')&orderby=CreatedDate

Response

CreatedDate,OrderRef,Company,FirstName,LastName,Total
2013-01-31 08:30:00,Ref123,Smith Inc,John,Smith,133.50

Update or Insert Orders


Update or insert multiple orders by posting a csv to the api. Inserting a Member should be done before inserting an order. Inserting Order Details and Payments should be done after inserting an order.

Action

UpdateOrders

Url format

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=UpdateOrders

Request Fields

Field Description
LineId A temporary unique id for the record. (Optional)
The id will be returned in the response.
Defaults to the record index starting at 1.
OrderId The unique cin7 order id. (Optional)
OrderId should be blank when inserting a new order.
OrderId or OrderRef should be specified to update an order.
OrderRef A unique order reference (Example: Ref123)
OrderRef or OrderId should be specified to update an order.
CreatedDate Created Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
Active Order active status: 1 active Sales Order, 11 active Quote, 0 disabled (Example: 1)
TransactionType The transaction type: Adjustment, Batch or Split Invoice, Bin Location Transfer, BOM Master, Branch Transfer, Consignment, Credit, Credit Note, Expenses, Layby, Location Transfer, Order, Pre-order, Production Job, Project, Purchase Agreement, Purchase Order, Purchase Quote, Quote (Example: Order)
MemberId The unique cin7 member id. (Optional)
MemberId or MemberEmail should be specified to link a cin7 member to the order.
MemberEmail The unique cin7 member email. (Optional)
MemberEmail or MemberId should be specified to link a cin7 member to the order.
MemberCostCenter Member Cost Center. (Optional)
When used in conjunction with MemberEmail, will only link members from the specified cost center.
SalesPersonId The unique cin7 member id of the sales person. (Optional)
SalesPersonId or SalesPersonEmail should be specified to link a sales person to the order.
SalesPersonEmail The unique cin7 member email of the sales person. (Optional)
SalesPersonEmail or SalesPersonId should be specified to link a sales person to the order.
FreightTotal Freight Total (Example: 10.50) (Optional)
FreightDescription Freight Description (Example: Local delivery) (Optional)
DiscountTotal Discount Total (Example: 2.00) (Optional)
DiscountDescription Discount Description (Example: 10% off all shirts) (Optional)
CurrencyRate The conversion rate to apply to displayed currency values (Example: 1.0)
CurrencyName The 3 letter currency name (Example NZD)
CurrencySymbol The currency symbol (Example: $)
TaxStatus Tax Status: Incl, Excl, Exempt (Example: Incl)
TaxRate Tax Rate (Example: 0.15)
FirstName First Name
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
LastName Last Name
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
Company Company
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
Phone Phone
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
Mobile Mobile
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
Email Email
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryFirstName Delivery First Name (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryLastName Delivery Last Name (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryCompany Delivery Company (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryAddress Delivery Address (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliverySuburb Delivery Suburb (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryCity Delivery City (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryPostalCode Delivery Postal Code (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryState Delivery State (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
DeliveryCountry Delivery Country (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked member value.
BillingFirstName Billing First Name (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingLastName Billing Last Name (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingCompany Billing Company (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingAddress Billing Address (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingSuburb Billing Suburb (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingCity Billing City (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingPostalCode Billing Postal Code (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingState Billing State (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
BillingCountry Billing Country (Optional)
If this field is missing and MemberId or MemberEmail is specified, the field will be updated with the linked members billing company value.
Comments Special order/delivery comments (Example: Leave at the door if not home)
VoucherCode Voucher Code (Example: CIN7123456789)
BranchId The unique cin7 member id of the branch. (Optional)
BranchId or BranchEmail should be specified to link a branch to the order.
BranchEmail The unique cin7 member email of the branch. (Optional)
BranchEmail or BranchId should be specified to link a branch to the order.
Stage Stage (Awaiting Payment, Declined, Dispatched, New, Processing, On Hold) (Optional)
CostCenter Cost Center (Alternative Gl Account) (Optional)
TrackingCode Tracking Code (Example: ABC123456789) (Optional)
PaymentTerms Payment Terms (Example: Cash) (Optional)

Response Fields

Field Description
LineId A temporary unique id for the record speciified in the request.
Defaults to the record index starting at 1.
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)
Errors Returns "Failed" if the order to update was not found

Insert an order for John Smith

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrders
    
OrderRef,CreatedDate,Active,MemberEmail,CurrencyRate,CurrencyName,CurrencySymbol,TaxStatus,TaxRate
Ref123,2013-01-31 08:30:00,1,john@somewhere.com,1.0,NZD,$,Incl,0.15

Response

LineId,OrderId,OrderRef,Errors
1,12345,Ref123,

Update delivery for John Smiths order

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrders
OrderRef,FreightTotal,FreightDescription,DeliveryFirstName,DeliveryLastName,DeliveryCompany,DeliveryAddress,DeliverySuburb,DeliveryCity,DeliveryPostalCode,DeliveryState,DeliveryCountry
Ref123,10.50,Local Shipping,John,Smith,Smith Inc,42 Somewhere St,Albany,Auckland,0632,,New Zealand

Response

LineId,OrderId,OrderRef,Errors
1,12345,Ref123,

Delete Orders


Delete orders using a where statement. The where statement can use any fields from the Get Orders Response Fields.
Returns a list of deleted records or returns blank if no records were deleted.
Order details and payments linked to the orders will also be deleted.

Action

DeleteOrders

Url format

GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=DeleteOrders&where={where}

Response Fields

Field Description
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)

Delete John Smiths order

Request

Where: OrderRef='Ref123'
    
GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=DeleteOrders&where=OrderRef%3D'Ref123'

Response

OrderId,OrderRef
12345,Ref123