Skip to content

Latest commit

 

History

History
337 lines (212 loc) · 8.86 KB

SupplierAddresses.md

File metadata and controls

337 lines (212 loc) · 8.86 KB

OrderCloud.SupplierAddresses

All URIs are relative to https://api.ordercloud.io/v1

Method HTTP request Description
Create POST /suppliers/{supplierID}/addresses
Delete DELETE /suppliers/{supplierID}/addresses/{addressID}
Get GET /suppliers/{supplierID}/addresses/{addressID}
List GET /suppliers/{supplierID}/addresses
Patch PATCH /suppliers/{supplierID}/addresses/{addressID}
Save PUT /suppliers/{supplierID}/addresses/{addressID}

Create

Address Create(supplierID, address)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

var address = new OrderCloud.Address(); // Address | 

apiInstance.Create(supplierID, address).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
address Address

Return type

Address

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Delete

Delete(supplierID, addressID)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

var addressID = "addressID_example"; // String | ID of the address.

apiInstance.Delete(supplierID, addressID).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
addressID String ID of the address.

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Get

Address Get(supplierID, addressID)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

var addressID = "addressID_example"; // String | ID of the address.

apiInstance.Get(supplierID, addressID).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
addressID String ID of the address.

Return type

Address

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

List

ListAddress List(supplierID, opts)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

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(supplierID, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
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]

Return type

ListAddress

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Patch

Address Patch(supplierID, addressID, partialAddress)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

var addressID = "addressID_example"; // String | ID of the address.

var partialAddress = new OrderCloud.Address(); // Address | 

apiInstance.Patch(supplierID, addressID, partialAddress).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
addressID String ID of the address.
partialAddress Address

Return type

Address

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Save

Address Save(supplierID, addressID, address)

Example

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.SupplierAddresses();

var supplierID = "supplierID_example"; // String | ID of the supplier.

var addressID = "addressID_example"; // String | ID of the address.

var address = new OrderCloud.Address(); // Address | 

apiInstance.Save(supplierID, addressID, address).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
addressID String ID of the address.
address Address

Return type

Address

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json