logo

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

  • Contents

Documentation - Order Details

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

 

Get Order Details


Retrieve order details. Returns blank if no records were found.

Action

GetOrderDetails

Url format

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

Response Fields

Field Description
OrderDetailId The unique cin7 order detail id.
OrderDetailImportedRef A unique order detail reference (Example: Ref456)
OrderId The unique cin7 order 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)
Active Order detail active status: 1 active, 0 disabled (Example: 1)
SKU The unique cin7 product option id.
Code The unique cin7 product option code.
ProductId The unique cin7 product id.
StyleCode The unique cin7 product code.
MasterId The cin7 master order detail id this order detail is a child of.
Price Price (Example: 30.00)
Qty Quantity (Example: 1.0)
Name Name (Example: Shirt)
Discount Discount (Example: 12.00)
Option1 Option1 (Example: Red)
Option2 Option2
Option3 Option3
LineComments Line Comments
ModifiedDate Modified Date

Get order details of an order

Request

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

Response

OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,CreatedDate,Active,SKU,Code,ProductId,StyleCode,MasterId,Price,Qty,Name,Discount,Code,Option1,Option2,Option3,LineComments,ModifiedDate
1001,Ref456,12345,Ref123,2013-09-17 22:28:20,1,456,ShirtRed123,789,Shirt123,0,30.00,1,Shirt,12.00,ShirtRed123,Red,,,,2013-09-17 22:28:20

Get Order Details By Size


Retrieve order details by size. Returns blank if no records were found.

Action

GetOrderDetailsBySize

Url format

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

Response Fields

Field Description
OrderDetailId The unique cin7 order detail id.
OrderDetailImportedRef A unique order detail reference (Example: Ref456)
OrderId The unique cin7 order 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)
Active Order detail active status: 1 active, 0 disabled (Example: 1)
SKU The unique cin7 product option id.
Code The unique cin7 product option code.
ProductId The unique cin7 product id.
StyleCode The unique cin7 product code.
Barcode Barcode
MasterId The cin7 master order detail id this order detail is a child of.
Price Price (Example: 30.00)
Qty Quantity (Example: 1.0)
Name Name (Example: Shirt)
Discount Discount (Example: 12.00)
Option1 Option1 (Example: Red)
Option2 Option2
Size Size
Option3 Option3
LineComments Line Comments
ModifiedDate Modified Date

Get order details by size of an order

Request

Fields: 
Where: OrderRef='PJ-3'
OrderBy: GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=GetOrderDetailsBySize&where=OrderRef%3D'PJ-3'

Response

OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,CreatedDate,Active,SKU,Code,ProductId,StyleCode,Barcode,MasterId,Price,Qty,Name,Discount,Option1,Option2,Size,LineComments,ModifiedDate
13,0,3,PJ-3,2015-09-21 10:47:43,1,13,test1234,8,ABC Supplier,,0,10.00,1,test123,0.00,,,,,2015-09-21 10:47:43

Update or Insert Order Details


Update or insert multiple order details by posting a csv to the api. Inserting Order Details should be done after inserting an Order.

Action

UpdateOrderDetails

Url format

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

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 or OrderRef should be specified to insert an order detail.
OrderRef A unique order reference (Example: Ref123) (Optional)
OrderRef or OrderId should be specified to insert an order detail.
OrderDetailId The unique cin7 order detail id.
OrderDetailId should be blank when inserting a new order detail.
OrderDetailId or OrderDetailImportedRef should be specified to update an order detail.
OrderDetailImportedRef A unique order detail reference (Example: Ref456) (Optional)
OrderDetailId or OrderDetailImportedRef should be specified to update an order detail.
CreatedDate Created Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
Active Order active status: 1 active, 0 disabled (Example: 1)
SKU The unique cin7 product option id. (Optional)
SKU, Barcode or Code should be specified to link a cin7 price break to the order detail.
Barcode The unique cin7 product option barcode. (Optional)
SKU, Barcode or Code should be specified to link a cin7 price break to the order detail.
Code The unique cin7 product option code. (Optional)
SKU, Barcode or Code should be specified to link a cin7 price break to the order detail.
MasterId The unique cin7 master order detail id. (Optional)
MasterId or MasterLineId should be specified to link the order detail to a master order detail.
MasterLineId The line id of the master order detail to link to. (Optional)
MasterLineId or MasterId should be specified to link the order detail to a master order detail.
Price Price (Example: 30.00) (Optional)
If this field is missing and SKU or Code is specified, the field will be updated with the linked price break value.
If a member is linked to the order the price will be taken from the price break column specified in the members PriceColumn, otherwise the retail price will be used.
If a sale price is specified in the price break it will be used if it is lower.
Qty Quantity (Example: 1.0)
Name Name (Example: Shirt) (Optional)
If this field is missing and SKU or Code is specified, the field will be updated with the linked price break value.
Discount Discount (Example: 12.00)
StyleCode Code (Example: ShirtRed123) (Optional)
If this field is missing and SKU or Code is specified, the field will be updated with the linked price break value.
Option1 Option1 (Example: Red) (Optional)
If this field is missing and SKU or Code is specified, the field will be updated with the linked price break value.
Option2 Option2 (Optional)
Option3 Option3 (Optional)
LineComments Line Comments (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.
OrderDetailId The unique cin7 order detail id.
OrderDetailImportedRef A unique order detail reference (Example: Ref456)
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)
Errors Returns "Failed" if the order detail to update was not found

Insert an order detail

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrderDetails
OrderRef,OrderDetailImportedRef,Code,Price,Qty,Name,Discount,Option1
Ref123,Ref456,ShirtRed123,30.00,1.0,Shirt,0.00,Red

Response

LineId,OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,

Insert an order detail using values from price break

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrderDetails
OrderRef,Code,Qty,Discount
Ref123,ShirtRed123,1.0,0.00

Response

LineId,OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,

Insert two order details linking the second (child) to the first (master) using LineId and MasterLineId

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrderDetails
LineId,OrderRef,Code,Qty,MasterLineId
1,Ref123,ShirtRed123,1.0,0
2,Ref123,ShirtButton123,8.0,1

Response

LineId,OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,
2,1002,Ref457,12345,Ref123,

Update quantity of order detail

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdateOrderDetails
OrderDetailId,Qty
1001,2.0

Response

LineId,OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,

Delete Order details


Delete order details using a where statement. The where statement can use any fields from the Get Order Details Response Fields.
Returns a list of deleted records or returns blank if no records were deleted.

Action

DeleteOrderDetails

Url format

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

Response Fields

Field Description
OrderDetailId The unique cin7 order detail id.
OrderDetailImportedRef A unique order detail reference (Example: Ref456)
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)

Delete all order details from an order

Request

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

Response

OrderDetailId,OrderDetailImportedRef,OrderId,OrderRef
1001,Ref456,12345,Ref123
1002,Ref457,12345,Ref123