All URIs are relative to https://api.ordercloud.io/v1
Method | HTTP request | Description |
---|---|---|
Create | POST /suppliers/{supplierID}/users | |
Delete | DELETE /suppliers/{supplierID}/users/{userID} | |
Get | GET /suppliers/{supplierID}/users/{userID} | |
GetAccessToken | POST /suppliers/{supplierID}/users/{userID}/accesstoken | |
List | GET /suppliers/{supplierID}/users | |
Patch | PATCH /suppliers/{supplierID}/users/{userID} | |
Save | PUT /suppliers/{supplierID}/users/{userID} |
User Create(supplierID, user)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var user = new OrderCloud.User(); // User |
apiInstance.Create(supplierID, user).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
user | User |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
Delete(supplierID, userID)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var userID = "userID_example"; // String | ID of the user.
apiInstance.Delete(supplierID, userID).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userID | String | ID of the user. |
null (empty response body)
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
User Get(supplierID, userID)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var userID = "userID_example"; // String | ID of the user.
apiInstance.Get(supplierID, userID).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userID | String | ID of the user. |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
AccessToken GetAccessToken(supplierID, userID, impersonateTokenRequest)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var userID = "userID_example"; // String | ID of the user.
var impersonateTokenRequest = new OrderCloud.ImpersonateTokenRequest(); // ImpersonateTokenRequest |
apiInstance.GetAccessToken(supplierID, userID, impersonateTokenRequest).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userID | String | ID of the user. | |
impersonateTokenRequest | ImpersonateTokenRequest |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
ListUser List(supplierID, 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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var opts = {
'userGroupID': "userGroupID_example", // String | ID of the user group.
'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);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userGroupID | String | ID of the user group. | [optional] |
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
User Patch(supplierID, userID, partialUser)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var userID = "userID_example"; // String | ID of the user.
var partialUser = new OrderCloud.User(); // User |
apiInstance.Patch(supplierID, userID, partialUser).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userID | String | ID of the user. | |
partialUser | User |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json
User Save(supplierID, userID, user)
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.SupplierUsers();
var supplierID = "supplierID_example"; // String | ID of the supplier.
var userID = "userID_example"; // String | ID of the user.
var user = new OrderCloud.User(); // User |
apiInstance.Save(supplierID, userID, user).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
supplierID | String | ID of the supplier. | |
userID | String | ID of the user. | |
user | User |
- Content-Type: application/json, text/plain; charset=utf-8
- Accept: application/json