All URIs are relative to https://api.ordercloud.io/v1
Method | HTTP request | Description |
---|---|---|
Create | POST /orders/{direction}/{orderID}/lineitems | |
Delete | DELETE /orders/{direction}/{orderID}/lineitems/{lineItemID} | |
Get | GET /orders/{direction}/{orderID}/lineitems/{lineItemID} | |
List | GET /orders/{direction}/{orderID}/lineitems | |
Patch | PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID} | |
PatchShippingAddress | PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto | |
Save | PUT /orders/{direction}/{orderID}/lineitems/{lineItemID} | |
SetShippingAddress | PUT /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto |
LineItem Create(direction, orderID, lineItem)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItem = new OrderCloud.LineItem(); // LineItem |
apiInstance.Create(direction, orderID, lineItem).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItem | LineItem |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
Delete(direction, orderID, lineItemID)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
apiInstance.Delete(direction, orderID, lineItemID).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. |
null (empty response body)
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
LineItem Get(direction, orderID, lineItemID)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
apiInstance.Get(direction, orderID, lineItemID).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
ListLineItem List(direction, orderID, opts)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var opts = {
'search': "search_example", // String | Word or phrase to search for.
'searchOn': "searchOn_example", // String | Comma-delimited list of fields to search on.
'sortBy': "sortBy_example", // String | Comma-delimited list of fields to sort by.
'page': 56, // Number | Page of results to return. Default: 1
'pageSize': 56, // Number | Number of results to return per page. Default: 20, max: 100.
'filters': {key: "filters_example"} // {String: String} | Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
};
apiInstance.List(direction, orderID, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
search | String | Word or phrase to search for. | [optional] |
searchOn | String | Comma-delimited list of fields to search on. | [optional] |
sortBy | String | Comma-delimited list of fields to sort by. | [optional] |
page | Number | Page of results to return. Default: 1 | [optional] |
pageSize | Number | Number of results to return per page. Default: 20, max: 100. | [optional] |
filters | {String: String} | Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' | [optional] |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
LineItem Patch(direction, orderID, lineItemID, partialLineItem)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
var partialLineItem = new OrderCloud.LineItem(); // LineItem |
apiInstance.Patch(direction, orderID, lineItemID, partialLineItem).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. | |
partialLineItem | LineItem |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
LineItem PatchShippingAddress(direction, orderID, lineItemID, partialAddress)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
var partialAddress = new OrderCloud.Address(); // Address |
apiInstance.PatchShippingAddress(direction, orderID, lineItemID, partialAddress).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. | |
partialAddress | Address |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
LineItem Save(direction, orderID, lineItemID, lineItem)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
var lineItem = new OrderCloud.LineItem(); // LineItem |
apiInstance.Save(direction, orderID, lineItemID, lineItem).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. | |
lineItem | LineItem |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
LineItem SetShippingAddress(direction, orderID, lineItemID, address)
var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.LineItems();
var direction = "direction_example"; // String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing.
var orderID = "orderID_example"; // String | ID of the order.
var lineItemID = "lineItemID_example"; // String | ID of the line item.
var address = new OrderCloud.Address(); // Address |
apiInstance.SetShippingAddress(direction, orderID, lineItemID, address).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. | |
orderID | String | ID of the order. | |
lineItemID | String | ID of the line item. | |
address | Address |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json