Skip to content

Latest commit

 

History

History
503 lines (318 loc) · 13.6 KB

SupplierUserGroups.md

File metadata and controls

503 lines (318 loc) · 13.6 KB

OrderCloud.SupplierUserGroups

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

Method HTTP request Description
Create POST /suppliers/{supplierID}/usergroups
Delete DELETE /suppliers/{supplierID}/usergroups/{userGroupID}
DeleteUserAssignment DELETE /suppliers/{supplierID}/usergroups/{userGroupID}/assignments/{userID}
Get GET /suppliers/{supplierID}/usergroups/{userGroupID}
List GET /suppliers/{supplierID}/usergroups
ListUserAssignments GET /suppliers/{supplierID}/usergroups/assignments
Patch PATCH /suppliers/{supplierID}/usergroups/{userGroupID}
Save PUT /suppliers/{supplierID}/usergroups/{userGroupID}
SaveUserAssignment POST /suppliers/{supplierID}/usergroups/assignments

Create

UserGroup Create(supplierID, userGroup)

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

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

var userGroup = new OrderCloud.UserGroup(); // UserGroup | 

apiInstance.Create(supplierID, userGroup).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.
userGroup UserGroup

Return type

UserGroup

Authorization

oauth2

HTTP request headers

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

Delete

Delete(supplierID, userGroupID)

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

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

var userGroupID = "userGroupID_example"; // String | ID of the user group.

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

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
userGroupID String ID of the user group.

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

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

DeleteUserAssignment

DeleteUserAssignment(supplierID, userGroupID, userID)

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

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

var userGroupID = "userGroupID_example"; // String | ID of the user group.

var userID = "userID_example"; // String | ID of the user.

apiInstance.DeleteUserAssignment(supplierID, userGroupID, userID).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
userGroupID String ID of the user group.
userID String ID of the user.

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

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

Get

UserGroup Get(supplierID, userGroupID)

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

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

var userGroupID = "userGroupID_example"; // String | ID of the user group.

apiInstance.Get(supplierID, userGroupID).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.
userGroupID String ID of the user group.

Return type

UserGroup

Authorization

oauth2

HTTP request headers

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

List

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

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

ListUserGroup

Authorization

oauth2

HTTP request headers

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

ListUserAssignments

ListUserGroupAssignment ListUserAssignments(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.SupplierUserGroups();

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

var opts = { 
  'userGroupID': "userGroupID_example", // String | ID of the user group.
  'userID': "userID_example", // String | ID of the user.
  'page': 56, // Number | Page of results to return. Default: 1
  'pageSize': 56 // Number | Number of results to return per page. Default: 20, max: 100.
};
apiInstance.ListUserAssignments(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.
userGroupID String ID of the user group. [optional]
userID String ID of the user. [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]

Return type

ListUserGroupAssignment

Authorization

oauth2

HTTP request headers

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

Patch

UserGroup Patch(supplierID, userGroupID, partialUserGroup)

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

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

var userGroupID = "userGroupID_example"; // String | ID of the user group.

var partialUserGroup = new OrderCloud.UserGroup(); // UserGroup | 

apiInstance.Patch(supplierID, userGroupID, partialUserGroup).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.
userGroupID String ID of the user group.
partialUserGroup UserGroup

Return type

UserGroup

Authorization

oauth2

HTTP request headers

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

Save

UserGroup Save(supplierID, userGroupID, userGroup)

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

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

var userGroupID = "userGroupID_example"; // String | ID of the user group.

var userGroup = new OrderCloud.UserGroup(); // UserGroup | 

apiInstance.Save(supplierID, userGroupID, userGroup).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.
userGroupID String ID of the user group.
userGroup UserGroup

Return type

UserGroup

Authorization

oauth2

HTTP request headers

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

SaveUserAssignment

SaveUserAssignment(supplierID, userGroupAssignment)

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

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

var userGroupAssignment = new OrderCloud.UserGroupAssignment(); // UserGroupAssignment | 

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

Parameters

Name Type Description Notes
supplierID String ID of the supplier.
userGroupAssignment UserGroupAssignment

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

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