Commerce Webservices

Address

createAddress

Creates a new address.

Creates a new address with detailed information provided.


/{baseSiteId}/users/{userId}/addresses

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createAddress(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#createAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createAddress(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#createAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

AddressApi *apiInstance = [[AddressApi alloc] init];

// Creates a new address.
[apiInstance createAddressWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Address output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var body = ; // {{Address}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAddress(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var body = new Address(); // Address | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates a new address.
                Address result = apiInstance.createAddress(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.createAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$body = ; // Address | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createAddress($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->createAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createAddress(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressApi->createAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
body =  # Address | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates a new address.
    api_response = api_instance.create_address(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressApi->createAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getAddress

Get info about address

Returns detailed information about address with a given id.


/{baseSiteId}/users/{userId}/addresses/{addressId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.getAddress(addressId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#getAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.getAddress(addressId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#getAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *addressId = addressId_example; // Address identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

AddressApi *apiInstance = [[AddressApi alloc] init];

// Get info about address
[apiInstance getAddressWith:addressId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Address output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var addressId = addressId_example; // {{String}} Address identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAddress(addressId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var addressId = addressId_example;  // String | Address identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get info about address
                Address result = apiInstance.getAddress(addressId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.getAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$addressId = addressId_example; // String | Address identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getAddress($addressId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->getAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $addressId = addressId_example; # String | Address identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getAddress(addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressApi->getAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
addressId = addressId_example # String | Address identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get info about address
    api_response = api_instance.get_address(addressId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressApi->getAddress: %s\n" % e)

Parameters

Path parameters
Name Description
addressId*
String
Address identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getAddresses

Get customer's addresses

Returns customer's addresses.


/{baseSiteId}/users/{userId}/addresses

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressList result = apiInstance.getAddresses(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#getAddresses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressList result = apiInstance.getAddresses(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#getAddresses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

AddressApi *apiInstance = [[AddressApi alloc] init];

// Get customer's addresses
[apiInstance getAddressesWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(AddressList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAddresses(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAddressesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get customer's addresses
                AddressList result = apiInstance.getAddresses(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.getAddresses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getAddresses($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->getAddresses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getAddresses(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressApi->getAddresses: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get customer's addresses
    api_response = api_instance.get_addresses(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressApi->getAddresses: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - List of customer's addresses


removeAddress

Delete customer's address.

Removes customer's address.


/{baseSiteId}/users/{userId}/addresses/{addressId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeAddress(addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#removeAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeAddress(addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#removeAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *addressId = addressId_example; // Address identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

AddressApi *apiInstance = [[AddressApi alloc] init];

// Delete customer's address.
[apiInstance removeAddressWith:addressId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var addressId = addressId_example; // {{String}} Address identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeAddress(addressId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var addressId = addressId_example;  // String | Address identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Delete customer's address.
                apiInstance.removeAddress(addressId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.removeAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$addressId = addressId_example; // String | Address identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeAddress($addressId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->removeAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $addressId = addressId_example; # String | Address identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeAddress(addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling AddressApi->removeAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
addressId = addressId_example # String | Address identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Delete customer's address.
    api_instance.remove_address(addressId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling AddressApi->removeAddress: %s\n" % e)

Parameters

Path parameters
Name Description
addressId*
String
Address identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceAddress

Updates the address

Updates the address. Attributes not provided in the request will be defined again (set to null or default).


/{baseSiteId}/users/{userId}/addresses/{addressId}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceAddress(body, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#replaceAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replaceAddress(body, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#replaceAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *addressId = addressId_example; // Address identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

AddressApi *apiInstance = [[AddressApi alloc] init];

// Updates the address
[apiInstance replaceAddressWith:body
    addressId:addressId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var body = ; // {{Address}} 
var addressId = addressId_example; // {{String}} Address identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceAddress(bodyaddressIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var body = new Address(); // Address | 
            var addressId = addressId_example;  // String | Address identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the address
                apiInstance.replaceAddress(body, addressId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.replaceAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$body = ; // Address | 
$addressId = addressId_example; // String | Address identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replaceAddress($body, $addressId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->replaceAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $addressId = addressId_example; # String | Address identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replaceAddress(body => $body, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling AddressApi->replaceAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
body =  # Address | 
addressId = addressId_example # String | Address identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the address
    api_instance.replace_address(body, addressId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling AddressApi->replaceAddress: %s\n" % e)

Parameters

Path parameters
Name Description
addressId*
String
Address identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateAddress

Updates the address

Updates the address. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/addresses/{addressId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateAddress(body, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#updateAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String addressId = addressId_example; // String | Address identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateAddress(body, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#updateAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *addressId = addressId_example; // Address identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

AddressApi *apiInstance = [[AddressApi alloc] init];

// Updates the address
[apiInstance updateAddressWith:body
    addressId:addressId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var body = ; // {{Address}} 
var addressId = addressId_example; // {{String}} Address identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateAddress(bodyaddressIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var body = new Address(); // Address | 
            var addressId = addressId_example;  // String | Address identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the address
                apiInstance.updateAddress(body, addressId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.updateAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$body = ; // Address | 
$addressId = addressId_example; // String | Address identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateAddress($body, $addressId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->updateAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $addressId = addressId_example; # String | Address identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateAddress(body => $body, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling AddressApi->updateAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
body =  # Address | 
addressId = addressId_example # String | Address identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the address
    api_instance.update_address(body, addressId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling AddressApi->updateAddress: %s\n" % e)

Parameters

Path parameters
Name Description
addressId*
String
Address identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


validateAddress

Verifies address.

Verifies provided address.


/{baseSiteId}/users/{userId}/addresses/verification

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/addresses/verification?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AddressApi;

import java.io.File;
import java.util.*;

public class AddressApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressValidation result = apiInstance.validateAddress(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#validateAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AddressApi;

public class AddressApiExample {

    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressValidation result = apiInstance.validateAddress(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#validateAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

AddressApi *apiInstance = [[AddressApi alloc] init];

// Verifies address.
[apiInstance validateAddressWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(AddressValidation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.AddressApi()
var body = ; // {{Address}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateAddress(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class validateAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AddressApi();
            var body = new Address(); // Address | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Verifies address.
                AddressValidation result = apiInstance.validateAddress(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AddressApi.validateAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiAddressApi();
$body = ; // Address | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->validateAddress($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->validateAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AddressApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AddressApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->validateAddress(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AddressApi->validateAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AddressApi()
body =  # Address | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Verifies address.
    api_response = api_instance.validate_address(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressApi->validateAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BCarts

doAddOrgCartEntries

Adds more quantity to the cart of specific products

Updates the details of specified products in the cart, based either on the product code or the entryNumber.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.doAddOrgCartEntries(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#doAddOrgCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.doAddOrgCartEntries(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#doAddOrgCartEntries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntryList *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Adds more quantity to the cart of specific products
[apiInstance doAddOrgCartEntriesWith:body
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModificationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var body = ; // {{OrderEntryList}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddOrgCartEntries(bodybaseSiteIduserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddOrgCartEntriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var body = new OrderEntryList(); // OrderEntryList | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Adds more quantity to the cart of specific products
                CartModificationList result = apiInstance.doAddOrgCartEntries(body, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.doAddOrgCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$body = ; // OrderEntryList | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddOrgCartEntries($body, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->doAddOrgCartEntries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddOrgCartEntries(body => $body, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->doAddOrgCartEntries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
body =  # OrderEntryList | 
baseSiteId = baseSiteId_example # String | Base site identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Adds more quantity to the cart of specific products
    api_response = api_instance.do_add_org_cart_entries(body, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->doAddOrgCartEntries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCurrentOrgCart

Gets the current cart.

Gets the current cart.


/{baseSiteId}/users/{userId}/carts/current

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/current?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.getCurrentOrgCart(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#getCurrentOrgCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.getCurrentOrgCart(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#getCurrentOrgCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Gets the current cart.
[apiInstance getCurrentOrgCartWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCurrentOrgCart(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCurrentOrgCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the current cart.
                Cart result = apiInstance.getCurrentOrgCart(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.getCurrentOrgCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCurrentOrgCart($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->getCurrentOrgCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCurrentOrgCart(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->getCurrentOrgCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the current cart.
    api_response = api_instance.get_current_org_cart(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->getCurrentOrgCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceOrgCartCostCenter

Sets the cost center for the checkout cart.

Sets the cost center for the checkout cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/costcenter

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/costcenter?costCenterId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        String costCenterId = costCenterId_example; // String | The id of the cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartCostCenter(costCenterId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        String costCenterId = costCenterId_example; // String | The id of the cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartCostCenter(costCenterId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *costCenterId = costCenterId_example; // The id of the cost center.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Sets the cost center for the checkout cart.
[apiInstance replaceOrgCartCostCenterWith:costCenterId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var costCenterId = costCenterId_example; // {{String}} The id of the cost center.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceOrgCartCostCenter(costCenterId, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceOrgCartCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var costCenterId = costCenterId_example;  // String | The id of the cost center.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Sets the cost center for the checkout cart.
                Cart result = apiInstance.replaceOrgCartCostCenter(costCenterId, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.replaceOrgCartCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$costCenterId = costCenterId_example; // String | The id of the cost center.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceOrgCartCostCenter($costCenterId, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->replaceOrgCartCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $costCenterId = costCenterId_example; # String | The id of the cost center.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceOrgCartCostCenter(costCenterId => $costCenterId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->replaceOrgCartCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
costCenterId = costCenterId_example # String | The id of the cost center.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Sets the cost center for the checkout cart.
    api_response = api_instance.replace_org_cart_cost_center(costCenterId, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->replaceOrgCartCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
costCenterId*
String
The id of the cost center.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceOrgCartDeliveryAddress

Sets the delivery address for the checkout cart.

Sets the delivery address for the checkout cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery?addressId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        String addressId = addressId_example; // String | The id of the address.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartDeliveryAddress(addressId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        String addressId = addressId_example; // String | The id of the address.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartDeliveryAddress(addressId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *addressId = addressId_example; // The id of the address.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Sets the delivery address for the checkout cart.
[apiInstance replaceOrgCartDeliveryAddressWith:addressId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var addressId = addressId_example; // {{String}} The id of the address.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceOrgCartDeliveryAddress(addressId, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceOrgCartDeliveryAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var addressId = addressId_example;  // String | The id of the address.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Sets the delivery address for the checkout cart.
                Cart result = apiInstance.replaceOrgCartDeliveryAddress(addressId, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.replaceOrgCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$addressId = addressId_example; // String | The id of the address.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceOrgCartDeliveryAddress($addressId, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->replaceOrgCartDeliveryAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $addressId = addressId_example; # String | The id of the address.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceOrgCartDeliveryAddress(addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->replaceOrgCartDeliveryAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
addressId = addressId_example # String | The id of the address.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Sets the delivery address for the checkout cart.
    api_response = api_instance.replace_org_cart_delivery_address(addressId, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->replaceOrgCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
addressId*
String
The id of the address.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceOrgCartEntries

Updates the quantity for specific products in the cart

Creates the specified products in the cart, or overwrites the details of existing products in the cart, based either on the product code or the entryNumber. For existing products, attributes not provided in the request body will be defined again (set to null or default).


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.replaceOrgCartEntries(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        OrderEntryList body = ; // OrderEntryList | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.replaceOrgCartEntries(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartEntries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntryList *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Updates the quantity for specific products in the cart
[apiInstance replaceOrgCartEntriesWith:body
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModificationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var body = ; // {{OrderEntryList}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceOrgCartEntries(bodybaseSiteIduserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceOrgCartEntriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var body = new OrderEntryList(); // OrderEntryList | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Updates the quantity for specific products in the cart
                CartModificationList result = apiInstance.replaceOrgCartEntries(body, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.replaceOrgCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$body = ; // OrderEntryList | 
$baseSiteId = baseSiteId_example; // String | Base site identifier.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceOrgCartEntries($body, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->replaceOrgCartEntries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntryList->new(); # OrderEntryList | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceOrgCartEntries(body => $body, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->replaceOrgCartEntries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
body =  # OrderEntryList | 
baseSiteId = baseSiteId_example # String | Base site identifier.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Updates the quantity for specific products in the cart
    api_response = api_instance.replace_org_cart_entries(body, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->replaceOrgCartEntries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceOrgCartPaymentType

Set the payment type for the checkout cart

Sets the payment type for the checkout cart. If the purchaseOrderNumber is not null, the purchaseOrderNumber is also assigned to the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/paymenttype

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymenttype?paymentType=&purchaseOrderNumber=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCartsApi;

import java.io.File;
import java.util.*;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCartsApi apiInstance = new B2BCartsApi();
        String paymentType = paymentType_example; // String | Payment type choice (between card and account).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartPaymentType(paymentType, baseSiteId, userId, cartId, purchaseOrderNumber, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartPaymentType");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCartsApi;

public class B2BCartsApiExample {

    public static void main(String[] args) {
        B2BCartsApi apiInstance = new B2BCartsApi();
        String paymentType = paymentType_example; // String | Payment type choice (between card and account).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.replaceOrgCartPaymentType(paymentType, baseSiteId, userId, cartId, purchaseOrderNumber, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCartsApi#replaceOrgCartPaymentType");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *paymentType = paymentType_example; // Payment type choice (between card and account).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *purchaseOrderNumber = purchaseOrderNumber_example; // Purchase order number to assign to the checkout cart. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCartsApi *apiInstance = [[B2BCartsApi alloc] init];

// Set the payment type for the checkout cart
[apiInstance replaceOrgCartPaymentTypeWith:paymentType
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    purchaseOrderNumber:purchaseOrderNumber
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCartsApi()
var paymentType = paymentType_example; // {{String}} Payment type choice (between card and account).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'purchaseOrderNumber': purchaseOrderNumber_example, // {{String}} Purchase order number to assign to the checkout cart.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceOrgCartPaymentType(paymentType, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceOrgCartPaymentTypeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCartsApi();
            var paymentType = paymentType_example;  // String | Payment type choice (between card and account).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var purchaseOrderNumber = purchaseOrderNumber_example;  // String | Purchase order number to assign to the checkout cart. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Set the payment type for the checkout cart
                Cart result = apiInstance.replaceOrgCartPaymentType(paymentType, baseSiteId, userId, cartId, purchaseOrderNumber, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCartsApi.replaceOrgCartPaymentType: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCartsApi();
$paymentType = paymentType_example; // String | Payment type choice (between card and account).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$purchaseOrderNumber = purchaseOrderNumber_example; // String | Purchase order number to assign to the checkout cart.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceOrgCartPaymentType($paymentType, $baseSiteId, $userId, $cartId, $purchaseOrderNumber, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCartsApi->replaceOrgCartPaymentType: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCartsApi->new();
my $paymentType = paymentType_example; # String | Payment type choice (between card and account).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $purchaseOrderNumber = purchaseOrderNumber_example; # String | Purchase order number to assign to the checkout cart.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceOrgCartPaymentType(paymentType => $paymentType, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, purchaseOrderNumber => $purchaseOrderNumber, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCartsApi->replaceOrgCartPaymentType: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCartsApi()
paymentType = paymentType_example # String | Payment type choice (between card and account).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
purchaseOrderNumber = purchaseOrderNumber_example # String | Purchase order number to assign to the checkout cart. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Set the payment type for the checkout cart
    api_response = api_instance.replace_org_cart_payment_type(paymentType, baseSiteId, userId, cartId, purchaseOrderNumber=purchaseOrderNumber, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCartsApi->replaceOrgCartPaymentType: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
paymentType*
String
Payment type choice (between card and account).
Required
purchaseOrderNumber
String
Purchase order number to assign to the checkout cart.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BCategories

getProductsByCategory

Gets a list of products under a specific category

Returns a list of products in the specified category.


/{baseSiteId}/categories/{categoryId}/products

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/categories/{categoryId}/products?query=¤tPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCategoriesApi;

import java.io.File;
import java.util.*;

public class B2BCategoriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCategoriesApi apiInstance = new B2BCategoriesApi();
        String categoryId = categoryId_example; // String | The category ID
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductSearchPage result = apiInstance.getProductsByCategory(categoryId, baseSiteId, query, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCategoriesApi#getProductsByCategory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCategoriesApi;

public class B2BCategoriesApiExample {

    public static void main(String[] args) {
        B2BCategoriesApi apiInstance = new B2BCategoriesApi();
        String categoryId = categoryId_example; // String | The category ID
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductSearchPage result = apiInstance.getProductsByCategory(categoryId, baseSiteId, query, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCategoriesApi#getProductsByCategory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *categoryId = categoryId_example; // The category ID
String *baseSiteId = baseSiteId_example; // Base site identifier
String *query = query_example; // Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the display search results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCategoriesApi *apiInstance = [[B2BCategoriesApi alloc] init];

// Gets a list of products under a specific category
[apiInstance getProductsByCategoryWith:categoryId
    baseSiteId:baseSiteId
    query:query
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(ProductSearchPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCategoriesApi()
var categoryId = categoryId_example; // {{String}} The category ID
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'query': query_example, // {{String}} Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the display search results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProductsByCategory(categoryId, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProductsByCategoryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCategoriesApi();
            var categoryId = categoryId_example;  // String | The category ID
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var query = query_example;  // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional) 
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the display search results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets a list of products under a specific category
                ProductSearchPage result = apiInstance.getProductsByCategory(categoryId, baseSiteId, query, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCategoriesApi.getProductsByCategory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCategoriesApi();
$categoryId = categoryId_example; // String | The category ID
$baseSiteId = baseSiteId_example; // String | Base site identifier
$query = query_example; // String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the display search results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getProductsByCategory($categoryId, $baseSiteId, $query, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCategoriesApi->getProductsByCategory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCategoriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCategoriesApi->new();
my $categoryId = categoryId_example; # String | The category ID
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $query = query_example; # String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the display search results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getProductsByCategory(categoryId => $categoryId, baseSiteId => $baseSiteId, query => $query, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCategoriesApi->getProductsByCategory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCategoriesApi()
categoryId = categoryId_example # String | The category ID
baseSiteId = baseSiteId_example # String | Base site identifier
query = query_example # String | Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2 (optional)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the display search results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets a list of products under a specific category
    api_response = api_instance.get_products_by_category(categoryId, baseSiteId, query=query, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCategoriesApi->getProductsByCategory: %s\n" % e)

Parameters

Path parameters
Name Description
categoryId*
String
The category ID
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
query
String
Serialized query in format: freeTextSearch: sort: facetKey1: facetValue1: facetKey2: facetValue2
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the display search results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BCostCenters

createCostCenter

Create a new cost center.

Creates a new cost center.


/{baseSiteId}/costcenters

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        B2BCostCenter body = ; // B2BCostCenter | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.createCostCenter(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#createCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        B2BCostCenter body = ; // B2BCostCenter | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.createCostCenter(body, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#createCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
B2BCostCenter *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Create a new cost center.
[apiInstance createCostCenterWith:body
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(B2BCostCenter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var body = ; // {{B2BCostCenter}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCostCenter(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var body = new B2BCostCenter(); // B2BCostCenter | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Create a new cost center.
                B2BCostCenter result = apiInstance.createCostCenter(body, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.createCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$body = ; // B2BCostCenter | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createCostCenter($body, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->createCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $body = WWW::SwaggerClient::Object::B2BCostCenter->new(); # B2BCostCenter | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createCostCenter(body => $body, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->createCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
body =  # B2BCostCenter | 
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Create a new cost center.
    api_response = api_instance.create_cost_center(body, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->createCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddBudgetToCostCenter

Add a budget to a specific cost center.

Adds a budget to a specific cost center.


/{baseSiteId}/costcenters/{costCenterCode}/budgets

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters/{costCenterCode}/budgets?budgetCode=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
        String budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddBudgetToCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#doAddBudgetToCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
        String budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddBudgetToCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#doAddBudgetToCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *costCenterCode = costCenterCode_example; // Identifier of the cost center to which the budget will be added.
String *budgetCode = budgetCode_example; // The budget which will be added to a specific cost center.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Add a budget to a specific cost center.
[apiInstance doAddBudgetToCostCenterWith:costCenterCode
    budgetCode:budgetCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var costCenterCode = costCenterCode_example; // {{String}} Identifier of the cost center to which the budget will be added.
var budgetCode = budgetCode_example; // {{String}} The budget which will be added to a specific cost center.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddBudgetToCostCenter(costCenterCode, budgetCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddBudgetToCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var costCenterCode = costCenterCode_example;  // String | Identifier of the cost center to which the budget will be added.
            var budgetCode = budgetCode_example;  // String | The budget which will be added to a specific cost center.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add a budget to a specific cost center.
                B2BSelectionData result = apiInstance.doAddBudgetToCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.doAddBudgetToCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$costCenterCode = costCenterCode_example; // String | Identifier of the cost center to which the budget will be added.
$budgetCode = budgetCode_example; // String | The budget which will be added to a specific cost center.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddBudgetToCostCenter($costCenterCode, $budgetCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->doAddBudgetToCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $costCenterCode = costCenterCode_example; # String | Identifier of the cost center to which the budget will be added.
my $budgetCode = budgetCode_example; # String | The budget which will be added to a specific cost center.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddBudgetToCostCenter(costCenterCode => $costCenterCode, budgetCode => $budgetCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->doAddBudgetToCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
costCenterCode = costCenterCode_example # String | Identifier of the cost center to which the budget will be added.
budgetCode = budgetCode_example # String | The budget which will be added to a specific cost center.
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add a budget to a specific cost center.
    api_response = api_instance.do_add_budget_to_cost_center(costCenterCode, budgetCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->doAddBudgetToCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
costCenterCode*
String
Identifier of the cost center to which the budget will be added.
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
budgetCode*
String
The budget which will be added to a specific cost center.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getActiveCostCenters

Get active cost centers.

Returns the list of all active cost centers.


/{baseSiteId}/costcenters

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenterList result = apiInstance.getActiveCostCenters(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getActiveCostCenters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenterList result = apiInstance.getActiveCostCenters(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getActiveCostCenters");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Get active cost centers.
[apiInstance getActiveCostCentersWith:baseSiteId
    fields:fields
              completionHandler: ^(B2BCostCenterList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getActiveCostCenters(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getActiveCostCentersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get active cost centers.
                B2BCostCenterList result = apiInstance.getActiveCostCenters(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.getActiveCostCenters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getActiveCostCenters($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->getActiveCostCenters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getActiveCostCenters(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->getActiveCostCenters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get active cost centers.
    api_response = api_instance.get_active_cost_centers(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->getActiveCostCenters: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getBudgetsForCostCenter

Get all budgets and select budgets which belong to a specific cost center.

Returns the list of all budgets, where those budgets, which belong to a specific cost center, are selected.


/{baseSiteId}/costcenters/{costCenterCode}/budgets

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters/{costCenterCode}/budgets?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BudgetList result = apiInstance.getBudgetsForCostCenter(costCenterCode, baseSiteId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getBudgetsForCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BudgetList result = apiInstance.getBudgetsForCostCenter(costCenterCode, baseSiteId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getBudgetsForCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *costCenterCode = costCenterCode_example; // Cost center identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Get all budgets and select budgets which belong to a specific cost center.
[apiInstance getBudgetsForCostCenterWith:costCenterCode
    baseSiteId:baseSiteId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(BudgetList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var costCenterCode = costCenterCode_example; // {{String}} Cost center identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBudgetsForCostCenter(costCenterCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBudgetsForCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var costCenterCode = costCenterCode_example;  // String | Cost center identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get all budgets and select budgets which belong to a specific cost center.
                BudgetList result = apiInstance.getBudgetsForCostCenter(costCenterCode, baseSiteId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.getBudgetsForCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$costCenterCode = costCenterCode_example; // String | Cost center identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBudgetsForCostCenter($costCenterCode, $baseSiteId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->getBudgetsForCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $costCenterCode = costCenterCode_example; # String | Cost center identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBudgetsForCostCenter(costCenterCode => $costCenterCode, baseSiteId => $baseSiteId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->getBudgetsForCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
costCenterCode = costCenterCode_example # String | Cost center identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get all budgets and select budgets which belong to a specific cost center.
    api_response = api_instance.get_budgets_for_cost_center(costCenterCode, baseSiteId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->getBudgetsForCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
costCenterCode*
String
Cost center identifier.
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCostCenter

Get a cost center.

Returns a specific cost center based on specific code. The response contains detailed cost center information.


/{baseSiteId}/costcenters/{costCenterCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters/{costCenterCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.getCostCenter(costCenterCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.getCostCenter(costCenterCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *costCenterCode = costCenterCode_example; // Cost center identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Get a cost center.
[apiInstance getCostCenterWith:costCenterCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(B2BCostCenter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var costCenterCode = costCenterCode_example; // {{String}} Cost center identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCostCenter(costCenterCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var costCenterCode = costCenterCode_example;  // String | Cost center identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a cost center.
                B2BCostCenter result = apiInstance.getCostCenter(costCenterCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.getCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$costCenterCode = costCenterCode_example; // String | Cost center identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCostCenter($costCenterCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->getCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $costCenterCode = costCenterCode_example; # String | Cost center identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCostCenter(costCenterCode => $costCenterCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->getCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
costCenterCode = costCenterCode_example # String | Cost center identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a cost center.
    api_response = api_instance.get_cost_center(costCenterCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->getCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
costCenterCode*
String
Cost center identifier.
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCostCenters

Get cost centers.

Returns the list of all cost centers.


/{baseSiteId}/costcentersall

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcentersall?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getCostCenters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#getCostCenters");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Get cost centers.
[apiInstance getCostCentersWith:baseSiteId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(B2BCostCenterList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCostCenters(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCostCentersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get cost centers.
                B2BCostCenterList result = apiInstance.getCostCenters(baseSiteId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.getCostCenters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCostCenters($baseSiteId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->getCostCenters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCostCenters(baseSiteId => $baseSiteId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->getCostCenters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get cost centers.
    api_response = api_instance.get_cost_centers(baseSiteId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->getCostCenters: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeBudgetFromCostCenter

Remove a budget from a specific cost center.

Removes a budget from a specific cost center.


/{baseSiteId}/costcenters/{costCenterCode}/budgets/{budgetCode}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters/{costCenterCode}/budgets/{budgetCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
        String budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeBudgetFromCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#removeBudgetFromCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        String costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
        String budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeBudgetFromCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#removeBudgetFromCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *costCenterCode = costCenterCode_example; // Identifier of the cost center from which the budget will be removed.
String *budgetCode = budgetCode_example; // The budget which will be removed from a specific cost center.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Remove a budget from a specific cost center.
[apiInstance removeBudgetFromCostCenterWith:costCenterCode
    budgetCode:budgetCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var costCenterCode = costCenterCode_example; // {{String}} Identifier of the cost center from which the budget will be removed.
var budgetCode = budgetCode_example; // {{String}} The budget which will be removed from a specific cost center.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeBudgetFromCostCenter(costCenterCode, budgetCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeBudgetFromCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var costCenterCode = costCenterCode_example;  // String | Identifier of the cost center from which the budget will be removed.
            var budgetCode = budgetCode_example;  // String | The budget which will be removed from a specific cost center.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Remove a budget from a specific cost center.
                B2BSelectionData result = apiInstance.removeBudgetFromCostCenter(costCenterCode, budgetCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.removeBudgetFromCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$costCenterCode = costCenterCode_example; // String | Identifier of the cost center from which the budget will be removed.
$budgetCode = budgetCode_example; // String | The budget which will be removed from a specific cost center.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->removeBudgetFromCostCenter($costCenterCode, $budgetCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->removeBudgetFromCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $costCenterCode = costCenterCode_example; # String | Identifier of the cost center from which the budget will be removed.
my $budgetCode = budgetCode_example; # String | The budget which will be removed from a specific cost center.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->removeBudgetFromCostCenter(costCenterCode => $costCenterCode, budgetCode => $budgetCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->removeBudgetFromCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
costCenterCode = costCenterCode_example # String | Identifier of the cost center from which the budget will be removed.
budgetCode = budgetCode_example # String | The budget which will be removed from a specific cost center.
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Remove a budget from a specific cost center.
    api_response = api_instance.remove_budget_from_cost_center(costCenterCode, budgetCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->removeBudgetFromCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
costCenterCode*
String
Identifier of the cost center from which the budget will be removed.
Required
budgetCode*
String
The budget which will be removed from a specific cost center.
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateCostCenter

Update a cost center.

Updates a cost center. Only attributes provided in the request body will be changed.


/{baseSiteId}/costcenters/{costCenterCode}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/costcenters/{costCenterCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BCostCentersApi;

import java.io.File;
import java.util.*;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        B2BCostCenter body = ; // B2BCostCenter | 
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.updateCostCenter(body, costCenterCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#updateCostCenter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCostCentersApi;

public class B2BCostCentersApiExample {

    public static void main(String[] args) {
        B2BCostCentersApi apiInstance = new B2BCostCentersApi();
        B2BCostCenter body = ; // B2BCostCenter | 
        String costCenterCode = costCenterCode_example; // String | Cost center identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BCostCenter result = apiInstance.updateCostCenter(body, costCenterCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCostCentersApi#updateCostCenter");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
B2BCostCenter *body = ; // 
String *costCenterCode = costCenterCode_example; // Cost center identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BCostCentersApi *apiInstance = [[B2BCostCentersApi alloc] init];

// Update a cost center.
[apiInstance updateCostCenterWith:body
    costCenterCode:costCenterCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(B2BCostCenter output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BCostCentersApi()
var body = ; // {{B2BCostCenter}} 
var costCenterCode = costCenterCode_example; // {{String}} Cost center identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateCostCenter(bodycostCenterCodebaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateCostCenterExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BCostCentersApi();
            var body = new B2BCostCenter(); // B2BCostCenter | 
            var costCenterCode = costCenterCode_example;  // String | Cost center identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Update a cost center.
                B2BCostCenter result = apiInstance.updateCostCenter(body, costCenterCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCostCentersApi.updateCostCenter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BCostCentersApi();
$body = ; // B2BCostCenter | 
$costCenterCode = costCenterCode_example; // String | Cost center identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->updateCostCenter($body, $costCenterCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCostCentersApi->updateCostCenter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCostCentersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BCostCentersApi->new();
my $body = WWW::SwaggerClient::Object::B2BCostCenter->new(); # B2BCostCenter | 
my $costCenterCode = costCenterCode_example; # String | Cost center identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->updateCostCenter(body => $body, costCenterCode => $costCenterCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCostCentersApi->updateCostCenter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BCostCentersApi()
body =  # B2BCostCenter | 
costCenterCode = costCenterCode_example # String | Cost center identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Update a cost center.
    api_response = api_instance.update_cost_center(body, costCenterCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCostCentersApi->updateCostCenter: %s\n" % e)

Parameters

Path parameters
Name Description
costCenterCode*
String
Cost center identifier.
Required
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BMiscs

getPaymentTypes

Returns a list of the available payment types.

Returns a list of the available payment types in the B2B checkout process.


/{baseSiteId}/paymenttypes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/paymenttypes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BMiscsApi;

import java.io.File;
import java.util.*;

public class B2BMiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BMiscsApi apiInstance = new B2BMiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BPaymentTypeList result = apiInstance.getPaymentTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BMiscsApi#getPaymentTypes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BMiscsApi;

public class B2BMiscsApiExample {

    public static void main(String[] args) {
        B2BMiscsApi apiInstance = new B2BMiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BPaymentTypeList result = apiInstance.getPaymentTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BMiscsApi#getPaymentTypes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BMiscsApi *apiInstance = [[B2BMiscsApi alloc] init];

// Returns a list of the available payment types.
[apiInstance getPaymentTypesWith:baseSiteId
    fields:fields
              completionHandler: ^(B2BPaymentTypeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BMiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPaymentTypes(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPaymentTypesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BMiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Returns a list of the available payment types.
                B2BPaymentTypeList result = apiInstance.getPaymentTypes(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BMiscsApi.getPaymentTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getPaymentTypes($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BMiscsApi->getPaymentTypes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BMiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BMiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getPaymentTypes(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BMiscsApi->getPaymentTypes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BMiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Returns a list of the available payment types.
    api_response = api_instance.get_payment_types(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BMiscsApi->getPaymentTypes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BOrders

createCartFromOrder

Create a cart based on a previous order

Returns a list of modification applied to the new cart compared to original. e.g lower quantity was added


/{baseSiteId}/users/{userId}/cartFromOrder

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/cartFromOrder?orderCode=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BOrdersApi;

import java.io.File;
import java.util.*;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BOrdersApi apiInstance = new B2BOrdersApi();
        String orderCode = orderCode_example; // String | The order code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModificationList result = apiInstance.createCartFromOrder(orderCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createCartFromOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BOrdersApi;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        B2BOrdersApi apiInstance = new B2BOrdersApi();
        String orderCode = orderCode_example; // String | The order code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            CartModificationList result = apiInstance.createCartFromOrder(orderCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createCartFromOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orderCode = orderCode_example; // The order code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

B2BOrdersApi *apiInstance = [[B2BOrdersApi alloc] init];

// Create a cart based on a previous order
[apiInstance createCartFromOrderWith:orderCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(CartModificationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BOrdersApi()
var orderCode = orderCode_example; // {{String}} The order code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCartFromOrder(orderCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartFromOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BOrdersApi();
            var orderCode = orderCode_example;  // String | The order code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Create a cart based on a previous order
                CartModificationList result = apiInstance.createCartFromOrder(orderCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.createCartFromOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BOrdersApi();
$orderCode = orderCode_example; // String | The order code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

try {
    $result = $api_instance->createCartFromOrder($orderCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BOrdersApi->createCartFromOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BOrdersApi->new();
my $orderCode = orderCode_example; # String | The order code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.

eval { 
    my $result = $api_instance->createCartFromOrder(orderCode => $orderCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BOrdersApi->createCartFromOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BOrdersApi()
orderCode = orderCode_example # String | The order code
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Create a cart based on a previous order
    api_response = api_instance.create_cart_from_order(orderCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BOrdersApi->createCartFromOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
orderCode*
String
The order code
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body.

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


createReplenishmentOrder

Creates an Order and schedules Replenishment.

Creates an Order and schedules Replenishment. By default the payment type is ACCOUNT. Please set payment type to CARD if placing an order using credit card.


/{baseSiteId}/users/{userId}/replenishmentOrders

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/replenishmentOrders?cartId=&termsChecked=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BOrdersApi;

import java.io.File;
import java.util.*;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BOrdersApi apiInstance = new B2BOrdersApi();
        ScheduleReplenishmentForm body = ; // ScheduleReplenishmentForm | 
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BOrdersApi;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        B2BOrdersApi apiInstance = new B2BOrdersApi();
        ScheduleReplenishmentForm body = ; // ScheduleReplenishmentForm | 
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#createReplenishmentOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ScheduleReplenishmentForm *body = ; // 
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Boolean *termsChecked = true; // Whether terms were accepted or not.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BOrdersApi *apiInstance = [[B2BOrdersApi alloc] init];

// Creates an Order and schedules Replenishment.
[apiInstance createReplenishmentOrderWith:body
    cartId:cartId
    termsChecked:termsChecked
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ReplenishmentOrder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BOrdersApi()
var body = ; // {{ScheduleReplenishmentForm}} 
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var termsChecked = true; // {{Boolean}} Whether terms were accepted or not.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createReplenishmentOrder(bodycartIdtermsCheckedbaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createReplenishmentOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BOrdersApi();
            var body = new ScheduleReplenishmentForm(); // ScheduleReplenishmentForm | 
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var termsChecked = true;  // Boolean | Whether terms were accepted or not.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates an Order and schedules Replenishment.
                ReplenishmentOrder result = apiInstance.createReplenishmentOrder(body, cartId, termsChecked, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.createReplenishmentOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BOrdersApi();
$body = ; // ScheduleReplenishmentForm | 
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$termsChecked = true; // Boolean | Whether terms were accepted or not.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createReplenishmentOrder($body, $cartId, $termsChecked, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BOrdersApi->createReplenishmentOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BOrdersApi->new();
my $body = WWW::SwaggerClient::Object::ScheduleReplenishmentForm->new(); # ScheduleReplenishmentForm | 
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $termsChecked = true; # Boolean | Whether terms were accepted or not.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createReplenishmentOrder(body => $body, cartId => $cartId, termsChecked => $termsChecked, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BOrdersApi->createReplenishmentOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BOrdersApi()
body =  # ScheduleReplenishmentForm | 
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
termsChecked = true # Boolean | Whether terms were accepted or not.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates an Order and schedules Replenishment.
    api_response = api_instance.create_replenishment_order(body, cartId, termsChecked, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BOrdersApi->createReplenishmentOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
termsChecked*
Boolean
Whether terms were accepted or not.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


placeOrgOrder

Places a B2B Order.

Places a B2B Order. By default the payment type is ACCOUNT. Please set payment type to CARD if placing an order using credit card.


/{baseSiteId}/users/{userId}/orders

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders?cartId=&termsChecked=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BOrdersApi;

import java.io.File;
import java.util.*;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BOrdersApi apiInstance = new B2BOrdersApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.placeOrgOrder(cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#placeOrgOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BOrdersApi;

public class B2BOrdersApiExample {

    public static void main(String[] args) {
        B2BOrdersApi apiInstance = new B2BOrdersApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean termsChecked = true; // Boolean | Whether terms were accepted or not.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.placeOrgOrder(cartId, termsChecked, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BOrdersApi#placeOrgOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Boolean *termsChecked = true; // Whether terms were accepted or not.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BOrdersApi *apiInstance = [[B2BOrdersApi alloc] init];

// Places a B2B Order.
[apiInstance placeOrgOrderWith:cartId
    termsChecked:termsChecked
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Order output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BOrdersApi()
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var termsChecked = true; // {{Boolean}} Whether terms were accepted or not.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.placeOrgOrder(cartId, termsChecked, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class placeOrgOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BOrdersApi();
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var termsChecked = true;  // Boolean | Whether terms were accepted or not.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Places a B2B Order.
                Order result = apiInstance.placeOrgOrder(cartId, termsChecked, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BOrdersApi.placeOrgOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BOrdersApi();
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$termsChecked = true; // Boolean | Whether terms were accepted or not.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->placeOrgOrder($cartId, $termsChecked, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BOrdersApi->placeOrgOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BOrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BOrdersApi->new();
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $termsChecked = true; # Boolean | Whether terms were accepted or not.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->placeOrgOrder(cartId => $cartId, termsChecked => $termsChecked, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BOrdersApi->placeOrgOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BOrdersApi()
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
termsChecked = true # Boolean | Whether terms were accepted or not.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Places a B2B Order.
    api_response = api_instance.place_org_order(cartId, termsChecked, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BOrdersApi->placeOrgOrder: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
termsChecked*
Boolean
Whether terms were accepted or not.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BProducts

getOrgProduct

Returns a product.

Returns a product, based on the specified product code.


/{baseSiteId}/products/{productCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/products/{productCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BProductsApi;

import java.io.File;
import java.util.*;

public class B2BProductsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BProductsApi apiInstance = new B2BProductsApi();
        String productCode = productCode_example; // String | The product code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Product result = apiInstance.getOrgProduct(productCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BProductsApi#getOrgProduct");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BProductsApi;

public class B2BProductsApiExample {

    public static void main(String[] args) {
        B2BProductsApi apiInstance = new B2BProductsApi();
        String productCode = productCode_example; // String | The product code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Product result = apiInstance.getOrgProduct(productCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BProductsApi#getOrgProduct");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *productCode = productCode_example; // The product code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BProductsApi *apiInstance = [[B2BProductsApi alloc] init];

// Returns a product.
[apiInstance getOrgProductWith:productCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(Product output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BProductsApi()
var productCode = productCode_example; // {{String}} The product code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgProduct(productCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgProductExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BProductsApi();
            var productCode = productCode_example;  // String | The product code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Returns a product.
                Product result = apiInstance.getOrgProduct(productCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BProductsApi.getOrgProduct: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BProductsApi();
$productCode = productCode_example; // String | The product code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgProduct($productCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BProductsApi->getOrgProduct: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BProductsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BProductsApi->new();
my $productCode = productCode_example; # String | The product code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgProduct(productCode => $productCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BProductsApi->getOrgProduct: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BProductsApi()
productCode = productCode_example # String | The product code
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Returns a product.
    api_response = api_instance.get_org_product(productCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BProductsApi->getOrgProduct: %s\n" % e)

Parameters

Path parameters
Name Description
productCode*
String
The product code
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


B2BUsers

createRegistrationRequest

Create a registration request for a B2B user

Create a registration request for a B2B user.


/{baseSiteId}/orgUsers

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/orgUsers?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BUsersApi;

import java.io.File;
import java.util.*;

public class B2BUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BUsersApi apiInstance = new B2BUsersApi();
        OrgUserRegistrationData body = ; // OrgUserRegistrationData | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            apiInstance.createRegistrationRequest(body, baseSiteId, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#createRegistrationRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BUsersApi;

public class B2BUsersApiExample {

    public static void main(String[] args) {
        B2BUsersApi apiInstance = new B2BUsersApi();
        OrgUserRegistrationData body = ; // OrgUserRegistrationData | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            apiInstance.createRegistrationRequest(body, baseSiteId, fields);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#createRegistrationRequest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgUserRegistrationData *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BUsersApi *apiInstance = [[B2BUsersApi alloc] init];

// Create a registration request for a B2B user
[apiInstance createRegistrationRequestWith:body
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BUsersApi()
var body = ; // {{OrgUserRegistrationData}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createRegistrationRequest(bodybaseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createRegistrationRequestExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BUsersApi();
            var body = new OrgUserRegistrationData(); // OrgUserRegistrationData | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Create a registration request for a B2B user
                apiInstance.createRegistrationRequest(body, baseSiteId, fields);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BUsersApi.createRegistrationRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BUsersApi();
$body = ; // OrgUserRegistrationData | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $api_instance->createRegistrationRequest($body, $baseSiteId, $fields);
} catch (Exception $e) {
    echo 'Exception when calling B2BUsersApi->createRegistrationRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BUsersApi->new();
my $body = WWW::SwaggerClient::Object::OrgUserRegistrationData->new(); # OrgUserRegistrationData | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    $api_instance->createRegistrationRequest(body => $body, baseSiteId => $baseSiteId, fields => $fields);
};
if ($@) {
    warn "Exception when calling B2BUsersApi->createRegistrationRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BUsersApi()
body =  # OrgUserRegistrationData | 
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Create a registration request for a B2B user
    api_instance.create_registration_request(body, baseSiteId, fields=fields)
except ApiException as e:
    print("Exception when calling B2BUsersApi->createRegistrationRequest: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getOrgUser

Get a B2B user profile

Returns a B2B user profile.


/{baseSiteId}/users/{userId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BUsersApi;

import java.io.File;
import java.util.*;

public class B2BUsersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        B2BUsersApi apiInstance = new B2BUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.getOrgUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#getOrgUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BUsersApi;

public class B2BUsersApiExample {

    public static void main(String[] args) {
        B2BUsersApi apiInstance = new B2BUsersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.getOrgUser(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BUsersApi#getOrgUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

B2BUsersApi *apiInstance = [[B2BUsersApi alloc] init];

// Get a B2B user profile
[apiInstance getOrgUserWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.B2BUsersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUser(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new B2BUsersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a B2B user profile
                User result = apiInstance.getOrgUser(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BUsersApi.getOrgUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiB2BUsersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUser($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BUsersApi->getOrgUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BUsersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::B2BUsersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUser(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BUsersApi->getOrgUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.B2BUsersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a B2B user profile
    api_response = api_instance.get_org_user(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BUsersApi->getOrgUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


BaseSites

getBaseSites

Get all base sites.

Get all base sites with corresponding base stores details in FULL mode.


/basesites

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/basesites?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BaseSitesApi;

import java.io.File;
import java.util.*;

public class BaseSitesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BaseSitesApi apiInstance = new BaseSitesApi();
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseSiteList result = apiInstance.getBaseSites(fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BaseSitesApi#getBaseSites");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BaseSitesApi;

public class BaseSitesApiExample {

    public static void main(String[] args) {
        BaseSitesApi apiInstance = new BaseSitesApi();
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseSiteList result = apiInstance.getBaseSites(fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BaseSitesApi#getBaseSites");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BaseSitesApi *apiInstance = [[BaseSitesApi alloc] init];

// Get all base sites.
[apiInstance getBaseSitesWith:fields
              completionHandler: ^(BaseSiteList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BaseSitesApi()
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBaseSites(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBaseSitesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BaseSitesApi();
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get all base sites.
                BaseSiteList result = apiInstance.getBaseSites(fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BaseSitesApi.getBaseSites: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBaseSitesApi();
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBaseSites($fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BaseSitesApi->getBaseSites: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BaseSitesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BaseSitesApi->new();
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBaseSites(fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BaseSitesApi->getBaseSites: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BaseSitesApi()
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get all base sites.
    api_response = api_instance.get_base_sites(fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BaseSitesApi->getBaseSites: %s\n" % e)

Parameters

Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


BaseStores

getBaseStore

Get a base store.

Returns details of a specific base store based on its identifier. The response contains detailed base store information.


/{baseSiteId}/basestores/{baseStoreUid}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/basestores/{baseStoreUid}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BaseStoresApi;

import java.io.File;
import java.util.*;

public class BaseStoresApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BaseStoresApi apiInstance = new BaseStoresApi();
        String baseStoreUid = baseStoreUid_example; // String | Base store name
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseStore result = apiInstance.getBaseStore(baseStoreUid, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BaseStoresApi#getBaseStore");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BaseStoresApi;

public class BaseStoresApiExample {

    public static void main(String[] args) {
        BaseStoresApi apiInstance = new BaseStoresApi();
        String baseStoreUid = baseStoreUid_example; // String | Base store name
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BaseStore result = apiInstance.getBaseStore(baseStoreUid, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BaseStoresApi#getBaseStore");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseStoreUid = baseStoreUid_example; // Base store name
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BaseStoresApi *apiInstance = [[BaseStoresApi alloc] init];

// Get a base store.
[apiInstance getBaseStoreWith:baseStoreUid
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(BaseStore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BaseStoresApi()
var baseStoreUid = baseStoreUid_example; // {{String}} Base store name
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBaseStore(baseStoreUid, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBaseStoreExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BaseStoresApi();
            var baseStoreUid = baseStoreUid_example;  // String | Base store name
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a base store.
                BaseStore result = apiInstance.getBaseStore(baseStoreUid, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BaseStoresApi.getBaseStore: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBaseStoresApi();
$baseStoreUid = baseStoreUid_example; // String | Base store name
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBaseStore($baseStoreUid, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BaseStoresApi->getBaseStore: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BaseStoresApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BaseStoresApi->new();
my $baseStoreUid = baseStoreUid_example; # String | Base store name
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBaseStore(baseStoreUid => $baseStoreUid, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BaseStoresApi->getBaseStore: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BaseStoresApi()
baseStoreUid = baseStoreUid_example # String | Base store name
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a base store.
    api_response = api_instance.get_base_store(baseStoreUid, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BaseStoresApi->getBaseStore: %s\n" % e)

Parameters

Path parameters
Name Description
baseStoreUid*
String
Base store name
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


BudgetManagement

createBudget

Creates a new budget

Creates a new budget.


/{baseSiteId}/users/{userId}/budgets

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/budgets?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BudgetManagementApi;

import java.io.File;
import java.util.*;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        Budget body = ; // Budget | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.createBudget(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#createBudget");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BudgetManagementApi;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        BudgetManagementApi apiInstance = new BudgetManagementApi();
        Budget body = ; // Budget | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.createBudget(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#createBudget");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Budget *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BudgetManagementApi *apiInstance = [[BudgetManagementApi alloc] init];

//  Creates a new budget
[apiInstance createBudgetWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Budget output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BudgetManagementApi()
var body = ; // {{Budget}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createBudget(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createBudgetExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BudgetManagementApi();
            var body = new Budget(); // Budget | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                //  Creates a new budget
                Budget result = apiInstance.createBudget(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BudgetManagementApi.createBudget: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBudgetManagementApi();
$body = ; // Budget | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createBudget($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BudgetManagementApi->createBudget: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BudgetManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BudgetManagementApi->new();
my $body = WWW::SwaggerClient::Object::Budget->new(); # Budget | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createBudget(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BudgetManagementApi->createBudget: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BudgetManagementApi()
body =  # Budget | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    #  Creates a new budget
    api_response = api_instance.create_budget(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->createBudget: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getBudget

Gets specific budget details accessible to a specified user for a specified base store based on budget code

Returns specific budget details accessible to a specified user for a specified base store based on budget code. The response contains detailed order information.


/{baseSiteId}/users/{userId}/budgets/{budgetCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/budgets/{budgetCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BudgetManagementApi;

import java.io.File;
import java.util.*;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.getBudget(budgetCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#getBudget");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BudgetManagementApi;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        BudgetManagementApi apiInstance = new BudgetManagementApi();
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.getBudget(budgetCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#getBudget");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *budgetCode = budgetCode_example; // Budget GUID (Globally Unique Identifier) or budget CODE.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BudgetManagementApi *apiInstance = [[BudgetManagementApi alloc] init];

// Gets specific budget details accessible to a specified user for a specified base store based on budget code
[apiInstance getBudgetWith:budgetCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Budget output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BudgetManagementApi()
var budgetCode = budgetCode_example; // {{String}} Budget GUID (Globally Unique Identifier) or budget CODE.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBudget(budgetCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBudgetExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BudgetManagementApi();
            var budgetCode = budgetCode_example;  // String | Budget GUID (Globally Unique Identifier) or budget CODE.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets specific budget details accessible to a specified user for a specified base store based on budget code
                Budget result = apiInstance.getBudget(budgetCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BudgetManagementApi.getBudget: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBudgetManagementApi();
$budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBudget($budgetCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BudgetManagementApi->getBudget: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BudgetManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BudgetManagementApi->new();
my $budgetCode = budgetCode_example; # String | Budget GUID (Globally Unique Identifier) or budget CODE.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBudget(budgetCode => $budgetCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BudgetManagementApi->getBudget: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BudgetManagementApi()
budgetCode = budgetCode_example # String | Budget GUID (Globally Unique Identifier) or budget CODE.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets specific budget details accessible to a specified user for a specified base store based on budget code
    api_response = api_instance.get_budget(budgetCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->getBudget: %s\n" % e)

Parameters

Path parameters
Name Description
budgetCode*
String
Budget GUID (Globally Unique Identifier) or budget CODE.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getBudgets

Gets the list of budgets for a specified base store

Returns the list of budgets accessible to a specified user for a specified base store. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/budgets

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/budgets?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BudgetManagementApi;

import java.io.File;
import java.util.*;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#getBudgets");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BudgetManagementApi;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        BudgetManagementApi apiInstance = new BudgetManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#getBudgets");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to code)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BudgetManagementApi *apiInstance = [[BudgetManagementApi alloc] init];

// Gets the list of budgets for a specified base store
[apiInstance getBudgetsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(BudgetList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BudgetManagementApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBudgets(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBudgetsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BudgetManagementApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to code)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of budgets for a specified base store
                BudgetList result = apiInstance.getBudgets(baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BudgetManagementApi.getBudgets: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBudgetManagementApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getBudgets($baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BudgetManagementApi->getBudgets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BudgetManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BudgetManagementApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getBudgets(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BudgetManagementApi->getBudgets: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BudgetManagementApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to code)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of budgets for a specified base store
    api_response = api_instance.get_budgets(baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->getBudgets: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateBudget

Updates the budget

Updates the budget. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/budgets/{budgetCode}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/budgets/{budgetCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BudgetManagementApi;

import java.io.File;
import java.util.*;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        BudgetManagementApi apiInstance = new BudgetManagementApi();
        Budget body = ; // Budget | 
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.updateBudget(body, budgetCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#updateBudget");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BudgetManagementApi;

public class BudgetManagementApiExample {

    public static void main(String[] args) {
        BudgetManagementApi apiInstance = new BudgetManagementApi();
        Budget body = ; // Budget | 
        String budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Budget result = apiInstance.updateBudget(body, budgetCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BudgetManagementApi#updateBudget");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Budget *body = ; // 
String *budgetCode = budgetCode_example; // Budget GUID (Globally Unique Identifier) or budget CODE.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

BudgetManagementApi *apiInstance = [[BudgetManagementApi alloc] init];

// Updates the budget
[apiInstance updateBudgetWith:body
    budgetCode:budgetCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Budget output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.BudgetManagementApi()
var body = ; // {{Budget}} 
var budgetCode = budgetCode_example; // {{String}} Budget GUID (Globally Unique Identifier) or budget CODE.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateBudget(bodybudgetCodebaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateBudgetExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new BudgetManagementApi();
            var body = new Budget(); // Budget | 
            var budgetCode = budgetCode_example;  // String | Budget GUID (Globally Unique Identifier) or budget CODE.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Updates the budget
                Budget result = apiInstance.updateBudget(body, budgetCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BudgetManagementApi.updateBudget: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiBudgetManagementApi();
$body = ; // Budget | 
$budgetCode = budgetCode_example; // String | Budget GUID (Globally Unique Identifier) or budget CODE.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->updateBudget($body, $budgetCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BudgetManagementApi->updateBudget: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BudgetManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::BudgetManagementApi->new();
my $body = WWW::SwaggerClient::Object::Budget->new(); # Budget | 
my $budgetCode = budgetCode_example; # String | Budget GUID (Globally Unique Identifier) or budget CODE.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->updateBudget(body => $body, budgetCode => $budgetCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BudgetManagementApi->updateBudget: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BudgetManagementApi()
body =  # Budget | 
budgetCode = budgetCode_example # String | Budget GUID (Globally Unique Identifier) or budget CODE.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Updates the budget
    api_response = api_instance.update_budget(body, budgetCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BudgetManagementApi->updateBudget: %s\n" % e)

Parameters

Path parameters
Name Description
budgetCode*
String
Budget GUID (Globally Unique Identifier) or budget CODE.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartAddresses

createCartDeliveryAddress

Creates a delivery address for the cart.

Creates an address and assigns it to the cart as the delivery address.


/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartAddressesApi;

import java.io.File;
import java.util.*;

public class CartAddressesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartAddressesApi apiInstance = new CartAddressesApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createCartDeliveryAddress(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#createCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

    public static void main(String[] args) {
        CartAddressesApi apiInstance = new CartAddressesApi();
        Address body = ; // Address | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createCartDeliveryAddress(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#createCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartAddressesApi *apiInstance = [[CartAddressesApi alloc] init];

// Creates a delivery address for the cart.
[apiInstance createCartDeliveryAddressWith:body
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(Address output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartAddressesApi()
var body = ; // {{Address}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCartDeliveryAddress(bodybaseSiteIduserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartDeliveryAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartAddressesApi();
            var body = new Address(); // Address | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates a delivery address for the cart.
                Address result = apiInstance.createCartDeliveryAddress(body, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.createCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartAddressesApi();
$body = ; // Address | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createCartDeliveryAddress($body, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartAddressesApi->createCartDeliveryAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartAddressesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartAddressesApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createCartDeliveryAddress(body => $body, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartAddressesApi->createCartDeliveryAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartAddressesApi()
body =  # Address | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates a delivery address for the cart.
    api_response = api_instance.create_cart_delivery_address(body, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartAddressesApi->createCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


removeCartDeliveryAddress

Deletes the delivery address from the cart.

Deletes the delivery address from the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/addresses/delivery"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartAddressesApi;

import java.io.File;
import java.util.*;

public class CartAddressesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartAddressesApi apiInstance = new CartAddressesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartDeliveryAddress(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#removeCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartAddressesApi;

public class CartAddressesApiExample {

    public static void main(String[] args) {
        CartAddressesApi apiInstance = new CartAddressesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartDeliveryAddress(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartAddressesApi#removeCartDeliveryAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartAddressesApi *apiInstance = [[CartAddressesApi alloc] init];

// Deletes the delivery address from the cart.
[apiInstance removeCartDeliveryAddressWith:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartAddressesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartDeliveryAddress(baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartDeliveryAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartAddressesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Deletes the delivery address from the cart.
                apiInstance.removeCartDeliveryAddress(baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartAddressesApi.removeCartDeliveryAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartAddressesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartDeliveryAddress($baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartAddressesApi->removeCartDeliveryAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartAddressesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartAddressesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartDeliveryAddress(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartAddressesApi->removeCartDeliveryAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartAddressesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Deletes the delivery address from the cart.
    api_instance.remove_cart_delivery_address(baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartAddressesApi->removeCartDeliveryAddress: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartDeliveryModes

getCartDeliveryMode

Get the delivery mode selected for the cart.

Returns the delivery mode selected for the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

import java.io.File;
import java.util.*;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartDeliveryModesApi *apiInstance = [[CartDeliveryModesApi alloc] init];

// Get the delivery mode selected for the cart.
[apiInstance getCartDeliveryModeWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(DeliveryMode output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartDeliveryMode(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartDeliveryModeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartDeliveryModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get the delivery mode selected for the cart.
                DeliveryMode result = apiInstance.getCartDeliveryMode(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.getCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartDeliveryMode($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartDeliveryModesApi->getCartDeliveryMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartDeliveryModesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartDeliveryMode(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartDeliveryModesApi->getCartDeliveryMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get the delivery mode selected for the cart.
    api_response = api_instance.get_cart_delivery_mode(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->getCartDeliveryMode: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartDeliveryModes

Get all delivery modes for the current store and delivery address.

Returns all delivery modes supported for the current base store and cart delivery address. A delivery address must be set for the cart, otherwise an empty list will be returned.


/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymodes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

import java.io.File;
import java.util.*;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryModes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#getCartDeliveryModes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartDeliveryModesApi *apiInstance = [[CartDeliveryModesApi alloc] init];

// Get all delivery modes for the current store and delivery address.
[apiInstance getCartDeliveryModesWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(DeliveryModeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartDeliveryModes(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartDeliveryModesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartDeliveryModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get all delivery modes for the current store and delivery address.
                DeliveryModeList result = apiInstance.getCartDeliveryModes(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.getCartDeliveryModes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartDeliveryModes($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartDeliveryModesApi->getCartDeliveryModes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartDeliveryModesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartDeliveryModes(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartDeliveryModesApi->getCartDeliveryModes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get all delivery modes for the current store and delivery address.
    api_response = api_instance.get_cart_delivery_modes(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->getCartDeliveryModes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCartDeliveryMode

Deletes the delivery mode from the cart.

Deletes the delivery mode from the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

import java.io.File;
import java.util.*;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartDeliveryMode(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#removeCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartDeliveryMode(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#removeCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartDeliveryModesApi *apiInstance = [[CartDeliveryModesApi alloc] init];

// Deletes the delivery mode from the cart.
[apiInstance removeCartDeliveryModeWith:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartDeliveryModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartDeliveryMode(baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartDeliveryModeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartDeliveryModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Deletes the delivery mode from the cart.
                apiInstance.removeCartDeliveryMode(baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.removeCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartDeliveryMode($baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartDeliveryModesApi->removeCartDeliveryMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartDeliveryModesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartDeliveryMode(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartDeliveryModesApi->removeCartDeliveryMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Deletes the delivery mode from the cart.
    api_instance.remove_cart_delivery_mode(baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->removeCartDeliveryMode: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceCartDeliveryMode

Sets the delivery mode for a cart.

Sets the delivery mode with a given identifier for the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/deliverymode?deliveryModeId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartDeliveryModesApi;

import java.io.File;
import java.util.*;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartDeliveryMode(deliveryModeId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#replaceCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartDeliveryModesApi;

public class CartDeliveryModesApiExample {

    public static void main(String[] args) {
        CartDeliveryModesApi apiInstance = new CartDeliveryModesApi();
        String deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartDeliveryMode(deliveryModeId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartDeliveryModesApi#replaceCartDeliveryMode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *deliveryModeId = deliveryModeId_example; // Delivery mode identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartDeliveryModesApi *apiInstance = [[CartDeliveryModesApi alloc] init];

// Sets the delivery mode for a cart.
[apiInstance replaceCartDeliveryModeWith:deliveryModeId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartDeliveryModesApi()
var deliveryModeId = deliveryModeId_example; // {{String}} Delivery mode identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceCartDeliveryMode(deliveryModeId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartDeliveryModeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartDeliveryModesApi();
            var deliveryModeId = deliveryModeId_example;  // String | Delivery mode identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Sets the delivery mode for a cart.
                apiInstance.replaceCartDeliveryMode(deliveryModeId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartDeliveryModesApi.replaceCartDeliveryMode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartDeliveryModesApi();
$deliveryModeId = deliveryModeId_example; // String | Delivery mode identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->replaceCartDeliveryMode($deliveryModeId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartDeliveryModesApi->replaceCartDeliveryMode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartDeliveryModesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartDeliveryModesApi->new();
my $deliveryModeId = deliveryModeId_example; # String | Delivery mode identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->replaceCartDeliveryMode(deliveryModeId => $deliveryModeId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartDeliveryModesApi->replaceCartDeliveryMode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartDeliveryModesApi()
deliveryModeId = deliveryModeId_example # String | Delivery mode identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Sets the delivery mode for a cart.
    api_instance.replace_cart_delivery_mode(deliveryModeId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartDeliveryModesApi->replaceCartDeliveryMode: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
deliveryModeId*
String
Delivery mode identifier (code)
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartEntries

createCartEntry

Adds a product to the cart.

Adds a product to the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#createCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.createCartEntry(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#createCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Adds a product to the cart.
[apiInstance createCartEntryWith:body
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCartEntry(bodybaseSiteIduserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Adds a product to the cart.
                CartModification result = apiInstance.createCartEntry(body, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.createCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createCartEntry($body, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->createCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createCartEntry(body => $body, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->createCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Adds a product to the cart.
    api_response = api_instance.create_cart_entry(body, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->createCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartEntries

Get cart entries.

Returns cart entries.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntryList result = apiInstance.getCartEntries(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntryList result = apiInstance.getCartEntries(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Get cart entries.
[apiInstance getCartEntriesWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(OrderEntryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartEntries(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartEntriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get cart entries.
                OrderEntryList result = apiInstance.getCartEntries(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.getCartEntries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartEntries($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->getCartEntries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartEntries(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->getCartEntries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get cart entries.
    api_response = api_instance.get_cart_entries(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->getCartEntries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartEntry

Get the details of the cart entries.

Returns the details of the cart entries.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(entryNumber, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderEntry result = apiInstance.getCartEntry(entryNumber, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#getCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Get the details of the cart entries.
[apiInstance getCartEntryWith:entryNumber
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(OrderEntry output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartEntry(entryNumber, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get the details of the cart entries.
                OrderEntry result = apiInstance.getCartEntry(entryNumber, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.getCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartEntry($entryNumber, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->getCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartEntry(entryNumber => $entryNumber, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->getCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get the details of the cart entries.
    api_response = api_instance.get_cart_entry(entryNumber, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->getCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCartEntry

Deletes cart entry.

Deletes cart entry by entry number.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartEntry(entryNumber, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#removeCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartEntry(entryNumber, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#removeCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Deletes cart entry.
[apiInstance removeCartEntryWith:entryNumber
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntry(entryNumber, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Deletes cart entry.
                apiInstance.removeCartEntry(entryNumber, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.removeCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartEntry($entryNumber, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->removeCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartEntry(entryNumber => $entryNumber, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->removeCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Deletes cart entry.
    api_instance.remove_cart_entry(entryNumber, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartEntriesApi->removeCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceCartEntry

Set quantity and store details of a cart entry.

Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up. Attributes not provided in request will be defined again (set to null or default)


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#replaceCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#replaceCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Set quantity and store details of a cart entry.
[apiInstance replaceCartEntryWith:body
    baseSiteId:baseSiteId
    entryNumber:entryNumber
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.replaceCartEntry(bodybaseSiteIdentryNumberuserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Set quantity and store details of a cart entry.
                CartModification result = apiInstance.replaceCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.replaceCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->replaceCartEntry($body, $baseSiteId, $entryNumber, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->replaceCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->replaceCartEntry(body => $body, baseSiteId => $baseSiteId, entryNumber => $entryNumber, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->replaceCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Set quantity and store details of a cart entry.
    api_response = api_instance.replace_cart_entry(body, baseSiteId, entryNumber, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->replaceCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateCartEntry

Update quantity and store details of a cart entry.

Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up.


/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntriesApi;

import java.io.File;
import java.util.*;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#updateCartEntry");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntriesApi;

public class CartEntriesApiExample {

    public static void main(String[] args) {
        CartEntriesApi apiInstance = new CartEntriesApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Long entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.updateCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntriesApi#updateCartEntry");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
Long *entryNumber = 789; // The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntriesApi *apiInstance = [[CartEntriesApi alloc] init];

// Update quantity and store details of a cart entry.
[apiInstance updateCartEntryWith:body
    baseSiteId:baseSiteId
    entryNumber:entryNumber
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntriesApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryNumber = 789; // {{Long}} The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateCartEntry(bodybaseSiteIdentryNumberuserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateCartEntryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntriesApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryNumber = 789;  // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Update quantity and store details of a cart entry.
                CartModification result = apiInstance.updateCartEntry(body, baseSiteId, entryNumber, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntriesApi.updateCartEntry: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntriesApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryNumber = 789; // Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->updateCartEntry($body, $baseSiteId, $entryNumber, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntriesApi->updateCartEntry: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntriesApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryNumber = 789; # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->updateCartEntry(body => $body, baseSiteId => $baseSiteId, entryNumber => $entryNumber, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntriesApi->updateCartEntry: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntriesApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
entryNumber = 789 # Long | The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Update quantity and store details of a cart entry.
    api_response = api_instance.update_cart_entry(body, baseSiteId, entryNumber, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntriesApi->updateCartEntry: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryNumber*
Long (int64)
The entry number. Each entry in a cart has an entry number. Cart entries are numbered in ascending order, starting with zero (0).
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartEntryGroups

addToCartEntryGroup

Add a product to a cart entry group.

Adds a product to a cart entry group.


/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntryGroupsApi;

import java.io.File;
import java.util.*;

public class CartEntryGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.addToCartEntryGroup(body, baseSiteId, entryGroupNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#addToCartEntryGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntryGroupsApi;

public class CartEntryGroupsApiExample {

    public static void main(String[] args) {
        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        OrderEntry body = ; // OrderEntry | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModification result = apiInstance.addToCartEntryGroup(body, baseSiteId, entryGroupNumber, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#addToCartEntryGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderEntry *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *entryGroupNumber = 56; // Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartEntryGroupsApi *apiInstance = [[CartEntryGroupsApi alloc] init];

// Add a product to a cart entry group.
[apiInstance addToCartEntryGroupWith:body
    baseSiteId:baseSiteId
    entryGroupNumber:entryGroupNumber
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntryGroupsApi()
var body = ; // {{OrderEntry}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var entryGroupNumber = 56; // {{Integer}} Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addToCartEntryGroup(bodybaseSiteIdentryGroupNumberuserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addToCartEntryGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntryGroupsApi();
            var body = new OrderEntry(); // OrderEntry | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var entryGroupNumber = 56;  // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add a product to a cart entry group.
                CartModification result = apiInstance.addToCartEntryGroup(body, baseSiteId, entryGroupNumber, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntryGroupsApi.addToCartEntryGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntryGroupsApi();
$body = ; // OrderEntry | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->addToCartEntryGroup($body, $baseSiteId, $entryGroupNumber, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartEntryGroupsApi->addToCartEntryGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntryGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntryGroupsApi->new();
my $body = WWW::SwaggerClient::Object::OrderEntry->new(); # OrderEntry | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $entryGroupNumber = 56; # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->addToCartEntryGroup(body => $body, baseSiteId => $baseSiteId, entryGroupNumber => $entryGroupNumber, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartEntryGroupsApi->addToCartEntryGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntryGroupsApi()
body =  # OrderEntry | 
baseSiteId = baseSiteId_example # String | Base site identifier
entryGroupNumber = 56 # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add a product to a cart entry group.
    api_response = api_instance.add_to_cart_entry_group(body, baseSiteId, entryGroupNumber, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartEntryGroupsApi->addToCartEntryGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
entryGroupNumber*
Integer (int32)
Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCartEntryGroup

Delete an entry group.

Removes an entry group from an associated cart. The entry group is identified by an entryGroupNumber. The cart is identified by the cartId.


/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/entrygroups/{entryGroupNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartEntryGroupsApi;

import java.io.File;
import java.util.*;

public class CartEntryGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartEntryGroup(entryGroupNumber, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#removeCartEntryGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartEntryGroupsApi;

public class CartEntryGroupsApiExample {

    public static void main(String[] args) {
        CartEntryGroupsApi apiInstance = new CartEntryGroupsApi();
        Integer entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartEntryGroup(entryGroupNumber, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartEntryGroupsApi#removeCartEntryGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Integer *entryGroupNumber = 56; // Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartEntryGroupsApi *apiInstance = [[CartEntryGroupsApi alloc] init];

// Delete an entry group.
[apiInstance removeCartEntryGroupWith:entryGroupNumber
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartEntryGroupsApi()
var entryGroupNumber = 56; // {{Integer}} Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartEntryGroup(entryGroupNumber, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartEntryGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartEntryGroupsApi();
            var entryGroupNumber = 56;  // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Delete an entry group.
                apiInstance.removeCartEntryGroup(entryGroupNumber, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartEntryGroupsApi.removeCartEntryGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartEntryGroupsApi();
$entryGroupNumber = 56; // Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartEntryGroup($entryGroupNumber, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartEntryGroupsApi->removeCartEntryGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartEntryGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartEntryGroupsApi->new();
my $entryGroupNumber = 56; # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartEntryGroup(entryGroupNumber => $entryGroupNumber, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartEntryGroupsApi->removeCartEntryGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartEntryGroupsApi()
entryGroupNumber = 56 # Integer | Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Delete an entry group.
    api_instance.remove_cart_entry_group(entryGroupNumber, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartEntryGroupsApi->removeCartEntryGroup: %s\n" % e)

Parameters

Path parameters
Name Description
entryGroupNumber*
Integer (int32)
Each entry group in a cart has a specific entry group number. Entry group numbers are integers starting at one. They are defined in ascending order.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartPayments

createCartPaymentDetails

Defines and assigns details of a new credit card payment to the cart.

Defines the details of a new credit card, and assigns this payment option to the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPaymentsApi;

import java.io.File;
import java.util.*;

public class CartPaymentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPaymentsApi apiInstance = new CartPaymentsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.createCartPaymentDetails(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPaymentsApi#createCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPaymentsApi;

public class CartPaymentsApiExample {

    public static void main(String[] args) {
        CartPaymentsApi apiInstance = new CartPaymentsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.createCartPaymentDetails(body, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPaymentsApi#createCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PaymentDetails *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPaymentsApi *apiInstance = [[CartPaymentsApi alloc] init];

// Defines and assigns details of a new credit card payment to the cart.
[apiInstance createCartPaymentDetailsWith:body
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(PaymentDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPaymentsApi()
var body = ; // {{PaymentDetails}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCartPaymentDetails(bodybaseSiteIduserIdcartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartPaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPaymentsApi();
            var body = new PaymentDetails(); // PaymentDetails | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Defines and assigns details of a new credit card payment to the cart.
                PaymentDetails result = apiInstance.createCartPaymentDetails(body, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPaymentsApi.createCartPaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPaymentsApi();
$body = ; // PaymentDetails | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createCartPaymentDetails($body, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPaymentsApi->createCartPaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPaymentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPaymentsApi->new();
my $body = WWW::SwaggerClient::Object::PaymentDetails->new(); # PaymentDetails | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createCartPaymentDetails(body => $body, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPaymentsApi->createCartPaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPaymentsApi()
body =  # PaymentDetails | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Defines and assigns details of a new credit card payment to the cart.
    api_response = api_instance.create_cart_payment_details(body, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPaymentsApi->createCartPaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


replaceCartPaymentDetails

Sets credit card payment details for the cart.

Sets credit card payment details for the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/paymentdetails?paymentDetailsId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPaymentsApi;

import java.io.File;
import java.util.*;

public class CartPaymentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPaymentsApi apiInstance = new CartPaymentsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartPaymentDetails(paymentDetailsId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPaymentsApi#replaceCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPaymentsApi;

public class CartPaymentsApiExample {

    public static void main(String[] args) {
        CartPaymentsApi apiInstance = new CartPaymentsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartPaymentDetails(paymentDetailsId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPaymentsApi#replaceCartPaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartPaymentsApi *apiInstance = [[CartPaymentsApi alloc] init];

// Sets credit card payment details for the cart.
[apiInstance replaceCartPaymentDetailsWith:paymentDetailsId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPaymentsApi()
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceCartPaymentDetails(paymentDetailsId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartPaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPaymentsApi();
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Sets credit card payment details for the cart.
                apiInstance.replaceCartPaymentDetails(paymentDetailsId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPaymentsApi.replaceCartPaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPaymentsApi();
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->replaceCartPaymentDetails($paymentDetailsId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartPaymentsApi->replaceCartPaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPaymentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPaymentsApi->new();
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->replaceCartPaymentDetails(paymentDetailsId => $paymentDetailsId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartPaymentsApi->replaceCartPaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPaymentsApi()
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Sets credit card payment details for the cart.
    api_instance.replace_cart_payment_details(paymentDetailsId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartPaymentsApi->replaceCartPaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CartPromotions

doApplyCartPromotion

Enables promotions based on the promotionsId of the cart.

Enables a promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions?promotionId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.doApplyCartPromotion(promotionId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.doApplyCartPromotion(promotionId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *promotionId = promotionId_example; // Promotion identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Enables promotions based on the promotionsId of the cart.
[apiInstance doApplyCartPromotionWith:promotionId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doApplyCartPromotion(promotionId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doApplyCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Enables promotions based on the promotionsId of the cart.
                apiInstance.doApplyCartPromotion(promotionId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.doApplyCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$promotionId = promotionId_example; // String | Promotion identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->doApplyCartPromotion($promotionId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->doApplyCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->doApplyCartPromotion(promotionId => $promotionId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->doApplyCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
promotionId = promotionId_example # String | Promotion identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Enables promotions based on the promotionsId of the cart.
    api_instance.do_apply_cart_promotion(promotionId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
promotionId*
String
Promotion identifier (code)
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doApplyCartVoucher

Applies a voucher based on the voucherId defined for the cart.

Applies a voucher based on the voucherId defined for the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers?voucherId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.doApplyCartVoucher(voucherId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.doApplyCartVoucher(voucherId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#doApplyCartVoucher");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *voucherId = voucherId_example; // Voucher identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Applies a voucher based on the voucherId defined for the cart.
[apiInstance doApplyCartVoucherWith:voucherId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doApplyCartVoucher(voucherId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doApplyCartVoucherExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var voucherId = voucherId_example;  // String | Voucher identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Applies a voucher based on the voucherId defined for the cart.
                apiInstance.doApplyCartVoucher(voucherId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.doApplyCartVoucher: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$voucherId = voucherId_example; // String | Voucher identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->doApplyCartVoucher($voucherId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->doApplyCartVoucher: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $voucherId = voucherId_example; # String | Voucher identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->doApplyCartVoucher(voucherId => $voucherId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->doApplyCartVoucher: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
voucherId = voucherId_example # String | Voucher identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Applies a voucher based on the voucherId defined for the cart.
    api_instance.do_apply_cart_voucher(voucherId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->doApplyCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
voucherId*
String
Voucher identifier (code)
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartPromotion

Get information about promotion applied on cart.

Returns information about a promotion (with a specific promotionId), that has been applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotion(promotionId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotion(promotionId, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *promotionId = promotionId_example; // Promotion identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get information about promotion applied on cart.
[apiInstance getCartPromotionWith:promotionId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(PromotionResultList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartPromotion(promotionId, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about promotion applied on cart.
                PromotionResultList result = apiInstance.getCartPromotion(promotionId, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$promotionId = promotionId_example; // String | Promotion identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartPromotion($promotionId, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartPromotion(promotionId => $promotionId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
promotionId = promotionId_example # String | Promotion identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about promotion applied on cart.
    api_response = api_instance.get_cart_promotion(promotionId, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
promotionId*
String
Promotion identifier (code)
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartPromotions

Get information about promotions applied on cart.

Returns information about the promotions applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartPromotions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get information about promotions applied on cart.
[apiInstance getCartPromotionsWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(PromotionResultList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartPromotions(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartPromotionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about promotions applied on cart.
                PromotionResultList result = apiInstance.getCartPromotions(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartPromotions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartPromotions($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartPromotions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartPromotions(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartPromotions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about promotions applied on cart.
    api_response = api_instance.get_cart_promotions(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartPromotions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCartVouchers

Get a list of vouchers applied to the cart.

Returns a list of vouchers applied to the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartVouchers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            VoucherList result = apiInstance.getCartVouchers(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#getCartVouchers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Get a list of vouchers applied to the cart.
[apiInstance getCartVouchersWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(VoucherList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCartVouchers(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartVouchersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of vouchers applied to the cart.
                VoucherList result = apiInstance.getCartVouchers(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.getCartVouchers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCartVouchers($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->getCartVouchers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCartVouchers(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->getCartVouchers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of vouchers applied to the cart.
    api_response = api_instance.get_cart_vouchers(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->getCartVouchers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCartPromotion

Disables the promotion based on the promotionsId of the cart.

Disables the promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine.


/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/promotions/{promotionId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartPromotion(promotionId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartPromotion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String promotionId = promotionId_example; // String | Promotion identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartPromotion(promotionId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartPromotion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *promotionId = promotionId_example; // Promotion identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Disables the promotion based on the promotionsId of the cart.
[apiInstance removeCartPromotionWith:promotionId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var promotionId = promotionId_example; // {{String}} Promotion identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartPromotion(promotionId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartPromotionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var promotionId = promotionId_example;  // String | Promotion identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Disables the promotion based on the promotionsId of the cart.
                apiInstance.removeCartPromotion(promotionId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.removeCartPromotion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$promotionId = promotionId_example; // String | Promotion identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartPromotion($promotionId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->removeCartPromotion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $promotionId = promotionId_example; # String | Promotion identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartPromotion(promotionId => $promotionId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->removeCartPromotion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
promotionId = promotionId_example # String | Promotion identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Disables the promotion based on the promotionsId of the cart.
    api_instance.remove_cart_promotion(promotionId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartPromotion: %s\n" % e)

Parameters

Path parameters
Name Description
promotionId*
String
Promotion identifier (code)
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCartVoucher

Deletes a voucher defined for the current cart.

Deletes a voucher based on the voucherId defined for the current cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers/{voucherId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/vouchers/{voucherId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartPromotionsApi;

import java.io.File;
import java.util.*;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartVoucher(voucherId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartVoucher");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartPromotionsApi;

public class CartPromotionsApiExample {

    public static void main(String[] args) {
        CartPromotionsApi apiInstance = new CartPromotionsApi();
        String voucherId = voucherId_example; // String | Voucher identifier (code)
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCartVoucher(voucherId, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartPromotionsApi#removeCartVoucher");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *voucherId = voucherId_example; // Voucher identifier (code)
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartPromotionsApi *apiInstance = [[CartPromotionsApi alloc] init];

// Deletes a voucher defined for the current cart.
[apiInstance removeCartVoucherWith:voucherId
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartPromotionsApi()
var voucherId = voucherId_example; // {{String}} Voucher identifier (code)
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCartVoucher(voucherId, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartVoucherExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartPromotionsApi();
            var voucherId = voucherId_example;  // String | Voucher identifier (code)
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Deletes a voucher defined for the current cart.
                apiInstance.removeCartVoucher(voucherId, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartPromotionsApi.removeCartVoucher: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartPromotionsApi();
$voucherId = voucherId_example; // String | Voucher identifier (code)
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCartVoucher($voucherId, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartPromotionsApi->removeCartVoucher: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartPromotionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartPromotionsApi->new();
my $voucherId = voucherId_example; # String | Voucher identifier (code)
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCartVoucher(voucherId => $voucherId, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartPromotionsApi->removeCartVoucher: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartPromotionsApi()
voucherId = voucherId_example # String | Voucher identifier (code)
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Deletes a voucher defined for the current cart.
    api_instance.remove_cart_voucher(voucherId, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartPromotionsApi->removeCartVoucher: %s\n" % e)

Parameters

Path parameters
Name Description
voucherId*
String
Voucher identifier (code)
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Carts

createCart

Creates or restore a cart for a user.

Creates a new cart or restores an anonymous cart as a user's cart (if an old Cart Id is given in the request).


/{baseSiteId}/users/{userId}/carts

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts?oldCartId=&toMergeCartGuid=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        String toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, oldCartId, toMergeCartGuid, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String oldCartId = oldCartId_example; // String | Anonymous cart GUID.
        String toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.createCart(baseSiteId, userId, oldCartId, toMergeCartGuid, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *oldCartId = oldCartId_example; // Anonymous cart GUID. (optional)
String *toMergeCartGuid = toMergeCartGuid_example; // The GUID of the user's cart that will be merged with the anonymous cart. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Creates or restore a cart for a user.
[apiInstance createCartWith:baseSiteId
    userId:userId
    oldCartId:oldCartId
    toMergeCartGuid:toMergeCartGuid
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'oldCartId': oldCartId_example, // {{String}} Anonymous cart GUID.
  'toMergeCartGuid': toMergeCartGuid_example, // {{String}} The GUID of the user's cart that will be merged with the anonymous cart.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCart(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var oldCartId = oldCartId_example;  // String | Anonymous cart GUID. (optional) 
            var toMergeCartGuid = toMergeCartGuid_example;  // String | The GUID of the user's cart that will be merged with the anonymous cart. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Creates or restore a cart for a user.
                Cart result = apiInstance.createCart(baseSiteId, userId, oldCartId, toMergeCartGuid, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.createCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$oldCartId = oldCartId_example; // String | Anonymous cart GUID.
$toMergeCartGuid = toMergeCartGuid_example; // String | The GUID of the user's cart that will be merged with the anonymous cart.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createCart($baseSiteId, $userId, $oldCartId, $toMergeCartGuid, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->createCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $oldCartId = oldCartId_example; # String | Anonymous cart GUID.
my $toMergeCartGuid = toMergeCartGuid_example; # String | The GUID of the user's cart that will be merged with the anonymous cart.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createCart(baseSiteId => $baseSiteId, userId => $userId, oldCartId => $oldCartId, toMergeCartGuid => $toMergeCartGuid, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->createCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
oldCartId = oldCartId_example # String | Anonymous cart GUID. (optional)
toMergeCartGuid = toMergeCartGuid_example # String | The GUID of the user's cart that will be merged with the anonymous cart. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Creates or restore a cart for a user.
    api_response = api_instance.create_cart(baseSiteId, userId, oldCartId=oldCartId, toMergeCartGuid=toMergeCartGuid, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->createCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
oldCartId
String
Anonymous cart GUID.
toMergeCartGuid
String
The GUID of the user's cart that will be merged with the anonymous cart.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


createConsolidatedPickupLocation

Handles the consolidating pickup locations.

Specifies one store location where all items will be picked up. Note, if any of the items are not available at the specified location, these items are removed from the cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate?storeName=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String storeName = storeName_example; // String | The name of the store where items will be picked up
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.createConsolidatedPickupLocation(storeName, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createConsolidatedPickupLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String storeName = storeName_example; // String | The name of the store where items will be picked up
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.createConsolidatedPickupLocation(storeName, baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#createConsolidatedPickupLocation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *storeName = storeName_example; // The name of the store where items will be picked up
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Handles the consolidating pickup locations.
[apiInstance createConsolidatedPickupLocationWith:storeName
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModificationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var storeName = storeName_example; // {{String}} The name of the store where items will be picked up
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createConsolidatedPickupLocation(storeName, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createConsolidatedPickupLocationExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var storeName = storeName_example;  // String | The name of the store where items will be picked up
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Handles the consolidating pickup locations.
                CartModificationList result = apiInstance.createConsolidatedPickupLocation(storeName, baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.createConsolidatedPickupLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$storeName = storeName_example; // String | The name of the store where items will be picked up
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createConsolidatedPickupLocation($storeName, $baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->createConsolidatedPickupLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $storeName = storeName_example; # String | The name of the store where items will be picked up
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createConsolidatedPickupLocation(storeName => $storeName, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->createConsolidatedPickupLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
storeName = storeName_example # String | The name of the store where items will be picked up
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Handles the consolidating pickup locations.
    api_response = api_instance.create_consolidated_pickup_location(storeName, baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->createConsolidatedPickupLocation: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
storeName*
String
The name of the store where items will be picked up
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doHandleSopPaymentResponse

Handles response from payment provider and create payment details

Handles the response from the payment provider and creates payment details. Note, the ?Try it out? button is not enabled for this method (always returns an error) because the Extended Carts Controller handles parameters differently, depending on which payment provider is used. For more information about this controller, please refer to the ?acceleratorocc AddOn? documentation on help.hybris.com.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.doHandleSopPaymentResponse(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#doHandleSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.doHandleSopPaymentResponse(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#doHandleSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Handles response from payment provider and create payment details
[apiInstance doHandleSopPaymentResponseWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(PaymentDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doHandleSopPaymentResponse(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doHandleSopPaymentResponseExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Handles response from payment provider and create payment details
                PaymentDetails result = apiInstance.doHandleSopPaymentResponse(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.doHandleSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doHandleSopPaymentResponse($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->doHandleSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doHandleSopPaymentResponse(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->doHandleSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Handles response from payment provider and create payment details
    api_response = api_instance.do_handle_sop_payment_response(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->doHandleSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCart

Get a cart with a given identifier.

Returns the cart with a given identifier.


/{baseSiteId}/users/{userId}/carts/{cartId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.getCart(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Cart result = apiInstance.getCart(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get a cart with a given identifier.
[apiInstance getCartWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(Cart output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCart(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a cart with a given identifier.
                Cart result = apiInstance.getCart(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCart($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCart(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a cart with a given identifier.
    api_response = api_instance.get_cart(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCarts

Get all customer carts.

Lists all customer carts.


/{baseSiteId}/users/{userId}/carts

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts?fields=&savedCartsOnly=¤tPage=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, fields, savedCartsOnly, currentPage, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        Boolean savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
        Integer currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
        Integer pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
        String sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.
        try {
            CartList result = apiInstance.getCarts(baseSiteId, userId, fields, savedCartsOnly, currentPage, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getCarts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
Boolean *savedCartsOnly = true; // Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
Integer *currentPage = 56; // Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
Integer *pageSize = 56; // Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
String *sort = sort_example; // Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get all customer carts.
[apiInstance getCartsWith:baseSiteId
    userId:userId
    fields:fields
    savedCartsOnly:savedCartsOnly
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
              completionHandler: ^(CartList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example, // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
  'savedCartsOnly': true, // {{Boolean}} Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
  'currentPage': 56, // {{Integer}} Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
  'pageSize': 56, // {{Integer}} Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
  'sort': sort_example // {{String}} Optional sort criterion in case of savedCartsOnly == true. No default value.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCarts(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCartsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)
            var savedCartsOnly = true;  // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional)  (default to false)
            var currentPage = 56;  // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional)  (default to 0)
            var pageSize = 56;  // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional)  (default to 20)
            var sort = sort_example;  // String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional) 

            try
            {
                // Get all customer carts.
                CartList result = apiInstance.getCarts(baseSiteId, userId, fields, savedCartsOnly, currentPage, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getCarts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
$savedCartsOnly = true; // Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
$currentPage = 56; // Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
$pageSize = 56; // Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
$sort = sort_example; // String | Optional sort criterion in case of savedCartsOnly == true. No default value.

try {
    $result = $api_instance->getCarts($baseSiteId, $userId, $fields, $savedCartsOnly, $currentPage, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getCarts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
my $savedCartsOnly = true; # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
my $currentPage = 56; # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
my $pageSize = 56; # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
my $sort = sort_example; # String | Optional sort criterion in case of savedCartsOnly == true. No default value.

eval { 
    my $result = $api_instance->getCarts(baseSiteId => $baseSiteId, userId => $userId, fields => $fields, savedCartsOnly => $savedCartsOnly, currentPage => $currentPage, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getCarts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)
savedCartsOnly = true # Boolean | Optional parameter. If the parameter is provided and its value is true, only saved carts are returned. (optional) (default to false)
currentPage = 56 # Integer | Optional pagination parameter in case of savedCartsOnly == true. Default value 0. (optional) (default to 0)
pageSize = 56 # Integer | Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20. (optional) (default to 20)
sort = sort_example # String | Optional sort criterion in case of savedCartsOnly == true. No default value. (optional)

try: 
    # Get all customer carts.
    api_response = api_instance.get_carts(baseSiteId, userId, fields=fields, savedCartsOnly=savedCartsOnly, currentPage=currentPage, pageSize=pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getCarts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
savedCartsOnly
Boolean
Optional parameter. If the parameter is provided and its value is true, only saved carts are returned.
currentPage
Integer (int32)
Optional pagination parameter in case of savedCartsOnly == true. Default value 0.
pageSize
Integer (int32)
Optional {@link PaginationData} parameter in case of savedCartsOnly == true. Default value 20.
sort
String
Optional sort criterion in case of savedCartsOnly == true. No default value.

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getConsolidatedPickupLocations

Get consolidated pickup options.

Returns a list of stores that have all the pick-up items in stock. Note, if there are no stores that have all the pick up items in stock, or all items are already set to the same pick up location, the response returns an empty list.


/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/consolidate?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getConsolidatedPickupLocations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getConsolidatedPickupLocations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get consolidated pickup options.
[apiInstance getConsolidatedPickupLocationsWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(PointOfServiceList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConsolidatedPickupLocations(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConsolidatedPickupLocationsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get consolidated pickup options.
                PointOfServiceList result = apiInstance.getConsolidatedPickupLocations(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getConsolidatedPickupLocations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getConsolidatedPickupLocations($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getConsolidatedPickupLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getConsolidatedPickupLocations(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getConsolidatedPickupLocations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get consolidated pickup options.
    api_response = api_instance.get_consolidated_pickup_locations(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getConsolidatedPickupLocations: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getSopPaymentRequestDetails

Get information needed for create subscription

Returns the necessary information for creating a subscription that contacts the payment provider directly. This information contains the payment provider URL and a list of parameters that are needed to create the subscription.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/request

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/request?responseUrl=&extendedMerchantCallback=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String responseUrl = responseUrl_example; // String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean extendedMerchantCallback = true; // Boolean | Define which url should be returned
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentRequest result = apiInstance.getSopPaymentRequestDetails(responseUrl, baseSiteId, userId, cartId, extendedMerchantCallback, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getSopPaymentRequestDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String responseUrl = responseUrl_example; // String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        Boolean extendedMerchantCallback = true; // Boolean | Define which url should be returned
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentRequest result = apiInstance.getSopPaymentRequestDetails(responseUrl, baseSiteId, userId, cartId, extendedMerchantCallback, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getSopPaymentRequestDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *responseUrl = responseUrl_example; // The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Boolean *extendedMerchantCallback = true; // Define which url should be returned (optional) (default to false)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get information needed for create subscription
[apiInstance getSopPaymentRequestDetailsWith:responseUrl
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
    extendedMerchantCallback:extendedMerchantCallback
    fields:fields
              completionHandler: ^(PaymentRequest output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var responseUrl = responseUrl_example; // {{String}} The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'extendedMerchantCallback': true, // {{Boolean}} Define which url should be returned
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSopPaymentRequestDetails(responseUrl, baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSopPaymentRequestDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var responseUrl = responseUrl_example;  // String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var extendedMerchantCallback = true;  // Boolean | Define which url should be returned (optional)  (default to false)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information needed for create subscription
                PaymentRequest result = apiInstance.getSopPaymentRequestDetails(responseUrl, baseSiteId, userId, cartId, extendedMerchantCallback, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getSopPaymentRequestDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$responseUrl = responseUrl_example; // String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$extendedMerchantCallback = true; // Boolean | Define which url should be returned
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getSopPaymentRequestDetails($responseUrl, $baseSiteId, $userId, $cartId, $extendedMerchantCallback, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getSopPaymentRequestDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $responseUrl = responseUrl_example; # String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $extendedMerchantCallback = true; # Boolean | Define which url should be returned
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getSopPaymentRequestDetails(responseUrl => $responseUrl, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, extendedMerchantCallback => $extendedMerchantCallback, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getSopPaymentRequestDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
responseUrl = responseUrl_example # String | The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
extendedMerchantCallback = true # Boolean | Define which url should be returned (optional) (default to false)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information needed for create subscription
    api_response = api_instance.get_sop_payment_request_details(responseUrl, baseSiteId, userId, cartId, extendedMerchantCallback=extendedMerchantCallback, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getSopPaymentRequestDetails: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
responseUrl*
String
The URL that the payment provider uses to return payment information. Possible values for responseUrl include the following: ?orderPage_cancelResponseURL?, ?orderPage_declineResponseURL?, and ?orderPage_receiptResponseURL?.
Required
extendedMerchantCallback
Boolean
Define which url should be returned
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getSopPaymentResponse

Get information about create subscription request results

Returns information related to creating subscription request results. If there is no response from the payment provider, a "202 Accepted" status is returned. If the subscription is created successfully, the payment details are returned. Otherwise, an error response is returned. Note, the ?Try it out? button is not enabled for this method (always returns an error) because the Extended Carts Controller handles parameters differently, depending on which payment provider is used. For more information about this controller, please refer to the ?acceleratorocc AddOn? documentation on help.hybris.com.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.getSopPaymentResponse(cartId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.getSopPaymentResponse(cartId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#getSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Get information about create subscription request results
[apiInstance getSopPaymentResponseWith:cartId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(PaymentDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSopPaymentResponse(cartId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSopPaymentResponseExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about create subscription request results
                PaymentDetails result = apiInstance.getSopPaymentResponse(cartId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.getSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getSopPaymentResponse($cartId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->getSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getSopPaymentResponse(cartId => $cartId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->getSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about create subscription request results
    api_response = api_instance.get_sop_payment_response(cartId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->getSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeCart

Deletes a cart with a given cart id.

Deletes a cart with a specified cart id.


/{baseSiteId}/users/{userId}/carts/{cartId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCart(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#removeCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.removeCart(baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#removeCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartsApi *apiInstance = [[CartsApi alloc] init];

// Deletes a cart with a given cart id.
[apiInstance removeCartWith:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeCart(baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Deletes a cart with a given cart id.
                apiInstance.removeCart(baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.removeCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->removeCart($baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->removeCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->removeCart(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartsApi->removeCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Deletes a cart with a given cart id.
    api_instance.remove_cart(baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartsApi->removeCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeSopPaymentResponse

Deletes payment provider response related to cart.

Deletes the payment provider response related to the specified cart.


/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/payment/sop/response"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSopPaymentResponse(cartId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#removeSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeSopPaymentResponse(cartId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#removeSopPaymentResponse");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

CartsApi *apiInstance = [[CartsApi alloc] init];

// Deletes payment provider response related to cart.
[apiInstance removeSopPaymentResponseWith:cartId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeSopPaymentResponse(cartId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeSopPaymentResponseExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes payment provider response related to cart.
                apiInstance.removeSopPaymentResponse(cartId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.removeSopPaymentResponse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeSopPaymentResponse($cartId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->removeSopPaymentResponse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeSopPaymentResponse(cartId => $cartId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling CartsApi->removeSopPaymentResponse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes payment provider response related to cart.
    api_instance.remove_sop_payment_response(cartId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling CartsApi->removeSopPaymentResponse: %s\n" % e)

Parameters

Path parameters
Name Description
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceCartGuestUser

Assigns an email to the cart.

Assigns an email to the cart. This step is required to make a guest checkout.


/{baseSiteId}/users/{userId}/carts/{cartId}/email

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/email?email="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartGuestUser(email, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#replaceCartGuestUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String email = email_example; // String | Email of the guest user. It will be used during the checkout process.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        try {
            apiInstance.replaceCartGuestUser(email, baseSiteId, userId, cartId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#replaceCartGuestUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *email = email_example; // Email of the guest user. It will be used during the checkout process.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

CartsApi *apiInstance = [[CartsApi alloc] init];

// Assigns an email to the cart.
[apiInstance replaceCartGuestUserWith:email
    baseSiteId:baseSiteId
    userId:userId
    cartId:cartId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var email = email_example; // {{String}} Email of the guest user. It will be used during the checkout process.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceCartGuestUser(email, baseSiteId, userId, cartId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceCartGuestUserExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var email = email_example;  // String | Email of the guest user. It will be used during the checkout process.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

            try
            {
                // Assigns an email to the cart.
                apiInstance.replaceCartGuestUser(email, baseSiteId, userId, cartId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.replaceCartGuestUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$email = email_example; // String | Email of the guest user. It will be used during the checkout process.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try {
    $api_instance->replaceCartGuestUser($email, $baseSiteId, $userId, $cartId);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->replaceCartGuestUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $email = email_example; # String | Email of the guest user. It will be used during the checkout process.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

eval { 
    $api_instance->replaceCartGuestUser(email => $email, baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId);
};
if ($@) {
    warn "Exception when calling CartsApi->replaceCartGuestUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
email = email_example # String | Email of the guest user. It will be used during the checkout process.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart

try: 
    # Assigns an email to the cart.
    api_instance.replace_cart_guest_user(email, baseSiteId, userId, cartId)
except ApiException as e:
    print("Exception when calling CartsApi->replaceCartGuestUser: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
email*
String
Email of the guest user. It will be used during the checkout process.
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


validateCart

Validates the cart

Runs a cart validation and returns the result.


/{baseSiteId}/users/{userId}/carts/{cartId}/validate

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/carts/{cartId}/validate?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartsApi;

import java.io.File;
import java.util.*;

public class CartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.validateCart(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#validateCart");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CartsApi;

public class CartsApiExample {

    public static void main(String[] args) {
        CartsApi apiInstance = new CartsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CartModificationList result = apiInstance.validateCart(baseSiteId, userId, cartId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CartsApi#validateCart");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CartsApi *apiInstance = [[CartsApi alloc] init];

// Validates the cart
[apiInstance validateCartWith:baseSiteId
    userId:userId
    cartId:cartId
    fields:fields
              completionHandler: ^(CartModificationList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CartsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.validateCart(baseSiteId, userId, cartId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class validateCartExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CartsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Validates the cart
                CartModificationList result = apiInstance.validateCart(baseSiteId, userId, cartId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CartsApi.validateCart: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCartsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->validateCart($baseSiteId, $userId, $cartId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CartsApi->validateCart: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CartsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->validateCart(baseSiteId => $baseSiteId, userId => $userId, cartId => $cartId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CartsApi->validateCart: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CartsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Validates the cart
    api_response = api_instance.validate_cart(baseSiteId, userId, cartId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CartsApi->validateCart: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Catalogs

getCatalog

Get a catalog

Returns information about a catalog based on its ID, along with the versions defined for the current base store.


/{baseSiteId}/catalogs/{catalogId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

import java.io.File;
import java.util.*;

public class CatalogsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Catalog result = apiInstance.getCatalog(catalogId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalog");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CatalogsApi;

public class CatalogsApiExample {

    public static void main(String[] args) {
        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Catalog result = apiInstance.getCatalog(catalogId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalog");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *catalogId = catalogId_example; // Catalog identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CatalogsApi *apiInstance = [[CatalogsApi alloc] init];

// Get a catalog
[apiInstance getCatalogWith:catalogId
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(Catalog output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var catalogId = catalogId_example; // {{String}} Catalog identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalog(catalogId, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var catalogId = catalogId_example;  // String | Catalog identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a catalog
                Catalog result = apiInstance.getCatalog(catalogId, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalog: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$catalogId = catalogId_example; // String | Catalog identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalog($catalogId, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalog: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $catalogId = catalogId_example; # String | Catalog identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalog(catalogId => $catalogId, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalog: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
catalogId = catalogId_example # String | Catalog identifier
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a catalog
    api_response = api_instance.get_catalog(catalogId, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalog: %s\n" % e)

Parameters

Path parameters
Name Description
catalogId*
String
Catalog identifier
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCatalogVersion

Get information about catalog version

Returns information about the catalog version that exists for the current base store.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

import java.io.File;
import java.util.*;

public class CatalogsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogVersion result = apiInstance.getCatalogVersion(catalogId, catalogVersionId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CatalogsApi;

public class CatalogsApiExample {

    public static void main(String[] args) {
        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogVersion result = apiInstance.getCatalogVersion(catalogId, catalogVersionId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *catalogId = catalogId_example; // Catalog identifier
String *catalogVersionId = catalogVersionId_example; // Catalog version identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CatalogsApi *apiInstance = [[CatalogsApi alloc] init];

// Get information about catalog version
[apiInstance getCatalogVersionWith:catalogId
    catalogVersionId:catalogVersionId
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(CatalogVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalogVersion(catalogId, catalogVersionId, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogVersionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about catalog version
                CatalogVersion result = apiInstance.getCatalogVersion(catalogId, catalogVersionId, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalogVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalogVersion($catalogId, $catalogVersionId, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalogVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalogVersion(catalogId => $catalogId, catalogVersionId => $catalogVersionId, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalogVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version identifier
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about catalog version
    api_response = api_instance.get_catalog_version(catalogId, catalogVersionId, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalogVersion: %s\n" % e)

Parameters

Path parameters
Name Description
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version identifier
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCatalogs

Get a list of catalogs

Returns all catalogs with versions defined for the base store.


/{baseSiteId}/catalogs

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

import java.io.File;
import java.util.*;

public class CatalogsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CatalogsApi apiInstance = new CatalogsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CatalogsApi;

public class CatalogsApiExample {

    public static void main(String[] args) {
        CatalogsApi apiInstance = new CatalogsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCatalogs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CatalogsApi *apiInstance = [[CatalogsApi alloc] init];

// Get a list of catalogs
[apiInstance getCatalogsWith:baseSiteId
    fields:fields
              completionHandler: ^(CatalogList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCatalogs(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCatalogsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of catalogs
                CatalogList result = apiInstance.getCatalogs(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCatalogs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCatalogs($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCatalogs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCatalogs(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCatalogs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of catalogs
    api_response = api_instance.get_catalogs(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCatalogs: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCategories

Get information about catagory in a catalog version

Returns information about a specified category that exists in a catalog version available for the current base store.


/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}/categories/{categoryId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CatalogsApi;

import java.io.File;
import java.util.*;

public class CatalogsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String categoryId = categoryId_example; // String | Category identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CategoryHierarchy result = apiInstance.getCategories(catalogId, catalogVersionId, categoryId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCategories");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CatalogsApi;

public class CatalogsApiExample {

    public static void main(String[] args) {
        CatalogsApi apiInstance = new CatalogsApi();
        String catalogId = catalogId_example; // String | Catalog identifier
        String catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
        String categoryId = categoryId_example; // String | Category identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CategoryHierarchy result = apiInstance.getCategories(catalogId, catalogVersionId, categoryId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CatalogsApi#getCategories");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *catalogId = catalogId_example; // Catalog identifier
String *catalogVersionId = catalogVersionId_example; // Catalog version identifier
String *categoryId = categoryId_example; // Category identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CatalogsApi *apiInstance = [[CatalogsApi alloc] init];

// Get information about catagory in a catalog version
[apiInstance getCategoriesWith:catalogId
    catalogVersionId:catalogVersionId
    categoryId:categoryId
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(CategoryHierarchy output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CatalogsApi()
var catalogId = catalogId_example; // {{String}} Catalog identifier
var catalogVersionId = catalogVersionId_example; // {{String}} Catalog version identifier
var categoryId = categoryId_example; // {{String}} Category identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCategories(catalogId, catalogVersionId, categoryId, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCategoriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CatalogsApi();
            var catalogId = catalogId_example;  // String | Catalog identifier
            var catalogVersionId = catalogVersionId_example;  // String | Catalog version identifier
            var categoryId = categoryId_example;  // String | Category identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get information about catagory in a catalog version
                CategoryHierarchy result = apiInstance.getCategories(catalogId, catalogVersionId, categoryId, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CatalogsApi.getCategories: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCatalogsApi();
$catalogId = catalogId_example; // String | Catalog identifier
$catalogVersionId = catalogVersionId_example; // String | Catalog version identifier
$categoryId = categoryId_example; // String | Category identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCategories($catalogId, $catalogVersionId, $categoryId, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogsApi->getCategories: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CatalogsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CatalogsApi->new();
my $catalogId = catalogId_example; # String | Catalog identifier
my $catalogVersionId = catalogVersionId_example; # String | Catalog version identifier
my $categoryId = categoryId_example; # String | Category identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCategories(catalogId => $catalogId, catalogVersionId => $catalogVersionId, categoryId => $categoryId, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CatalogsApi->getCategories: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CatalogsApi()
catalogId = catalogId_example # String | Catalog identifier
catalogVersionId = catalogVersionId_example # String | Catalog version identifier
categoryId = categoryId_example # String | Category identifier
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get information about catagory in a catalog version
    api_response = api_instance.get_categories(catalogId, catalogVersionId, categoryId, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CatalogsApi->getCategories: %s\n" % e)

Parameters

Path parameters
Name Description
catalogId*
String
Catalog identifier
Required
catalogVersionId*
String
Catalog version identifier
Required
categoryId*
String
Category identifier
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Consents

doGiveConsent

A user can give consent.

A user gives consent with specified consent template and version.


/{baseSiteId}/users/{userId}/consents

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consents?consentTemplateId=&consentTemplateVersion="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

import java.io.File;
import java.util.*;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ConsentsApi apiInstance = new ConsentsApi();
        String consentTemplateId = consentTemplateId_example; // String | Consent template ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConsentTemplate result = apiInstance.doGiveConsent(consentTemplateId, consentTemplateVersion, baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#doGiveConsent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String consentTemplateId = consentTemplateId_example; // String | Consent template ID.
        Integer consentTemplateVersion = 56; // Integer | Consent template version.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            ConsentTemplate result = apiInstance.doGiveConsent(consentTemplateId, consentTemplateVersion, baseSiteId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#doGiveConsent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *consentTemplateId = consentTemplateId_example; // Consent template ID.
Integer *consentTemplateVersion = 56; // Consent template version.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// A user can give consent.
[apiInstance doGiveConsentWith:consentTemplateId
    consentTemplateVersion:consentTemplateVersion
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(ConsentTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template ID.
var consentTemplateVersion = 56; // {{Integer}} Consent template version.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doGiveConsent(consentTemplateId, consentTemplateVersion, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doGiveConsentExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var consentTemplateId = consentTemplateId_example;  // String | Consent template ID.
            var consentTemplateVersion = 56;  // Integer | Consent template version.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // A user can give consent.
                ConsentTemplate result = apiInstance.doGiveConsent(consentTemplateId, consentTemplateVersion, baseSiteId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.doGiveConsent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$consentTemplateId = consentTemplateId_example; // String | Consent template ID.
$consentTemplateVersion = 56; // Integer | Consent template version.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $result = $api_instance->doGiveConsent($consentTemplateId, $consentTemplateVersion, $baseSiteId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->doGiveConsent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $consentTemplateId = consentTemplateId_example; # String | Consent template ID.
my $consentTemplateVersion = 56; # Integer | Consent template version.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    my $result = $api_instance->doGiveConsent(consentTemplateId => $consentTemplateId, consentTemplateVersion => $consentTemplateVersion, baseSiteId => $baseSiteId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->doGiveConsent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
consentTemplateId = consentTemplateId_example # String | Consent template ID.
consentTemplateVersion = 56 # Integer | Consent template version.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # A user can give consent.
    api_response = api_instance.do_give_consent(consentTemplateId, consentTemplateVersion, baseSiteId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->doGiveConsent: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
consentTemplateId*
String
Consent template ID.
Required
consentTemplateVersion*
Integer (int32)
Consent template version.
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getConsentTemplate

Fetch the consent.

If user has not given or withdrawn consent to the template, no given or withdraw date is returned.


/{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consenttemplates/{consentTemplateId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

import java.io.File;
import java.util.*;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ConsentsApi apiInstance = new ConsentsApi();
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(consentTemplateId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String consentTemplateId = consentTemplateId_example; // String | Consent template id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplate result = apiInstance.getConsentTemplate(consentTemplateId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *consentTemplateId = consentTemplateId_example; // Consent template id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Fetch the consent.
[apiInstance getConsentTemplateWith:consentTemplateId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ConsentTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var consentTemplateId = consentTemplateId_example; // {{String}} Consent template id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConsentTemplate(consentTemplateId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConsentTemplateExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var consentTemplateId = consentTemplateId_example;  // String | Consent template id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Fetch the consent.
                ConsentTemplate result = apiInstance.getConsentTemplate(consentTemplateId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.getConsentTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$consentTemplateId = consentTemplateId_example; // String | Consent template id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getConsentTemplate($consentTemplateId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->getConsentTemplate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $consentTemplateId = consentTemplateId_example; # String | Consent template id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getConsentTemplate(consentTemplateId => $consentTemplateId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->getConsentTemplate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
consentTemplateId = consentTemplateId_example # String | Consent template id.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Fetch the consent.
    api_response = api_instance.get_consent_template(consentTemplateId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->getConsentTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
consentTemplateId*
String
Consent template id.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getConsentTemplates

Fetch the list of consents

If user has not given or withdrawn consent to any of the template, no given or withdraw date is returned.


/{baseSiteId}/users/{userId}/consenttemplates

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consenttemplates?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

import java.io.File;
import java.util.*;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplateList result = apiInstance.getConsentTemplates(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ConsentTemplateList result = apiInstance.getConsentTemplates(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#getConsentTemplates");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Fetch the list of consents
[apiInstance getConsentTemplatesWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ConsentTemplateList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getConsentTemplates(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getConsentTemplatesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Fetch the list of consents
                ConsentTemplateList result = apiInstance.getConsentTemplates(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.getConsentTemplates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getConsentTemplates($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->getConsentTemplates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getConsentTemplates(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ConsentsApi->getConsentTemplates: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Fetch the list of consents
    api_response = api_instance.get_consent_templates(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConsentsApi->getConsentTemplates: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeConsent

Withdraw the user consent for a given consent code.

If the user consent was given, the consent is withdrawn. If consent was already withdrawn then returns consent already withdrawn error. If there is no such consent then returns not found. If the current user is an anonymous user then returns access denied error.


/{baseSiteId}/users/{userId}/consents/{consentCode}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/consents/{consentCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConsentsApi;

import java.io.File;
import java.util.*;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ConsentsApi apiInstance = new ConsentsApi();
        String consentCode = consentCode_example; // String | Consent code.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeConsent(consentCode, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#removeConsent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConsentsApi;

public class ConsentsApiExample {

    public static void main(String[] args) {
        ConsentsApi apiInstance = new ConsentsApi();
        String consentCode = consentCode_example; // String | Consent code.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeConsent(consentCode, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConsentsApi#removeConsent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *consentCode = consentCode_example; // Consent code.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

ConsentsApi *apiInstance = [[ConsentsApi alloc] init];

// Withdraw the user consent for a given consent code.
[apiInstance removeConsentWith:consentCode
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ConsentsApi()
var consentCode = consentCode_example; // {{String}} Consent code.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeConsent(consentCode, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeConsentExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ConsentsApi();
            var consentCode = consentCode_example;  // String | Consent code.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Withdraw the user consent for a given consent code.
                apiInstance.removeConsent(consentCode, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConsentsApi.removeConsent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiConsentsApi();
$consentCode = consentCode_example; // String | Consent code.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeConsent($consentCode, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling ConsentsApi->removeConsent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConsentsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ConsentsApi->new();
my $consentCode = consentCode_example; # String | Consent code.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeConsent(consentCode => $consentCode, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling ConsentsApi->removeConsent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ConsentsApi()
consentCode = consentCode_example # String | Consent code.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Withdraw the user consent for a given consent code.
    api_instance.remove_consent(consentCode, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling ConsentsApi->removeConsent: %s\n" % e)

Parameters

Path parameters
Name Description
consentCode*
String
Consent code.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Countries

getCountries

Get a list of countries.

If the value of type equals to shipping, then return shipping countries. If the value of type equals to billing, then return billing countries. If the value of type is not given, return all countries. The list is sorted alphabetically.


/{baseSiteId}/countries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/countries?type=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CountriesApi;

import java.io.File;
import java.util.*;

public class CountriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CountriesApi apiInstance = new CountriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | The type of countries.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CountryList result = apiInstance.getCountries(baseSiteId, type, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#getCountries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CountriesApi;

public class CountriesApiExample {

    public static void main(String[] args) {
        CountriesApi apiInstance = new CountriesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String type = type_example; // String | The type of countries.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CountryList result = apiInstance.getCountries(baseSiteId, type, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#getCountries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *type = type_example; // The type of countries. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CountriesApi *apiInstance = [[CountriesApi alloc] init];

// Get a list of countries.
[apiInstance getCountriesWith:baseSiteId
    type:type
    fields:fields
              completionHandler: ^(CountryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CountriesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'type': type_example, // {{String}} The type of countries.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountries(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CountriesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var type = type_example;  // String | The type of countries. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of countries.
                CountryList result = apiInstance.getCountries(baseSiteId, type, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CountriesApi.getCountries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCountriesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$type = type_example; // String | The type of countries.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCountries($baseSiteId, $type, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountriesApi->getCountries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CountriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CountriesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $type = type_example; # String | The type of countries.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCountries(baseSiteId => $baseSiteId, type => $type, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CountriesApi->getCountries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CountriesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
type = type_example # String | The type of countries. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of countries.
    api_response = api_instance.get_countries(baseSiteId, type=type, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->getCountries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
type
String
The type of countries.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCountryRegions

Fetch the list of regions for the provided country.

Lists all regions.


/{baseSiteId}/countries/{countyIsoCode}/regions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/countries/{countyIsoCode}/regions?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CountriesApi;

import java.io.File;
import java.util.*;

public class CountriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CountriesApi apiInstance = new CountriesApi();
        String countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            RegionList result = apiInstance.getCountryRegions(countyIsoCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#getCountryRegions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CountriesApi;

public class CountriesApiExample {

    public static void main(String[] args) {
        CountriesApi apiInstance = new CountriesApi();
        String countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            RegionList result = apiInstance.getCountryRegions(countyIsoCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#getCountryRegions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *countyIsoCode = countyIsoCode_example; // An ISO code for a country
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

CountriesApi *apiInstance = [[CountriesApi alloc] init];

// Fetch the list of regions for the provided country.
[apiInstance getCountryRegionsWith:countyIsoCode
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(RegionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CountriesApi()
var countyIsoCode = countyIsoCode_example; // {{String}} An ISO code for a country
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountryRegions(countyIsoCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountryRegionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CountriesApi();
            var countyIsoCode = countyIsoCode_example;  // String | An ISO code for a country
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Fetch the list of regions for the provided country.
                RegionList result = apiInstance.getCountryRegions(countyIsoCode, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CountriesApi.getCountryRegions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCountriesApi();
$countyIsoCode = countyIsoCode_example; // String | An ISO code for a country
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCountryRegions($countyIsoCode, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountriesApi->getCountryRegions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CountriesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CountriesApi->new();
my $countyIsoCode = countyIsoCode_example; # String | An ISO code for a country
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCountryRegions(countyIsoCode => $countyIsoCode, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CountriesApi->getCountryRegions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CountriesApi()
countyIsoCode = countyIsoCode_example # String | An ISO code for a country
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Fetch the list of regions for the provided country.
    api_response = api_instance.get_country_regions(countyIsoCode, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->getCountryRegions: %s\n" % e)

Parameters

Path parameters
Name Description
countyIsoCode*
String
An ISO code for a country
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


CustomerGroups

createCustomerGroup

Creates a new customer group.

Creates a new customer group that is a direct subgroup of a customergroup. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        UserGroup body = ; // UserGroup | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.createCustomerGroup(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#createCustomerGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        UserGroup body = ; // UserGroup | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.createCustomerGroup(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#createCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
UserGroup *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Creates a new customer group.
[apiInstance createCustomerGroupWith:body
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var body = ; // {{UserGroup}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createCustomerGroup(bodybaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var body = new UserGroup(); // UserGroup | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Creates a new customer group.
                apiInstance.createCustomerGroup(body, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.createCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$body = ; // UserGroup | 
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->createCustomerGroup($body, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->createCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $body = WWW::SwaggerClient::Object::UserGroup->new(); # UserGroup | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->createCustomerGroup(body => $body, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->createCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
body =  # UserGroup | 
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Creates a new customer group.
    api_instance.create_customer_group(body, baseSiteId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->createCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getCustomerGroup

Get a specific customer group.

Returns a customer group with a specific groupId. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups/{groupId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroup result = apiInstance.getCustomerGroup(groupId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroup result = apiInstance.getCustomerGroup(groupId, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *groupId = groupId_example; // Group identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Get a specific customer group.
[apiInstance getCustomerGroupWith:groupId
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(UserGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var groupId = groupId_example; // {{String}} Group identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomerGroup(groupId, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var groupId = groupId_example;  // String | Group identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to BASIC)

            try
            {
                // Get a specific customer group.
                UserGroup result = apiInstance.getCustomerGroup(groupId, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.getCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$groupId = groupId_example; // String | Group identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCustomerGroup($groupId, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->getCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $groupId = groupId_example; # String | Group identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCustomerGroup(groupId => $groupId, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->getCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
groupId = groupId_example # String | Group identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

try: 
    # Get a specific customer group.
    api_response = api_instance.get_customer_group(groupId, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->getCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
groupId*
String
Group identifier.
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCustomerGroups

Get all subgroups of a customergroup.

Returns all customer groups that are direct subgroups of a customergroup. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups?currentPage=&pageSize=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | Current page number (starts with 0).
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, pageSize, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | Current page number (starts with 0).
        Integer pageSize = 56; // Integer | Number of customer group returned in one page.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, pageSize, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#getCustomerGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // Current page number (starts with 0). (optional) (default to 0)
Integer *pageSize = 56; // Number of customer group returned in one page. (optional) (default to 20)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Get all subgroups of a customergroup.
[apiInstance getCustomerGroupsWith:baseSiteId
    currentPage:currentPage
    pageSize:pageSize
    fields:fields
              completionHandler: ^(UserGroupList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} Current page number (starts with 0).
  'pageSize': 56, // {{Integer}} Number of customer group returned in one page.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomerGroups(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCustomerGroupsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | Current page number (starts with 0). (optional)  (default to 0)
            var pageSize = 56;  // Integer | Number of customer group returned in one page. (optional)  (default to 20)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to BASIC)

            try
            {
                // Get all subgroups of a customergroup.
                UserGroupList result = apiInstance.getCustomerGroups(baseSiteId, currentPage, pageSize, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.getCustomerGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | Current page number (starts with 0).
$pageSize = 56; // Integer | Number of customer group returned in one page.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCustomerGroups($baseSiteId, $currentPage, $pageSize, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->getCustomerGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | Current page number (starts with 0).
my $pageSize = 56; # Integer | Number of customer group returned in one page.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCustomerGroups(baseSiteId => $baseSiteId, currentPage => $currentPage, pageSize => $pageSize, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->getCustomerGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | Current page number (starts with 0). (optional) (default to 0)
pageSize = 56 # Integer | Number of customer group returned in one page. (optional) (default to 20)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to BASIC)

try: 
    # Get all subgroups of a customergroup.
    api_response = api_instance.get_customer_groups(baseSiteId, currentPage=currentPage, pageSize=pageSize, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->getCustomerGroups: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
Current page number (starts with 0).
pageSize
Integer (int32)
Number of customer group returned in one page.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeUsersFromCustomerGroup

Deletes a user from a customer group.

Deletes user from a customer group. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups/{groupId}/members/{userId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String groupId = groupId_example; // String | Group identifier.
        String userId = userId_example; // String | User identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.removeUsersFromCustomerGroup(groupId, userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#removeUsersFromCustomerGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        String groupId = groupId_example; // String | Group identifier.
        String userId = userId_example; // String | User identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.removeUsersFromCustomerGroup(groupId, userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#removeUsersFromCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *groupId = groupId_example; // Group identifier.
String *userId = userId_example; // User identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Deletes a user from a customer group.
[apiInstance removeUsersFromCustomerGroupWith:groupId
    userId:userId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var groupId = groupId_example; // {{String}} Group identifier.
var userId = userId_example; // {{String}} User identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeUsersFromCustomerGroup(groupId, userId, baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeUsersFromCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var groupId = groupId_example;  // String | Group identifier.
            var userId = userId_example;  // String | User identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Deletes a user from a customer group.
                apiInstance.removeUsersFromCustomerGroup(groupId, userId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.removeUsersFromCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$groupId = groupId_example; // String | Group identifier.
$userId = userId_example; // String | User identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->removeUsersFromCustomerGroup($groupId, $userId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $groupId = groupId_example; # String | Group identifier.
my $userId = userId_example; # String | User identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->removeUsersFromCustomerGroup(groupId => $groupId, userId => $userId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
groupId = groupId_example # String | Group identifier.
userId = userId_example # String | User identifier.
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Deletes a user from a customer group.
    api_instance.remove_users_from_customer_group(groupId, userId, baseSiteId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->removeUsersFromCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
groupId*
String
Group identifier.
Required
userId*
String
User identifier.
Required
baseSiteId*
String
Base site identifier
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replaceUsersForCustomerGroup

Sets members for a user group.

Sets members for a user group. The list of existing members is overwritten with a new one. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups/{groupId}/members

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.replaceUsersForCustomerGroup(body, groupId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#replaceUsersForCustomerGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.replaceUsersForCustomerGroup(body, groupId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#replaceUsersForCustomerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
MemberList *body = ; // 
String *groupId = groupId_example; // Group identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Sets members for a user group.
[apiInstance replaceUsersForCustomerGroupWith:body
    groupId:groupId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var body = ; // {{MemberList}} 
var groupId = groupId_example; // {{String}} Group identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replaceUsersForCustomerGroup(bodygroupIdbaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replaceUsersForCustomerGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var body = new MemberList(); // MemberList | 
            var groupId = groupId_example;  // String | Group identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Sets members for a user group.
                apiInstance.replaceUsersForCustomerGroup(body, groupId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.replaceUsersForCustomerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$body = ; // MemberList | 
$groupId = groupId_example; // String | Group identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->replaceUsersForCustomerGroup($body, $groupId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->replaceUsersForCustomerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $body = WWW::SwaggerClient::Object::MemberList->new(); # MemberList | 
my $groupId = groupId_example; # String | Group identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->replaceUsersForCustomerGroup(body => $body, groupId => $groupId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->replaceUsersForCustomerGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
body =  # MemberList | 
groupId = groupId_example # String | Group identifier.
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Sets members for a user group.
    api_instance.replace_users_for_customer_group(body, groupId, baseSiteId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->replaceUsersForCustomerGroup: %s\n" % e)

Parameters

Path parameters
Name Description
groupId*
String
Group identifier.
Required
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateCustomerGroupWithUsers

Assigns user(s) to a customer group.

Assigns user(s) to a customer group. To try out the methods of the Customer Groups controller, you must authorize a user who belongs to the ?customermanagergroup?.


/{baseSiteId}/customergroups/{groupId}/members

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/customergroups/{groupId}/members"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomerGroupsApi;

import java.io.File;
import java.util.*;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.updateCustomerGroupWithUsers(body, groupId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#updateCustomerGroupWithUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomerGroupsApi;

public class CustomerGroupsApiExample {

    public static void main(String[] args) {
        CustomerGroupsApi apiInstance = new CustomerGroupsApi();
        MemberList body = ; // MemberList | 
        String groupId = groupId_example; // String | Group identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.updateCustomerGroupWithUsers(body, groupId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerGroupsApi#updateCustomerGroupWithUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
MemberList *body = ; // 
String *groupId = groupId_example; // Group identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier

CustomerGroupsApi *apiInstance = [[CustomerGroupsApi alloc] init];

// Assigns user(s) to a customer group.
[apiInstance updateCustomerGroupWithUsersWith:body
    groupId:groupId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.CustomerGroupsApi()
var body = ; // {{MemberList}} 
var groupId = groupId_example; // {{String}} Group identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateCustomerGroupWithUsers(bodygroupIdbaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateCustomerGroupWithUsersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CustomerGroupsApi();
            var body = new MemberList(); // MemberList | 
            var groupId = groupId_example;  // String | Group identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Assigns user(s) to a customer group.
                apiInstance.updateCustomerGroupWithUsers(body, groupId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomerGroupsApi.updateCustomerGroupWithUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiCustomerGroupsApi();
$body = ; // MemberList | 
$groupId = groupId_example; // String | Group identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->updateCustomerGroupWithUsers($body, $groupId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling CustomerGroupsApi->updateCustomerGroupWithUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomerGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::CustomerGroupsApi->new();
my $body = WWW::SwaggerClient::Object::MemberList->new(); # MemberList | 
my $groupId = groupId_example; # String | Group identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->updateCustomerGroupWithUsers(body => $body, groupId => $groupId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling CustomerGroupsApi->updateCustomerGroupWithUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.CustomerGroupsApi()
body =  # MemberList | 
groupId = groupId_example # String | Group identifier.
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Assigns user(s) to a customer group.
    api_instance.update_customer_group_with_users(body, groupId, baseSiteId)
except ApiException as e:
    print("Exception when calling CustomerGroupsApi->updateCustomerGroupWithUsers: %s\n" % e)

Parameters

Path parameters
Name Description
groupId*
String
Group identifier.
Required
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Export

getExportedProducts

Get a list of product exports.

Used for product export. Depending on the timestamp parameter, it can return all products or only products modified after the given time.


/{baseSiteId}/export/products

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/export/products?currentPage=&pageSize=&catalog=&version=×tamp=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExportApi;

import java.io.File;
import java.util.*;

public class ExportApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ExportApi apiInstance = new ExportApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, currentPage, pageSize, catalog, version, timestamp, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#getExportedProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExportApi;

public class ExportApiExample {

    public static void main(String[] args) {
        ExportApi apiInstance = new ExportApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
        String version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
        String timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductList result = apiInstance.getExportedProducts(baseSiteId, currentPage, pageSize, catalog, version, timestamp, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExportApi#getExportedProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *catalog = catalog_example; // The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
String *version = version_example; // The catalog version. The catalog version must be provided along with the catalog. (optional)
String *timestamp = timestamp_example; // When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

ExportApi *apiInstance = [[ExportApi alloc] init];

// Get a list of product exports.
[apiInstance getExportedProductsWith:baseSiteId
    currentPage:currentPage
    pageSize:pageSize
    catalog:catalog
    version:version
    timestamp:timestamp
    fields:fields
              completionHandler: ^(ProductList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ExportApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'catalog': catalog_example, // {{String}} The catalog to retrieve products from. The catalog must be provided along with the version.
  'version': version_example, // {{String}} The catalog version. The catalog version must be provided along with the catalog.
  'timestamp': timestamp_example, // {{String}} When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getExportedProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getExportedProductsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ExportApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var catalog = catalog_example;  // String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional) 
            var version = version_example;  // String | The catalog version. The catalog version must be provided along with the catalog. (optional) 
            var timestamp = timestamp_example;  // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of product exports.
                ProductList result = apiInstance.getExportedProducts(baseSiteId, currentPage, pageSize, catalog, version, timestamp, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExportApi.getExportedProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiExportApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$catalog = catalog_example; // String | The catalog to retrieve products from. The catalog must be provided along with the version.
$version = version_example; // String | The catalog version. The catalog version must be provided along with the catalog.
$timestamp = timestamp_example; // String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getExportedProducts($baseSiteId, $currentPage, $pageSize, $catalog, $version, $timestamp, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExportApi->getExportedProducts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExportApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ExportApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $catalog = catalog_example; # String | The catalog to retrieve products from. The catalog must be provided along with the version.
my $version = version_example; # String | The catalog version. The catalog version must be provided along with the catalog.
my $timestamp = timestamp_example; # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getExportedProducts(baseSiteId => $baseSiteId, currentPage => $currentPage, pageSize => $pageSize, catalog => $catalog, version => $version, timestamp => $timestamp, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExportApi->getExportedProducts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ExportApi()
baseSiteId = baseSiteId_example # String | Base site identifier
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
catalog = catalog_example # String | The catalog to retrieve products from. The catalog must be provided along with the version. (optional)
version = version_example # String | The catalog version. The catalog version must be provided along with the catalog. (optional)
timestamp = timestamp_example # String | When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000). (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of product exports.
    api_response = api_instance.get_exported_products(baseSiteId, currentPage=currentPage, pageSize=pageSize, catalog=catalog, version=version, timestamp=timestamp, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->getExportedProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
catalog
String
The catalog to retrieve products from. The catalog must be provided along with the version.
version
String
The catalog version. The catalog version must be provided along with the catalog.
timestamp
String
When this parameter is set, only products modified after the given time will be returned. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Feeds

getOrderStatusFeed

Get a list of orders with status updates.

Returns the orders that have changed status. Returns only the elements from the current baseSite that have been updated after the provided timestamp.


/{baseSiteId}/feeds/orders/statusfeed

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/feeds/orders/statusfeed?timestamp=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FeedsApi;

import java.io.File;
import java.util.*;

public class FeedsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FeedsApi apiInstance = new FeedsApi();
        String timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderStatusUpdateElementList result = apiInstance.getOrderStatusFeed(timestamp, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeedsApi#getOrderStatusFeed");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FeedsApi;

public class FeedsApiExample {

    public static void main(String[] args) {
        FeedsApi apiInstance = new FeedsApi();
        String timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderStatusUpdateElementList result = apiInstance.getOrderStatusFeed(timestamp, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeedsApi#getOrderStatusFeed");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *timestamp = timestamp_example; // Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

FeedsApi *apiInstance = [[FeedsApi alloc] init];

// Get a list of orders with status updates.
[apiInstance getOrderStatusFeedWith:timestamp
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(OrderStatusUpdateElementList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FeedsApi()
var timestamp = timestamp_example; // {{String}} Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderStatusFeed(timestamp, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderStatusFeedExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FeedsApi();
            var timestamp = timestamp_example;  // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of orders with status updates.
                OrderStatusUpdateElementList result = apiInstance.getOrderStatusFeed(timestamp, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FeedsApi.getOrderStatusFeed: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFeedsApi();
$timestamp = timestamp_example; // String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderStatusFeed($timestamp, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FeedsApi->getOrderStatusFeed: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FeedsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FeedsApi->new();
my $timestamp = timestamp_example; # String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderStatusFeed(timestamp => $timestamp, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FeedsApi->getOrderStatusFeed: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FeedsApi()
timestamp = timestamp_example # String | Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of orders with status updates.
    api_response = api_instance.get_order_status_feed(timestamp, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FeedsApi->getOrderStatusFeed: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
timestamp*
String
Only items newer than the given parameter are retrieved. This parameter should be in ISO-8601 format (for example, 2018-01-09T16:28:45+0000).
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


ForgottenPasswords

doResetPassword

Reset password after customer's clicked forgotten password link.

Reset password after customer's clicked forgotten password link. A new password needs to be provided.


/{baseSiteId}/resetpassword

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/resetpassword"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ForgottenPasswordsApi;

import java.io.File;
import java.util.*;

public class ForgottenPasswordsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        ResetPassword body = ; // ResetPassword | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doResetPassword(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ForgottenPasswordsApi#doResetPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ForgottenPasswordsApi;

public class ForgottenPasswordsApiExample {

    public static void main(String[] args) {
        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        ResetPassword body = ; // ResetPassword | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doResetPassword(body, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ForgottenPasswordsApi#doResetPassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ResetPassword *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier

ForgottenPasswordsApi *apiInstance = [[ForgottenPasswordsApi alloc] init];

// Reset password after customer's clicked forgotten password link.
[apiInstance doResetPasswordWith:body
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ForgottenPasswordsApi()
var body = ; // {{ResetPassword}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doResetPassword(bodybaseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doResetPasswordExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ForgottenPasswordsApi();
            var body = new ResetPassword(); // ResetPassword | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Reset password after customer's clicked forgotten password link.
                apiInstance.doResetPassword(body, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ForgottenPasswordsApi.doResetPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiForgottenPasswordsApi();
$body = ; // ResetPassword | 
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->doResetPassword($body, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling ForgottenPasswordsApi->doResetPassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ForgottenPasswordsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ForgottenPasswordsApi->new();
my $body = WWW::SwaggerClient::Object::ResetPassword->new(); # ResetPassword | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->doResetPassword(body => $body, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling ForgottenPasswordsApi->doResetPassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ForgottenPasswordsApi()
body =  # ResetPassword | 
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Reset password after customer's clicked forgotten password link.
    api_instance.do_reset_password(body, baseSiteId)
except ApiException as e:
    print("Exception when calling ForgottenPasswordsApi->doResetPassword: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 202 - Accepted


doRestorePassword

Generates a token to restore a customer's forgotten password.

Generates a token in order to restore a customer's forgotten password.


/{baseSiteId}/forgottenpasswordtokens

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/forgottenpasswordtokens?userId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ForgottenPasswordsApi;

import java.io.File;
import java.util.*;

public class ForgottenPasswordsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        String userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doRestorePassword(userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ForgottenPasswordsApi#doRestorePassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ForgottenPasswordsApi;

public class ForgottenPasswordsApiExample {

    public static void main(String[] args) {
        ForgottenPasswordsApi apiInstance = new ForgottenPasswordsApi();
        String userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doRestorePassword(userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ForgottenPasswordsApi#doRestorePassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *userId = userId_example; // Customer's user id. Customer user id is case insensitive.
String *baseSiteId = baseSiteId_example; // Base site identifier

ForgottenPasswordsApi *apiInstance = [[ForgottenPasswordsApi alloc] init];

// Generates a token to restore a customer's forgotten password.
[apiInstance doRestorePasswordWith:userId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ForgottenPasswordsApi()
var userId = userId_example; // {{String}} Customer's user id. Customer user id is case insensitive.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doRestorePassword(userId, baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doRestorePasswordExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ForgottenPasswordsApi();
            var userId = userId_example;  // String | Customer's user id. Customer user id is case insensitive.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Generates a token to restore a customer's forgotten password.
                apiInstance.doRestorePassword(userId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ForgottenPasswordsApi.doRestorePassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiForgottenPasswordsApi();
$userId = userId_example; // String | Customer's user id. Customer user id is case insensitive.
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->doRestorePassword($userId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling ForgottenPasswordsApi->doRestorePassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ForgottenPasswordsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ForgottenPasswordsApi->new();
my $userId = userId_example; # String | Customer's user id. Customer user id is case insensitive.
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->doRestorePassword(userId => $userId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling ForgottenPasswordsApi->doRestorePassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ForgottenPasswordsApi()
userId = userId_example # String | Customer's user id. Customer user id is case insensitive.
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Generates a token to restore a customer's forgotten password.
    api_instance.do_restore_password(userId, baseSiteId)
except ApiException as e:
    print("Exception when calling ForgottenPasswordsApi->doRestorePassword: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
userId*
String
Customer's user id. Customer user id is case insensitive.
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 202 - Accepted


FutureStocks

getFutureStocks

Gets the future product availability for the specified product.

Returns a list of future product availability of the specified product.


/{baseSiteId}/users/{userId}/futureStocks/{productCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/futureStocks/{productCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FutureStocksApi;

import java.io.File;
import java.util.*;

public class FutureStocksApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FutureStocksApi apiInstance = new FutureStocksApi();
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductFutureStocks result = apiInstance.getFutureStocks(productCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FutureStocksApi#getFutureStocks");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FutureStocksApi;

public class FutureStocksApiExample {

    public static void main(String[] args) {
        FutureStocksApi apiInstance = new FutureStocksApi();
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductFutureStocks result = apiInstance.getFutureStocks(productCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FutureStocksApi#getFutureStocks");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *productCode = productCode_example; // Product identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

FutureStocksApi *apiInstance = [[FutureStocksApi alloc] init];

// Gets the future product availability for the specified product.
[apiInstance getFutureStocksWith:productCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ProductFutureStocks output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FutureStocksApi()
var productCode = productCode_example; // {{String}} Product identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFutureStocks(productCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFutureStocksExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FutureStocksApi();
            var productCode = productCode_example;  // String | Product identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the future product availability for the specified product.
                ProductFutureStocks result = apiInstance.getFutureStocks(productCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FutureStocksApi.getFutureStocks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFutureStocksApi();
$productCode = productCode_example; // String | Product identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getFutureStocks($productCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FutureStocksApi->getFutureStocks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FutureStocksApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FutureStocksApi->new();
my $productCode = productCode_example; # String | Product identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getFutureStocks(productCode => $productCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FutureStocksApi->getFutureStocks: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FutureStocksApi()
productCode = productCode_example # String | Product identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the future product availability for the specified product.
    api_response = api_instance.get_future_stocks(productCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FutureStocksApi->getFutureStocks: %s\n" % e)

Parameters

Path parameters
Name Description
productCode*
String
Product identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getFutureStocksList

Gets the future product availability for the list of specified products.

Returns a list of product codes with a list of future product availability.


/{baseSiteId}/users/{userId}/futureStocks

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/futureStocks?productCodes=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FutureStocksApi;

import java.io.File;
import java.util.*;

public class FutureStocksApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        FutureStocksApi apiInstance = new FutureStocksApi();
        String productCodes = productCodes_example; // String | Products identifiers.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductFutureStocksList result = apiInstance.getFutureStocksList(productCodes, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FutureStocksApi#getFutureStocksList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FutureStocksApi;

public class FutureStocksApiExample {

    public static void main(String[] args) {
        FutureStocksApi apiInstance = new FutureStocksApi();
        String productCodes = productCodes_example; // String | Products identifiers.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            ProductFutureStocksList result = apiInstance.getFutureStocksList(productCodes, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FutureStocksApi#getFutureStocksList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *productCodes = productCodes_example; // Products identifiers.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

FutureStocksApi *apiInstance = [[FutureStocksApi alloc] init];

// Gets the future product availability for the list of specified products.
[apiInstance getFutureStocksListWith:productCodes
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(ProductFutureStocksList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.FutureStocksApi()
var productCodes = productCodes_example; // {{String}} Products identifiers.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFutureStocksList(productCodes, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFutureStocksListExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FutureStocksApi();
            var productCodes = productCodes_example;  // String | Products identifiers.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the future product availability for the list of specified products.
                ProductFutureStocksList result = apiInstance.getFutureStocksList(productCodes, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FutureStocksApi.getFutureStocksList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiFutureStocksApi();
$productCodes = productCodes_example; // String | Products identifiers.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getFutureStocksList($productCodes, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FutureStocksApi->getFutureStocksList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FutureStocksApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FutureStocksApi->new();
my $productCodes = productCodes_example; # String | Products identifiers.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getFutureStocksList(productCodes => $productCodes, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FutureStocksApi->getFutureStocksList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FutureStocksApi()
productCodes = productCodes_example # String | Products identifiers.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the future product availability for the list of specified products.
    api_response = api_instance.get_future_stocks_list(productCodes, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FutureStocksApi->getFutureStocksList: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
productCodes*
String
Products identifiers.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


LoginNotification

doPublishSuccessfulLoginEvent

Notify about successful login.

Publish notification event about successful login.


/{baseSiteId}/users/{userId}/loginnotification

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/loginnotification"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginNotificationApi;

import java.io.File;
import java.util.*;

public class LoginNotificationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        LoginNotificationApi apiInstance = new LoginNotificationApi();
        String userId = userId_example; // String | User identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doPublishSuccessfulLoginEvent(userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginNotificationApi#doPublishSuccessfulLoginEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginNotificationApi;

public class LoginNotificationApiExample {

    public static void main(String[] args) {
        LoginNotificationApi apiInstance = new LoginNotificationApi();
        String userId = userId_example; // String | User identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doPublishSuccessfulLoginEvent(userId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginNotificationApi#doPublishSuccessfulLoginEvent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *userId = userId_example; // User identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier

LoginNotificationApi *apiInstance = [[LoginNotificationApi alloc] init];

// Notify about successful login.
[apiInstance doPublishSuccessfulLoginEventWith:userId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.LoginNotificationApi()
var userId = userId_example; // {{String}} User identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doPublishSuccessfulLoginEvent(userId, baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doPublishSuccessfulLoginEventExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LoginNotificationApi();
            var userId = userId_example;  // String | User identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Notify about successful login.
                apiInstance.doPublishSuccessfulLoginEvent(userId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginNotificationApi.doPublishSuccessfulLoginEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiLoginNotificationApi();
$userId = userId_example; // String | User identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->doPublishSuccessfulLoginEvent($userId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling LoginNotificationApi->doPublishSuccessfulLoginEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoginNotificationApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LoginNotificationApi->new();
my $userId = userId_example; # String | User identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->doPublishSuccessfulLoginEvent(userId => $userId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling LoginNotificationApi->doPublishSuccessfulLoginEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LoginNotificationApi()
userId = userId_example # String | User identifier.
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Notify about successful login.
    api_instance.do_publish_successful_login_event(userId, baseSiteId)
except ApiException as e:
    print("Exception when calling LoginNotificationApi->doPublishSuccessfulLoginEvent: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
User identifier.
Required
baseSiteId*
String
Base site identifier
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 202 - Accepted


MerchantCallback

doHandleCartMerchantCallback

Verify the decision of the Merchant for a cart

Verifies the decision of the merchant for a specified cart, and stores information of the PaymentSubscriptionResult for the cart. Note, the ?Try it out? button is not enabled for this method (always returns an error) because the Merchant Callback Controller handles parameters differently, depending on which payment provider is used. For more information about this controller, please refer to the ?acceleratorocc AddOn? documentation on help.hybris.com.


/{baseSiteId}/integration/users/{userId}/carts/{cartId}/payment/sop/response

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/integration/users/{userId}/carts/{cartId}/payment/sop/response"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MerchantCallbackApi;

import java.io.File;
import java.util.*;

public class MerchantCallbackApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doHandleCartMerchantCallback(userId, cartId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MerchantCallbackApi#doHandleCartMerchantCallback");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MerchantCallbackApi;

public class MerchantCallbackApiExample {

    public static void main(String[] args) {
        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doHandleCartMerchantCallback(userId, cartId, baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MerchantCallbackApi#doHandleCartMerchantCallback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *cartId = cartId_example; // Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
String *baseSiteId = baseSiteId_example; // Base site identifier

MerchantCallbackApi *apiInstance = [[MerchantCallbackApi alloc] init];

// Verify the decision of the Merchant for a cart
[apiInstance doHandleCartMerchantCallbackWith:userId
    cartId:cartId
    baseSiteId:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MerchantCallbackApi()
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var cartId = cartId_example; // {{String}} Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doHandleCartMerchantCallback(userId, cartId, baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doHandleCartMerchantCallbackExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MerchantCallbackApi();
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var cartId = cartId_example;  // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Verify the decision of the Merchant for a cart
                apiInstance.doHandleCartMerchantCallback(userId, cartId, baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MerchantCallbackApi.doHandleCartMerchantCallback: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMerchantCallbackApi();
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$cartId = cartId_example; // String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->doHandleCartMerchantCallback($userId, $cartId, $baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling MerchantCallbackApi->doHandleCartMerchantCallback: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MerchantCallbackApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MerchantCallbackApi->new();
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $cartId = cartId_example; # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->doHandleCartMerchantCallback(userId => $userId, cartId => $cartId, baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling MerchantCallbackApi->doHandleCartMerchantCallback: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MerchantCallbackApi()
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
cartId = cartId_example # String | Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Verify the decision of the Merchant for a cart
    api_instance.do_handle_cart_merchant_callback(userId, cartId, baseSiteId)
except ApiException as e:
    print("Exception when calling MerchantCallbackApi->doHandleCartMerchantCallback: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
cartId*
String
Cart identifier: cart code for logged in user, cart guid for anonymous user, 'current' for the last modified cart
Required
baseSiteId*
String
Base site identifier
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doHandleMerchantCallback

Verify the decision of the Merchant

Verifies the decision of the merchant. Note, the ?Try it out? button is not enabled for this method (always returns an error) because the Merchant Callback Controller handles parameters differently, depending on which payment provider is used. For more information about this controller, please refer to the ?acceleratorocc AddOn? documentation on help.hybris.com.


/{baseSiteId}/integration/merchant_callback

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/integration/merchant_callback"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MerchantCallbackApi;

import java.io.File;
import java.util.*;

public class MerchantCallbackApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doHandleMerchantCallback(baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MerchantCallbackApi#doHandleMerchantCallback");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MerchantCallbackApi;

public class MerchantCallbackApiExample {

    public static void main(String[] args) {
        MerchantCallbackApi apiInstance = new MerchantCallbackApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        try {
            apiInstance.doHandleMerchantCallback(baseSiteId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MerchantCallbackApi#doHandleMerchantCallback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier

MerchantCallbackApi *apiInstance = [[MerchantCallbackApi alloc] init];

// Verify the decision of the Merchant
[apiInstance doHandleMerchantCallbackWith:baseSiteId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MerchantCallbackApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doHandleMerchantCallback(baseSiteId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doHandleMerchantCallbackExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MerchantCallbackApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier

            try
            {
                // Verify the decision of the Merchant
                apiInstance.doHandleMerchantCallback(baseSiteId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MerchantCallbackApi.doHandleMerchantCallback: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMerchantCallbackApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier

try {
    $api_instance->doHandleMerchantCallback($baseSiteId);
} catch (Exception $e) {
    echo 'Exception when calling MerchantCallbackApi->doHandleMerchantCallback: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MerchantCallbackApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MerchantCallbackApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier

eval { 
    $api_instance->doHandleMerchantCallback(baseSiteId => $baseSiteId);
};
if ($@) {
    warn "Exception when calling MerchantCallbackApi->doHandleMerchantCallback: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MerchantCallbackApi()
baseSiteId = baseSiteId_example # String | Base site identifier

try: 
    # Verify the decision of the Merchant
    api_instance.do_handle_merchant_callback(baseSiteId)
except ApiException as e:
    print("Exception when calling MerchantCallbackApi->doHandleMerchantCallback: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Miscs

getCardTypes

Get a list of supported payment card types.

Lists supported payment card types.


/{baseSiteId}/cardtypes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/cardtypes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

import java.io.File;
import java.util.*;

public class MiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CardTypeList result = apiInstance.getCardTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getCardTypes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscsApi;

public class MiscsApiExample {

    public static void main(String[] args) {
        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CardTypeList result = apiInstance.getCardTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getCardTypes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

MiscsApi *apiInstance = [[MiscsApi alloc] init];

// Get a list of supported payment card types.
[apiInstance getCardTypesWith:baseSiteId
    fields:fields
              completionHandler: ^(CardTypeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCardTypes(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCardTypesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of supported payment card types.
                CardTypeList result = apiInstance.getCardTypes(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscsApi.getCardTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCardTypes($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscsApi->getCardTypes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCardTypes(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscsApi->getCardTypes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of supported payment card types.
    api_response = api_instance.get_card_types(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscsApi->getCardTypes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getCurrencies

Get a list of available currencies.

Lists all available currencies (all usable currencies for the current store). If the list of currencies for a base store is empty, a list of all currencies available in the system is returned.


/{baseSiteId}/currencies

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/currencies?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

import java.io.File;
import java.util.*;

public class MiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CurrencyList result = apiInstance.getCurrencies(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getCurrencies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscsApi;

public class MiscsApiExample {

    public static void main(String[] args) {
        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CurrencyList result = apiInstance.getCurrencies(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getCurrencies");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

MiscsApi *apiInstance = [[MiscsApi alloc] init];

// Get a list of available currencies.
[apiInstance getCurrenciesWith:baseSiteId
    fields:fields
              completionHandler: ^(CurrencyList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCurrencies(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCurrenciesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of available currencies.
                CurrencyList result = apiInstance.getCurrencies(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscsApi.getCurrencies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getCurrencies($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscsApi->getCurrencies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getCurrencies(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscsApi->getCurrencies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of available currencies.
    api_response = api_instance.get_currencies(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscsApi->getCurrencies: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getDeliveryCountries

Get a list of shipping countries.

Lists all supported delivery countries for the current store. The list is sorted alphabetically.


/{baseSiteId}/deliverycountries

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/deliverycountries?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

import java.io.File;
import java.util.*;

public class MiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CountryList result = apiInstance.getDeliveryCountries(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getDeliveryCountries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscsApi;

public class MiscsApiExample {

    public static void main(String[] args) {
        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            CountryList result = apiInstance.getDeliveryCountries(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getDeliveryCountries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

MiscsApi *apiInstance = [[MiscsApi alloc] init];

// Get a list of shipping countries.
[apiInstance getDeliveryCountriesWith:baseSiteId
    fields:fields
              completionHandler: ^(CountryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeliveryCountries(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDeliveryCountriesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of shipping countries.
                CountryList result = apiInstance.getDeliveryCountries(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscsApi.getDeliveryCountries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getDeliveryCountries($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscsApi->getDeliveryCountries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getDeliveryCountries(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscsApi->getDeliveryCountries: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of shipping countries.
    api_response = api_instance.get_delivery_countries(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscsApi->getDeliveryCountries: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getLanguages

Get a list of available languages.

Lists all available languages (all languages used for a particular store). If the list of languages for a base store is empty, a list of all languages available in the system will be returned.


/{baseSiteId}/languages

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/languages?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

import java.io.File;
import java.util.*;

public class MiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            LanguageList result = apiInstance.getLanguages(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getLanguages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscsApi;

public class MiscsApiExample {

    public static void main(String[] args) {
        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            LanguageList result = apiInstance.getLanguages(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getLanguages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

MiscsApi *apiInstance = [[MiscsApi alloc] init];

// Get a list of available languages.
[apiInstance getLanguagesWith:baseSiteId
    fields:fields
              completionHandler: ^(LanguageList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLanguages(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLanguagesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of available languages.
                LanguageList result = apiInstance.getLanguages(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscsApi.getLanguages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getLanguages($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscsApi->getLanguages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getLanguages(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscsApi->getLanguages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of available languages.
    api_response = api_instance.get_languages(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscsApi->getLanguages: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getTitles

Get a list of all localized titles.

Lists all localized titles.


/{baseSiteId}/titles

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/titles?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscsApi;

import java.io.File;
import java.util.*;

public class MiscsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            TitleList result = apiInstance.getTitles(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getTitles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscsApi;

public class MiscsApiExample {

    public static void main(String[] args) {
        MiscsApi apiInstance = new MiscsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            TitleList result = apiInstance.getTitles(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscsApi#getTitles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

MiscsApi *apiInstance = [[MiscsApi alloc] init];

// Get a list of all localized titles.
[apiInstance getTitlesWith:baseSiteId
    fields:fields
              completionHandler: ^(TitleList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.MiscsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTitles(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTitlesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MiscsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a list of all localized titles.
                TitleList result = apiInstance.getTitles(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscsApi.getTitles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiMiscsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getTitles($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscsApi->getTitles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MiscsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getTitles(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscsApi->getTitles: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MiscsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a list of all localized titles.
    api_response = api_instance.get_titles(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscsApi->getTitles: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


OrderApprovalPermissionTypes

getOrderApprovalPermissionTypes

Get order approval permission types.

Returns the list of order approval permission types.


/{baseSiteId}/orderApprovalPermissionTypes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/orderApprovalPermissionTypes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalPermissionTypesApi;

import java.io.File;
import java.util.*;

public class OrderApprovalPermissionTypesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalPermissionTypesApi apiInstance = new OrderApprovalPermissionTypesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionTypeList result = apiInstance.getOrderApprovalPermissionTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionTypesApi#getOrderApprovalPermissionTypes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalPermissionTypesApi;

public class OrderApprovalPermissionTypesApiExample {

    public static void main(String[] args) {
        OrderApprovalPermissionTypesApi apiInstance = new OrderApprovalPermissionTypesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionTypeList result = apiInstance.getOrderApprovalPermissionTypes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionTypesApi#getOrderApprovalPermissionTypes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalPermissionTypesApi *apiInstance = [[OrderApprovalPermissionTypesApi alloc] init];

// Get order approval permission types.
[apiInstance getOrderApprovalPermissionTypesWith:baseSiteId
    fields:fields
              completionHandler: ^(OrderApprovalPermissionTypeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalPermissionTypesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovalPermissionTypes(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalPermissionTypesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalPermissionTypesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get order approval permission types.
                OrderApprovalPermissionTypeList result = apiInstance.getOrderApprovalPermissionTypes(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionTypesApi.getOrderApprovalPermissionTypes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalPermissionTypesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApprovalPermissionTypes($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalPermissionTypesApi->getOrderApprovalPermissionTypes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalPermissionTypesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalPermissionTypesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApprovalPermissionTypes(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalPermissionTypesApi->getOrderApprovalPermissionTypes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalPermissionTypesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get order approval permission types.
    api_response = api_instance.get_order_approval_permission_types(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionTypesApi->getOrderApprovalPermissionTypes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


OrderApprovalPermissions

createOrderApprovalPermission

Create a new order approval permission.

Creates a new order approval permission.


/{baseSiteId}/users/{userId}/orderApprovalPermissions

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderApprovalPermissions?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalPermissionsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        OrderApprovalPermission body = ; // OrderApprovalPermission | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.createOrderApprovalPermission(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#createOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalPermissionsApi;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        OrderApprovalPermission body = ; // OrderApprovalPermission | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.createOrderApprovalPermission(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#createOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderApprovalPermission *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalPermissionsApi *apiInstance = [[OrderApprovalPermissionsApi alloc] init];

// Create a new order approval permission.
[apiInstance createOrderApprovalPermissionWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApprovalPermission output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalPermissionsApi()
var body = ; // {{OrderApprovalPermission}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrderApprovalPermission(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrderApprovalPermissionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalPermissionsApi();
            var body = new OrderApprovalPermission(); // OrderApprovalPermission | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Create a new order approval permission.
                OrderApprovalPermission result = apiInstance.createOrderApprovalPermission(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionsApi.createOrderApprovalPermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalPermissionsApi();
$body = ; // OrderApprovalPermission | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrderApprovalPermission($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalPermissionsApi->createOrderApprovalPermission: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalPermissionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalPermissionsApi->new();
my $body = WWW::SwaggerClient::Object::OrderApprovalPermission->new(); # OrderApprovalPermission | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrderApprovalPermission(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalPermissionsApi->createOrderApprovalPermission: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalPermissionsApi()
body =  # OrderApprovalPermission | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Create a new order approval permission.
    api_response = api_instance.create_order_approval_permission(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->createOrderApprovalPermission: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getOrderApprovalPermission

Get an order approval permission.

Returns a specific order approval permission based on specific code. The response contains detailed order approval permission information.


/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalPermissionsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.getOrderApprovalPermission(orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#getOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalPermissionsApi;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.getOrderApprovalPermission(orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#getOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order Approval Permission identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalPermissionsApi *apiInstance = [[OrderApprovalPermissionsApi alloc] init];

// Get an order approval permission.
[apiInstance getOrderApprovalPermissionWith:orderApprovalPermissionCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApprovalPermission output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalPermissionsApi()
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order Approval Permission identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovalPermission(orderApprovalPermissionCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalPermissionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalPermissionsApi();
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order Approval Permission identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get an order approval permission.
                OrderApprovalPermission result = apiInstance.getOrderApprovalPermission(orderApprovalPermissionCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionsApi.getOrderApprovalPermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalPermissionsApi();
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApprovalPermission($orderApprovalPermissionCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermission: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalPermissionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalPermissionsApi->new();
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order Approval Permission identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApprovalPermission(orderApprovalPermissionCode => $orderApprovalPermissionCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermission: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalPermissionsApi()
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order Approval Permission identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get an order approval permission.
    api_response = api_instance.get_order_approval_permission(orderApprovalPermissionCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermission: %s\n" % e)

Parameters

Path parameters
Name Description
orderApprovalPermissionCode*
String
Order Approval Permission identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrderApprovalPermissions

Get order approval permissions.

Returns the list of order approval permissions for the company of the identified user. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orderApprovalPermissions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderApprovalPermissions?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalPermissionsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#getOrderApprovalPermissions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalPermissionsApi;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#getOrderApprovalPermissions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalPermissionsApi *apiInstance = [[OrderApprovalPermissionsApi alloc] init];

// Get order approval permissions.
[apiInstance getOrderApprovalPermissionsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrderApprovalPermissionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalPermissionsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovalPermissions(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalPermissionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalPermissionsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get order approval permissions.
                OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissions(baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionsApi.getOrderApprovalPermissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalPermissionsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApprovalPermissions($baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalPermissionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalPermissionsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApprovalPermissions(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermissions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalPermissionsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get order approval permissions.
    api_response = api_instance.get_order_approval_permissions(baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->getOrderApprovalPermissions: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateOrderApprovalPermission

Update the order approval permission

Updates the order approval permission. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderApprovalPermissions/{orderApprovalPermissionCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalPermissionsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        OrderApprovalPermission body = ; // OrderApprovalPermission | 
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.updateOrderApprovalPermission(body, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#updateOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalPermissionsApi;

public class OrderApprovalPermissionsApiExample {

    public static void main(String[] args) {
        OrderApprovalPermissionsApi apiInstance = new OrderApprovalPermissionsApi();
        OrderApprovalPermission body = ; // OrderApprovalPermission | 
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermission result = apiInstance.updateOrderApprovalPermission(body, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalPermissionsApi#updateOrderApprovalPermission");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderApprovalPermission *body = ; // 
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order Approval Permission identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalPermissionsApi *apiInstance = [[OrderApprovalPermissionsApi alloc] init];

// Update the order approval permission
[apiInstance updateOrderApprovalPermissionWith:body
    orderApprovalPermissionCode:orderApprovalPermissionCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApprovalPermission output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalPermissionsApi()
var body = ; // {{OrderApprovalPermission}} 
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order Approval Permission identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOrderApprovalPermission(bodyorderApprovalPermissionCodebaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrderApprovalPermissionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalPermissionsApi();
            var body = new OrderApprovalPermission(); // OrderApprovalPermission | 
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order Approval Permission identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Update the order approval permission
                OrderApprovalPermission result = apiInstance.updateOrderApprovalPermission(body, orderApprovalPermissionCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalPermissionsApi.updateOrderApprovalPermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalPermissionsApi();
$body = ; // OrderApprovalPermission | 
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order Approval Permission identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->updateOrderApprovalPermission($body, $orderApprovalPermissionCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalPermissionsApi->updateOrderApprovalPermission: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalPermissionsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalPermissionsApi->new();
my $body = WWW::SwaggerClient::Object::OrderApprovalPermission->new(); # OrderApprovalPermission | 
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order Approval Permission identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->updateOrderApprovalPermission(body => $body, orderApprovalPermissionCode => $orderApprovalPermissionCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalPermissionsApi->updateOrderApprovalPermission: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalPermissionsApi()
body =  # OrderApprovalPermission | 
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order Approval Permission identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Update the order approval permission
    api_response = api_instance.update_order_approval_permission(body, orderApprovalPermissionCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalPermissionsApi->updateOrderApprovalPermission: %s\n" % e)

Parameters

Path parameters
Name Description
orderApprovalPermissionCode*
String
Order Approval Permission identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


OrderApprovals

doMakeOrderApprovalDecision

Makes an approval decision for an order.

Makes a decision on the order approval that will trigger the next step in the approval workflow.


/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}/decision

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}/decision?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        OrderApprovalDecision body = ; // OrderApprovalDecision | 
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalDecision result = apiInstance.doMakeOrderApprovalDecision(body, orderApprovalCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#doMakeOrderApprovalDecision");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalsApi;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        OrderApprovalDecision body = ; // OrderApprovalDecision | 
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalDecision result = apiInstance.doMakeOrderApprovalDecision(body, orderApprovalCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#doMakeOrderApprovalDecision");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrderApprovalDecision *body = ; // 
String *orderApprovalCode = orderApprovalCode_example; // Code that identifies the order approval.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalsApi *apiInstance = [[OrderApprovalsApi alloc] init];

// Makes an approval decision for an order.
[apiInstance doMakeOrderApprovalDecisionWith:body
    orderApprovalCode:orderApprovalCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApprovalDecision output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalsApi()
var body = ; // {{OrderApprovalDecision}} 
var orderApprovalCode = orderApprovalCode_example; // {{String}} Code that identifies the order approval.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doMakeOrderApprovalDecision(bodyorderApprovalCodebaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doMakeOrderApprovalDecisionExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalsApi();
            var body = new OrderApprovalDecision(); // OrderApprovalDecision | 
            var orderApprovalCode = orderApprovalCode_example;  // String | Code that identifies the order approval.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Makes an approval decision for an order.
                OrderApprovalDecision result = apiInstance.doMakeOrderApprovalDecision(body, orderApprovalCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalsApi.doMakeOrderApprovalDecision: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalsApi();
$body = ; // OrderApprovalDecision | 
$orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doMakeOrderApprovalDecision($body, $orderApprovalCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalsApi->doMakeOrderApprovalDecision: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalsApi->new();
my $body = WWW::SwaggerClient::Object::OrderApprovalDecision->new(); # OrderApprovalDecision | 
my $orderApprovalCode = orderApprovalCode_example; # String | Code that identifies the order approval.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doMakeOrderApprovalDecision(body => $body, orderApprovalCode => $orderApprovalCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalsApi->doMakeOrderApprovalDecision: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalsApi()
body =  # OrderApprovalDecision | 
orderApprovalCode = orderApprovalCode_example # String | Code that identifies the order approval.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Makes an approval decision for an order.
    api_response = api_instance.do_make_order_approval_decision(body, orderApprovalCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalsApi->doMakeOrderApprovalDecision: %s\n" % e)

Parameters

Path parameters
Name Description
orderApprovalCode*
String
Code that identifies the order approval.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrderApproval

Get an order to approve.

Returns specific order details based on a specific order code. The response contains detailed order information.


/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderapprovals/{orderApprovalCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApproval result = apiInstance.getOrderApproval(orderApprovalCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#getOrderApproval");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalsApi;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        String orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApproval result = apiInstance.getOrderApproval(orderApprovalCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#getOrderApproval");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orderApprovalCode = orderApprovalCode_example; // Code that identifies the order approval.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalsApi *apiInstance = [[OrderApprovalsApi alloc] init];

// Get an order to approve.
[apiInstance getOrderApprovalWith:orderApprovalCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrderApproval output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalsApi()
var orderApprovalCode = orderApprovalCode_example; // {{String}} Code that identifies the order approval.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApproval(orderApprovalCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalsApi();
            var orderApprovalCode = orderApprovalCode_example;  // String | Code that identifies the order approval.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get an order to approve.
                OrderApproval result = apiInstance.getOrderApproval(orderApprovalCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalsApi.getOrderApproval: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalsApi();
$orderApprovalCode = orderApprovalCode_example; // String | Code that identifies the order approval.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApproval($orderApprovalCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalsApi->getOrderApproval: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalsApi->new();
my $orderApprovalCode = orderApprovalCode_example; # String | Code that identifies the order approval.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApproval(orderApprovalCode => $orderApprovalCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalsApi->getOrderApproval: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalsApi()
orderApprovalCode = orderApprovalCode_example # String | Code that identifies the order approval.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get an order to approve.
    api_response = api_instance.get_order_approval(orderApprovalCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalsApi->getOrderApproval: %s\n" % e)

Parameters

Path parameters
Name Description
orderApprovalCode*
String
Code that identifies the order approval.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrderApprovals

Get orders to approve.

Returns the list of orders the specified user is allowed to approve.


/{baseSiteId}/users/{userId}/orderapprovals

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orderapprovals?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApprovalsApi;

import java.io.File;
import java.util.*;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#getOrderApprovals");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApprovalsApi;

public class OrderApprovalsApiExample {

    public static void main(String[] args) {
        OrderApprovalsApi apiInstance = new OrderApprovalsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApprovalsApi#getOrderApprovals");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrderApprovalsApi *apiInstance = [[OrderApprovalsApi alloc] init];

// Get orders to approve.
[apiInstance getOrderApprovalsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrderApprovalList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrderApprovalsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovals(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrderApprovalsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get orders to approve.
                OrderApprovalList result = apiInstance.getOrderApprovals(baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApprovalsApi.getOrderApprovals: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrderApprovalsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApprovals($baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApprovalsApi->getOrderApprovals: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApprovalsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrderApprovalsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApprovals(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApprovalsApi->getOrderApprovals: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrderApprovalsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get orders to approve.
    api_response = api_instance.get_order_approvals(baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApprovalsApi->getOrderApprovals: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Orders

countUserOrders

Get total number of orders.

In the response header, the "x-total-count" indicates the total number of orders placed by a specified user for a specified base store.


/{baseSiteId}/users/{userId}/orders

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders?statuses="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        try {
            apiInstance.countUserOrders(baseSiteId, userId, statuses);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#countUserOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        try {
            apiInstance.countUserOrders(baseSiteId, userId, statuses);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#countUserOrders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *statuses = statuses_example; // Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Get total number of orders.
[apiInstance countUserOrdersWith:baseSiteId
    userId:userId
    statuses:statuses
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'statuses': statuses_example // {{String}} Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countUserOrders(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class countUserOrdersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var statuses = statuses_example;  // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional) 

            try
            {
                // Get total number of orders.
                apiInstance.countUserOrders(baseSiteId, userId, statuses);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.countUserOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.

try {
    $api_instance->countUserOrders($baseSiteId, $userId, $statuses);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->countUserOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $statuses = statuses_example; # String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.

eval { 
    $api_instance->countUserOrders(baseSiteId => $baseSiteId, userId => $userId, statuses => $statuses);
};
if ($@) {
    warn "Exception when calling OrdersApi->countUserOrders: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
statuses = statuses_example # String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional)

try: 
    # Get total number of orders.
    api_instance.count_user_orders(baseSiteId, userId, statuses=statuses)
except ApiException as e:
    print("Exception when calling OrdersApi->countUserOrders: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
statuses
String
Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doCancelOrder

Cancel an order.

Cancels an order partially or completely


/{baseSiteId}/users/{userId}/orders/{code}/cancellation

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{code}/cancellation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        CancellationRequestEntryInputList body = ; // CancellationRequestEntryInputList | 
        String code = code_example; // String | Order code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doCancelOrder(body, code, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#doCancelOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        CancellationRequestEntryInputList body = ; // CancellationRequestEntryInputList | 
        String code = code_example; // String | Order code
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doCancelOrder(body, code, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#doCancelOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
CancellationRequestEntryInputList *body = ; // 
String *code = code_example; // Order code
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Cancel an order.
[apiInstance doCancelOrderWith:body
    code:code
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrdersApi()
var body = ; // {{CancellationRequestEntryInputList}} 
var code = code_example; // {{String}} Order code
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doCancelOrder(bodycodebaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doCancelOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrdersApi();
            var body = new CancellationRequestEntryInputList(); // CancellationRequestEntryInputList | 
            var code = code_example;  // String | Order code
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Cancel an order.
                apiInstance.doCancelOrder(body, code, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.doCancelOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrdersApi();
$body = ; // CancellationRequestEntryInputList | 
$code = code_example; // String | Order code
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doCancelOrder($body, $code, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->doCancelOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrdersApi->new();
my $body = WWW::SwaggerClient::Object::CancellationRequestEntryInputList->new(); # CancellationRequestEntryInputList | 
my $code = code_example; # String | Order code
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doCancelOrder(body => $body, code => $code, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrdersApi->doCancelOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrdersApi()
body =  # CancellationRequestEntryInputList | 
code = code_example # String | Order code
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Cancel an order.
    api_instance.do_cancel_order(body, code, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrdersApi->doCancelOrder: %s\n" % e)

Parameters

Path parameters
Name Description
code*
String
Order code
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrder

Get a order.

Returns details of a specific order based on the order GUID (Globally Unique Identifier) or the order CODE. The response contains detailed order information.


/{baseSiteId}/orders/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/orders/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.getOrder(code, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.getOrder(code, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getOrder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *code = code_example; // Order GUID (Globally Unique Identifier) or order CODE
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Get a order.
[apiInstance getOrderWith:code
    baseSiteId:baseSiteId
    fields:fields
              completionHandler: ^(Order output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrdersApi()
var code = code_example; // {{String}} Order GUID (Globally Unique Identifier) or order CODE
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrder(code, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrdersApi();
            var code = code_example;  // String | Order GUID (Globally Unique Identifier) or order CODE
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a order.
                Order result = apiInstance.getOrder(code, baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.getOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrdersApi();
$code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrder($code, $baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->getOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrdersApi->new();
my $code = code_example; # String | Order GUID (Globally Unique Identifier) or order CODE
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrder(code => $code, baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->getOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrdersApi()
code = code_example # String | Order GUID (Globally Unique Identifier) or order CODE
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a order.
    api_response = api_instance.get_order(code, baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getOrder: %s\n" % e)

Parameters

Path parameters
Name Description
code*
String
Order GUID (Globally Unique Identifier) or order CODE
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getUserOrderHistory

Get order history for user.

Returns order history data for all orders placed by a specified user for a specified base store. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orders

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders?statuses=¤tPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, statuses, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getUserOrderHistory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the return results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, statuses, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getUserOrderHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *statuses = statuses_example; // Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional)
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the return results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Get order history for user.
[apiInstance getUserOrderHistoryWith:baseSiteId
    userId:userId
    statuses:statuses
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrderHistoryList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrdersApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'statuses': statuses_example, // {{String}} Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the return results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserOrderHistory(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserOrderHistoryExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrdersApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var statuses = statuses_example;  // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional) 
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the return results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get order history for user.
                OrderHistoryList result = apiInstance.getUserOrderHistory(baseSiteId, userId, statuses, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.getUserOrderHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrdersApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$statuses = statuses_example; // String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the return results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getUserOrderHistory($baseSiteId, $userId, $statuses, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->getUserOrderHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrdersApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $statuses = statuses_example; # String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the return results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getUserOrderHistory(baseSiteId => $baseSiteId, userId => $userId, statuses => $statuses, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->getUserOrderHistory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrdersApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
statuses = statuses_example # String | Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID. (optional)
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the return results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get order history for user.
    api_response = api_instance.get_user_order_history(baseSiteId, userId, statuses=statuses, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getUserOrderHistory: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
statuses
String
Filters only certain order statuses. For example, statuses=CANCELLED,CHECKED_VALID would only return orders with status CANCELLED or CHECKED_VALID.
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the return results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getUserOrders

Get a order.

Returns specific order details based on a specific order code. The response contains detailed order information.


/{baseSiteId}/users/{userId}/orders/{code}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orders/{code}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrdersApi apiInstance = new OrdersApi();
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.getUserOrders(code, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getUserOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrdersApi;

public class OrdersApiExample {

    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        String code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Order result = apiInstance.getUserOrders(code, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getUserOrders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *code = code_example; // Order GUID (Globally Unique Identifier) or order CODE
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrdersApi *apiInstance = [[OrdersApi alloc] init];

// Get a order.
[apiInstance getUserOrdersWith:code
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Order output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrdersApi()
var code = code_example; // {{String}} Order GUID (Globally Unique Identifier) or order CODE
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserOrders(code, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserOrdersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrdersApi();
            var code = code_example;  // String | Order GUID (Globally Unique Identifier) or order CODE
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get a order.
                Order result = apiInstance.getUserOrders(code, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrdersApi.getUserOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrdersApi();
$code = code_example; // String | Order GUID (Globally Unique Identifier) or order CODE
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getUserOrders($code, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->getUserOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrdersApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrdersApi->new();
my $code = code_example; # String | Order GUID (Globally Unique Identifier) or order CODE
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getUserOrders(code => $code, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->getUserOrders: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrdersApi()
code = code_example # String | Order GUID (Globally Unique Identifier) or order CODE
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get a order.
    api_response = api_instance.get_user_orders(code, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getUserOrders: %s\n" % e)

Parameters

Path parameters
Name Description
code*
String
Order GUID (Globally Unique Identifier) or order CODE
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


OrganizationalUnitCustomerManagement

createOrgCustomer

Registers a org customer

Creates a new organizational customer.


/{baseSiteId}/users/{userId}/orgCustomers

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerCreation body = ; // OrgCustomerCreation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#createOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerCreation body = ; // OrgCustomerCreation | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#createOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgCustomerCreation *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

//  Registers a org customer
[apiInstance createOrgCustomerWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var body = ; // {{OrgCustomerCreation}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgCustomer(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var body = new OrgCustomerCreation(); // OrgCustomerCreation | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                //  Registers a org customer
                User result = apiInstance.createOrgCustomer(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.createOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$body = ; // OrgCustomerCreation | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgCustomer($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->createOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $body = WWW::SwaggerClient::Object::OrgCustomerCreation->new(); # OrgCustomerCreation | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgCustomer(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->createOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
body =  # OrgCustomerCreation | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    #  Registers a org customer
    api_response = api_instance.create_org_customer(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->createOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddApproverToOrgCustomer

Add an approver to an specific org customer

Add an approver to an specific org customer


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddApproverToOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddApproverToOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddApproverToOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddApproverToOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *approverId = approverId_example; // Approver GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Add an approver to an specific org customer
[apiInstance doAddApproverToOrgCustomerWith:orgCustomerId
    approverId:approverId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var approverId = approverId_example; // {{String}} Approver GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddApproverToOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddApproverToOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var approverId = approverId_example;  // String | Approver GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add an approver to an specific org customer
                B2BSelectionData result = apiInstance.doAddApproverToOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.doAddApproverToOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddApproverToOrgCustomer($orgCustomerId, $approverId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->doAddApproverToOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $approverId = approverId_example; # String | Approver GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddApproverToOrgCustomer(orgCustomerId => $orgCustomerId, approverId => $approverId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->doAddApproverToOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
approverId = approverId_example # String | Approver GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add an approver to an specific org customer
    api_response = api_instance.do_add_approver_to_org_customer(orgCustomerId, approverId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddApproverToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
approverId*
String
Approver GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doAddOrgUserGroupToOrgCustomer

Add an org user group to an specific org customer

Add an org user group to an specific org customer


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddOrgUserGroupToOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddOrgUserGroupToOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddOrgUserGroupToOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddOrgUserGroupToOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *userGroupId = userGroupId_example; // Org User Group GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Add an org user group to an specific org customer
[apiInstance doAddOrgUserGroupToOrgCustomerWith:orgCustomerId
    userGroupId:userGroupId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var userGroupId = userGroupId_example; // {{String}} Org User Group GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddOrgUserGroupToOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddOrgUserGroupToOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var userGroupId = userGroupId_example;  // String | Org User Group GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add an org user group to an specific org customer
                B2BSelectionData result = apiInstance.doAddOrgUserGroupToOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.doAddOrgUserGroupToOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddOrgUserGroupToOrgCustomer($orgCustomerId, $userGroupId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->doAddOrgUserGroupToOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $userGroupId = userGroupId_example; # String | Org User Group GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddOrgUserGroupToOrgCustomer(orgCustomerId => $orgCustomerId, userGroupId => $userGroupId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->doAddOrgUserGroupToOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
userGroupId = userGroupId_example # String | Org User Group GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add an org user group to an specific org customer
    api_response = api_instance.do_add_org_user_group_to_org_customer(orgCustomerId, userGroupId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddOrgUserGroupToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
userGroupId*
String
Org User Group GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


doAddPermissionToOrgCustomer

Add a permission to an specific org customer

Add a permission to an specific org customer


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddPermissionToOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddPermissionToOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddPermissionToOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#doAddPermissionToOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *permissionId = permissionId_example; // Permission GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Add a permission to an specific org customer
[apiInstance doAddPermissionToOrgCustomerWith:orgCustomerId
    permissionId:permissionId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var permissionId = permissionId_example; // {{String}} Permission GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddPermissionToOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddPermissionToOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var permissionId = permissionId_example;  // String | Permission GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add a permission to an specific org customer
                B2BSelectionData result = apiInstance.doAddPermissionToOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.doAddPermissionToOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddPermissionToOrgCustomer($orgCustomerId, $permissionId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->doAddPermissionToOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $permissionId = permissionId_example; # String | Permission GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddPermissionToOrgCustomer(orgCustomerId => $orgCustomerId, permissionId => $permissionId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->doAddPermissionToOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
permissionId = permissionId_example # String | Permission GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add a permission to an specific org customer
    api_response = api_instance.do_add_permission_to_org_customer(orgCustomerId, permissionId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->doAddPermissionToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
permissionId*
String
Permission GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgCustomer

Get a org customer profile

Returns a org customer profile.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            User result = apiInstance.getOrgCustomer(orgCustomerId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.
        try {
            User result = apiInstance.getOrgCustomer(orgCustomerId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. (optional)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Get a org customer profile
[apiInstance getOrgCustomerWith:orgCustomerId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomer(orgCustomerId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. (optional) 

            try
            {
                // Get a org customer profile
                User result = apiInstance.getOrgCustomer(orgCustomerId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.getOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body.

try {
    $result = $api_instance->getOrgCustomer($orgCustomerId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body.

eval { 
    my $result = $api_instance->getOrgCustomer(orgCustomerId => $orgCustomerId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. (optional)

try: 
    # Get a org customer profile
    api_response = api_instance.get_org_customer(orgCustomerId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body.

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgCustomerApprovers

Gets the list of approvers for an specified org customer

Returns the list of approvers for an specified org customer. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerApprovers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerApprovers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Gets the list of approvers for an specified org customer
[apiInstance getOrgCustomerApproversWith:orgCustomerId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerApprovers(orgCustomerId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgCustomerApproversExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of approvers for an specified org customer
                OrgUnitUserList result = apiInstance.getOrgCustomerApprovers(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.getOrgCustomerApprovers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgCustomerApprovers($orgCustomerId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerApprovers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgCustomerApprovers(orgCustomerId => $orgCustomerId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerApprovers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of approvers for an specified org customer
    api_response = api_instance.get_org_customer_approvers(orgCustomerId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerApprovers: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgCustomerOrgUserGroups

Gets the list of org user groups for a specified org customer

Returns the list of org user gruops for a specified org customer. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerOrgUserGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerOrgUserGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Gets the list of org user groups for a specified org customer
[apiInstance getOrgCustomerOrgUserGroupsWith:orgCustomerId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserGroupList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerOrgUserGroups(orgCustomerId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgCustomerOrgUserGroupsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of org user groups for a specified org customer
                OrgUnitUserGroupList result = apiInstance.getOrgCustomerOrgUserGroups(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.getOrgCustomerOrgUserGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgCustomerOrgUserGroups($orgCustomerId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerOrgUserGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgCustomerOrgUserGroups(orgCustomerId => $orgCustomerId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerOrgUserGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of org user groups for a specified org customer
    api_response = api_instance.get_org_customer_org_user_groups(orgCustomerId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerOrgUserGroups: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgCustomerPermissions

Gets the list of permissions for an org customer

Returns the list of permissions for a user. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerPermissions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomerPermissions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Gets the list of permissions for an org customer
[apiInstance getOrgCustomerPermissionsWith:orgCustomerId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrderApprovalPermissionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomerPermissions(orgCustomerId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgCustomerPermissionsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of permissions for an org customer
                OrderApprovalPermissionList result = apiInstance.getOrgCustomerPermissions(orgCustomerId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.getOrgCustomerPermissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgCustomerPermissions($orgCustomerId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerPermissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgCustomerPermissions(orgCustomerId => $orgCustomerId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerPermissions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of permissions for an org customer
    api_response = api_instance.get_org_customer_permissions(orgCustomerId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomerPermissions: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgCustomers

Gets the list of org customers for a specified base store

Returns the list of org customers for a specified base store. The response can display the results across multiple pages, if required.


/{baseSiteId}/users/{userId}/orgCustomers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#getOrgCustomers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Gets the list of org customers for a specified base store
[apiInstance getOrgCustomersWith:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgCustomers(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgCustomersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of org customers for a specified base store
                OrgUnitUserList result = apiInstance.getOrgCustomers(baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.getOrgCustomers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgCustomers($baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgCustomers(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of org customers for a specified base store
    api_response = api_instance.get_org_customers(baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->getOrgCustomers: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeApproverFromOrgCustomer

Deletes an approver from an specific org customer with the provided approverId

Deletes an approver from an specific org customer with the provided approverId


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/approvers/{approverId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeApproverFromOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removeApproverFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeApproverFromOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removeApproverFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *approverId = approverId_example; // Approver GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Deletes an approver from an specific org customer with the provided approverId
[apiInstance removeApproverFromOrgCustomerWith:orgCustomerId
    approverId:approverId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var approverId = approverId_example; // {{String}} Approver GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeApproverFromOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeApproverFromOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var approverId = approverId_example;  // String | Approver GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Deletes an approver from an specific org customer with the provided approverId
                B2BSelectionData result = apiInstance.removeApproverFromOrgCustomer(orgCustomerId, approverId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.removeApproverFromOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$approverId = approverId_example; // String | Approver GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->removeApproverFromOrgCustomer($orgCustomerId, $approverId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->removeApproverFromOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $approverId = approverId_example; # String | Approver GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->removeApproverFromOrgCustomer(orgCustomerId => $orgCustomerId, approverId => $approverId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->removeApproverFromOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
approverId = approverId_example # String | Approver GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Deletes an approver from an specific org customer with the provided approverId
    api_response = api_instance.remove_approver_from_org_customer(orgCustomerId, approverId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removeApproverFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
approverId*
String
Approver GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgUserGroupFromOrgCustomer

Deletes an org user group from an specific org customer with the provided orgUserGroupId

Deletes an org user group from an specific org customer with the provided orgUserGroupId


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/orgUserGroups/{userGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUserGroupFromOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removeOrgUserGroupFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUserGroupFromOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removeOrgUserGroupFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *userGroupId = userGroupId_example; // Org User Group GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Deletes an org user group from an specific org customer with the provided orgUserGroupId
[apiInstance removeOrgUserGroupFromOrgCustomerWith:orgCustomerId
    userGroupId:userGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var userGroupId = userGroupId_example; // {{String}} Org User Group GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgUserGroupFromOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgUserGroupFromOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var userGroupId = userGroupId_example;  // String | Org User Group GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes an org user group from an specific org customer with the provided orgUserGroupId
                apiInstance.removeOrgUserGroupFromOrgCustomer(orgCustomerId, userGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.removeOrgUserGroupFromOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$userGroupId = userGroupId_example; // String | Org User Group GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUserGroupFromOrgCustomer($orgCustomerId, $userGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->removeOrgUserGroupFromOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $userGroupId = userGroupId_example; # String | Org User Group GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgUserGroupFromOrgCustomer(orgCustomerId => $orgCustomerId, userGroupId => $userGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->removeOrgUserGroupFromOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
userGroupId = userGroupId_example # String | Org User Group GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes an org user group from an specific org customer with the provided orgUserGroupId
    api_instance.remove_org_user_group_from_org_customer(orgCustomerId, userGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removeOrgUserGroupFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
userGroupId*
String
Org User Group GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removePermissionFromOrgCustomer

Deletes a permission from an specific org customer with the provided permissionId

Deletes a permission from an specific org customer with the provided permissionId


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/permissions/{permissionId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removePermissionFromOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removePermissionFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removePermissionFromOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#removePermissionFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *permissionId = permissionId_example; // Permission GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Deletes a permission from an specific org customer with the provided permissionId
[apiInstance removePermissionFromOrgCustomerWith:orgCustomerId
    permissionId:permissionId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var permissionId = permissionId_example; // {{String}} Permission GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removePermissionFromOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removePermissionFromOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var permissionId = permissionId_example;  // String | Permission GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Deletes a permission from an specific org customer with the provided permissionId
                B2BSelectionData result = apiInstance.removePermissionFromOrgCustomer(orgCustomerId, permissionId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.removePermissionFromOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$permissionId = permissionId_example; // String | Permission GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->removePermissionFromOrgCustomer($orgCustomerId, $permissionId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->removePermissionFromOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $permissionId = permissionId_example; # String | Permission GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->removePermissionFromOrgCustomer(orgCustomerId => $orgCustomerId, permissionId => $permissionId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->removePermissionFromOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
permissionId = permissionId_example # String | Permission GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Deletes a permission from an specific org customer with the provided permissionId
    api_response = api_instance.remove_permission_from_org_customer(orgCustomerId, permissionId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->removePermissionFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
permissionId*
String
Permission GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateOrgCustomer

Updates org customer profile

Updates org customer profile. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerModification body = ; // OrgCustomerModification | 
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgCustomer(body, orgCustomerId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#updateOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitCustomerManagementApi;

public class OrganizationalUnitCustomerManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitCustomerManagementApi apiInstance = new OrganizationalUnitCustomerManagementApi();
        OrgCustomerModification body = ; // OrgCustomerModification | 
        String orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgCustomer(body, orgCustomerId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitCustomerManagementApi#updateOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgCustomerModification *body = ; // 
String *orgCustomerId = orgCustomerId_example; // Org Customer GUID (Globally Unique Identifier).
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitCustomerManagementApi *apiInstance = [[OrganizationalUnitCustomerManagementApi alloc] init];

// Updates org customer profile
[apiInstance updateOrgCustomerWith:body
    orgCustomerId:orgCustomerId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitCustomerManagementApi()
var body = ; // {{OrgCustomerModification}} 
var orgCustomerId = orgCustomerId_example; // {{String}} Org Customer GUID (Globally Unique Identifier).
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateOrgCustomer(bodyorgCustomerIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitCustomerManagementApi();
            var body = new OrgCustomerModification(); // OrgCustomerModification | 
            var orgCustomerId = orgCustomerId_example;  // String | Org Customer GUID (Globally Unique Identifier).
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates org customer profile
                apiInstance.updateOrgCustomer(body, orgCustomerId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitCustomerManagementApi.updateOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitCustomerManagementApi();
$body = ; // OrgCustomerModification | 
$orgCustomerId = orgCustomerId_example; // String | Org Customer GUID (Globally Unique Identifier).
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateOrgCustomer($body, $orgCustomerId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitCustomerManagementApi->updateOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitCustomerManagementApi->new();
my $body = WWW::SwaggerClient::Object::OrgCustomerModification->new(); # OrgCustomerModification | 
my $orgCustomerId = orgCustomerId_example; # String | Org Customer GUID (Globally Unique Identifier).
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateOrgCustomer(body => $body, orgCustomerId => $orgCustomerId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitCustomerManagementApi->updateOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitCustomerManagementApi()
body =  # OrgCustomerModification | 
orgCustomerId = orgCustomerId_example # String | Org Customer GUID (Globally Unique Identifier).
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates org customer profile
    api_instance.update_org_customer(body, orgCustomerId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitCustomerManagementApi->updateOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Org Customer GUID (Globally Unique Identifier).
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 204 - No Content


OrganizationalUnitManagement

createOrgUnit

Create a new organizational unit.

Creates a new organizational unit.


/{baseSiteId}/users/{userId}/orgUnits

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnit");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
B2BUnit *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Create a new organizational unit.
[apiInstance createOrgUnitWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnit output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var body = ; // {{B2BUnit}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgUnit(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgUnitExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var body = new B2BUnit(); // B2BUnit | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Create a new organizational unit.
                B2BUnit result = apiInstance.createOrgUnit(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.createOrgUnit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$body = ; // B2BUnit | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgUnit($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->createOrgUnit: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $body = WWW::SwaggerClient::Object::B2BUnit->new(); # B2BUnit | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgUnit(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->createOrgUnit: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
body =  # B2BUnit | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Create a new organizational unit.
    api_response = api_instance.create_org_unit(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->createOrgUnit: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


createOrgUnitAddress

Create a new organizational unit address

Creates a new organizational unit address


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        Address body = ; // Address | 
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createOrgUnitAddress(body, orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        Address body = ; // Address | 
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Address result = apiInstance.createOrgUnitAddress(body, orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#createOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Create a new organizational unit address
[apiInstance createOrgUnitAddressWith:body
    orgUnitId:orgUnitId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(Address output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var body = ; // {{Address}} 
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgUnitAddress(bodyorgUnitIdbaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgUnitAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var body = new Address(); // Address | 
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Create a new organizational unit address
                Address result = apiInstance.createOrgUnitAddress(body, orgUnitId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.createOrgUnitAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$body = ; // Address | 
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgUnitAddress($body, $orgUnitId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->createOrgUnitAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgUnitAddress(body => $body, orgUnitId => $orgUnitId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->createOrgUnitAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
body =  # Address | 
orgUnitId = orgUnitId_example # String | Organizational unit id.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Create a new organizational unit address
    api_response = api_instance.create_org_unit_address(body, orgUnitId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->createOrgUnitAddress: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddOrgUnitRoleToOrgCustomer

Add an organizational unit dependent role to a specific organizational customer

Adds an organizational unit dependent role to a specific organizational customer


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles?roleId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgUnitRoleToOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#doAddOrgUnitRoleToOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgUnitRoleToOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#doAddOrgUnitRoleToOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be added.
String *roleId = roleId_example; // The role which is added to the user. Example roles are: b2bapprovergroup
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Add an organizational unit dependent role to a specific organizational customer
[apiInstance doAddOrgUnitRoleToOrgCustomerWith:orgUnitId
    orgCustomerId:orgCustomerId
    roleId:roleId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be added.
var roleId = roleId_example; // {{String}} The role which is added to the user. Example roles are: b2bapprovergroup
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doAddOrgUnitRoleToOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddOrgUnitRoleToOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be added.
            var roleId = roleId_example;  // String | The role which is added to the user. Example roles are: b2bapprovergroup
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add an organizational unit dependent role to a specific organizational customer
                apiInstance.doAddOrgUnitRoleToOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.doAddOrgUnitRoleToOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
$roleId = roleId_example; // String | The role which is added to the user. Example roles are: b2bapprovergroup
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doAddOrgUnitRoleToOrgCustomer($orgUnitId, $orgCustomerId, $roleId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->doAddOrgUnitRoleToOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be added.
my $roleId = roleId_example; # String | The role which is added to the user. Example roles are: b2bapprovergroup
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doAddOrgUnitRoleToOrgCustomer(orgUnitId => $orgUnitId, orgCustomerId => $orgCustomerId, roleId => $roleId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->doAddOrgUnitRoleToOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational unit id.
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be added.
roleId = roleId_example # String | The role which is added to the user. Example roles are: b2bapprovergroup
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add an organizational unit dependent role to a specific organizational customer
    api_instance.do_add_org_unit_role_to_org_customer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->doAddOrgUnitRoleToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
orgCustomerId*
String
Identifier of the organizational customer which the role will be added.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
roleId*
String
The role which is added to the user. Example roles are: b2bapprovergroup
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddRoleToOrgCustomer

Add a role to a specific organizational customer

Adds a role to a specific organizational customer


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles?roleId=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String roleId = roleId_example; // String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddRoleToOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#doAddRoleToOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
        String roleId = roleId_example; // String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddRoleToOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#doAddRoleToOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be added.
String *roleId = roleId_example; // The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Add a role to a specific organizational customer
[apiInstance doAddRoleToOrgCustomerWith:orgCustomerId
    roleId:roleId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be added.
var roleId = roleId_example; // {{String}} The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddRoleToOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddRoleToOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be added.
            var roleId = roleId_example;  // String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add a role to a specific organizational customer
                B2BSelectionData result = apiInstance.doAddRoleToOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.doAddRoleToOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be added.
$roleId = roleId_example; // String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddRoleToOrgCustomer($orgCustomerId, $roleId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->doAddRoleToOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be added.
my $roleId = roleId_example; # String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddRoleToOrgCustomer(orgCustomerId => $orgCustomerId, roleId => $roleId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->doAddRoleToOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be added.
roleId = roleId_example # String | The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add a role to a specific organizational customer
    api_response = api_instance.do_add_role_to_org_customer(orgCustomerId, roleId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->doAddRoleToOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Identifier of the organizational customer which the role will be added.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
roleId*
String
The role which is added to the organizational customer. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getAvailableOrgUnitNodes

Get available organizational unit nodes.

Returns list of available organizational unit nodes.


/{baseSiteId}/users/{userId}/availableOrgUnitNodes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/availableOrgUnitNodes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNodeList result = apiInstance.getAvailableOrgUnitNodes(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getAvailableOrgUnitNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNodeList result = apiInstance.getAvailableOrgUnitNodes(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getAvailableOrgUnitNodes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get available organizational unit nodes.
[apiInstance getAvailableOrgUnitNodesWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnitNodeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableOrgUnitNodes(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableOrgUnitNodesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get available organizational unit nodes.
                B2BUnitNodeList result = apiInstance.getAvailableOrgUnitNodes(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getAvailableOrgUnitNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getAvailableOrgUnitNodes($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getAvailableOrgUnitNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getAvailableOrgUnitNodes(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getAvailableOrgUnitNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get available organizational unit nodes.
    api_response = api_instance.get_available_org_unit_nodes(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getAvailableOrgUnitNodes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getAvailableParentUnits

Get available parent units.

Returns a list of parent units for which the unit with id can be assigned as a child.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/availableParents

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/availableParents?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNodeList result = apiInstance.getAvailableParentUnits(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getAvailableParentUnits");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNodeList result = apiInstance.getAvailableParentUnits(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getAvailableParentUnits");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational Unit identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get available parent units.
[apiInstance getAvailableParentUnitsWith:orgUnitId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnitNodeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational Unit identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableParentUnits(orgUnitId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableParentUnitsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get available parent units.
                B2BUnitNodeList result = apiInstance.getAvailableParentUnits(orgUnitId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getAvailableParentUnits: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getAvailableParentUnits($orgUnitId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getAvailableParentUnits: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational Unit identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getAvailableParentUnits(orgUnitId => $orgUnitId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getAvailableParentUnits: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational Unit identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get available parent units.
    api_response = api_instance.get_available_parent_units(orgUnitId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getAvailableParentUnits: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational Unit identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnit

Get an organizational unit.

Returns a specific organizational unit based on specific id. The response contains detailed organizational unit information.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.getOrgUnit(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnit result = apiInstance.getOrgUnit(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnit");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational Unit identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get an organizational unit.
[apiInstance getOrgUnitWith:orgUnitId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnit output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational Unit identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnit(orgUnitId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get an organizational unit.
                B2BUnit result = apiInstance.getOrgUnit(orgUnitId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getOrgUnit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnit($orgUnitId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getOrgUnit: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational Unit identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnit(orgUnitId => $orgUnitId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getOrgUnit: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational Unit identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get an organizational unit.
    api_response = api_instance.get_org_unit(orgUnitId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnit: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational Unit identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitAddresses

Get organizational unit addresses

Retrieves organizational unit addresses


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressList result = apiInstance.getOrgUnitAddresses(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitAddresses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            AddressList result = apiInstance.getOrgUnitAddresses(orgUnitId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitAddresses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get organizational unit addresses
[apiInstance getOrgUnitAddressesWith:orgUnitId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(AddressList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitAddresses(orgUnitId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitAddressesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get organizational unit addresses
                AddressList result = apiInstance.getOrgUnitAddresses(orgUnitId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getOrgUnitAddresses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitAddresses($orgUnitId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getOrgUnitAddresses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitAddresses(orgUnitId => $orgUnitId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getOrgUnitAddresses: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational unit id.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get organizational unit addresses
    api_response = api_instance.get_org_unit_addresses(orgUnitId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitAddresses: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitUsers

Get users who belongs to the organization unit.

Returns list of users which belongs to the organizational unit and can be assigned to a specific role. Users who are already assigned to the role are flagged by 'selected' attribute.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/availableUsers/{roleId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/availableUsers/{roleId}?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgUnitUsers(orgUnitId, roleId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String roleId = roleId_example; // String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the display search results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getOrgUnitUsers(orgUnitId, roleId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *roleId = roleId_example; // Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the display search results. (optional)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get users who belongs to the organization unit.
[apiInstance getOrgUnitUsersWith:orgUnitId
    roleId:roleId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var roleId = roleId_example; // {{String}} Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the display search results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitUsers(orgUnitId, roleId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitUsersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var roleId = roleId_example;  // String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the display search results. (optional) 
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get users who belongs to the organization unit.
                OrgUnitUserList result = apiInstance.getOrgUnitUsers(orgUnitId, roleId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getOrgUnitUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$roleId = roleId_example; // String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the display search results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitUsers($orgUnitId, $roleId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getOrgUnitUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $roleId = roleId_example; # String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the display search results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitUsers(orgUnitId => $orgUnitId, roleId => $roleId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getOrgUnitUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational unit id.
roleId = roleId_example # String | Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the display search results. (optional)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get users who belongs to the organization unit.
    api_response = api_instance.get_org_unit_users(orgUnitId, roleId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitUsers: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
roleId*
String
Filtering parameter which is used to return a specific role. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the display search results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitsAvailableApprovalProcesses

Get available approval business processes.

Returns list of available approval business processes.


/{baseSiteId}/users/{userId}/orgUnitsAvailableApprovalProcesses

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitsAvailableApprovalProcesses?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BApprovalProcessList result = apiInstance.getOrgUnitsAvailableApprovalProcesses(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitsAvailableApprovalProcesses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BApprovalProcessList result = apiInstance.getOrgUnitsAvailableApprovalProcesses(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitsAvailableApprovalProcesses");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get available approval business processes.
[apiInstance getOrgUnitsAvailableApprovalProcessesWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BApprovalProcessList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitsAvailableApprovalProcesses(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitsAvailableApprovalProcessesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get available approval business processes.
                B2BApprovalProcessList result = apiInstance.getOrgUnitsAvailableApprovalProcesses(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getOrgUnitsAvailableApprovalProcesses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitsAvailableApprovalProcesses($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getOrgUnitsAvailableApprovalProcesses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitsAvailableApprovalProcesses(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getOrgUnitsAvailableApprovalProcesses: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get available approval business processes.
    api_response = api_instance.get_org_units_available_approval_processes(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitsAvailableApprovalProcesses: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitsRootNodeTree

Get the root organizational unit node.

Returns the root organizational unit node. The response contains detailed organizational unit node information and the child nodes associated to it.


/{baseSiteId}/users/{userId}/orgUnitsRootNodeTree

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitsRootNodeTree?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNode result = apiInstance.getOrgUnitsRootNodeTree(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitsRootNodeTree");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BUnitNode result = apiInstance.getOrgUnitsRootNodeTree(baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#getOrgUnitsRootNodeTree");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Get the root organizational unit node.
[apiInstance getOrgUnitsRootNodeTreeWith:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BUnitNode output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitsRootNodeTree(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitsRootNodeTreeExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get the root organizational unit node.
                B2BUnitNode result = apiInstance.getOrgUnitsRootNodeTree(baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.getOrgUnitsRootNodeTree: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitsRootNodeTree($baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->getOrgUnitsRootNodeTree: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitsRootNodeTree(baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->getOrgUnitsRootNodeTree: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get the root organizational unit node.
    api_response = api_instance.get_org_units_root_node_tree(baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->getOrgUnitsRootNodeTree: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgUnitAddress

Remove the organizational unit address.

Removes the organizational unit address.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses/{addressId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitAddress(orgUnitId, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitAddress(orgUnitId, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *addressId = addressId_example; // Address id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Remove the organizational unit address.
[apiInstance removeOrgUnitAddressWith:orgUnitId
    addressId:addressId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var addressId = addressId_example; // {{String}} Address id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgUnitAddress(orgUnitId, addressId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgUnitAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var addressId = addressId_example;  // String | Address id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Remove the organizational unit address.
                apiInstance.removeOrgUnitAddress(orgUnitId, addressId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.removeOrgUnitAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$addressId = addressId_example; // String | Address id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitAddress($orgUnitId, $addressId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->removeOrgUnitAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $addressId = addressId_example; # String | Address id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgUnitAddress(orgUnitId => $orgUnitId, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->removeOrgUnitAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational unit id.
addressId = addressId_example # String | Address id.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Remove the organizational unit address.
    api_instance.remove_org_unit_address(orgUnitId, addressId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeOrgUnitAddress: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
addressId*
String
Address id.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgUnitRoleFromOrgCustomer

Remove an organizational unit dependent role from a specific organizational customer.

Removes an organizational unit dependent role from a specific organizational customer.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles/{roleId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles/{roleId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitRoleFromOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeOrgUnitRoleFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitRoleFromOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeOrgUnitRoleFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be removed.
String *roleId = roleId_example; // The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Remove an organizational unit dependent role from a specific organizational customer.
[apiInstance removeOrgUnitRoleFromOrgCustomerWith:orgUnitId
    orgCustomerId:orgCustomerId
    roleId:roleId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be removed.
var roleId = roleId_example; // {{String}} The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgUnitRoleFromOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgUnitRoleFromOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be removed.
            var roleId = roleId_example;  // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Remove an organizational unit dependent role from a specific organizational customer.
                apiInstance.removeOrgUnitRoleFromOrgCustomer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.removeOrgUnitRoleFromOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
$roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitRoleFromOrgCustomer($orgUnitId, $orgCustomerId, $roleId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->removeOrgUnitRoleFromOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be removed.
my $roleId = roleId_example; # String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgUnitRoleFromOrgCustomer(orgUnitId => $orgUnitId, orgCustomerId => $orgCustomerId, roleId => $roleId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->removeOrgUnitRoleFromOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgUnitId = orgUnitId_example # String | Organizational unit id.
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be removed.
roleId = roleId_example # String | The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Remove an organizational unit dependent role from a specific organizational customer.
    api_instance.remove_org_unit_role_from_org_customer(orgUnitId, orgCustomerId, roleId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeOrgUnitRoleFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
orgCustomerId*
String
Identifier of the organizational customer which the role will be removed.
Required
roleId*
String
The role which is removed from the user. Example roles are: b2bapprovergroup, b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeRoleFromOrgCustomer

Remove a role from a specific organizational customer

Removes a role from a specific organizational customer


/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles/{roleId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgCustomers/{orgCustomerId}/roles/{roleId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeRoleFromOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeRoleFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
        String roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeRoleFromOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#removeRoleFromOrgCustomer");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which the role will be removed.
String *roleId = roleId_example; // The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Remove a role from a specific organizational customer
[apiInstance removeRoleFromOrgCustomerWith:orgCustomerId
    roleId:roleId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which the role will be removed.
var roleId = roleId_example; // {{String}} The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeRoleFromOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeRoleFromOrgCustomerExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which the role will be removed.
            var roleId = roleId_example;  // String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Remove a role from a specific organizational customer
                B2BSelectionData result = apiInstance.removeRoleFromOrgCustomer(orgCustomerId, roleId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.removeRoleFromOrgCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which the role will be removed.
$roleId = roleId_example; // String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->removeRoleFromOrgCustomer($orgCustomerId, $roleId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->removeRoleFromOrgCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which the role will be removed.
my $roleId = roleId_example; # String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->removeRoleFromOrgCustomer(orgCustomerId => $orgCustomerId, roleId => $roleId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->removeRoleFromOrgCustomer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which the role will be removed.
roleId = roleId_example # String | The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Remove a role from a specific organizational customer
    api_response = api_instance.remove_role_from_org_customer(orgCustomerId, roleId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->removeRoleFromOrgCustomer: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Identifier of the organizational customer which the role will be removed.
Required
roleId*
String
The role which is removed from the user. Example roles are: b2badmingroup, b2bmanagergroup, b2bcustomergroup
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateOrgUnit

Update the organizational unit

Updates the organizational unit. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnit(body, orgUnitId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#updateOrgUnit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        B2BUnit body = ; // B2BUnit | 
        String orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnit(body, orgUnitId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#updateOrgUnit");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
B2BUnit *body = ; // 
String *orgUnitId = orgUnitId_example; // Organizational Unit identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Update the organizational unit
[apiInstance updateOrgUnitWith:body
    orgUnitId:orgUnitId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var body = ; // {{B2BUnit}} 
var orgUnitId = orgUnitId_example; // {{String}} Organizational Unit identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateOrgUnit(bodyorgUnitIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrgUnitExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var body = new B2BUnit(); // B2BUnit | 
            var orgUnitId = orgUnitId_example;  // String | Organizational Unit identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Update the organizational unit
                apiInstance.updateOrgUnit(body, orgUnitId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.updateOrgUnit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$body = ; // B2BUnit | 
$orgUnitId = orgUnitId_example; // String | Organizational Unit identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateOrgUnit($body, $orgUnitId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->updateOrgUnit: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $body = WWW::SwaggerClient::Object::B2BUnit->new(); # B2BUnit | 
my $orgUnitId = orgUnitId_example; # String | Organizational Unit identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateOrgUnit(body => $body, orgUnitId => $orgUnitId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->updateOrgUnit: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
body =  # B2BUnit | 
orgUnitId = orgUnitId_example # String | Organizational Unit identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Update the organizational unit
    api_instance.update_org_unit(body, orgUnitId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->updateOrgUnit: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational Unit identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 204 - No Content


updateOrgUnitAddress

Update the organizational unit address.

Updates the organizational unit address. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses/{addressId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnits/{orgUnitId}/addresses/{addressId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitManagementApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        Address body = ; // Address | 
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnitAddress(body, orgUnitId, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#updateOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitManagementApi;

public class OrganizationalUnitManagementApiExample {

    public static void main(String[] args) {
        OrganizationalUnitManagementApi apiInstance = new OrganizationalUnitManagementApi();
        Address body = ; // Address | 
        String orgUnitId = orgUnitId_example; // String | Organizational unit id.
        String addressId = addressId_example; // String | Address id.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnitAddress(body, orgUnitId, addressId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitManagementApi#updateOrgUnitAddress");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Address *body = ; // 
String *orgUnitId = orgUnitId_example; // Organizational unit id.
String *addressId = addressId_example; // Address id.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitManagementApi *apiInstance = [[OrganizationalUnitManagementApi alloc] init];

// Update the organizational unit address.
[apiInstance updateOrgUnitAddressWith:body
    orgUnitId:orgUnitId
    addressId:addressId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitManagementApi()
var body = ; // {{Address}} 
var orgUnitId = orgUnitId_example; // {{String}} Organizational unit id.
var addressId = addressId_example; // {{String}} Address id.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateOrgUnitAddress(bodyorgUnitIdaddressIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrgUnitAddressExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitManagementApi();
            var body = new Address(); // Address | 
            var orgUnitId = orgUnitId_example;  // String | Organizational unit id.
            var addressId = addressId_example;  // String | Address id.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Update the organizational unit address.
                apiInstance.updateOrgUnitAddress(body, orgUnitId, addressId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitManagementApi.updateOrgUnitAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitManagementApi();
$body = ; // Address | 
$orgUnitId = orgUnitId_example; // String | Organizational unit id.
$addressId = addressId_example; // String | Address id.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateOrgUnitAddress($body, $orgUnitId, $addressId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitManagementApi->updateOrgUnitAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitManagementApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitManagementApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | 
my $orgUnitId = orgUnitId_example; # String | Organizational unit id.
my $addressId = addressId_example; # String | Address id.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateOrgUnitAddress(body => $body, orgUnitId => $orgUnitId, addressId => $addressId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitManagementApi->updateOrgUnitAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitManagementApi()
body =  # Address | 
orgUnitId = orgUnitId_example # String | Organizational unit id.
addressId = addressId_example # String | Address id.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Update the organizational unit address.
    api_instance.update_org_unit_address(body, orgUnitId, addressId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitManagementApi->updateOrgUnitAddress: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitId*
String
Organizational unit id.
Required
addressId*
String
Address id.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 204 - No Content


OrganizationalUnitUserGroups

createOrgUnitUserGroup

Creates a new organizational unit user group

Creates a new organizational unit user group.


/{baseSiteId}/users/{userId}/orgUnitUserGroups

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        OrgUnitUserGroup body = ; // OrgUnitUserGroup | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroup result = apiInstance.createOrgUnitUserGroup(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#createOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        OrgUnitUserGroup body = ; // OrgUnitUserGroup | 
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroup result = apiInstance.createOrgUnitUserGroup(body, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#createOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgUnitUserGroup *body = ; // 
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

//  Creates a new organizational unit user group
[apiInstance createOrgUnitUserGroupWith:body
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrgUnitUserGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var body = ; // {{OrgUnitUserGroup}} 
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrgUnitUserGroup(bodybaseSiteIduserId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var body = new OrgUnitUserGroup(); // OrgUnitUserGroup | 
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                //  Creates a new organizational unit user group
                OrgUnitUserGroup result = apiInstance.createOrgUnitUserGroup(body, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.createOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$body = ; // OrgUnitUserGroup | 
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->createOrgUnitUserGroup($body, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->createOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $body = WWW::SwaggerClient::Object::OrgUnitUserGroup->new(); # OrgUnitUserGroup | 
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->createOrgUnitUserGroup(body => $body, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->createOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
body =  # OrgUnitUserGroup | 
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    #  Creates a new organizational unit user group
    api_response = api_instance.create_org_unit_user_group(body, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->createOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddOrderApprovalPermissionToOrgUnitUserGroup

Add an order approval permission to a specific organizational unit user group

Adds an order approval permission to a specific organizational unit user group


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/orderApprovalPermissions

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/orderApprovalPermissions?orderApprovalPermissionCode=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddOrderApprovalPermissionToOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#doAddOrderApprovalPermissionToOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.doAddOrderApprovalPermissionToOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#doAddOrderApprovalPermissionToOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Identifier of the organizational unit user group which the order approval permission will be added.
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order approval permission identifier which is added to the organizational unit user group.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Add an order approval permission to a specific organizational unit user group
[apiInstance doAddOrderApprovalPermissionToOrgUnitUserGroupWith:orgUnitUserGroupId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Identifier of the organizational unit user group which the order approval permission will be added.
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order approval permission identifier which is added to the organizational unit user group.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doAddOrderApprovalPermissionToOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddOrderApprovalPermissionToOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Identifier of the organizational unit user group which the order approval permission will be added.
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order approval permission identifier which is added to the organizational unit user group.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Add an order approval permission to a specific organizational unit user group
                B2BSelectionData result = apiInstance.doAddOrderApprovalPermissionToOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.doAddOrderApprovalPermissionToOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Identifier of the organizational unit user group which the order approval permission will be added.
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is added to the organizational unit user group.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->doAddOrderApprovalPermissionToOrgUnitUserGroup($orgUnitUserGroupId, $orderApprovalPermissionCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->doAddOrderApprovalPermissionToOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Identifier of the organizational unit user group which the order approval permission will be added.
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order approval permission identifier which is added to the organizational unit user group.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->doAddOrderApprovalPermissionToOrgUnitUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, orderApprovalPermissionCode => $orderApprovalPermissionCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->doAddOrderApprovalPermissionToOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Identifier of the organizational unit user group which the order approval permission will be added.
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order approval permission identifier which is added to the organizational unit user group.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Add an order approval permission to a specific organizational unit user group
    api_response = api_instance.do_add_order_approval_permission_to_org_unit_user_group(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->doAddOrderApprovalPermissionToOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Identifier of the organizational unit user group which the order approval permission will be added.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
orderApprovalPermissionCode*
String
Order approval permission identifier which is added to the organizational unit user group.
Required
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


doAddOrgCustomerToOrgUnitUserGroupMembers

Add an organizational customer to a specific unit user group members

Adds an organizational customer to a specific unit user group members


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members?orgCustomerId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be added to the organizational unit user group members
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgCustomerToOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#doAddOrgCustomerToOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be added to the organizational unit user group members
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.doAddOrgCustomerToOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#doAddOrgCustomerToOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which will be added to the organizational unit user group members
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Add an organizational customer to a specific unit user group members
[apiInstance doAddOrgCustomerToOrgUnitUserGroupMembersWith:orgCustomerId
    orgUnitUserGroupId:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which will be added to the organizational unit user group members
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.doAddOrgCustomerToOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doAddOrgCustomerToOrgUnitUserGroupMembersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which will be added to the organizational unit user group members
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Add an organizational customer to a specific unit user group members
                apiInstance.doAddOrgCustomerToOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.doAddOrgCustomerToOrgUnitUserGroupMembers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be added to the organizational unit user group members
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->doAddOrgCustomerToOrgUnitUserGroupMembers($orgCustomerId, $orgUnitUserGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->doAddOrgCustomerToOrgUnitUserGroupMembers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which will be added to the organizational unit user group members
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->doAddOrgCustomerToOrgUnitUserGroupMembers(orgCustomerId => $orgCustomerId, orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->doAddOrgCustomerToOrgUnitUserGroupMembers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which will be added to the organizational unit user group members
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Add an organizational customer to a specific unit user group members
    api_instance.do_add_org_customer_to_org_unit_user_group_members(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->doAddOrgCustomerToOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
orgCustomerId*
String
Identifier of the organizational customer which will be added to the organizational unit user group members
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 201 - Created


getAvailableOrgCustomersForUserGroup

Gets the list of organizational customers for a specified organizational unit user group

Returns the list of organizational customers who can belong to a specific organizational unit user group. Users who already belong to the user group are flagged by 'selected' attribute.


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrgCustomers

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrgCustomers?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getAvailableOrgCustomersForUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getAvailableOrgCustomersForUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Gets the list of organizational customers for a specified organizational unit user group
[apiInstance getAvailableOrgCustomersForUserGroupWith:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableOrgCustomersForUserGroup(orgUnitUserGroupId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAvailableOrgCustomersForUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of organizational customers for a specified organizational unit user group
                OrgUnitUserList result = apiInstance.getAvailableOrgCustomersForUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.getAvailableOrgCustomersForUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getAvailableOrgCustomersForUserGroup($orgUnitUserGroupId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->getAvailableOrgCustomersForUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getAvailableOrgCustomersForUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->getAvailableOrgCustomersForUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of organizational customers for a specified organizational unit user group
    api_response = api_instance.get_available_org_customers_for_user_group(orgUnitUserGroupId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getAvailableOrgCustomersForUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrderApprovalPermissionsForOrgUnitUserGroup

Gets the list of order approval permissions for a specified organizational unit user group

Returns the list of order approval permissions who can belong to a specific organizational unit user group. Order approval permissions who already belong to the user group are flagged by 'selected' attribute.


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrderApprovalPermissions

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/availableOrderApprovalPermissions?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrderApprovalPermissionsForOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrderApprovalPermissionsForOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to name)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Gets the list of order approval permissions for a specified organizational unit user group
[apiInstance getOrderApprovalPermissionsForOrgUnitUserGroupWith:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrderApprovalPermissionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrderApprovalPermissionsForOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderApprovalPermissionsForOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to name)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of order approval permissions for a specified organizational unit user group
                OrderApprovalPermissionList result = apiInstance.getOrderApprovalPermissionsForOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.getOrderApprovalPermissionsForOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrderApprovalPermissionsForOrgUnitUserGroup($orgUnitUserGroupId, $baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->getOrderApprovalPermissionsForOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrderApprovalPermissionsForOrgUnitUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->getOrderApprovalPermissionsForOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to name)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of order approval permissions for a specified organizational unit user group
    api_response = api_instance.get_order_approval_permissions_for_org_unit_user_group(orgUnitUserGroupId, baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getOrderApprovalPermissionsForOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitUserGroup

Gets specific organizational unit user group details accessible for a specified base store based on user group code

Returns specific UserGroup details accessible for a specified base store based on UserGroup code. The response contains detailed order information.


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroup result = apiInstance.getOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroup result = apiInstance.getOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Gets specific organizational unit user group details accessible for a specified base store based on user group code
[apiInstance getOrgUnitUserGroupWith:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(OrgUnitUserGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets specific organizational unit user group details accessible for a specified base store based on user group code
                OrgUnitUserGroup result = apiInstance.getOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.getOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitUserGroup($orgUnitUserGroupId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets specific organizational unit user group details accessible for a specified base store based on user group code
    api_response = api_instance.get_org_unit_user_group(orgUnitUserGroupId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getOrgUnitUserGroups

Gets the list of organizational unit user groups for a specified base store

Returns the list of organizational unit user groups accessible for a specified base store.


/{baseSiteId}/users/{userId}/orgUnitUserGroups

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups?currentPage=&pageSize=&sort=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrgUnitUserGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Integer currentPage = 56; // Integer | The current result page requested.
        Integer pageSize = 56; // Integer | The number of results returned per page.
        String sort = sort_example; // String | Sorting method applied to the returned results.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, pageSize, sort, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#getOrgUnitUserGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Integer *currentPage = 56; // The current result page requested. (optional) (default to 0)
Integer *pageSize = 56; // The number of results returned per page. (optional) (default to 20)
String *sort = sort_example; // Sorting method applied to the returned results. (optional) (default to uid)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Gets the list of organizational unit user groups for a specified base store
[apiInstance getOrgUnitUserGroupsWith:baseSiteId
    userId:userId
    currentPage:currentPage
    pageSize:pageSize
    sort:sort
    fields:fields
              completionHandler: ^(OrgUnitUserGroupList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'currentPage': 56, // {{Integer}} The current result page requested.
  'pageSize': 56, // {{Integer}} The number of results returned per page.
  'sort': sort_example, // {{String}} Sorting method applied to the returned results.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrgUnitUserGroups(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrgUnitUserGroupsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var currentPage = 56;  // Integer | The current result page requested. (optional)  (default to 0)
            var pageSize = 56;  // Integer | The number of results returned per page. (optional)  (default to 20)
            var sort = sort_example;  // String | Sorting method applied to the returned results. (optional)  (default to uid)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets the list of organizational unit user groups for a specified base store
                OrgUnitUserGroupList result = apiInstance.getOrgUnitUserGroups(baseSiteId, userId, currentPage, pageSize, sort, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.getOrgUnitUserGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$currentPage = 56; // Integer | The current result page requested.
$pageSize = 56; // Integer | The number of results returned per page.
$sort = sort_example; // String | Sorting method applied to the returned results.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getOrgUnitUserGroups($baseSiteId, $userId, $currentPage, $pageSize, $sort, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $currentPage = 56; # Integer | The current result page requested.
my $pageSize = 56; # Integer | The number of results returned per page.
my $sort = sort_example; # String | Sorting method applied to the returned results.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getOrgUnitUserGroups(baseSiteId => $baseSiteId, userId => $userId, currentPage => $currentPage, pageSize => $pageSize, sort => $sort, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
currentPage = 56 # Integer | The current result page requested. (optional) (default to 0)
pageSize = 56 # Integer | The number of results returned per page. (optional) (default to 20)
sort = sort_example # String | Sorting method applied to the returned results. (optional) (default to uid)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets the list of organizational unit user groups for a specified base store
    api_response = api_instance.get_org_unit_user_groups(baseSiteId, userId, currentPage=currentPage, pageSize=pageSize, sort=sort, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->getOrgUnitUserGroups: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
currentPage
Integer (int32)
The current result page requested.
pageSize
Integer (int32)
The number of results returned per page.
sort
String
Sorting method applied to the returned results.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrderApprovalPermissionFromOrgUnitUserGroup

Remove an order approval permission from a specific organizational unit user group

Removes an order approval permission from a specific organizational unit user group


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/orderApprovalPermissions/{orderApprovalPermissionCode}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*,application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/orderApprovalPermissions/{orderApprovalPermissionCode}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeOrderApprovalPermissionFromOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrderApprovalPermissionFromOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
        String orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            B2BSelectionData result = apiInstance.removeOrderApprovalPermissionFromOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrderApprovalPermissionFromOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier which is added to the organizational customer.
String *orderApprovalPermissionCode = orderApprovalPermissionCode_example; // Order approval permission identifier which is removed from the organizational unit user group.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Remove an order approval permission from a specific organizational unit user group
[apiInstance removeOrderApprovalPermissionFromOrgUnitUserGroupWith:orgUnitUserGroupId
    orderApprovalPermissionCode:orderApprovalPermissionCode
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(B2BSelectionData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier which is added to the organizational customer.
var orderApprovalPermissionCode = orderApprovalPermissionCode_example; // {{String}} Order approval permission identifier which is removed from the organizational unit user group.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeOrderApprovalPermissionFromOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrderApprovalPermissionFromOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier which is added to the organizational customer.
            var orderApprovalPermissionCode = orderApprovalPermissionCode_example;  // String | Order approval permission identifier which is removed from the organizational unit user group.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Remove an order approval permission from a specific organizational unit user group
                B2BSelectionData result = apiInstance.removeOrderApprovalPermissionFromOrgUnitUserGroup(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.removeOrderApprovalPermissionFromOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier which is added to the organizational customer.
$orderApprovalPermissionCode = orderApprovalPermissionCode_example; // String | Order approval permission identifier which is removed from the organizational unit user group.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->removeOrderApprovalPermissionFromOrgUnitUserGroup($orgUnitUserGroupId, $orderApprovalPermissionCode, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->removeOrderApprovalPermissionFromOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier which is added to the organizational customer.
my $orderApprovalPermissionCode = orderApprovalPermissionCode_example; # String | Order approval permission identifier which is removed from the organizational unit user group.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->removeOrderApprovalPermissionFromOrgUnitUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, orderApprovalPermissionCode => $orderApprovalPermissionCode, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->removeOrderApprovalPermissionFromOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier which is added to the organizational customer.
orderApprovalPermissionCode = orderApprovalPermissionCode_example # String | Order approval permission identifier which is removed from the organizational unit user group.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Remove an order approval permission from a specific organizational unit user group
    api_response = api_instance.remove_order_approval_permission_from_org_unit_user_group(orgUnitUserGroupId, orderApprovalPermissionCode, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrderApprovalPermissionFromOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier which is added to the organizational customer.
Required
orderApprovalPermissionCode*
String
Order approval permission identifier which is removed from the organizational unit user group.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgCustomerFromOrgUnitUserGroupMembers

Remove an organizational customer from the organizational unit user group members

Removes an organizational customer from the organizational unit user group members


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members/{orgCustomerId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members/{orgCustomerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be removed from the organizational unit user group members
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgCustomerFromOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgCustomerFromOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be removed from the organizational unit user group members
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgCustomerFromOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgCustomerFromOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgCustomerId = orgCustomerId_example; // Identifier of the organizational customer which will be removed from the organizational unit user group members
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Remove an organizational customer from the organizational unit user group members
[apiInstance removeOrgCustomerFromOrgUnitUserGroupMembersWith:orgCustomerId
    orgUnitUserGroupId:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgCustomerId = orgCustomerId_example; // {{String}} Identifier of the organizational customer which will be removed from the organizational unit user group members
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgCustomerFromOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgCustomerFromOrgUnitUserGroupMembersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgCustomerId = orgCustomerId_example;  // String | Identifier of the organizational customer which will be removed from the organizational unit user group members
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Remove an organizational customer from the organizational unit user group members
                apiInstance.removeOrgCustomerFromOrgUnitUserGroupMembers(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.removeOrgCustomerFromOrgUnitUserGroupMembers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgCustomerId = orgCustomerId_example; // String | Identifier of the organizational customer which will be removed from the organizational unit user group members
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgCustomerFromOrgUnitUserGroupMembers($orgCustomerId, $orgUnitUserGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->removeOrgCustomerFromOrgUnitUserGroupMembers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgCustomerId = orgCustomerId_example; # String | Identifier of the organizational customer which will be removed from the organizational unit user group members
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgCustomerFromOrgUnitUserGroupMembers(orgCustomerId => $orgCustomerId, orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->removeOrgCustomerFromOrgUnitUserGroupMembers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgCustomerId = orgCustomerId_example # String | Identifier of the organizational customer which will be removed from the organizational unit user group members
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Remove an organizational customer from the organizational unit user group members
    api_instance.remove_org_customer_from_org_unit_user_group_members(orgCustomerId, orgUnitUserGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgCustomerFromOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
orgCustomerId*
String
Identifier of the organizational customer which will be removed from the organizational unit user group members
Required
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgUnitUserGroup

Removes the organizational unit user group

Removes the organizational unit user group.


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Removes the organizational unit user group
[apiInstance removeOrgUnitUserGroupWith:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Removes the organizational unit user group
                apiInstance.removeOrgUnitUserGroup(orgUnitUserGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.removeOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitUserGroup($orgUnitUserGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgUnitUserGroup(orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Removes the organizational unit user group
    api_instance.remove_org_unit_user_group(orgUnitUserGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removeOrgUnitUserGroupMembers

Removes all organizational customers in the organizational unit user group members

Removes all organizational customers in the organizational unit user group members which marks the user group disabled until a new member is added


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}/members"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitUserGroupMembers(orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removeOrgUnitUserGroupMembers(orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#removeOrgUnitUserGroupMembers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Removes all organizational customers in the organizational unit user group members
[apiInstance removeOrgUnitUserGroupMembersWith:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeOrgUnitUserGroupMembers(orgUnitUserGroupId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeOrgUnitUserGroupMembersExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Removes all organizational customers in the organizational unit user group members
                apiInstance.removeOrgUnitUserGroupMembers(orgUnitUserGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.removeOrgUnitUserGroupMembers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removeOrgUnitUserGroupMembers($orgUnitUserGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroupMembers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removeOrgUnitUserGroupMembers(orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroupMembers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Removes all organizational customers in the organizational unit user group members
    api_instance.remove_org_unit_user_group_members(orgUnitUserGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->removeOrgUnitUserGroupMembers: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updateOrgUnitUserGroup

Updates the organizational unit user group

Updates the organizational unit user group. Only attributes provided in the request body will be changed.


/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/orgUnitUserGroups/{orgUnitUserGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

import java.io.File;
import java.util.*;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        OrgUnitUserGroup body = ; // OrgUnitUserGroup | 
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnitUserGroup(body, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#updateOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationalUnitUserGroupsApi;

public class OrganizationalUnitUserGroupsApiExample {

    public static void main(String[] args) {
        OrganizationalUnitUserGroupsApi apiInstance = new OrganizationalUnitUserGroupsApi();
        OrgUnitUserGroup body = ; // OrgUnitUserGroup | 
        String orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updateOrgUnitUserGroup(body, orgUnitUserGroupId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationalUnitUserGroupsApi#updateOrgUnitUserGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OrgUnitUserGroup *body = ; // 
String *orgUnitUserGroupId = orgUnitUserGroupId_example; // Organizational unit user group identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

OrganizationalUnitUserGroupsApi *apiInstance = [[OrganizationalUnitUserGroupsApi alloc] init];

// Updates the organizational unit user group
[apiInstance updateOrgUnitUserGroupWith:body
    orgUnitUserGroupId:orgUnitUserGroupId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.OrganizationalUnitUserGroupsApi()
var body = ; // {{OrgUnitUserGroup}} 
var orgUnitUserGroupId = orgUnitUserGroupId_example; // {{String}} Organizational unit user group identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateOrgUnitUserGroup(bodyorgUnitUserGroupIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrgUnitUserGroupExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationalUnitUserGroupsApi();
            var body = new OrgUnitUserGroup(); // OrgUnitUserGroup | 
            var orgUnitUserGroupId = orgUnitUserGroupId_example;  // String | Organizational unit user group identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates the organizational unit user group
                apiInstance.updateOrgUnitUserGroup(body, orgUnitUserGroupId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationalUnitUserGroupsApi.updateOrgUnitUserGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiOrganizationalUnitUserGroupsApi();
$body = ; // OrgUnitUserGroup | 
$orgUnitUserGroupId = orgUnitUserGroupId_example; // String | Organizational unit user group identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updateOrgUnitUserGroup($body, $orgUnitUserGroupId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationalUnitUserGroupsApi->updateOrgUnitUserGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationalUnitUserGroupsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationalUnitUserGroupsApi->new();
my $body = WWW::SwaggerClient::Object::OrgUnitUserGroup->new(); # OrgUnitUserGroup | 
my $orgUnitUserGroupId = orgUnitUserGroupId_example; # String | Organizational unit user group identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updateOrgUnitUserGroup(body => $body, orgUnitUserGroupId => $orgUnitUserGroupId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling OrganizationalUnitUserGroupsApi->updateOrgUnitUserGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationalUnitUserGroupsApi()
body =  # OrgUnitUserGroup | 
orgUnitUserGroupId = orgUnitUserGroupId_example # String | Organizational unit user group identifier
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates the organizational unit user group
    api_instance.update_org_unit_user_group(body, orgUnitUserGroupId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling OrganizationalUnitUserGroupsApi->updateOrgUnitUserGroup: %s\n" % e)

Parameters

Path parameters
Name Description
orgUnitUserGroupId*
String
Organizational unit user group identifier
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 204 - No Content


PaymentDetails

getPaymentDetails

Get customer's credit card payment details.

Returns a customer's credit card payment details for the specified paymentDetailsId.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentDetailsApi;

import java.io.File;
import java.util.*;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.getPaymentDetails(paymentDetailsId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#getPaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentDetailsApi;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetails result = apiInstance.getPaymentDetails(paymentDetailsId, baseSiteId, userId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#getPaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

PaymentDetailsApi *apiInstance = [[PaymentDetailsApi alloc] init];

// Get customer's credit card payment details.
[apiInstance getPaymentDetailsWith:paymentDetailsId
    baseSiteId:baseSiteId
    userId:userId
    fields:fields
              completionHandler: ^(PaymentDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentDetailsApi()
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPaymentDetails(paymentDetailsId, baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentDetailsApi();
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get customer's credit card payment details.
                PaymentDetails result = apiInstance.getPaymentDetails(paymentDetailsId, baseSiteId, userId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.getPaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getPaymentDetails($paymentDetailsId, $baseSiteId, $userId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentDetailsApi->getPaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentDetailsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentDetailsApi->new();
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getPaymentDetails(paymentDetailsId => $paymentDetailsId, baseSiteId => $baseSiteId, userId => $userId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentDetailsApi->getPaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get customer's credit card payment details.
    api_response = api_instance.get_payment_details(paymentDetailsId, baseSiteId, userId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->getPaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


getPaymentDetailsList

Get customer's credit card payment details list.

Return customer's credit card payment details list.


/{baseSiteId}/users/{userId}/paymentdetails

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/paymentdetails?saved=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentDetailsApi;

import java.io.File;
import java.util.*;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Boolean saved = true; // Boolean | Type of payment details.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, saved, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#getPaymentDetailsList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentDetailsApi;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        Boolean saved = true; // Boolean | Type of payment details.
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, saved, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#getPaymentDetailsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Boolean *saved = true; // Type of payment details. (optional) (default to false)
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

PaymentDetailsApi *apiInstance = [[PaymentDetailsApi alloc] init];

// Get customer's credit card payment details list.
[apiInstance getPaymentDetailsListWith:baseSiteId
    userId:userId
    saved:saved
    fields:fields
              completionHandler: ^(PaymentDetailsList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentDetailsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
var opts = { 
  'saved': true, // {{Boolean}} Type of payment details.
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPaymentDetailsList(baseSiteId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPaymentDetailsListExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentDetailsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
            var saved = true;  // Boolean | Type of payment details. (optional)  (default to false)
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Get customer's credit card payment details list.
                PaymentDetailsList result = apiInstance.getPaymentDetailsList(baseSiteId, userId, saved, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.getPaymentDetailsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
$saved = true; // Boolean | Type of payment details.
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getPaymentDetailsList($baseSiteId, $userId, $saved, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentDetailsApi->getPaymentDetailsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentDetailsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentDetailsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
my $saved = true; # Boolean | Type of payment details.
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getPaymentDetailsList(baseSiteId => $baseSiteId, userId => $userId, saved => $saved, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentDetailsApi->getPaymentDetailsList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
saved = true # Boolean | Type of payment details. (optional) (default to false)
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Get customer's credit card payment details list.
    api_response = api_instance.get_payment_details_list(baseSiteId, userId, saved=saved, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->getPaymentDetailsList: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Query parameters
Name Description
saved
Boolean
Type of payment details.
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


removePaymentDetails

Deletes customer's credit card payment details.

Deletes a customer's credit card payment details based on a specified paymentDetailsId.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

curl -X DELETE\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentDetailsApi;

import java.io.File;
import java.util.*;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removePaymentDetails(paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#removePaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentDetailsApi;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.removePaymentDetails(paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#removePaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

PaymentDetailsApi *apiInstance = [[PaymentDetailsApi alloc] init];

// Deletes customer's credit card payment details.
[apiInstance removePaymentDetailsWith:paymentDetailsId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentDetailsApi()
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removePaymentDetails(paymentDetailsId, baseSiteId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removePaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentDetailsApi();
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Deletes customer's credit card payment details.
                apiInstance.removePaymentDetails(paymentDetailsId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.removePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->removePaymentDetails($paymentDetailsId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling PaymentDetailsApi->removePaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentDetailsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentDetailsApi->new();
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->removePaymentDetails(paymentDetailsId => $paymentDetailsId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling PaymentDetailsApi->removePaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Deletes customer's credit card payment details.
    api_instance.remove_payment_details(paymentDetailsId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->removePaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


replacePaymentDetails

Updates existing customer's credit card payment info.

Updates existing customer's credit card payment info based on the payment info ID. Attributes not given in request will be defined again (set to null or default).


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

curl -X PUT\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentDetailsApi;

import java.io.File;
import java.util.*;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replacePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#replacePaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentDetailsApi;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.replacePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#replacePaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PaymentDetails *body = ; // 
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

PaymentDetailsApi *apiInstance = [[PaymentDetailsApi alloc] init];

// Updates existing customer's credit card payment info.
[apiInstance replacePaymentDetailsWith:body
    paymentDetailsId:paymentDetailsId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentDetailsApi()
var body = ; // {{PaymentDetails}} 
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.replacePaymentDetails(bodypaymentDetailsIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class replacePaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentDetailsApi();
            var body = new PaymentDetails(); // PaymentDetails | 
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates existing customer's credit card payment info.
                apiInstance.replacePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.replacePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$body = ; // PaymentDetails | 
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->replacePaymentDetails($body, $paymentDetailsId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling PaymentDetailsApi->replacePaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentDetailsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentDetailsApi->new();
my $body = WWW::SwaggerClient::Object::PaymentDetails->new(); # PaymentDetails | 
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->replacePaymentDetails(body => $body, paymentDetailsId => $paymentDetailsId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling PaymentDetailsApi->replacePaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
body =  # PaymentDetails | 
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates existing customer's credit card payment info.
    api_instance.replace_payment_details(body, paymentDetailsId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->replacePaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


updatePaymentDetails

Updates existing customer's credit card payment details.

Updates an existing customer's credit card payment details based on the specified paymentDetailsId. Only those attributes provided in the request will be updated.


/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}

Usage and SDK Samples

curl -X PATCH\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/users/{userId}/paymentdetails/{paymentDetailsId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentDetailsApi;

import java.io.File;
import java.util.*;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updatePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#updatePaymentDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentDetailsApi;

public class PaymentDetailsApiExample {

    public static void main(String[] args) {
        PaymentDetailsApi apiInstance = new PaymentDetailsApi();
        PaymentDetails body = ; // PaymentDetails | 
        String paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
        try {
            apiInstance.updatePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentDetailsApi#updatePaymentDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
PaymentDetails *body = ; // 
String *paymentDetailsId = paymentDetailsId_example; // Payment details identifier.
String *baseSiteId = baseSiteId_example; // Base site identifier
String *userId = userId_example; // User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

PaymentDetailsApi *apiInstance = [[PaymentDetailsApi alloc] init];

// Updates existing customer's credit card payment details.
[apiInstance updatePaymentDetailsWith:body
    paymentDetailsId:paymentDetailsId
    baseSiteId:baseSiteId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentDetailsApi()
var body = ; // {{PaymentDetails}} 
var paymentDetailsId = paymentDetailsId_example; // {{String}} Payment details identifier.
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var userId = userId_example; // {{String}} User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updatePaymentDetails(bodypaymentDetailsIdbaseSiteIduserId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updatePaymentDetailsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentDetailsApi();
            var body = new PaymentDetails(); // PaymentDetails | 
            var paymentDetailsId = paymentDetailsId_example;  // String | Payment details identifier.
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var userId = userId_example;  // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

            try
            {
                // Updates existing customer's credit card payment details.
                apiInstance.updatePaymentDetails(body, paymentDetailsId, baseSiteId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentDetailsApi.updatePaymentDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentDetailsApi();
$body = ; // PaymentDetails | 
$paymentDetailsId = paymentDetailsId_example; // String | Payment details identifier.
$baseSiteId = baseSiteId_example; // String | Base site identifier
$userId = userId_example; // String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try {
    $api_instance->updatePaymentDetails($body, $paymentDetailsId, $baseSiteId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling PaymentDetailsApi->updatePaymentDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentDetailsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentDetailsApi->new();
my $body = WWW::SwaggerClient::Object::PaymentDetails->new(); # PaymentDetails | 
my $paymentDetailsId = paymentDetailsId_example; # String | Payment details identifier.
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $userId = userId_example; # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

eval { 
    $api_instance->updatePaymentDetails(body => $body, paymentDetailsId => $paymentDetailsId, baseSiteId => $baseSiteId, userId => $userId);
};
if ($@) {
    warn "Exception when calling PaymentDetailsApi->updatePaymentDetails: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentDetailsApi()
body =  # PaymentDetails | 
paymentDetailsId = paymentDetailsId_example # String | Payment details identifier.
baseSiteId = baseSiteId_example # String | Base site identifier
userId = userId_example # String | User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user

try: 
    # Updates existing customer's credit card payment details.
    api_instance.update_payment_details(body, paymentDetailsId, baseSiteId, userId)
except ApiException as e:
    print("Exception when calling PaymentDetailsApi->updatePaymentDetails: %s\n" % e)

Parameters

Path parameters
Name Description
paymentDetailsId*
String
Payment details identifier.
Required
baseSiteId*
String
Base site identifier
Required
userId*
String
User identifier or one of the literals : 'current' for currently authenticated user, 'anonymous' for anonymous user
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


PaymentModes

getPaymentModes

Gets all available payment modes.

Gets all payment modes defined for the base store.


/{baseSiteId}/paymentmodes

Usage and SDK Samples

curl -X GET\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/paymentmodes?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentModesApi;

import java.io.File;
import java.util.*;

public class PaymentModesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        PaymentModesApi apiInstance = new PaymentModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentModeList result = apiInstance.getPaymentModes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentModesApi#getPaymentModes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentModesApi;

public class PaymentModesApiExample {

    public static void main(String[] args) {
        PaymentModesApi apiInstance = new PaymentModesApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            PaymentModeList result = apiInstance.getPaymentModes(baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentModesApi#getPaymentModes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *fields = fields_example; // Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

PaymentModesApi *apiInstance = [[PaymentModesApi alloc] init];

// Gets all available payment modes.
[apiInstance getPaymentModesWith:baseSiteId
    fields:fields
              completionHandler: ^(PaymentModeList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.PaymentModesApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'fields': fields_example // {{String}} Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPaymentModes(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPaymentModesExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PaymentModesApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var fields = fields_example;  // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional)  (default to DEFAULT)

            try
            {
                // Gets all available payment modes.
                PaymentModeList result = apiInstance.getPaymentModes(baseSiteId, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentModesApi.getPaymentModes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiPaymentModesApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

try {
    $result = $api_instance->getPaymentModes($baseSiteId, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentModesApi->getPaymentModes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentModesApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PaymentModesApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $fields = fields_example; # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

eval { 
    my $result = $api_instance->getPaymentModes(baseSiteId => $baseSiteId, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentModesApi->getPaymentModes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PaymentModesApi()
baseSiteId = baseSiteId_example # String | Base site identifier
fields = fields_example # String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL (optional) (default to DEFAULT)

try: 
    # Gets all available payment modes.
    api_response = api_instance.get_payment_modes(baseSiteId, fields=fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentModesApi->getPaymentModes: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
fields
String
Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


Products

countProductStockByLocation

Get header with a total number of product's stock levels.

In the response header, the "x-total-count" indicates the total number of a product's stock levels. The following two sets of parameters are available: location (required); or longitude (required), and latitude (required).


/{baseSiteId}/products/{productCode}/stock

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/products/{productCode}/stock?location=&latitude=&longitude="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

import java.io.File;
import java.util.*;

public class ProductsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ProductsApi apiInstance = new ProductsApi();
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String location = location_example; // String | Free-text location
        Double latitude = 1.2; // Double | Latitude location parameter.
        Double longitude = 1.2; // Double | Longitude location parameter.
        try {
            apiInstance.countProductStockByLocation(productCode, baseSiteId, location, latitude, longitude);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProductStockByLocation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String location = location_example; // String | Free-text location
        Double latitude = 1.2; // Double | Latitude location parameter.
        Double longitude = 1.2; // Double | Longitude location parameter.
        try {
            apiInstance.countProductStockByLocation(productCode, baseSiteId, location, latitude, longitude);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProductStockByLocation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *productCode = productCode_example; // Product identifier
String *baseSiteId = baseSiteId_example; // Base site identifier
String *location = location_example; // Free-text location (optional)
Double *latitude = 1.2; // Latitude location parameter. (optional)
Double *longitude = 1.2; // Longitude location parameter. (optional)

ProductsApi *apiInstance = [[ProductsApi alloc] init];

// Get header with a total number of product's stock levels.
[apiInstance countProductStockByLocationWith:productCode
    baseSiteId:baseSiteId
    location:location
    latitude:latitude
    longitude:longitude
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ProductsApi()
var productCode = productCode_example; // {{String}} Product identifier
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'location': location_example, // {{String}} Free-text location
  'latitude': 1.2, // {{Double}} Latitude location parameter.
  'longitude': 1.2 // {{Double}} Longitude location parameter.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countProductStockByLocation(productCode, baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class countProductStockByLocationExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProductsApi();
            var productCode = productCode_example;  // String | Product identifier
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var location = location_example;  // String | Free-text location (optional) 
            var latitude = 1.2;  // Double | Latitude location parameter. (optional) 
            var longitude = 1.2;  // Double | Longitude location parameter. (optional) 

            try
            {
                // Get header with a total number of product's stock levels.
                apiInstance.countProductStockByLocation(productCode, baseSiteId, location, latitude, longitude);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.countProductStockByLocation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiProductsApi();
$productCode = productCode_example; // String | Product identifier
$baseSiteId = baseSiteId_example; // String | Base site identifier
$location = location_example; // String | Free-text location
$latitude = 1.2; // Double | Latitude location parameter.
$longitude = 1.2; // Double | Longitude location parameter.

try {
    $api_instance->countProductStockByLocation($productCode, $baseSiteId, $location, $latitude, $longitude);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->countProductStockByLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $productCode = productCode_example; # String | Product identifier
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $location = location_example; # String | Free-text location
my $latitude = 1.2; # Double | Latitude location parameter.
my $longitude = 1.2; # Double | Longitude location parameter.

eval { 
    $api_instance->countProductStockByLocation(productCode => $productCode, baseSiteId => $baseSiteId, location => $location, latitude => $latitude, longitude => $longitude);
};
if ($@) {
    warn "Exception when calling ProductsApi->countProductStockByLocation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
productCode = productCode_example # String | Product identifier
baseSiteId = baseSiteId_example # String | Base site identifier
location = location_example # String | Free-text location (optional)
latitude = 1.2 # Double | Latitude location parameter. (optional)
longitude = 1.2 # Double | Longitude location parameter. (optional)

try: 
    # Get header with a total number of product's stock levels.
    api_instance.count_product_stock_by_location(productCode, baseSiteId, location=location, latitude=latitude, longitude=longitude)
except ApiException as e:
    print("Exception when calling ProductsApi->countProductStockByLocation: %s\n" % e)

Parameters

Path parameters
Name Description
productCode*
String
Product identifier
Required
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
location
String
Free-text location
latitude
Double (double)
Latitude location parameter.
longitude
Double (double)
Longitude location parameter.

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


countProducts

Get a header with total number of products.

In the response header, the "x-total-count" indicates the total number of products satisfying a query.


/{baseSiteId}/products/search

Usage and SDK Samples

curl -X HEAD\
\
\
-H "Accept: */*"\
"http://localhost:9001/occ/v2/{baseSiteId}/products/search?query="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

import java.io.File;
import java.util.*;

public class ProductsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        try {
            apiInstance.countProducts(baseSiteId, query);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProducts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
        try {
            apiInstance.countProducts(baseSiteId, query);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#countProducts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_Password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *baseSiteId = baseSiteId_example; // Base site identifier
String *query = query_example; // Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)

ProductsApi *apiInstance = [[ProductsApi alloc] init];

// Get a header with total number of products.
[apiInstance countProductsWith:baseSiteId
    query:query
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CommerceWebservices = require('commerce_webservices');
var defaultClient = CommerceWebservices.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2_Password
var oauth2_Password = defaultClient.authentications['oauth2_Password'];
oauth2_Password.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"

var api = new CommerceWebservices.ProductsApi()
var baseSiteId = baseSiteId_example; // {{String}} Base site identifier
var opts = { 
  'query': query_example // {{String}} Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.countProducts(baseSiteId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class countProductsExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth2_Password
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: oauth2_client_credentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProductsApi();
            var baseSiteId = baseSiteId_example;  // String | Base site identifier
            var query = query_example;  // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional) 

            try
            {
                // Get a header with total number of products.
                apiInstance.countProducts(baseSiteId, query);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.countProducts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2_Password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiProductsApi();
$baseSiteId = baseSiteId_example; // String | Base site identifier
$query = query_example; // String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2

try {
    $api_instance->countProducts($baseSiteId, $query);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->countProducts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

# Configure OAuth2 access token for authorization: oauth2_Password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $baseSiteId = baseSiteId_example; # String | Base site identifier
my $query = query_example; # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2

eval { 
    $api_instance->countProducts(baseSiteId => $baseSiteId, query => $query);
};
if ($@) {
    warn "Exception when calling ProductsApi->countProducts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2_Password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
baseSiteId = baseSiteId_example # String | Base site identifier
query = query_example # String | Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2 (optional)

try: 
    # Get a header with total number of products.
    api_instance.count_products(baseSiteId, query=query)
except ApiException as e:
    print("Exception when calling ProductsApi->countProducts: %s\n" % e)

Parameters

Path parameters
Name Description
baseSiteId*
String
Base site identifier
Required
Query parameters
Name Description
query
String
Serialized query, free text search, facets. The format of a serialized query: freeTextSearch:sort:facetKey1:facetValue1:facetKey2:facetValue2

Responses

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 200 - OK


createProductReview

Creates a new customer review as an anonymous user.

Creates a new customer review as an anonymous user. Review data needs to be provided.


/{baseSiteId}/products/{productCode}/reviews

Usage and SDK Samples

curl -X POST\
\
\
-H "Accept: */*"\
-H "Content-Type: application/json,application/xml"\
"http://localhost:9001/occ/v2/{baseSiteId}/products/{productCode}/reviews?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

import java.io.File;
import java.util.*;

public class ProductsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2_Password
        OAuth oauth2_Password = (OAuth) defaultClient.getAuthentication("oauth2_Password");
        oauth2_Password.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: oauth2_client_credentials
        OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
        oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");

        ProductsApi apiInstance = new ProductsApi();
        Review body = ; // Review | 
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Review result = apiInstance.createProductReview(body, productCode, baseSiteId, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#createProductReview");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        Review body = ; // Review | 
        String productCode = productCode_example; // String | Product identifier
        String baseSiteId = baseSiteId_example; // String | Base site identifier
        String fields = fields_example; // String | Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC,DEFAULT,FULL
        try {
            Review result = apiInstance.createProductR